# 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](/smartapps/exchange-rates.md#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](/orangepill-api/persons-and-companies.md#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](/smartapps/accept-blockchain-payments.md) 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](/websocket-subscriptions.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.orangepill.cloud/tutorials/crypto-payments-processor/process-payment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
