# SNAP

### Introduction

Before you hit API on DOKU side, you need to understand how to generate a `X-Signature`. &#x20;

`X-Signature` is a security parameter that must be generated on the merchant's backend to verify the authenticity of the request.

Here is the case the `X-Signature` is used:

1. When merchant hits DOKU endpoints
   1. Merchant generate `X-Signature` in Request Header : Merchant must generate the x-signature in request header and DOKU will verify the authenticity.
   2. For Register the virtual Account you have to use Symmetric Signature. [Learn how to generate Symmetric Signature](/get-started-with-doku-api/signature-component/snap/symmetric-signature.md).
2. When DOKU hits merchant endpoints (HTTP Notification / Inquiry Request).\
   Merchant must also verify the `X-Signature` that DOKU sends on the request header when DOKU Notification hits merchant `Merchant domain URL`, to verify the notification request is coming from DOKU.  [Learn how to generate Symmetric Signature](/get-started-with-doku-api/signature-component/snap/symmetric-signature.md).

### **Signature Type**

1. **Symmetric Signature**

{% hint style="info" %}
When to use ?&#x20;

For  transaction request such as Create VA, Account Binding, OTP Verification, Check Balance Inquiry, Payment, Refund, Account Unbinding,  and Transfer Bank
{% endhint %}

2. **Asymmetric Signature**

{% hint style="info" %}
When to use ?&#x20;

For Get Token B2B and Get Token B2B2C
{% endhint %}

***


---

# 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/signature-component/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.
