Fiat-to-Stablecoin (Crypto On-Ramp)

Fiat to Stablecoin 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).

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"
  },
  "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,
    "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 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": "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

{
    "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"
    }
}