# Process Payment

## **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](https://docs.orangepill.cloud/smartapps/exchange-rates#get-price).

## &#x20;**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](https://docs.orangepill.cloud/orangepill-api/persons-and-companies#create-person-and-identity) 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-customer-profile).

## **Create a Payment Request**

Call the Orangepill API to create a new [Apps.Payment](https://docs.orangepill.cloud/smartapps/accept-blockchain-payments) 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](https://docs.orangepill.cloud/websocket-subscriptions).
