Collecting Payment Information from End-Customer (Stripe)
Overview
The high-level steps for this process are
- Create a customer on Stripe
- Go through the payment flow using Stripe Elements or Stripe.js
- Save the payment method back to MonetizeNow
You can either use the MonetizeNow APIs to complete the entire process, or you can own the entire process and then import the Stripe customer to MonetizeNow.
All of the MonetizeNow APIs require that you know our internal id of the Payment Gateway, you can obtain that from our UI or by calling GET /api/paymentGateways
.
Using the MonetizeNow APIs
You can use the MonetizeNow APIs instead of working with the Stripe APIs directly.
- Create a Stripe Customer
- POST
/api/accounts/{accountId}/paymentGateways/{gatewayId}/gatewayAccount
- If the Stripe customer was previously created when collecting a prior payment, you would use
- GET
/api/accounts/{accountId}/paymentGateways/{gatewayId}/gatewayAccount
- GET
- POST
- Initialized a Setup Intent with Stripe
- POST
/api/paymentGateways/{gatewayId}/gatewayAccounts/{gatewayAccountId}/setupIntent
- POST
- Use the Stripe Elements components to host the Stripe payment collection form on your website
- Once the customer has completed this step successfully, then you will save the payment method back to MonetizeNow
- POST
/api/accounts/{accountId}/paymentMethods
Importing existing payment methods
If you want to work with the Stripe APIs directly, you can call a MonetizeNow API to link an existing Stripe customer and import existing payment methods.
- Go through entire Stripe flow using Stripe APIs
- Create Stripe customer
- Create a Setup Intent or Payment Intent, and ensure it is available for offline_use
- Use the Stripe Elements components to host the Stripe payment collection form on your website
- Import the customer and payment method(s) into MonetizeNow
- POST
/api/accounts/{accountId}/paymentMethods/import
- POST
Updated 5 months ago