Process Payment
Create payment requests and subscribe for notifications on payment status.
Retrieve Supported Crypto Currencies and Prices
Call the Orangepill API to receive a list of Ramp accounts and supported crypto currencies.
Use endpoint https://api.orangepill.cloud/v1/accounts?query=:{"type":"ramp"}&fields=asset.
In response you will get the list of Ramp accounts assets.
Display the current price for each currency by calling the Orangepill API to retrieve price data.
Create a Customer Profile
Create a customer profile, ensuring at least the customer's email is set. This email will be used to send successful payment notifications. Optionally, fill in the complete customer profile information.
Call the Orangepill API to check if the customer already exists.
Use endpoint https://api.orangepill.cloud/v1/identities/persons?email=EMAIL
to find customer with specific email.
If the customer doesn't exist, use the Orangepill API to onboard the new customer.
Check documentation on creating new customer.
Create a Payment Request
Call the Orangepill API to create a new Apps.Payment object for the payment request.
As a destination use alias of merchants virtual account.
Display the payment amount in the selected currency and a unique blockchain address where the payment should be made. Show a timer indicating the timespan within which the payment needs to be completed.
Implement Websocket Client for Payment Notifications
Implement a websocket client to listen for notifications on the payment status. When a payment status update is received, process the notification accordingly.
Check documentation on WebSocket subscription.
Last updated