Payment Intent API

The Payment Intent API allows users to purchase crypto using fiat currency (e.g., buy USDT by paying in EUR). Payments are made via bank transfer.

Once the payment is completed, the purchased crypto is sent to the wallet specified during order registration.

The API also supports KYC verification for new users if required.

Create a new Payment Intent

This method allow to register a new payment intent.

A Payment Intent records a user's intent to purchase a specified amount of crypto and pay for it using fiat. Either the crypto amount or the fiat amount is defined during the creation of the Payment Intent.

For example, if a user wants to buy €1000 worth of BTC, the system will automatically calculate the corresponding BTC amount. Similarly, if the user wants to purchase 0.01 BTC, the system will determine the required fiat amount to complete the purchase.

Therefore, it is not necessary to provide both values. If both the crypto and fiat amounts are sent via the API, the system will prioritize the fiat amount and recalculate the crypto amount accordingly.

The fiat or crypto amounts calculated by the system can be retrieved through the payment instructions API call. This allows users to review and confirm the final amounts before proceeding with the payment.

If the user is required to complete the KYC process before purchasing crypto, this API call will return a URL where they can complete the verification. Additionally, a callback URL can be specified so that, once the KYC process is successfully completed, the user is redirected back to continue the purchase process.

The API call will return three values:

  1. A Payment Intent ID to reference in subsequent API calls.

  2. A status:

    • 2 if the user needs to complete the KYC process.

    • 3 if everything is ready for payment.

  3. A KYC URL (if required) where the user can complete the verification process.

To call the API, it is essential to include the x-api-key header.

Additionally, the storeId value, which is unique per client, must be specified for the API request to function correctly.

Both values are provided by AhoraCrypto.

Get Payment Instructions

Once the Payment Intent has been registered and the payment is ready—either because the returned status was 3 (Ready for Payment) or the user has successfully completed the KYC process

To call the API, it is essential to include the x-api-key header.

We can retrieve the payment instructions by calling the following method:

Last updated