Payment Links

Get Payment Link with Attempts

Changed on

Retrieve detailed information about a payment link including payment attempts

get/payment-links/{id}

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

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"
    }
  ],
  "paymentAttempts": [
    {
      "id": "pay_QW2d6JnqiatcH8KhK0mD1",
      "intentId": "pi_z1urYtVFgEebtcj8fxp4v",
      "createdAt": "2020-10-15T12:09:49.355Z",
      "updatedAt": "2020-10-15T12:16:26.128Z",
      "status": "successful",
      "amount": 100,
      "currency": "XOF",
      "method": "mobile_money",
      "country": "CI",
      "fees": [
        {
          "id": "fee_lAe5HnFpvOjwdT9vSIgPA",
          "amount": 5,
          "currency": "XOF",
          "taxes": [
            {
              "id": "tax_lAe5HnFpvOjwdT9vSIgPA",
              "feeId": "fee_lAe5HnFpvOjwdT9vSIgPA",
              "taxType": "tva",
              "type": "percent",
              "value": 3.813559322033896
            }
          ]
        }
      ],
      "nextAction": {
        "data": {
          "method": "post"
        }
      },
      "paymentInformation": {
        "customer_id_hashmac": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
      }
    }
  ]
}

Changes

    • breaking

      the /////// response property's maxLength was increased from 50 to 64 for the response status

    • breaking

      the ///// response's property type changed from string to object for status

    • breaking

      removed the required property // from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property /////// from the response with the status

    • warning

      removed the optional property /////// from the response with the status

    • 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

    • warning

      added the new consent_reference_in_use enum value to the /////// response property for the response status

    • warning

      added the new instant_payment enum value to the // response property for the response status

    • warning

      added the new issuer_authentication_unavailable enum value to the /////// response property for the response status

    • warning

      added the new recipient_unavailable enum value to the /////// response property for the response status

    • warning

      added the new reconciliation_failure enum value to the /////// response property for the response status

    • info

      added the optional property to the response with the status

    • info

      removed the blacklisted_msisdn enum value from the /////// response property for the response status

    • info

      the /////// response's property pattern ^[0-9a-fA-F]{64}$ was added for the status

    • info

      added the required property ////// to the response with the status

    • info

      added the required property ////// to the response with the status

    • info

      added the required property ////// to the response with the status

    • info

      added the required property ////// to the response with the status

    • info

      added the required property ////// to the response with the status