Fiat-to-Stablecoin (Crypto On-Ramp)
Funding methods
For an explainer on the difference between a payment with vs. without source account ID, visit the Payments page.
Fiat to Stablecoin with Source Account ID
When sending a payment with a source.accountId, we will automatically pull funds from this account to fund the payment (as long as the Account is a Virtual Account).
Request
curl --request POST \
--url 'https://sandbox-api.walapay.io/v1/payments/<customerId>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'X-Api-Key: fa15de08-f1af-4c41-a74b-2302b6785c13' \
--header 'X-Idempotency-Key: ced13348-d16d-4310-aa07-b3264cb00bc4' \
--data '{
"source": {
"currencyCode": "PHP",
"amount": 100,
"accountId": "cm3zbgjxe000hr8cqmm3v384e" // Virtual Account
},
"destination": {
"currencyCode": "USDC",
"rail": "CRYPTO",
"accountId": "d15d4441-bba9-48d2-8cb4-cb9d0273ac51" //Virtual Account ID
},
"comment": "Test PHP to USDC payment",
"memo": "For testing purposes",
"paymentReason": "Testing fiat to crypto payment",
"sourceOfFunds": "PERSONAL_ACCOUNT"
}'
curl --request POST \
--url 'https://sandbox-api.walapay.io/v1/payments/<customerId>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'X-Api-Key: fa15de08-f1af-4c41-a74b-2302b6785c13' \
--header 'X-Idempotency-Key: ced13348-d16d-4310-aa07-b3264cb00bc4' \
--data '{
"source": {
"currencyCode": "BRL",
"amount": 100,
"accountId": "c202409241621308758eb7c1970159"
},
"destination": {
"currencyCode": "USDT",
"rail": "CRYPTO",
"accountId": "d15d4441-bba9-48d2-8cb4-cb9d0273ac51"
},
"comment": "Test BRL to USDT payment",
"memo": "For testing purposes",
"paymentReason": "Testing fiat to crypto payment",
"sourceOfFunds": "PERSONAL_ACCOUNT"
}'
Fiat to Stablecoin without Source Account ID
When sending a payment without a source.accountId, the response will include the funding instructions for the customer to fund the payment.
Generally, payments of this type have a 5 minute window for the customer to send the funds. Exceptions have been noted in the Country Specific Requirements section.
Request
curl --request POST \
--url 'https://sandbox-api.walapay.io/v1/payments/<customerId>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'X-Api-Key: fa15de08-f1af-4c41-a74b-2302b6785c13' \
--header 'X-Idempotency-Key: ced13348-d16d-4310-aa07-b3264cb00bc4' \
--data '{
"source": {
"currencyCode": "PHP",
"amount": 100,
"rail": "LOCAL"
},
"destination": {
"currencyCode": "USDC",
"rail": "CRYPTO",
"accountId": "d15d4441-bba9-48d2-8cb4-cb9d0273ac51"
},
"comment": "Test PHP to USDC payment",
"memo": "For testing purposes",
"paymentReason": "Testing fiat to crypto payment",
"sourceOfFunds": "PERSONAL_ACCOUNT"
}'
curl --request POST \
--url 'https://sandbox-api.walapay.io/v1/payments/<customerId>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'X-Api-Key: fa15de08-f1af-4c41-a74b-2302b6785c13' \
--header 'X-Idempotency-Key: ced13348-d16d-4310-aa07-b3264cb00bc4' \
--data '{
"source": {
"currencyCode": "BRL",
"amount": 100,
"rail": "LOCAL"
},
"destination": {
"currencyCode": "USDT",
"rail": "CRYPTO",
"accountId": "d15d4441-bba9-48d2-8cb4-cb9d0273ac51"
},
"comment": "Test BRL to USDT payment",
"memo": "For testing purposes",
"paymentReason": "Testing fiat to crypto payment",
"sourceOfFunds": "PERSONAL_ACCOUNT"
}'
Response
Notice that the response here includes a fundingInstructions object with the details required to fund the payment.
{
"id": "cm40psd0g0001xnyhdy6nmzmj",
"createdAt": "2024-11-28T02:47:33.088Z",
"updatedAt": "2024-11-28T02:47:33.088Z",
"status": "AWAITING_FUNDS",
"comment": "Test PHP to USDC payment",
"paymentReason": "Testing fiat to crypto payment",
"sourceOfFunds": "PERSONAL_ACCOUNT",
"source": {
"rail": "LOCAL",
"currencyCode": "PHP"
},
"destination": {
"rail": "CRYPTO",
"currencyCode": "USDC",
"accountId": "cm3zbgjxe000hr8cqmm3v384e"
},
"fundingInstructions": {
"amount": 100,
"currencyCode": "PHP",
"depositMessage": "sourceFundingMessage-cm40psd0g0001xnyhdy6nmzmj",
"rail": "LOCAL",
"bankName": "Example Bank Name",
"bankAccountNumber": "Example Bank Account Number",
"bankBeneficiaryName": "Example Beneficiary Name"
}
}
{
"id": "cm40psd0g0001xnyhdy6nmzmj",
"createdAt": "2024-11-28T02:47:33.088Z",
"updatedAt": "2024-11-28T02:47:33.088Z",
"status": "AWAITING_FUNDS",
"comment": "Test BRL to USDT payment",
"paymentReason": "Testing fiat to crypto payment",
"sourceOfFunds": "PERSONAL_ACCOUNT",
"source": {
"rail": "LOCAL",
"currencyCode": "BRL"
},
"destination": {
"rail": "CRYPTO",
"currencyCode": "USDT",
"accountId": "cm3zbgjxe000hr8cqmm3v384e"
},
"fundingInstructions": {
"amount": 100,
"currencyCode": "BRL",
"rail": "LOCAL",
"pixCode": "00020101021226860014br.gov.bcb.pix2557brcode.example.com/v2/f256bdd942094a4f9f60d798421092455204000053039865802BR5915Inc.6010Vila Velha62070503***63045F59"
}
}
Country Specific Requirements
For some countries, the fundingInstructions object will contain a depositMessage that should be included in the transaction sent to fund the payment. Failure to do so will prevent Walapay's auto-matching system from properly crediting your customer and completing the payment. Walapay will reach out to you about unmatched deposits to figure out how to resolve these situations and handle it together. Certain banks don't have enough characters to input the entire deposit message. Tell your customer to put in as much as they can.
United States
- For a wire, the depositMessage must be the wire memo on the wire
- For ACH, the depositMessage must be in the description of the transaction
- These payments do not have expiry times since there is no FX conversion involved
EU (SEPA)
- For a SEPA transfer, the depositMessage must be in the description of the transaction
Nigeria
- For payments without a source account ID, the end-user has 30 minutes to fund the payment
- The minimum payin must be equal to 5 USD
Mexico
- Only one payin can be active (i.e., not already funded) at a time. If you would like to create a new one, you must first cancel the previous one
- Rates can only be guaranteed during EST trading hours
Updated 4 days ago