Stablecoin-to-Fiat (Crypto Off-Ramp)

📘

Funding methods

For an explainer on the difference between a payment with vs. without source account ID, visit the Payments page.

Stablecoin to Fiat 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 or an External Account that allows pulling).

📘

Sandbox

In sandbox, there are two ways to get testnet USDC in your Virtual Digital Asset Wallet:

  1. Use the official testnet faucet: https://faucet.circle.com/
  2. Cancel a payment (this will automatically refund the USDC wallet)

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": "USDC",
    "amount": 100,
    "rail": "CRYPTO",
    "chain": "POLYGON",
    "accountId": "cm3zbgjxe000hr8cqmm3v384e"
  },
  "destination": {
    "currencyCode": "PHP",
    "rail": "LOCAL",
    "accountId": "cm3zbgjxe000hr8cqmm3v384e"
  },
  "comment": "Test USDC to PHP payment",
  "memo": "For testing purposes",
  "paymentReason": "Testing fiat to crypto payment"
}'
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": "USDC",
    "rail": "CRYPTO",
    "chain": "POLYGON",
    "amount": 100,
    "accountId": "cm3zbgjxe000hr8cqmm3v384e"
  },
  "destination": {
    "currencyCode": "BRL",
    "rail": "LOCAL",
    "accountId": "cm3zbgjxe000hr8cqmm3v384e"
  },
  "comment": "Test USDT to BRL payment",
  "memo": "For testing purposes",
  "paymentReason": "Testing fiat to crypto payment",
  "sourceOfFunds": "PERSONAL_ACCOUNT"
}'

Stablecoin to Fiat without Source Entity Account Id

When sending a payment without a source.accountId, the response will include the funding instructions for the customer to fund the payment. All payments of this type have a 5 minute window for the customer to send the funds.

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": "USDC",
    "amount": 100,
    "rail": "CRYPTO",
    "chain": "POLYGON",
    "fromAddress": "0x388C818CA8B9251b393131C08a736A67ccB19297"
  },
  "destination": {
    "currencyCode": "PHP",
    "rail": "LOCAL",
    "accountId": "cm3zbgjxe000hr8cqmm3v384e"
  },
  "comment": "Test USDC to PHP payment",
  "memo": "For testing purposes",
  "paymentReason": "Testing fiat to crypto payment"
}'
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": "USDC",
    "amount": 100,
    "rail": "CRYPTO",
    "chain": "POLYGON",
    "fromAddress": "0x388C818CA8B9251b393131C08a736A67ccB19297"
  },
  "destination": {
    "currencyCode": "BRL",
    "rail": "LOCAL",
    "accountId": "cm3zbgjxe000hr8cqmm3v384e"
  },
  "comment": "Test USDC to BRL payment",
  "memo": "For testing purposes",
  "paymentReason": "Testing fiat to crypto payment"
}'

Response

Notice that the response here includes a fundingInstructions object with the details required to fund the payment

{
    "id": "cm40pxvdo0005xnyhgkr54uvk",
    "createdAt": "2024-11-28T02:51:50.173Z",
    "updatedAt": "2024-11-28T02:51:50.173Z",
    "status": "AWAITING_FUNDS",
    "comment": "Test USDC to PHP payment",
    "paymentReason": "Testing fiat to crypto payment",
    "source": {
        "rail": "CRYPTO",
        "chain": "POLYGON",
        "fromAddress": "0x388C818CA8B9251b393131C08a736A67ccB19297",
        "currencyCode": "USDC"
    },
    "destination": {
        "rail": "LOCAL",
        "currencyCode": "PHP",
        "accountId": "cm3zbgjxe000hr8cqmm3v384e"
    },
    "fundingInstructions": {
        "amount": 100,
        "currencyCode": "USDC",
        "rail": "CRYPTO",
        "fromAddress": "0x388C818CA8B9251b393131C08a736A67ccB19297",
        "toAddress": "0x12345678900987654321234567890",
        "chain": "Example Chain"
    }
}
{
    "id": "cm40pxvdo0005xnyhgkr54uvk",
    "createdAt": "2024-11-28T02:51:50.173Z",
    "updatedAt": "2024-11-28T02:51:50.173Z",
    "status": "AWAITING_FUNDS",
    "comment": "Test USDC to BRL payment",
    "paymentReason": "Testing fiat to crypto payment",
    "source": {
        "rail": "CRYPTO",
        "chain": "POLYGON",
        "fromAddress": "0x388C818CA8B9251b393131C08a736A67ccB19297",
        "currencyCode": "USDC"
    },
    "destination": {
        "rail": "LOCAL",
        "currencyCode": "BRL",
        "accountId": "cm3zbgjxe000hr8cqmm3v384e"
    },
    "fundingInstructions": {
        "amount": 100,
        "currencyCode": "USDT",
        "rail": "CRYPTO",
        "fromAddress": "0x388C818CA8B9251b393131C08a736A67ccB19297",
        "toAddress": "0x12345678900987654321234567890",
        "chain": "Example Chain"
    }
}

Country Specific Requirements

  • Payments to CN, BR (B2B over 50,000 BRL only), GH, and IN (depending on the provider) require a file to be attached that explains the purpose of the payment (e.g., an invoice, a salary stipend)
  • Payments to individuals IN (depending on the provider) require a document reference
  • IDR and NGN have a $2 minimum requirement. This means that post Walapay rates being applied, the IDR or NGN the recipient will receive is greater than or equal to the $2
  • INR has a 10 INR minimum requirement