Skip to main content
POST
/
payment-requests
/
settlements
Settle a payment request by card-provider reference
curl --request POST \
  --url https://api.venlyfinance.com/v1/payment-requests/settlements \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "paymentRequestReference": {
    "cardProviderReference": {
      "type": "paymentology",
      "referenceId": "ACC-12345"
    },
    "externalId": "TID-67890"
  },
  "amount": 25,
  "currency": "USD",
  "idempotencyKey": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}
'
{
  "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"
  }
}
Settles 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 settling by ID. Send a unique idempotencyKey; repeating the same key and body returns the original result. Concept guide: Payment requests

Authorizations

Body

application/json

Settles 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.

amount
number
required

Final settlement amount, in the authorized fiat currency

currency
string
required

Must match the authorized currency

Minimum string length: 1
idempotencyKey
string
required

Unique key to prevent duplicate operations on retry

Minimum string length: 1

Response

Settlement accepted; on-chain processing is asynchronous

success
boolean

Indicates whether the request was successful

result
object