Skip to main content
POST
/
payment-requests
/
reversals
Reverse a payment request by card-provider reference
curl --request POST \
  --url https://api.venlyfinance.com/v1/payment-requests/reversals \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "paymentRequestReference": {
    "cardProviderReference": {
      "type": "paymentology",
      "referenceId": "ACC-12345"
    },
    "externalId": "TID-67890"
  },
  "reason": "NETWORK_DECLINE",
  "description": "Scheme declined after issuer approval",
  "idempotencyKey": "1b4e28ba-2fa1-11d2-883f-0016d3cca427"
}
'
{
  "success": true,
  "result": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "amount": {
      "fiat": 123,
      "crypto": "<string>"
    },
    "originalAmount": {
      "fiat": 123,
      "crypto": "<string>"
    },
    "settlementAmount": {
      "fiat": 123,
      "crypto": "<string>"
    },
    "settledAmount": {
      "fiat": 123,
      "crypto": "<string>"
    },
    "shortfallAmount": {
      "fiat": 123,
      "crypto": "<string>"
    },
    "currency": "<string>",
    "externalId": "<string>",
    "description": "<string>",
    "settledAt": "2023-11-07T05:31:56Z",
    "reversalDescription": "<string>",
    "reversedAt": "2023-11-07T05:31:56Z",
    "executions": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "walletPairId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "asset": "<string>",
        "amount": 123,
        "exchangeRate": 123,
        "transactionHash": "<string>",
        "errorMessage": "<string>",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z"
      }
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}
Reverses a payment request you identify by its card-provider reference instead of its ID: the account comes from paymentRequestReference.cardProviderReference (type + referenceId) and the request from its externalId. Behavior and response — including the { "fiat": <number>, "crypto": "<string>" } amount objects — match reversing by ID. Send a unique idempotencyKey; repeating the same key and body returns the original result. Concept guide: Payment requests

Authorizations

Body

application/json

Reverses a payment request identified by its card-provider reference.

paymentRequestReference
object
required

Identifies a payment request by the card-provider reference of its account plus the request's externalId — used by the "by reference" settle/reverse endpoints.

reason
enum<string>
required

Why a payment request was reversed (recorded for audit).

Available options:
CUSTOMER_CANCELLATION,
MERCHANT_VOID,
ACQUIRER_FAILURE,
NETWORK_DECLINE,
OTHER
idempotencyKey
string
required

Unique key to prevent duplicate operations on retry

Maximum string length: 255
description
string

Optional free-text reason for the reversal

Maximum string length: 1000

Response

Reversal accepted; on-chain processing is asynchronous

success
boolean

Indicates whether the request was successful

result
object