Skip to main content
Set the payment terms for a reserved voucher — creates a SIMPLE or CUSTOM voucher.
POST /api/v1/vouchers/:voucherId/redeem-voucher Redeeming defines what the payee expects to receive. The voucher type is automatically determined:
  • Provide expectedPaymentSIMPLE voucher (automatic network selection, supports FX)
  • Provide networks, payments, or extrasCUSTOM voucher (full control, no FX)
You cannot provide both expectedPayment and networks/payments/extras — the system picks one based on what you supply.

Parameters

Path

NameTypeRequiredDescription
voucherIdstringYesThe voucher ID from the reserve response

Body — SIMPLE voucher

Use expectedPayment for straightforward token transfers:
NameTypeRequiredDescription
expectedPaymentobjectSee noteThe payment the payee expects to receive
expectedPayment.networkstringYesBlockchain network (e.g. polygon, ethereum)
expectedPayment.currencystringYesSettlement currency symbol (e.g. EURC, USDC)
expectedPayment.currencyAddressstringYesContract address of the settlement token on-chain
expectedPayment.amountstringYesAmount to receive, as a decimal string (e.g. "100")
expectedPayment.walletobjectYesDestination wallet
expectedPayment.wallet.addressstringYesPayee’s wallet address where funds are sent

Body — CUSTOM voucher

Use networks, payments, and extras for smart contract interactions:
NameTypeRequiredDescription
networksarrayYes1–3 blockchain network specifications
networks[].networkstringYesNetwork name (e.g. ethereum)
networks[].typestringYesNetwork type (evm, solana)
networks[].chainIdstringYesChain ID (e.g. "1")
paymentsarrayYes1 payment instruction
payments[].typestringYessend_transaction
payments[].input.fromstringYes{payer} — substituted by the wallet at resolution
payments[].input.tostringYesContract address to call
payments[].input.valuestringYesNative currency value to send ("0" for contract calls)
payments[].input.datastringYesABI-encoded calldata
extrasarrayNo0–5 additional instructions (e.g. call_transaction for reads)
payeeInfoobjectNoAdditional payee information

Request examples

SIMPLE voucher (EURC payment)

curl --request POST 'https://payments.bleepay.com/api/v1/vouchers/vch_482916/redeem-voucher' \
  --header 'Authorization: Bearer <payee_token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "expectedPayment": {
      "network": "polygon",
      "currency": "EURC",
      "currencyAddress": "0x73b3db5a96a4b9d9bcfc22b8f1b3d85a5e5b5e5b",
      "amount": "100",
      "wallet": {
        "address": "0xYourWalletAddress"
      }
    }
  }'

CUSTOM voucher (staking contract call)

curl --request POST 'https://payments.bleepay.com/api/v1/vouchers/vch_591234/redeem-voucher' \
  --header 'Authorization: Bearer <payee_token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "networks": [
      {
        "network": "ethereum",
        "type": "evm",
        "chainId": "1"
      }
    ],
    "payments": [
      {
        "type": "send_transaction",
        "input": {
          "from": "{payer}",
          "to": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
          "value": "0",
          "data": "0xa694fc3a0000000000000000000000000000000000000000000000000de0b6b3a7640000"
        }
      }
    ],
    "extras": []
  }'

Response

Response schema

FieldTypeDescription
idstringVoucher identifier
statusstringVoucher status — REDEEMED
typestringSIMPLE or CUSTOM
expectedPaymentobjectPresent for SIMPLE vouchers (see body parameters)
networksarrayPresent for CUSTOM vouchers
paymentsarrayPresent for CUSTOM vouchers
extrasarrayPresent for CUSTOM vouchers

Example response (SIMPLE)

{
  "id": "vch_482916",
  "status": "REDEEMED",
  "type": "SIMPLE",
  "expectedPayment": {
    "network": "polygon",
    "currency": "EURC",
    "currencyAddress": "0x73b3db5a96a4b9d9bcfc22b8f1b3d85a5e5b5e5b",
    "amount": "100",
    "wallet": {
      "address": "0xYourWalletAddress"
    }
  }
}

Error responses

StatusCodeDescription
400already_redeemedThe voucher has already been redeemed
400validation_failedInvalid parameters — check that expectedPayment and networks/payments are not both provided
401unauthorizedMissing or invalid bearer token
404not_foundVoucher not found