Skip to main content
Propose an alternative payment currency — used for FX negotiation.
POST /api/v1/vouchers/:voucherId/negotiate-voucher If the payer doesn’t hold the currency the payee requested, their wallet can negotiate by proposing an alternative currency they do hold. The system calculates the exchange rate and fills in the required amount. This only applies to SIMPLE vouchers. The negotiation happens on the payer’s side — the payee’s expectedPayment remains unchanged, and a suppliedPayment is added to the voucher.

Parameters

Path

NameTypeRequiredDescription
voucherIdstringYesThe voucher ID to negotiate

Body

NameTypeRequiredDescription
suppliedPaymentobjectYesThe payment the payer is offering
suppliedPayment.networkstringYesBlockchain network
suppliedPayment.currencystringYesCurrency symbol (e.g. USDC)
suppliedPayment.currencyAddressstringYesContract address of the offered token
suppliedPayment.amountstringYesAmount the payer is offering
suppliedPayment.walletobjectYesPayer’s wallet
suppliedPayment.wallet.addressstringYesPayer’s wallet address

Request example

curl --request POST 'https://payments.bleepay.com/api/v1/vouchers/vch_482916/negotiate-voucher' \
  --header 'Authorization: Bearer <payer_token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "suppliedPayment": {
      "network": "polygon",
      "currency": "USDC",
      "currencyAddress": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
      "amount": "105",
      "wallet": {
        "address": "0xPayerWalletAddress"
      }
    }
  }'

Response

Response schema

FieldTypeDescription
idstringVoucher identifier
statusstringVoucher status
expectedPaymentobjectThe payee’s original request (unchanged)
suppliedPaymentobjectThe payer’s proposed alternative, with FX-adjusted amount

Example response

{
  "id": "vch_482916",
  "status": "REDEEMED",
  "expectedPayment": {
    "network": "polygon",
    "currency": "EURC",
    "currencyAddress": "0x73b3db5a96a4b9d9bcfc22b8f1b3d85a5e5b5e5b",
    "amount": "100",
    "wallet": { "address": "0xYourWalletAddress" }
  },
  "suppliedPayment": {
    "network": "polygon",
    "currency": "USDC",
    "currencyAddress": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
    "amount": "105.23",
    "wallet": { "address": "0xPayerWalletAddress" }
  }
}

Error responses

StatusCodeDescription
400not_simpleNegotiation is only available for SIMPLE vouchers
400different_networkThe supplied currency must be on the same network as the expected currency
401unauthorizedMissing or invalid bearer token
404not_foundVoucher not found