> ## Documentation Index
> Fetch the complete documentation index at: https://docs.singapay.id/llms.txt
> Use this file to discover all available pages before exploring further.

# E-Wallet Native Webhook

> Real-time notifications when a customer successfully pays via e-wallet (GoPay, OVO, ShopeePay, etc.) through your checkout session. Update your order status and fulfill transactions promptly.

<Note>
  **Money In Operation** — This webhook fires when a customer completes an e-wallet payment, transferring funds into your SingaPay account.
</Note>

## Information

<div className="overflow-x-auto">
  | Method                                                                                                              | Path                                | Format | Authentication        |
  | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------ | --------------------- |
  | <span className="inline-flex items-center px-2 py-0.5 rounded text-xs font-bold bg-blue-500 text-white">POST</span> | `https://your-webhook-url/callback` | json   | HMAC SHA512 Signature |
</div>

SingaPay sends a `POST` request to your configured `transaction_notif_url` when a customer completes payment via e-wallet native checkout.

<Info>
  This webhook may share a callback URL with other event types. See [Shared webhook endpoints](/api-reference/webhooks/shared-endpoints) for routing by `event` value.
</Info>

***

## Request Details

### Headers

| Field           | Value                     | Type         | Mandatory | Description                                                                |
| --------------- | ------------------------- | ------------ | :-------: | -------------------------------------------------------------------------- |
| `Content-Type`  | `application/json`        | Alphabetic   |    Yes    | Specifies JSON format for the request body                                 |
| `User-Agent`    | `SingaPaymentGateway/1.0` | Alphabetic   |    Yes    | Identifies the source of the webhook                                       |
| `Accept`        | `application/json`        | Alphabetic   |    Yes    | Expected response format                                                   |
| `X-PARTNER-ID`  | —                         | Alphanumeric |    Yes    | Your API Key from the merchant dashboard                                   |
| `X-Signature`   | —                         | Alphanumeric |    Yes    | HMAC SHA512 signature (128 chars) for request verification                 |
| `X-Timestamp`   | —                         | Numeric      |    Yes    | Unix timestamp in **seconds** when the request was sent                    |
| `Authorization` | `Bearer <random_token>`   | Alphanumeric |    Yes    | System-generated random bearer token; used as a component in the signature |

