Skip to main content
Layer1

(Optional) Pre-selecting the digital asset to receive

To streamline the process of redirecting end users directly to the payment address page for digital asset transactions, utilize the Create Payment endpoint, incorporating payOutDetails.

Below are the details required for the create payment request that bypasses the digital asset selection stage. Set type to OUT, and use the Merchant ID from the Merchant Details page as merchantId. Set payOutDetails.currency to the digital asset the end-user receives to skip the selection screen; if that asset supports multiple protocols, also set payOutDetails.protocol. Leave payOutDetails out to let the end-user choose.

Example Request​

Here is how an example request might look:

Example Request
{
"currency": "EUR",
"amount": 10,
"reference": "a0c95e46-28f6-403d-a612-735ff21bd38f",
"merchantId": "ce3fe53f-2461-46d7-9e8a-0e58003cd358",
"expiryMinutes": 20,
"returnUrl": "https://yourwebsitename.com",
"type": "OUT",
"payOutDetails": {
"code": "crypto",
"currency": "USDT",
"protocol": "ERC20",
"address": "0x84A4a239805d06c685219801B82BEA7c76702215"
}
}

Example Response​

Upon successfully submitting the request, you'll receive a response like the following:

Response
Example Response
{
"metadata": {},
"uuid": "11db7d1b-97cf-4e71-ac73-ef9e8e505331",
"merchantDisplayName": "USDT wallet",
"merchantId": "ce3fe53f-2461-46d7-9e8a-0e58003cd358",
"dateCreated": 1750171656561,
"expiryDate": 1750172856561,
"quoteExpiryDate": 1750172856561,
"acceptanceExpiryDate": 1750171686592,
"quoteStatus": "ACCEPTED",
"reference": "a0c95e46-28f6-403d-a612-735ff21bd38f",
"type": "OUT",
"subType": "merchantPayOut",
"status": "PROCESSING",
"displayCurrency": {
"currency": "EUR",
"amount": 10,
"actual": 0
},
"walletCurrency": {
"currency": "USDT",
"amount": 11.57236634640142803,
"actual": 11.57236634640142803
},
"paidCurrency": {
"currency": "USDT",
"amount": 11.57236634640142803,
"actual": 0
},
"feeCurrency": {
"currency": "USDT",
"amount": 0.381888089039204284,
"actual": 0
},
"displayRate": {
"base": "USDT",
"counter": "EUR",
"rate": 0.864127525866
},
"exchangeRate": {
"base": "USDT",
"counter": "USDT",
"rate": 1
},
"address": {
"address": "0x84A4a239805d06c685219801B82BEA7c76702214",
"tag": "",
"protocol": "ERC20",
"uri": "ethereum:0xdac17f958d2ee523a2206206994597c13d831ec7/transfer?address=0x84A4a239805d06c685219801B82BEA7c76702214&uint256=11572366",
"alternatives": []
},
"returnUrl": "https://yourwebsitename.com",
"redirectUrl": "https://pay.sandbox.layer1.com/payout/11db7d1b-97cf-4e71-ac73-ef9e8e505331",
"transactions": [],
"refund": null,
"refunds": []
}

Key takeaways include the uuid for payment queries and the redirectURL for directing the end-user to the Hosted Payments Page, bypassing the first digital asset selection screen if payOutDetails.currency is provided.

This setup ensures a tailored payment experience, directly linking to the specified payment address. All Exchange rates are now provided given that the payment currency is known at the time the payment is created.

Next, see Listening for payout webhooks.

Was this page helpful?