Amwal Tech logoDocs

Get Payment Link Details

Retrieve detailed information about a generated installment payment link, including its current status (Paid, Unpaid, Expired), customer details, and associated transaction records.


Endpoint

POST /payment_links/{payment_link_id}/details

Path Parameters

ParameterTypeRequiredDescription
payment_link_idString (UUID)YesThe unique identifier of the payment link (e.g. d0901e69-02ec-499f-ba5c-9c7ef95ad062).

Request Headers

Authorization: YOUR_SECRET_KEY
X-Amwal-Key: sandbox-amwal-xxx
Content-Type: application/json
HeaderTypeRequiredDescription
AuthorizationStringYesYour Amwal Secret Key (e.g. d9ccf8bc-ed63-44ad-a54c-9d8fee63df6b).
X-Amwal-KeyStringNoMerchant publishable API Key or sandbox identifier.
Content-TypeStringYesMust be set to application/json.

Request Body

No request body is required. An empty JSON object {} may be passed.


Response (200 OK)

{
  "payment_link": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "store_id": "f24267bd-79f4-433f-a9f2-485c171301e4",
    "status": "Paid",
    "amount": 299.99,
    "currency": "SAR",
    "title": "Premium Service Invoice #INV-2024-001",
    "description": "Payment for premium headphones - 6-month installment",
    "single_use": true,
    "enabled": true,
    "expiry_date": "2026-12-31T23:59:59Z",
    "created_at": "2026-05-14T11:18:49Z",
    "metadata": {
      "order_id": "ORD-9876",
      "customer_id": "CUST-12345"
    }
  },
  "transactions": [
    {
      "id": "60b43176-5991-4475-8ef6-c73c2417c805",
      "status": "success",
      "amount": 299.99,
      "currency": "SAR",
      "bank_name": "Al Rajhi Bank",
      "payment_option": "Installment",
      "installment_duration": 6,
      "installment_status": "Approved",
      "installment_fee": 0.00,
      "monthly_installment": 50.00,
      "paymentBrand": "VISA",
      "number": "411111xxxxxx1111",
      "refunded_amount": 0.00,
      "refund_tracker": null,
      "installment_tracker": {
        "id": "275460",
        "status": "A",
        "message": "Operation Successful"
      },
      "failure_reason": null,
      "created_at": "2026-05-14T11:22:10Z"
    }
  ]
}

Response Parameters

FieldTypeDescription
idString (UUID)Unique identifier of the payment link.
store_idString (UUID)Store ID associated with this payment link.
statusStringOverall payment link status: Unpaid, Paid, or Expired.
amountNumberOrder total amount in SAR.
currencyStringISO 4217 Currency code (SAR).
titleStringDisplay title configured on the payment link.
descriptionString / NullOrder or invoice description.
single_useBooleanWhether the payment link expires upon first successful checkout.
enabledBooleanWhether the link is currently active for payments.
expiry_dateString (ISO 8601) / NullExpiration timestamp in UTC.
created_atString (ISO 8601)Timestamp when the payment link was generated.
metadataObjectCustom key-value merchant metadata dictionary.

Transaction Record (transactions[])

FieldTypeDescription
idString (UUID)Unique Amwal transaction identifier.
statusStringAuthorization lifecycle state: pending, success, fail, partially refunded, or refunded.
amountNumberTransaction authorization amount in SAR.
currencyStringCurrency code (SAR).
bank_nameStringPartner bank processing the installment (e.g. Al Rajhi Bank, SNB, Alinma Bank, Riyad Bank).
payment_optionStringPayment method category: Installment or Pay In Full.
installment_durationInteger / NullSelected installment tenure in months (3, 6, 12, 24).
installment_statusString / NullStatus of bank installment approval: Approved, Pending, or Declined.
installment_feeNumberMerchant / bank installment financing fee.
monthly_installmentNumberMonthly installment billing amount charged to the cardholder.
paymentBrandStringCard network: VISA, MASTERCARD, MADA, etc.
numberStringMasked card number (e.g. 411111xxxxxx1111).
refunded_amountNumberTotal cumulative refund amount accepted for this transaction.
refund_trackerArray of Objects / NullList of individual refund attempts and their gateway settlement status (P = Pending, R = Settled).
installment_trackerObject / NullBank installment verification tracking object with approval code (A = Approved).
failure_reasonString / NullDetailed decline message from issuing bank if status is fail. See Transaction Failed Reasons.
created_atString (ISO 8601)Timestamp of transaction authorization in UTC.

Refund Tracker Object (refund_tracker[])

FieldTypeDescription
idStringInternal refund tracker identifier.
statusStringGateway settlement status: "P" (Pending settlement at gateway) or "R" (Settled/Reconciled).
amountNumber / StringRefund amount in SAR for this specific refund event.
gateway_transaction_idStringPayment gateway transaction / refund reference number.
rrnString / NullBank Retrieval Reference Number populated once settled (status: "R").

payment_link.status reverts to Unpaid after ANY refund

Once a refund — even a small partial one — is applied to a transaction on this link, payment_link.status reverts to Unpaid. This makes a refunded link indistinguishable from one nobody has ever paid if you only look at payment_link.status.

payment_link.status is not a reliable "was this order paid" check on its own. For the true state, read each entry in transactions[].status instead (success, partially refunded, refunded — see Transaction Status), and check transactions[].refund_tracker for the settlement state of any refunds (see Refund an Installment).


Error Responses

Status CodeError CodeDescription
401 Unauthorizedauthentication_failedMissing or invalid Secret Key in the Authorization header.
404 Not Foundpayment_link_not_foundThe payment_link_id UUID does not exist or does not belong to your merchant account.

On this page