# Notification / Callback

Used by a partner for receiving notification transactions from the disbursement system Faspay. If there is a fund transfer transaction or disbursement of funds, the system will send the notification to the partner via the URL sent during the transaction/withdrawal process.

> **Url Notification : \[provide By Partner]**

### **Generate Signature Notification**

**Requirement:**

1. app\_key
2. app\_secret
3. client\_id
4. client\_secret
5. Request Body from Faspay
6. Request Method from Faspay

**Generate:**&#x20;

1. Request Body From Faspay:\
   \- Remove character '\r', '\n', '\t' dan space - hashing with algorithm sha256 - Change to capital letters (UPPERCASE).
2. Faspay Authorization: \
   \- base64\_encode(client\_id:client\_secret).
3. StringToSign : "\[api\_key]:\[Request Method From Faspay]:\[Faspay Authorization]:\[Request Body From Faspay]"\
   \&#xNAN;**\*) without \[] and ""**
4. Signature : SHA-256 HMAC (StringToSign, api\_secret).\
   \- For validation at the partner's side.

{% tabs %}
{% tab title="Request Body" %}

<table><thead><tr><th width="254">Parameter</th><th width="150">Data Type</th><th width="150">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>request</td><td>Alphanumeric</td><td>Mandatory</td><td>Request Description</td></tr><tr><td>virtual_account</td><td>Numeric</td><td>Mandatory</td><td>Sender VA</td></tr><tr><td>va_name</td><td>Alphanumeric</td><td>Mandatory</td><td>Sender VA Name</td></tr><tr><td>beneficiary_virtual_account</td><td>Numeric</td><td>Mandatory</td><td>Receiver VA number</td></tr><tr><td>beneficiary_account</td><td>Alphanumeric</td><td>Mandatory</td><td>Account number of VA receiver</td></tr><tr><td>beneficiary_name</td><td>Alphanumeric</td><td>Mandatory</td><td>Account Number Name</td></tr><tr><td>trx_id</td><td>Alphanumeric</td><td>Mandatory</td><td>Transaction ID</td></tr><tr><td>trx_date</td><td>Datetime</td><td>Mandatory</td><td>Datetime format (YYYY-MM-DD H:i:s)</td></tr><tr><td>trx_amount</td><td>Numeric</td><td>Mandatory</td><td>Total amount, ex : 10.000 -> 10000<strong>00</strong></td></tr><tr><td>trx_desc</td><td>Alphanumeric</td><td>Mandatory</td><td>Description</td></tr><tr><td>trx_status</td><td>Numeric</td><td>Mandatory</td><td>List of status transaction: <br>1 = On Process, <br>2 = Success, <br>4 = Failed, <br>5 = Reverse</td></tr><tr><td>trx_status_date</td><td>Datetime</td><td>Mandatory</td><td>Transaction of Success Date, Format Datetime (YYYY-MM-DD H:i:s)</td></tr><tr><td>trx_reff</td><td>Alphanumeric</td><td>Mandatory</td><td>Remark from system</td></tr><tr><td>trx_no</td><td>Alphanumeric</td><td>Mandatory</td><td>Transaction number of the partner</td></tr><tr><td>bank_code</td><td>Numeric</td><td>Mandatory</td><td>Bank code of VA receiver</td></tr><tr><td>bank_name</td><td>Alphanumeric</td><td>Mandatory</td><td>Beneficiary Bank Name</td></tr><tr><td>bank_response_code</td><td>Numeric</td><td>Mandatory</td><td>Response transaction (trx) from bank: <br>2 = Transaction Success, <br>3 = Transaction Reversal/Transaction Expired</td></tr><tr><td>bank_response_msg</td><td>Alphanumeric</td><td>Mandatory</td><td>Response message of transaction (trx) from bank</td></tr><tr><td>signature</td><td>Alphanumeric</td><td>Mandatory</td><td>*) see documentation on generate signature</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Request" %}

```json
{  
   "request":"Notification",
   "virtual_account":"9920000153",
   "va_name":"Aselole",
   "beneficiary_virtual_account":"9920000206",
   "beneficiary_account":"1020006137993",
   "beneficiary_name":"PT LENTERA ABADI INDONUSA",
   "trx_id":"1064620",
   "trx_date":"2018-09-18 14:53:00.0000000",
   "trx_amount":"15000",
   "trx_desc":"Cashout disburse",
   "trx_status":"2",
   "trx_status_date":"2018-09-18 16:19:02.7059190",
   "trx_reff":"9999980500003798",
   "trx_no":"3140815927999298410",
   "bank_code":"008",
   "bank_name":"BANK MANDIRI",
   "bank_response_code":"2",
   "bank_response_msg":"Payment Success",
   "signature":"e3350052919bfef6a436110988265508aa5738898383a4bae4d4cb4e3575cf27"
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
&#x20;Notes: Please note, that in the notification process. **trx\_status** parameter will be able to know the actual status of transactions.
{% endhint %}

{% tabs %}
{% tab title="Response Body" %}

<table><thead><tr><th width="267">Parameter</th><th width="150">Type</th><th width="150">Required</th><th>Description</th></tr></thead><tbody><tr><td>response</td><td>Alphanumeric</td><td>Mandatory</td><td>Description of response</td></tr><tr><td>virtual_account</td><td>Numeric</td><td>Mandatory</td><td>VA Sender of transaction</td></tr><tr><td>beneficiary_virtual_account</td><td>Numeric</td><td>Mandatory</td><td>Receiver VA number</td></tr><tr><td>bank_code</td><td>Numeric</td><td>Mandatory</td><td>Bank code of VA receiver</td></tr><tr><td>bank_name</td><td>Alphanumeric</td><td>Mandatory</td><td>Bank name</td></tr><tr><td>response_code</td><td>Numeric</td><td>Mandatory</td><td>List of response:<br>00 = Success, <br>01 = Failed</td></tr><tr><td>response_desc</td><td>Alphanumeric</td><td>Mandatory</td><td>Response Description</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Response" %}

```json
{  
   "response":"Notification",
   "virtual_account":"9920000153",
   "beneficiary_virtual_account":"9920000206",
   "bank_code":"008",
   "bank_name":"BANK MANDIRI",
   "response_code":"00",
   "response_desc":"Success"
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.faspay.co.id/merchant-integration/api-reference-1/sendme/notification-callback.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.
