Amwal Tech logoDocs

Get Transaction Details

Retrieve complete transaction authorization data, partner bank approval details, installment tenure duration, fees, net merchant payout, and the refund_tracker array for a specific transaction ID.


Endpoint Details

AttributeDetails
MethodGET
URLhttps://backend.sa.amwal.tech/transactions/{transaction_id}
Path Parametertransaction_id (string, required) — Unique transaction UUID.
AuthenticationSecured (Authorization + X-Amwal-Key headers)
Response Content-Typeapplication/json

Request Headers

Pass your merchant public key in the required X-Amwal-Key header:

  • Sandbox: X-Amwal-Key: sandbox-amwal-xxx
  • Production: X-Amwal-Key: prod-amwal-xxx
Authorization: YOUR_SECRET_KEY
X-Amwal-Key: sandbox-amwal-xxx
Accept: application/json
HeaderTypeRequiredDescription
AuthorizationStringYesYour Amwal Secret Key (e.g. d9ccf8bc-ed63-44ad-a54c-9d8fee63df6b).
X-Amwal-KeyStringYesMerchant Public Key (sandbox-amwal-xxx in Sandbox, prod-amwal-xxx in Production).
AcceptStringYesMust be set to application/json.

Example cURL Request

curl -s "https://backend.sa.amwal.tech/transactions/618f07c5-1d40-4b9e-bd40-f733936be163" \
  -H "Authorization: YOUR_SECRET_KEY" \
  -H "X-Amwal-Key: sandbox-amwal-xxx" \
  -H "Accept: application/json"

Response Payload (200 OK)

Below is an example response payload for an approved 0% bank installment transaction:

{
  "id": "618f07c5-1d40-4b9e-bd40-f733936be163",
  "status": "refunded",
  "amount": "1255.00000",
  "total_amount": "1255.00",
  "payment_amount": "1291.09",
  "refunded_amount": "1255.00",
  "amwal_fee": "18.82",
  "amwal_tax_vat": "2.82",
  "brand_percentage": "1.50",
  "brand_static_fee": "0.00",
  "merchant_payout": "1233.35",
  "merchant_business_name": "Example Retail Store",
  "merchant_country_code": "SA",
  "merchant_id": "87ccc829-xxxx-xxxx-xxxx-8ea454688db7",
  "merchant_key": "sandbox-amwal-xxxx-xxxx-xxxx-5a54dc815fcd",
  "paymentBrand": "VISA",
  "payment_method": "Card",
  "payment_option": "Installment",
  "number": "411111xxxxxx1111",
  "bank_name": "RAJHI",
  "installment_duration": "3",
  "installment_status": "Approved",
  "installment_tracker": {
    "id": "287436",
    "status": "A",
    "message": "Operation Successful"
  },
  "installment_fee": "0.00",
  "installment_fee_vat": "0.00",
  "murabha_fee": "31.38",
  "murabha_fee_vat": "4.71",
  "payment_link_id": "c63608d3-7c6d-4ae3-8678-b2003601ee97",
  "payment_link_callback_url": "https://merchant-store.com/checkout/callback?trackId=track-eaa52cb2&chargeId=charge-amwal-ec15aaab",
  "payment_link_description": "Amwal installment charge for Order #109f4d52",
  "payment_link_passkey_enabled": true,
  "payment_link_only_show_bank_installments": true,
  "payment_link_only_show_pay_in_full": false,
  "payment_link_show_shipping": false,
  "billing_address_required": false,
  "supports_stc_pay": false,
  "client_first_name": "Ahmed",
  "client_last_name": "Al-Mansoor",
  "client_email": "customer@example.com",
  "client_phone_number": "+966500000000",
  "address_details": {
    "name": "Riyadh, Saudi Arabia"
  },
  "order_details": {
    "order_id": "109f4d52-c593-4e8e-9df7-90cdd4b0490a",
    "payment_link_metadata": {
      "trackId": "track-eaa52cb2-4fb9-4ac8-8e6b-adb4cecb70e2"
    }
  },
  "refund_tracker": [
    {
      "id": "5059",
      "status": "R",
      "amount": "1255.00",
      "gateway_transaction_id": "2026001835",
      "gateway_key_type": "RefundReference",
      "rrn": "624411293930",
      "idempotency_key": "a6861821-e90e-42d4-b501-9f144e4cc01a",
      "order_refund_id": "8f6cae9f-3d65-4696-aa91-11080088c4ce"
    }
  ],
  "created_at": "2026-09-01T14:48:30.097180+03:00",
  "trx_lang": "ar",
  "type": "SANDBOX",
  "is_refundable": false
}

Response Parameter Breakdown

1. Transaction Core & Status

