Stablecoin-to-Fiat (Crypto Off-Ramp)

Stablecoin to Fiat with Source Account Id

When sending a payment with a source accountId, the payment 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).

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,
    "accountId": "cm3zbgjxe000hr8cqmm3v384e"
  },
  "destination": {
    "currencyCode": "PHP",
    "rail": "LOCAL",
    "accountId": "cm3zbgjxe000hr8cqmm3v384e"
  },
  "comment": "Test BRL to USDT 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": "USDC",
    "amount": 100,
    "accountId": "cm3zbgjxe000hr8cqmm3v384e"
  },
  "destination": {
    "currencyCode": "PHP",
    "rail": "LOCAL",
    "accountId": "cm3zbgjxe000hr8cqmm3v384e"
  },
  "comment": "Test BRL to USDT 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 entityAccountId, the response will include the funding instructions for you to deposit Fiat.

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

Response

{
    "id": "cm40pxvdo0005xnyhgkr54uvk",
    "createdAt": "2024-11-28T02:51:50.173Z",
    "updatedAt": "2024-11-28T02:51:50.173Z",
    "status": "AWAITING_FUNDS",
    "comment": "Test BRL to USDT payment",
    "paymentReason": "Testing fiat to crypto payment",
    "sourceOfFunds": "PERSONAL_ACCOUNT",
    "source": {
        "rail": "CRYPTO",
        "chain": "EVM",
        "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 BRL to USDT payment",
    "paymentReason": "Testing fiat to crypto payment",
    "sourceOfFunds": "PERSONAL_ACCOUNT",
    "source": {
        "rail": "CRYPTO",
        "chain": "EVM",
        "fromAddress": "0x388C818CA8B9251b393131C08a736A67ccB19297",
        "currencyCode": "USDT"
    },
    "destination": {
        "rail": "LOCAL",
        "currencyCode": "BRL",
        "accountId": "cm3zbgjxe000hr8cqmm3v384e"
    },
    "fundingInstructions": {
        "amount": 100,
        "currencyCode": "USDT",
        "rail": "CRYPTO",
        "fromAddress": "0x388C818CA8B9251b393131C08a736A67ccB19297",
        "toAddress": "0x12345678900987654321234567890",
        "chain": "Example Chain"
    }
}