Stripe Payment Use Case
  • 27 Feb 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Stripe Payment Use Case

  • Dark
    Light
  • PDF

Article summary

Imagine a scenario where two parties are eager to exchange an on-chain asset seamlessly, with the swiftness of a digital transaction. The exchange is on-chain whereas the payment is off-chain.

This is where the dynamic synergy of Stripe, a Web 2 payment processor, and Silent Data [Oracle], the oracle to bridging Web2 and Web3 technologies, comes into play.

In this article, we delve into a compelling use case that illustrates how this partnership enables a frictionless transfer of assets by integrating your Stripe account directly into a smart contract. Welcome to a new era of blockchain innovation, where traditional finance meets the limitless potential of the blockchain world.

How to configure the Silent Data [Oracle] Job you need for the Stripe Event API
In this video, the user can check how to configure the Job on Silent Data [Oracle] to use in this use case.
Please refer to the guide How To for all the steps, for this one we have the following configuration:
Trigger
Type: HTTPS (Webhook)
Format: JSON
Step

  • Request #1
    Format: JSON
    Method:GET
    Endpoint: https://api.stripe.com/v1/events/TRIGGER.data.eventId*
    Headers: {"Authorization":"Bearer ${SECRETS.STRIPE_KEY}"}

  • Attestation #1
    Rule source*: “${data.status}”
    Rule operator*: "=="
    Rule target*: “succeeded”

*note: there are some differences with the video

Publish the job and connect with Stripe
In this video, the job is published, and the Silent Data [Oracle] URL is used to listen to all the Stripe payment events. The job will be triggered by listening to events, happening on Stripe, related to payment of the designated Account.
Now we are all set to trigger the job. First, we simulate a payment on Stripe, as mentioned above, that will create payment events on Stripe. And Silent Data [Oracle] will be triggered and check if the status of the payment is completed.

Results of a triggered Job on Silent Data [Oracle]
Once the job is completed, the configured callback contract is triggered, and the user can see the transaction happening on this contract.
To show this in the video, we used Etherscan and added the callback contract address.

Once the job is completed, the user can also see the transaction and the status on the Silent Data [Oracle] App.


Was this article helpful?

What's Next