v2

latestOpenAPI 3.0.12026-07-26334612609.5 KB
SDK

Start Crypto.com payment

Create a Crypto.com payment and return the payment payload (URL and optional QR code)

post/sdk/{environmentId}/onramps/cryptoDotCom/payment

Path parameters

environmentIdstring required
Example:95b11417-f18f-457f-8804-68e361f9164f

ID of the environment

Request body

amountnumber required

A positive integer representing how much to collect in the smallest currency unit (e.g., 100 cents to collect $1.00). Refer to Pricing Currencies for the smallest unit for each currency.

currencystring required

Three-letter currency code for the payment amount (pricing currency). Must be a supported fiat currency / cryptocurrency. Refer to Pricing Currencies for the currency code.

descriptionstring
metadataobject

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

orderIdstring
subMerchantIdstring
walletAddressstring required

Valid blockchain wallet address, must be an alphanumeric string without any special characters

networkIdstring
chain'ETH' | 'EVM' | 'FLOW' | 'SOL' | 'ALGO' | 'STARK' | 'COSMOS' | 'BTC' | 'ECLIPSE' | 'SUI' | 'SPARK' | 'TRON' | 'APTOS' | 'TON' | 'STELLAR' required
merchantNamestring

Example request

{
  "amount": 100,
  "currency": "USD",
  "description": "An example name",
  "orderId": "An example name",
  "subMerchantId": "An example name",
  "walletAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
  "networkId": "An example name",
  "merchantName": "An example name"
}

Response

Crypto.com payment payload

idstring required
amountnumber required

A positive integer representing how much to collect in the smallest currency unit (e.g., 100 cents to collect $1.00). Refer to Pricing Currencies for the smallest unit for each currency.

currencystring required

Three-letter currency code for the payment amount (pricing currency). Must be a supported fiat currency / cryptocurrency. Refer to Pricing Currencies for the currency code.

amountRefundednumber

Amount in cents refunded (can be less than the amount of the payment if a partial refund was issued).

creatednumber

Time at which the object was created. Measured in seconds since the Unix epoch.

cryptoCurrencystring

The cryptocurrency to be collected for this payment.

cryptoAmountstring

The amount of cryptocurrency to be collected for this payment.

customerIdstring

ID of the customer created in Crypto.com Pay Merchant Dashboard, if exists.

paymentUrlstring required

The URL of the payment page that customers will navigate to in order to make the payment.

qrCodestring required
returnUrlstring

The URL for payment page to redirect back to when the payment becomes succeeded.

cancelUrlstring

The URL for payment page to redirect to when the payment is failed or cancelled.

descriptionstring

An arbitrary string attached to the object.

liveModeboolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

metadataobject

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

orderIdstring

Merchant provided order ID for this payment. Merchants can view the associated order ID of each payment on the Merchant Dashboard. Crypto.com Pay does not verify or guarantee the uniqueness of the values in this field.

recipientstring

The name of the merchant collecting this payment.

refundedboolean

Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.

statusstring required

The status of the payment is either pending (pending payment), succeeded (payment captured), or cancelled.

expiredAtnumber

Time at which the payment expires. Measured in seconds since the Unix epoch.

Example response

{
  "id": "95b11417-f18f-457f-8804-68e361f9164f",
  "amount": 2500,
  "currency": "USD",
  "created": 1555098161,
  "cryptoAmount": "1894.8",
  "customerId": "1234567890",
  "paymentUrl": "https://js.crypto.com/sdk/payments/checkout/set_wallet?publishableKey=XXX&sdkMeta=YYY",
  "returnUrl": "http://YOUR_WEBSITE.com/orders/123/complete",
  "cancelUrl": "http://YOUR_WEBSITE.com/orders/123/fail",
  "description": "Crypto.com Tee (Unisex)",
  "orderId": "640cf83d-a316-4030-9878-71be1d98b737",
  "recipient": "Crypto.com Shop",
  "status": "pending",
  "expiredAt": 1555098461
}