v1

latestOpenAPI 3.1.02026-07-2478315484.9 KB
Payment Links

Get Payment Link Usage

Returns the details of a single payment link usage, including its current status, the identifiers collected from the payer during the payment flow, and the resulting payment reference once the bank has processed the payment.

The payment_id and payment_status fields are populated asynchronously - they will be null immediately after usage creation and will be set once the payment has been processed by the bank.

get/payment-links/v1/{payment_link_id}/usages/{usage_id}

Path parameters

payment_link_idstring uuid required
Example:d290f1ee-6c54-4b01-90e6-d701748f0851

The unique identifier of the payment link.

usage_idstring uuid required
Example:3fa85f64-5717-4562-b3fc-2c963f66afa6

The unique identifier of the payment link usage.

Response

OK - Payment link usage found and returned.

usage_idstring uuid required

Unique identifier of this usage.

payment_link_idstring uuid required

Identifier of the payment link that was used.

usage_status'STARTED' | 'PAYMENT_CREATED' | 'FAILED' | 'EXPIRED' required

Lifecycle status of the payment link usage.

  • STARTED: Payment flow initiated; payment intent created; waiting for bank confirmation.
  • PAYMENT_CREATED: Bank confirmed the payment was accepted or is pending.
  • FAILED: Bank rejected the payment or an error occurred during processing.
  • EXPIRED: Usage remained in STARTED for more than 30 minutes and was cleaned up by the system.
customer_idstring uuid nullable

Identifier of the customer record created or matched for this payer.

payment_idstring uuid nullable

Identifier of the payment created for this usage. null until the bank has confirmed or rejected the payment submission.

payment_statusstring nullable

Status of the underlying payment as last reported by the bank. null until the payment has been created. Refer to the Lean Payments API documentation for the full list of payment status values.

Example response

{
  "usage_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "payment_link_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "usage_status": "PAYMENT_CREATED",
  "customer_id": "a3bb189e-8bf9-3888-9912-ace4e6543002",
  "payment_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "payment_status": "PENDING",
  "identifiers": [
    {
      "display_label": "Email address",
      "value": "payer@example.com"
    }
  ]
}