# HTTP Notification Sample for SNAP&#x20;

After setting up your `Notification URL`, we will send the notification for certain events such as when the Virtual Account has been paid by your customers, etc.&#x20;

Once the customers finish the payment, DOKU will send the notification to your defined `Notification URL.`

### Virtual Account

Here is the sample notification that DOKU will send to merchant's server. For Virtual Account SNAP has same sample notification.&#x20;

The list of Virtual Account SNAP, you can find [here](/accept-payments/direct-api/snap/integration-guide/virtual-account.md).

{% openapi src="/files/AUFdbXiPyL51nDhr34MY" path="/v1/transfer-va/payment" method="post" %}
[Payment Notification.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FnQGwhUXSYpHnXNnr8gVY%2FPayment%20Notification.json?alt=media\&token=cc3fbba5-cbbb-4a36-b63d-0445e9901801)
{% endopenapi %}

### Direct Debit

Here is the sample notification that DOKU will send to merchant's server. For Direct Debit SNAP has same sample notification.&#x20;

The list of Direct Debit SNAP, you can find [here](/accept-payments/direct-api/snap/integration-guide/direct-debit.md).

{% openapi src="/files/v282JQBer9CUOaTIK0gk" path="/v1.0/debit/notify" method="post" %}
[dd-notify-snap.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FVcWNgbA2bsdEg6UwTdKt%2Fdd-notify-snap.json?alt=media\&token=d0b5dd88-56e0-416c-8b5f-78e59f0a15b8)
{% endopenapi %}

### E-wallet

The notification format for SNAP e-wallet transactions exhibits minor differences from those of other e-wallets. For further details please refer to sample notification below.&#x20;

#### 1. Payment Notification

{% openapi src="/files/VO3O7k7BBLkCAByNjpPD" path="/v1.0/debit/notify" method="post" %}
[emoney-notify-snap.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FYjpXtA3TA2wdNYDeBErB%2Femoney-notify-snap.json?alt=media\&token=2016512d-2d43-45c8-b68a-dfd337758ecf)
{% endopenapi %}

#### 2. Refund Notification

## POST /v1.0/debit/notify

> Refund Notify endpoint

```json
{"openapi":"3.0.3","info":{"title":"Refund Notification EMONEY SNAP","version":"1.0.11"},"tags":[{"name":"SNAP","description":"Operations about SNAP API"}],"servers":[{"url":"https://{api-domain}"}],"paths":{"/v1.0/debit/notify":{"post":{"summary":"Refund Notify endpoint","tags":["SNAP"],"parameters":[{"in":"header","name":"X-TIMESTAMP","schema":{"type":"string","format":"utc timestamp"},"required":true,"description":"Client's current local time in yyyy-MM- ddTHH:mm:ssTZD format"},{"in":"header","name":"X-SIGNATURE","schema":{"type":"string"},"description":"Algorithm symmetric signature HMAC_SHA512 (clientSecret, stringToSign)","required":true},{"in":"header","name":"X-PARTNER-ID","schema":{"type":"string"},"required":true,"description":"Unique ID for a partner (DOKU'S Client ID)"},{"in":"header","name":"X-EXTERNAL-ID","schema":{"type":"string"},"required":true,"description":"Numeric String. Reference number that should be unique in the same day (request-id)"},{"in":"header","name":"X-DEVICE-ID","schema":{"type":"string"},"required":true,"description":"Device identification on which the API services are currently being accessed by the end user (customer). Can’t contain symbols"},{"in":"header","name":"X-IP-ADDRESS","schema":{"type":"string"},"description":"conditional. IP address of the end user (customer) using IPv4 format"},{"in":"header","name":"Authorization-customer","schema":{"type":"string","description":"Access token obtained from B2B2C API merchant"},"required":true,"description":"Access token obtained from B2B2C API merchant"},{"in":"header","name":"Authorization","schema":{"type":"string"},"required":true,"description":"Access Token obtained from Get B2B Token API from merchant"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyResponse"}}}}}}}},"components":{"schemas":{"NotifyRequest":{"type":"object","required":["originalPartnerReferenceNo","originalReferenceNo","originalExternalId","latestTransactionStatus","transactionStatusDesc","amount","additionalInfo"],"properties":{"originalPartnerReferenceNo":{"type":"string","description":"Original Partner Reference Number | min length: 1 | max length: 64"},"originalReferenceNo":{"type":"string","description":"Original Reference Number | min length: 1 | max length: 64"},"originalExternalId":{"type":"string","description":"Original External ID from payment process | min length: 1 | max length: 64"},"latestTransactionStatus":{"type":"string","description":"latest transaction status of transaction | format: 00 (Success) / 03 (Pending) / 04 (Refunded) / 05 (Canceled) / 06 (Failed)"},"transactionStatusDesc":{"type":"string","description":"description of transaction status "},"amount":{"type":"object","properties":{"value":{"type":"string","description":"Amount Value | min length: 1 | max length: 16 "},"currency":{"type":"string","description":"Amount Currency | format: IDR "}}},"additionalInfo":{"type":"object","properties":{"channelId":{"type":"string","description":"Channel Id of payment "},"channel":{"type":"string","description":"Channel Id of payment "},"acquirerId":{"type":"string","description":"Acquirer Id of payment "},"custIdMerchant":{"type":"string","description":"Customer id merchant | min length: 1 | max length: 64"},"accountType":{"type":"string","description":"accout type | format: DIRECT_DEBIT/EMONEY"},"refundNo":{"type":"string","description":"Refund No from Acquirer (if available) | max length: 64"},"refundAmount":{"type":"object","properties":{"value":{"type":"string","description":"Refund Amount Value | min length: 1 | max length: 16 "},"currency":{"type":"string","description":"Refund Amount Currency | format: IDR "}}},"partnerRefundNo":{"type":"string","description":"Refund No From Merchant | max length: 64"},"origin":{"type":"object","properties":{"apiFormat":{"type":"string"}}},"paymentType":{"type":"string","description":"Original Transaction Type | value: SALE/RECURRING"}}}}},"NotifyResponse":{"type":"object","required":["responseCode","approvalCode","responseMessage"],"properties":{"responseCode":{"type":"string"},"approvalCode":{"type":"string"},"responseMessage":{"type":"string"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.doku.com/get-started-with-doku-api/notification/http-notification-sample-for-snap.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
