Skip to main content
POST
/
sdk
/
{environmentId}
/
onramps
/
cryptoDotCom
/
payment
Start Crypto.com payment
curl --request POST \
  --url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/onramps/cryptoDotCom/payment \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 100,
  "currency": "USD",
  "walletAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
  "chain": "ETH",
  "description": "An example name",
  "metadata": {},
  "orderId": "An example name",
  "subMerchantId": "An example name",
  "networkId": "An example name",
  "merchantName": "An example name"
}
'
{
  "id": "95b11417-f18f-457f-8804-68e361f9164f",
  "amount": 2500,
  "currency": "USD",
  "paymentUrl": "https://js.crypto.com/sdk/payments/checkout/set_wallet?publishableKey=XXX&sdkMeta=YYY",
  "qrCode": "<string>",
  "status": "pending",
  "amountRefunded": 0,
  "created": 1555098161,
  "cryptoCurrency": "<string>",
  "cryptoAmount": "1894.8",
  "customerId": "1234567890",
  "returnUrl": "http://YOUR_WEBSITE.com/orders/123/complete",
  "cancelUrl": "http://YOUR_WEBSITE.com/orders/123/fail",
  "description": "Crypto.com Tee (Unisex)",
  "liveMode": false,
  "metadata": {},
  "orderId": "640cf83d-a316-4030-9878-71be1d98b737",
  "recipient": "Crypto.com Shop",
  "refunded": false,
  "expiredAt": 1555098461
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

environmentId
string
required

ID of the environment

Required string length: 36
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

Body

application/json
amount
number
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.

Example:

100

currency
string
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.

Example:

"USD"

walletAddress
string
required

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

Maximum string length: 255
Example:

"0xbF394748301603f18d953C90F0b087CBEC0E1834"

chain
enum<string>
required
Available options:
ETH,
EVM,
FLOW,
SOL,
ALGO,
STARK,
COSMOS,
BTC,
ECLIPSE,
SUI,
SPARK,
TRON,
APTOS,
TON
description
string
Maximum string length: 255
Example:

"An example name"

metadata
object

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.

orderId
string
Maximum string length: 50
Example:

"An example name"

subMerchantId
string
Maximum string length: 255
Example:

"An example name"

networkId
string
Maximum string length: 50
Example:

"An example name"

merchantName
string
Maximum string length: 255
Example:

"An example name"

Response

Crypto.com payment payload

id
string
required
Required string length: 36
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

amount
number
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.

Example:

2500

currency
string
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.

Example:

"USD"

paymentUrl
string
required

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

Example:

"https://js.crypto.com/sdk/payments/checkout/set_wallet?publishableKey=XXX&sdkMeta=YYY"

qrCode
string
required
status
string
required

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

Example:

"pending"

amountRefunded
number

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

Example:

0

created
number

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

Example:

1555098161

cryptoCurrency
string

The cryptocurrency to be collected for this payment.

cryptoAmount
string

The amount of cryptocurrency to be collected for this payment.

Example:

"1894.8"

customerId
string

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

Example:

"1234567890"

returnUrl
string

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

Example:

"http://YOUR_WEBSITE.com/orders/123/complete"

cancelUrl
string

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

Example:

"http://YOUR_WEBSITE.com/orders/123/fail"

description
string

An arbitrary string attached to the object.

Example:

"Crypto.com Tee (Unisex)"

liveMode
boolean

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

Example:

false

metadata
object

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.

orderId
string

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.

Example:

"640cf83d-a316-4030-9878-71be1d98b737"

recipient
string

The name of the merchant collecting this payment.

Example:

"Crypto.com Shop"

refunded
boolean

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

Example:

false

expiredAt
number

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

Example:

1555098461