# Payment Webhooks

Payment webhooks notify you about events related to payment processing.

> **Note:** The sample payloads on this page are pretty-printed. The body Glomo sends is the RFC 8785 canonical form of the same object, and the `X-Glomopay-Signature` header is computed over those bytes. See [Webhook Authentication & Security](/platform/webhooks#webhook-authentication--security).


Payments with `payin_type: add_funds` represent a direct wallet top-up and fire only as `event_type: success`.

| Event Type | Description |
|  --- | --- |
|  success  | The payment has been successfully processed. |
|  in_progress  | The payment is being processed. Sent for LRS and broker flows only; don't wait for it. |
|  action_required  | The payment needs more details to be processed. |
|  under_review  | The payment is under review (e.g. after RFI documents are submitted). |
|  failed  | The payment has failed. |
|  funds_available  | Held funds have been released and can be included in a payout or settlement. Otherwise `success` arrives with `funds_available: true`. |
|  credited_to_beneficiary  | LRS broker flows only. The partner broker has credited the funds to the beneficiary. The payment carries `credited_to_beneficiary: true`. |
|  compliance_action_required  | The payment has been flagged for a compliance review and requires additional documents. See `compliance_status` and `rfi` in the payload. |
|  compliance_under_review  | Glomo is reviewing the payment, after every open request was answered or with no request raised. |
|  compliance_approved  | The compliance review is complete and the payment has been cleared. |
|  compliance_rejected  | The compliance review is complete and the payment has been rejected. |


> **Note:** `partner_transaction_reference_id` is present only for partnership payments.


## Understanding Payment Amounts

The payment webhook includes three different amount fields that represent different stages of the payment flow:

| Field | Description | Example |
|  --- | --- | --- |
| `requested_amount``requested_currency` | The original amount the merchant requested (in settlement currency, excluding customer-borne fees) | Merchant requests $1,000 USD |
| `payment_amount``payment_currency` | The total amount the customer pays (in order currency, includes customer-borne fees) | Customer pays 3,745.80 AED (includes 1% txn fee + 1% FX fee) |
| `converted_amount``converted_currency` | The final amount after currency conversion (in settlement currency, includes all fees) | Total amount received is $1,020 USD |
| `fx_rate` | Mid-market rate before FX fees, as `converted_currency` per one `payment_currency`. `1` for same-currency payments | 1 AED = 0.2723 USD |
| `effective_fx_rate` | Rate after the FX fee only, as `converted_currency` per one `payment_currency`. `1` for same-currency payments | 1 AED = 0.2696 USD after a 1% FX fee |


**Fees Breakdown:**

- `txn_fee`: Transaction processing fee
- `fx_fee`: Foreign exchange/currency conversion fee
- `referral_fee`: Referral or platform fee (if applicable)


**Note on amounts:** All amounts are represented in the smallest currency unit. For example, if the amount is $299.00, then 29900 is passed in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to represent an amount of 295.991, we will pass the value as 295990. And in the case of zero decimal currencies such as JPY, for amount ￥295, we will pass the value as 295.

## Sample Payload

```Sample
{
  "entity_type": "payment",
  "event_type": "success",
  "data": {
    "id": "payt_686f7cc3pe69T",
    "payin_id": "order_686f7c8c7txqj",
    "payin_type": "orders",
    "customer_id": "cust_686f7c6evv6Nv", // only valid for regular businesses
    "merchant_id": "merch_68cc1216xPrdU", // only valid for platform businesses
    "product_name": null,
    "product_description": null,
    "status": "success",
    "payment_amount": 374580,
    "payment_currency": "AED",
    "converted_amount": 102000,
    "converted_currency": "USD",
    "fx_rate": 0.2723,
    "effective_fx_rate": 0.2696,
    "requested_amount": 100000,
    "requested_currency": "USD",
    "purpose_code": "P1301",
    "sender_name": "Jane Doe",
    "paid_at": "2025-07-10T08:41:52Z",
    "country": "IND",
    "fees": {
      "txn_fee": {
        "currency": "USD",
        "amount": 1000
      },
      "fx_fee": {
        "currency": "USD",
        "amount": 1000
      },
      "referral_fee": {
        "currency": "USD",
        "amount": 0
      }
    },
    "documents": [],
    "payment_method": {
      "type": "bank_transfer",
      "details": {
        "sender_name": "Jane Doe",
        "sender_account_number": "XXXXXXXX1234",
        "receiver_account_number": "98765432109876",
        "sender_country": "IND",
        "sender_bank_name": "JPMORGAN CHASE BANK,N.A.",
        "sender_bank_country": "USA",
        "sender_bank_address": "270 Park Avenue, New York",
        "swift_code": "CHASUS33",
        "local_routing_number": null,
        "external_reference": "GLM7A2C1",
        "transfer_type": "swift",
        "remittance_information": "Test Remittance Information"
      }
    },
    "fee_bearer": "customer",
    "created_at": "2025-07-10T08:41:39Z",
    "updated_at": "2025-07-10T08:41:52Z",
    "error_code": null,
    "error_description": null,
    "customer_error_description": null,
    "funds_available": true,
    "partner_transaction_reference_id": "ptr_6819d8046mpKt"
  }
}
```

## Payment progress

LRS payments carry a `progress` object: the last checkout stage Glomo recorded for the customer. It tells you how far the customer got, even when your page received no [checkout events](/platform/sdk/checkout-events), for example because the customer closed the tab.

`progress` appears on every payment webhook for the payment, and on `getPaymentById` (`GET /payment/{id}`) and `getPayments` (`GET /payment`).

**Availability.** LRS payments only. It is enabled per merchant by the same switch as [checkout events](/platform/sdk/checkout-events#availability). Contact your Glomo account manager to turn it on. `progress` is absent when the switch is off, when the payment is not LRS, and when no stage was recorded.

| Field | Type | Required | Values | Description |
|  --- | --- | --- | --- | --- |
| `progress.last_stage` | string | Yes | Known values below | The last stage recorded. New stages can be added. |
| `progress.last_step` | string or null | Yes | Known values below, or `null` | The screen within `customer_auth`. `null` for every other stage. |
| `progress.at` | string | Yes | ISO 8601 date-time, UTC, seconds | When Glomo last recorded a change to `last_stage` or `last_step`, from Glomo's clock. |


These are all the `last_stage` values recorded today:

| `last_stage` | Recorded when |
|  --- | --- |
| `attempt_created` | The payment attempt was created. |
| `customer_auth` | The customer is authenticating with the bank inside checkout. See `last_step`. |
| `provider_handoff` | Glomo issued the bank's page for the customer to approve the payment. Glomo cannot see whether the customer opened it. |
| `confirmed` | The bank authorised the remittance. Glomo is waiting for the funds. |


These are all the `last_step` values recorded today:

| `last_step` (with `customer_auth`) | Screen |
|  --- | --- |
| `otp` | One-time password from the bank. |
| `document_upload` | The customer uploads a document the bank asks for. |
| `txn_summary` | The customer reviews the transaction summary. |
| `agreements` | The customer accepts the bank's terms. |


How `progress` changes:

- `last_stage` only moves forward, in the order of the table above. Within `customer_auth`, `last_step` can change, including back to an earlier step.
- Recording stops at `confirmed`, or when the payment fails. After that, `progress` keeps its last value.
- `progress` records how far the customer got, not the outcome. A payment can reach `pending`, `success` or `failed` without reaching `confirmed`, for example after `action_required` or `under_review`, so read `status` for the result.
- A change to `progress` does **not** send a webhook. You see the current value on the next payment webhook, or when you fetch the payment.
- New stages and steps can be added within the same API version. Ignore values you do not recognise.


The server records a subset of the [checkout stages](/platform/sdk/checkout-events#payment-stages) and uses snake_case. `progress.last_stage`, `progress.last_step` and `progress.at` correspond to `lastStage`, `lastStep` and `at` on the `checkout.closed` client event, and the stage values are the same strings. Client `at` comes from the customer's device clock; server `at` comes from Glomo's clock.

The sample below shows only the fields relevant to `progress`. The other fields are the same as in any payment webhook, see [Sample Payload](#sample-payload).

```Sample
{
  "entity_type": "payment",
  "event_type": "failed",
  "data": {
    "id": "payt_6f1c2b04QmR8s",
    "payin_id": "order_6f1c2a9b7XyZ1",
    "payin_type": "orders",
    "status": "failed",
    "progress": {
      "last_stage": "customer_auth",
      "last_step": "otp",
      "at": "2026-11-16T09:31:41Z"
    }
  }
}
```

## Sample Payload — Compliance Action Required

- `compliance_status` is present on every payment webhook event once a payment has been screened — not only on `compliance_action_required`.
- `rfi` is present when a compliance RFI exists on the payment. It is omitted when the payment was held with no request, or cleared directly. While a request is open, `rfi` is the newest open request.
- `rfi.documents_required` and `rfi.response_deadline` are present only when `compliance_status` is `action_required`.
- Other compliance events (`compliance_under_review`, `compliance_approved`, `compliance_rejected`) include `rfi.id`, `rfi.reason_code_description` and `rfi.reason_code`, without `documents_required` or `response_deadline`.
- `rfis` lists every open request on the payment, oldest first. Each item has `id`, `reason_code`, `reason_code_description`, `documents_required` and `response_deadline`. It is omitted when no request is open. Answer each `rfis[].id` with the [Respond to an RFI API](/api-reference/openapi/rfi/respondrfi).
- `reason_code` depends on the payment method: `COMPLIANCE_REVIEW` for card payments, and `RFI_REQUESTED` (`Verification required`) for LRS and other payments.
- `response_deadline` is always `null` today. It is reserved for a future response deadline. An open request expires 14 days after it last changed.
- Separately, a payment can carry top-level `rfi_id` and `rfi_documents` for the newest open RFI of any kind, for example an LRS document request. Each `rfi_documents` item has `rfi_doc_id` and `name`.


```Sample
{
  "entity_type": "payment",
  "event_type": "compliance_action_required",
  "data": {
    "id": "payt_686f7cc3pe69T",
    "status": "success",
    "compliance_status": "action_required",
    "rfi": {
      "id": "rfi_6a72a39b38jDD",
      "reason_code_description": "The payment has been flagged for a compliance review and requires additional information before it can credited to your account.",
      "reason_code": "COMPLIANCE_REVIEW",
      "documents_required": [
        {
          "rfi_doc_id": "rfidoc_6a72a39bGslYe",
          "description": "Upload documents supporting this payment: invoice matching the transaction amount and date, card statement for the billing cycle containing this transaction, bank statement showing the card bill repayment, proof of source of funds for the repaying account, and a note stating the purpose of the transfer.",
          "multiple_allowed": true,
          "max_count": 15,
          "required": true
        },
        {
          "rfi_doc_id": "rfidoc_6a72a39b38jDD",
          "description": "Passport",
          "multiple_allowed": false,
          "max_count": 1,
          "required": true
        }
      ],
      "response_deadline": null
    },
    "rfis": [
      {
        "id": "rfi_6a72a39b38jDD",
        "reason_code_description": "The payment has been flagged for a compliance review and requires additional information before it can credited to your account.",
        "reason_code": "COMPLIANCE_REVIEW",
        "documents_required": [
          {
            "rfi_doc_id": "rfidoc_6a72a39bGslYe",
            "description": "Upload documents supporting this payment: invoice matching the transaction amount and date, card statement for the billing cycle containing this transaction, bank statement showing the card bill repayment, proof of source of funds for the repaying account, and a note stating the purpose of the transfer.",
            "multiple_allowed": true,
            "max_count": 15,
            "required": true
          },
          {
            "rfi_doc_id": "rfidoc_6a72a39b38jDD",
            "description": "Passport",
            "multiple_allowed": false,
            "max_count": 1,
            "required": true
          }
        ],
        "response_deadline": null
      }
    ],
    "payment_amount": 374580,
    "payment_currency": "AED",
    "funds_available": false
    // ...remaining fields are the same as any other payment webhook, see the sample payload above
  }
}
```