<Note>
  The `Authorization` token for e-wallet webhooks is a **randomly generated string** — not a user access token. This webhook is triggered by a payment notification (system event), not a user action. Extract the token as-is and use it in the string to sign. See [How to Validate Signature](#how-to-validate-signature) below.
</Note>

***

### Body Parameters

<ParamField body="status" type="number" required>
  HTTP Status Code. Example: `200`
</ParamField>

<ParamField body="success" type="boolean" required>
  Indicates if the transaction was successful. Example: `true`
</ParamField>

<ParamField body="event" type="string" required>
  Event type identifier. Always `"ewallet-native-transaction"` for this webhook.
</ParamField>

<ParamField body="timestamp" type="string" required>
  Event timestamp in format `"d M Y H:i:s"`. Example: `"26 Dec 2025 13:35:45"`
</ParamField>

<ParamField body="data" type="object" required>
  Container for transaction, customer, and payment details.

  <Expandable title="data fields">
    <ParamField body="transaction" type="object" required>
      Transaction details.

      <Expandable title="transaction fields">
        <ParamField body="id" type="integer" required>
          Unique transaction ID. Example: `42`
        </ParamField>

        <ParamField body="reff_no" type="string" required>
          Merchant reference number used during checkout creation. Example: `"INV-2026-001"`
        </ParamField>

        <ParamField body="merchant_reff_no" type="string">
          Optional merchant reference number for tracing. Example: `"INV-2026-001"`
        </ParamField>

        <ParamField body="type" type="string" required>
          Transaction type. Always `"ewallet"`.
        </ParamField>

        <ParamField body="ewallet_vendor" type="string" required>
          E-wallet vendor code. Example: `"GOPAY"`, `"OVO"`, `"SHOPEEPAY"`
        </ParamField>

        <ParamField body="status" type="string" required>
          Transaction status. Always `"paid"` for this webhook.
        </ParamField>

        <ParamField body="amount" type="object" required>
          **Net** transaction amount after fees — credited to your balance.

          <Expandable title="amount fields">
            <ParamField body="value" type="number" required>Net amount value. Example: `95000`</ParamField>
            <ParamField body="currency" type="string" required>ISO 4217 currency code. Example: `"IDR"`</ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="total_amount" type="object" required>
          **Gross** transaction amount — what the customer actually paid.

          <Expandable title="total_amount fields">
            <ParamField body="value" type="number" required>Total amount value. Example: `100000`</ParamField>
            <ParamField body="currency" type="string" required>ISO 4217 currency code. Example: `"IDR"`</ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="post_timestamp" type="string" required>
          Timestamp when the transaction record was last updated. Example: `"26 Dec 2025 13:35:43"`
        </ParamField>

        <ParamField body="processed_timestamp" type="string" required>
          Timestamp when the payment was confirmed and processed. Example: `"26 Dec 2025 13:35:45"`
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="customer" type="object" required>
      Customer details provided during checkout. All fields are optional depending on checkout creation data.

      <Expandable title="customer fields">
        <ParamField body="name" type="string">Customer name. Example: `"John Doe"`</ParamField>
        <ParamField body="email" type="string">Customer email address. Example: `"john@example.com"`</ParamField>
        <ParamField body="phone" type="string">Customer phone number. Example: `"081234567890"`</ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="payment" type="object" required>
      Payment method details.

      <Expandable title="payment fields">
        <ParamField body="method" type="string" required>
          Payment method. Always `"ewallet"`.
        </ParamField>

        <ParamField body="vendor" type="string" required>
          E-wallet vendor code — same as `transaction.ewallet_vendor`. Example: `"GOPAY"`
        </ParamField>

        <ParamField body="additional_info" type="object" required>
          E-wallet specific payment information.

          <Expandable title="additional_info fields">
            <ParamField body="payment_event_id" type="number" required>
              Internal payment event ID for traceability. Example: `1042`
            </ParamField>

            <ParamField body="vendor_reference_no" type="string">
              Reference number from the e-wallet vendor. May be `null` depending on the provider's API response.
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

***

### Payload Example

```json Success theme={null}
{
  "status": 200,
  "success": true,
  "event": "ewallet-native-transaction",
  "timestamp": "26 Dec 2025 13:35:45",
  "data": {
    "transaction": {
      "id": 42,
      "reff_no": "INV-2026-001",
      "merchant_reff_no": "INV-2026-001",
      "type": "ewallet",
      "ewallet_vendor": "GOPAY",
      "status": "paid",
      "amount": {
        "value": 95000,
        "currency": "IDR"
      },
      "total_amount": {
        "value": 100000,
        "currency": "IDR"
      },
      "post_timestamp": "26 Dec 2025 13:35:43",
      "processed_timestamp": "26 Dec 2025 13:35:45"
    },
    "customer": {
      "name": "John Doe",
      "email": "john@example.com",
      "phone": "081234567890"
    },
    "payment": {
      "method": "ewallet",
      "vendor": "GOPAY",
      "additional_info": {
        "payment_event_id": 1042,
        "vendor_reference_no": "PAY-XYZ-12345"
      }
    }
  }
}
```

***

***

## Security and responses

Return HTTP `200` promptly after validating the request. For retry behavior, see [Webhook retry mechanism](/api-reference/webhooks/retry-mechanism).

Verify every webhook using [Security and signature validation](/api-reference/webhooks/security-and-signature). Use your configured callback path when building `StringToSign`.

Handle duplicate deliveries idempotently using stable identifiers from the payload (for example `transaction_id` or `reff_no`).

***

## E-Wallet Specific Notes

<AccordionGroup>
  <Accordion title="amount vs total_amount" icon="circle-dollar-to-slot">
    `total_amount` is the **gross amount the customer paid**. `amount` is the **net amount after fees** — this is what gets credited to your balance. Always use `total_amount` for display to the customer and `amount` for reconciliation.
  </Accordion>

  <Accordion title="vendor_reference_no may be null" icon="triangle-exclamation">
    The `vendor_reference_no` field may be `null` depending on the e-wallet provider's API response. Always handle `null` gracefully in your code — don't assume it's always populated.
  </Accordion>

  <Accordion title="Customer fields are optional" icon="user">
    All `customer` fields (`name`, `email`, `phone`) are optional and depend on the data provided during checkout creation. Your handler should not assume any of these are present.
  </Accordion>

  <Accordion title="Timestamp format & timezone" icon="clock">
    Both `post_timestamp` and `processed_timestamp` use the format `"d M Y H:i:s"` (e.g. `"26 Dec 2025 13:35:45"`) in **Asia/Jakarta (WIB)** timezone — not UTC.
  </Accordion>
</AccordionGroup>
