OutSystems Developer Cloud (ODC) is a cloud-native app development platform that provides a modular, scalable environment in which you develop and deploy your apps. With ODC you can build and deploy enterprise-grade, mission-critical apps in weeks. You can build web apps, web portals, mobile apps, and business workflows faster than with traditional development tools. You can then deploy your apps in a scalable, secure, and high-performance environment.
This connector has two parts:
- A custom code extension : Stripe_ExternalLogic
- A library that uses the underlying custom code extension: Stripe Connector (Black Belt Edition)
The connector provides the following functionality (as of now):
- CreateCheckoutSession
- CreateCustomer
- CreatePaymentIntent
- CreateRefund
- CreateSubscription
- GetCharges
- RetrieveSubscriptionsWithDetails
- RetrieveSubscriptionDetails
- RetrieveSubscription
- SearchCustomer
- UpdateCustomer
There is also a operational support API to discover the unique build number for this connector so that any bugs discovered can be reported against this unique build number. The API is
- GetBuildInfo
To use this component correctly, you should have a Stripe account setup and you should have created the needed API key via Developer dashboard. Note that the secret key is the one to be used in the ODC Stripe Connector library configuration. For now, please take note of the value of the secret key found in your Stripe Developer dashboard.
Without the correct API key, you will not be able to connect to Stripe publicly exposed service. This API key uniquely identify you to that service.
You can install the connector through ODC Forge.
You should install both the custom code extension as well as the Stripe Connector (Black Belt Edition) library.
Firstly, add the Stripe Connector (Black Belt Edition) library to your application as shown below.
Depending whether you want to use all the APIs, you can selectively add the needed APIs (or removed unused ones automatically later).
The Stripe Connector (Black Belt Edition) library requires a setting STRIPE_API_KEY to be configured. As your application uses this library, the value of STRIPE_API_KEY can be configured in ODC portal as a secret. Refer to the screenshot below as an example of where to find the STRIPE_API_KEY for your application
A Checkout Session represents your customer's session as they pay for one-time purchases or subscriptions through Checkout or Payment Links. We recommend creating a new Session each time your customer attempts to pay.
Once payment is successful, the Checkout Session will contain a reference to the Customer, and either the successful PaymentIntent or an active Subscription.
You can create a Checkout Session on your server and redirect to its URL to begin Checkout.
NOTE: The customer ID is an optional field. However, it is recommended to supply it.
A PaymentIntent guides you through the process of collecting a payment from your customer. It is recommended that you create exactly one PaymentIntent for each order or customer session in your system. You can reference the PaymentIntent later to see the history of payment attempts for a particular session.
A PaymentIntent tracks the customer’s payment lifecycle, keeping track of any failed payment attempts and ensuring the customer is only charged once. The CreatePaymentIntent API returns the PaymentIntent’s client secret in the response to finish the payment on the client.
You can create a Payment Intent for a customer as shown in the sample flow below.
Kindly submit your bug report here and do indicate the build number of the library which you are using too.
You can reach out to me via email at paul.ho@outsystems.com