Stripe
Last updated
Last updated
The Stripe service allows you to accept payments in your app using the Stripe payment services.
Stripe API keys come in pairs:
Publishable Key: This is meant for use within the pages of your app.
Secret Key: Used in your app's Zingy Cloud backend.
Now, there are two distinct sets of these keys:
Test mode: Used to test your app's integration with Stripe. The Page Editor's preview feature will use the test mode when using this service.
Live mode: Used in the live version of the app.
NOTE: Use the test credit card numbers to accept payments in test mode.
NOTE: All profile settings are encrypted and stored in Zingy's cloud infrastructure.
Enter the test mode publishable key here.
Enter the test mode secret key here.
Enter the live mode publishable key here.
Enter the live mode secret key here.
Enter the 3 letter ISO currency code associated with your account. Please note that this must be a Stripe supported currency.
If not provided the default value of usd will be used.
The Stripe Payment widget element provides a quick and easy way to add payment functionality to any page or form. This element makes use of the Stripe service.
The Execute Connection Command block is available in both Page Flow and Cloud Flow. Using this block you can add logic to trigger the operations/commands supported by the Stripe service.
In Stripe, a Payment Intent represents an attempt to collect payment from a customer. Normally the process of creating a payment intent is automatically done if you use the Stripe Payment widget element with a specified configured amount.
For custom implementations using Page Flow and Cloud Flow, you can use the Create Payment Intent command to create the payment intent.
When invoking this operation, an object with the following properties is required:
customProps
Optional. For advanced users, this specifies an object with properties based on parameters used by Stripe's API.
Upon success, the operation provides an object with the following properties:
Once a payment intent is created, the Stripe's payment payment collection form can be presented to the user. The Stripe Payment widget element automatically does this.
For any custom implementation, where you present Stripe's payment payment collection form yourself, once the user finalizes the payment, Zingy's cloud backend can retrieve the confirmation details and record the transaction in the Connection Data for the service.
The Confirm Payment Intent command informs Zingy's cloud backend that the payment procedure has concluded, prompting the backend to register the payment details.
When invoking this operation, an object with the following properties is required:
sgInstName
Optional. Name of the Sendgrid service connection to use for automatically sending the user a payment receipt email.
notfnEmail
Optional. The email address where an automatic payment notification email is sent. Valid only if sgInstName is provided and sendNotfn is set to true.
emailCust
Optional. If the value is true, an automatic email receipt will be sent to the customer based on information retrieved from Stripe's payment confirmation. Valid only if sgInstName is provided.
sendNotfn
Optional. If the value is true, and a valid notfnEmail is provided, a notification will be sent.
The Confirm Payment Intent command does not provide any output beyond the Success/Fail status.
In your app's Cloud Flow Web Hooks and Background Tasks, the Custom Code block can be used to access and implement advanced functionality related to the Stripe payment service.
To access the Stripe client initialized with credentials saved on this Stripe service connection, see the following example:
You may also initialize a seperate Stripe client, by specifying account credentials directly:
After the stripe
object is initialized, you can use it to call into the Stripe library. Refer to Stripe library documentation for more information.