FieldTypeDescription
idstring (UUID)Unique identifier of the transaction.
statusstringTransaction lifecycle status (success, fail, partially refunded, refunded).
typestringEnvironment context (SANDBOX or LIVE).
created_atstring (ISO 8601)Timestamp of payment authorization in UTC.
trx_langstringLanguage selected during checkout (ar or en).
is_refundablebooleantrue if remaining balance is eligible for refund; false once fully refunded or expired.

2. Financial & Fee Breakdown

FieldTypeDescription
amount / total_amountstringGross purchase amount authorized in SAR.
payment_amountstringTotal amount charged including bank Murabaha financing fees.
refunded_amountstringCumulative amount refunded across all refund requests.
amwal_feestringGateway MDR fee charged for transaction processing in SAR.
amwal_tax_vatstring15% VAT on the Amwal gateway fee in SAR.
brand_percentagestringCard scheme percentage interchange fee (e.g. 1.50%).
merchant_payoutstringNet amount scheduled for settlement to merchant's corporate IBAN (amount - amwal_fee - amwal_tax_vat).
murabha_feestringBank Murabaha financing fee charged by the issuing bank.
murabha_fee_vatstring15% VAT on the bank financing fee.

3. Payment Method & Installments

FieldTypeDescription
paymentBrandstringCard network (VISA, MASTERCARD, MADA, AMEX).
payment_methodstringPayment channel (Card).
payment_optionstringCheckout mode (Installment or Pay In Full).
numberstringMasked card number (e.g. 411111xxxxxx1111).
bank_namestringPartner bank providing the 0% installment plan (e.g. RAJHI, SNB, RIBL, INMA).
installment_durationstringSelected tenure in months (3, 6, 12, 24).
installment_statusstringBank loan approval status (Approved).
installment_trackerobjectBank loan booking reference object (detailed below).

4. Installment Tracker Object (installment_tracker)

FieldTypeDescription
idstringUnique installment loan facility tracking ID assigned by the partner bank.
statusstringBank underwriting status code: A (Approved), R (Rejected), or P (Pending).
messagestringStatus message returned directly from the partner bank gateway (e.g. Operation Successful).

5. Refund Tracker (refund_tracker[])

FieldTypeDescription
idstringUnique identifier for this refund execution.
statusstringSettlement status: R (Settled / Refunded) or P (Pending).
amountstringAmount refunded in SAR for this specific refund event.
gateway_transaction_idstringBank gateway refund reference number.
rrnstringBank Retrieval Reference Number (RRN) used for cardholder bank tracing.
idempotency_keystringIdempotency UUID preventing duplicate executions.
order_refund_idstringInternal order refund reference identifier.

6. Customer & Order Metadata

FieldTypeDescription
client_first_namestringCustomer's first name.
client_last_namestringCustomer's last name.
client_emailstringCustomer's email address.
client_phone_numberstringCustomer's mobile phone number (E.164 format).
order_details.order_idstringMerchant's internal order reference identifier.
order_details.payment_link_metadataobjectCustom metadata dictionary passed during payment link creation.
payment_link_idstring (UUID)Associated Amwal payment link identifier.
payment_link_callback_urlstringMerchant redirect URL after checkout completion.

Status Fields & Lifecycle Reference

The transaction details endpoint returns several status properties representing different stages of payment authorization, bank underwriting, and refund reconciliation:

1. Transaction Lifecycle Status (status)

Status ValueMeaning & Actionable Guidance
successThe transaction was authorized and captured successfully. Merchant can proceed to order fulfillment.
pendingTransaction initiated and awaiting customer 3DS/Passkey authentication or bank processing.
failPayment declined by issuing bank or gateway (e.g. insufficient funds, 3DS authentication failure, expired session).
partially refundedOne or more partial refunds have been settled on the card network, leaving a positive balance remaining.
refundedThe full transaction amount (100%) has been completely refunded back to the cardholder.

2. Bank Installment Underwriting Status (installment_status / installment_tracker.status)

Status CodeValueMeaning & Bank Workflow
AApprovedThe partner bank has approved the 0% installment loan, booked the credit facility with the cardholder, and guaranteed 100% upfront settlement to the merchant via SARIE.
RRejectedThe bank declined the installment loan underwriting (e.g. cardholder credit limit exceeded, card not enrolled in 0% program, or order amount below bank minimum).
PPendingInstallment underwriting review is in progress with the issuing bank.

3. Refund Tracker Settlement Status (refund_tracker[].status)

Status CodeMeaningBehavioral Context
RRefunded (Settled)The refund was successfully processed by the payment switch and credited back to the customer's card.
PPendingWhen multiple partial refund requests are submitted for the same transaction ID within a 1-hour window, the first request is marked R (Refunded) and subsequent requests are marked P (Pending) pending manual finance team review.

On this page