Payment Links

Close Payment Link

Changed on

Close a payment link so that it no longer accepts payments

patch/payment-links/{id}/close

Request

  • The document declares no server URL.
  • Auth
    none declared. Required headers: ApiKey, MerchantId, Environment

Path parameters

idstring required
Example:pl_z1urYtVFgEebtcj8fxp4v

Payment link ID

Headers

ApiKeystring required

Your api key. To create a key, please get into our dashboard. If you don't have access to it, please reach the Support team.

MerchantIdstring required

Your merchant ID. This information is available in our dashboard. If you don't have access to it, please reach the Support team.

Environment'live' | 'sandbox' required

Allow you to choose between the sandbox mode to perform some tests or the live mode for real world transactions.

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' | 'bill_payment' required

Type of the payment link

providersstring[]

Mobile money providers the link offers. A provider listed at creation that is not enabled in the country for a method the link offers, or that the routing check refused for the merchant, is missing here. Absent on a card-only link.

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",
  "providers": [
    "orange",
    "mtn"
  ],
  "customerFields": [
    {
      "fieldName": "national_id",
      "fieldLabel": "National ID"
    }
  ]
}

Changes

    • breaking

      added the new required header request parameter ApiKey

    • breaking

      added the new required header request parameter Environment

    • breaking

      added the new required header request parameter MerchantId

    • warning

      removed the optional property from the response with the status

    • warning

      added the new bill_payment enum value to the response property for the response status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status