Step 2: Creating a Stablecoin Payout
When creating a payout, there are two possible flows:
- You already know the crypto address of the destination of the payout and can enter it on the API call.
- You don't know the crypto address of the destination of the payout, and will redirect the user to the hosted page to collect it.
For this guide, we will focus on the elements specific to the Embedded Model. Please see the Creating a payout guide to gain a general understanding of the Payout API.
Making the request
Here's an example payout request using the Create payment endpoint in the Embedded Model.
Please note two specifics for the Embedded Model
The
flow
key - To indicate that payouts are being done on behalf of Embedded Partner Customers.The
embeddedCustomerDetails
Object - To specify the exact Embedded Partner Customer.
{
"merchantId": "7a12944d-d422-4218-9ff6-a0be0a1554a6",
"amount": 1000,
"currency": "USD",
"reference": "REF777579",
"type": "OUT",
"returnUrl": "https://my-return-url.com",
"customerId": "1289702",
"flow": "EMBEDDED_CRYPTO",
"payOutDetails": {
"currency": "USDC",
"code": "crypto",
"address": "0xca3b0670d63f4faa1a876efce4c471fb41abf124",
"protocol": "ERC20"
},
"complianceDetails": {
"requesterIpAddress": "77.71.188.87",
"partyDetails": [
{
"type": "BENEFICIARY",
"entityType": "INDIVIDUAL",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1984-06-30",
"relationshipType": "THIRD_PARTY",
"countryCode": "DE"
}
]
},
"embeddedCustomerDetails": {
"reference": "a7e21c62-27b8-4b3b-b51e-eb10edeb1731"
}
}
Please see the Creating a payout guide to go through the details you'll will need to supply in the payout request. Here we will just highlight the specific fields required for the Embedded Model.
Parameter | Type | Description |
---|---|---|
flow | string | Is required to indicate payments on behalf of Embedded Partner Customers. Possible values: EMBEDDED_CRYPTO |
embeddedCustomerDetails.reference | string | Specifies on behalf of which Embedded Partner Customer the payment should be initiated from. Please see Retrieve Embedded Partner Customer Details on how to retrieve the reference or grab it from the Customer section in the Merchant Portal. Example value: a7e21c62-27b8-4b3b-b51e-eb10edeb1731 |
Flow of Funds
The EMBEDDED_CRYPTO
parameter will signal the system to follow the below flow of funds. All steps are automated and will be executed within seconds.
Updated 8 days ago