v1

latestOpenAPI 3.0.02026-07-265892227.1 KB
Payment Links

patch/payment-links/{id}/close

Path parameters

idstring required
Example:pl_z1urYtVFgEebtcj8fxp4v

Payment link ID

Response

Payment link closed successfully

idstring required

Unique identifier for the payment link

urlstring required

URL for the payment link

status'active' | 'expired' | 'closed' | 'completed' required

Current status of the payment link

purchaseReferencestring required

Merchant reference for the payment

amountobject nullable required

Amount intended to be charged in the smallest currency unit. Null when openAmount is true.

openAmountboolean

When true, the payer decides the amount at payment time.

minAmountnumber

Minimum amount the payer can enter (only when openAmount is true).

maxAmountnumber

Maximum amount the payer can enter (only when openAmount is true).

currencystring required

Three-letter ISO 4217 currency code

maximumPaymentsnumber

Maximum successful payments allowed (omitted when unlimited multi_use)

currentSuccessCountnumber required

Number of successful payments recorded for this link

maximumAttemptsnumber required

Maximum number of failed payments allowed per user

createdAtstring required

Creation date in ISO 8601 format

updatedAtstring required

Last update date in ISO 8601 format

expirationDatestring required

Expiration date in ISO 8601 format

customerPhoneNumberstring required

Restricted MSISDN

type'single_use' | 'multi_use' required

Type of the payment link

customerDataobject

Collected payer data as fieldName → value pairs. Absent when no customerFields are defined.

Example response

{
  "id": "pl_z1urYtVFgEebtcj8fxp4v",
  "url": "https://pay.hub2.com/pl_z1urYtVFgEebtcj8fxp4v",
  "status": "active",
  "purchaseReference": "ORDER-12345",
  "minAmount": 500,
  "maxAmount": 100000,
  "currency": "XOF",
  "maximumPayments": 50,
  "maximumAttempts": 3,
  "createdAt": "2024-01-15T12:00:00.000Z",
  "updatedAt": "2024-01-15T12:30:00.000Z",
  "expirationDate": "2024-01-15T14:30:00.000Z",
  "customerPhoneNumber": "123456789",
  "type": "single_use",
  "customerFields": [
    {
      "fieldName": "national_id",
      "fieldLabel": "National ID"
    }
  ],
  "customerData": {
    "national_id": "AB123456"
  }
}