# B-secure

The basic integration process of online debit will be explained below.

## Integration Step

1. Post Data Transaction to Faspay
2. Redirect customer to online debit website
3. Callback/Return URL
4. Payment Notification

### 1. Post Data Transaction

Post data transactions should be done from the merchant backend, the detailed API reference can be found [Here](/merchant-integration/api-reference-1/debit-transaction/post-data-transaction.md)

This is an example of post data transaction request for an Online Debit channel

{% tabs %}
{% tab title="B-secure" %}

```json
{
   "request": "Post Data Transaction",
   "merchant_id": "99999",
   "merchant": "Sophia Store",
   "bill_no": "20201222114107",
   "bill_reff": "20200324_02-2286704_336",
   "bill_date": "2020-12-19 06:04:29",
   "bill_expired": "2020-12-19 07:04:29",
   "bill_desc": "Payment Online Via Faspay",
   "bill_currency": "IDR",
   "bill_gross": "100000",
   "bill_miscfee": "100000",
   "bill_total": "200000",
   "cust_no": "01",
   "cust_name": "John Doe",
   "payment_channel": "810",
   "pay_type": "01",
   "msisdn": "8562927907",
   "email": "john@gmail.com",
   "terminal": "10",
   "billing_address": "Jl Sabang 37",
   "billing_address_city": "Jakarta",
   "billing_address_region": "DKI Jakarta",
   "billing_address_state": "Indonesia",
   "billing_address_poscode": "10170",
   "billing_address_country_code": "ID",
   "receiver_name_for_shipping": "John Doe",
   "shipping_address": "Jl. Sabang 37",
   "shipping_address_city": "Jakarta",
   "shipping_address_region": "DKI Jakarta",
   "shipping_address_state": "Indonesia",
   "shipping_address_poscode": "10170",
   "item": {
      "id": "A001",
      "product": "Invoice #2286704",
      "qty": "1",
      "amount": "100000",
      "payment_plan": "01",
      "merchant_id":"99999",
      "tenor": "00"
   },
   "reserve1": "",
   "reserve2": "",
   "signature": "4e73de7139cd0c00466a4db93fdf1407a17a5670"
}
```

{% endtab %}
{% endtabs %}

**Post Data Transaction Response**

You will get the post data response like the following

{% tabs %}
{% tab title="B-secure" %}

```json
{
   "response": "Transmission of Purchase Detail Info",
   "trx_id": "9999981000005892",
   "merchant_id": "99999",
   "merchant": "Sophia Store",
   "bill_no": "20201222114107",
   "bill_items": {
      "id": "A001",
      "product": "Invoice #2286704",
      "qty": "1",
      "amount": "100000",
      "payment_plan": "01",
      "merchant_id": "99999",
      "tenor": "00"
   },
   "response_code": "00",
   "response_desc": "Success",
   "redirect_url" : "https://dev.faspay.co.id/pws/100003/0830000010100000/4e73de7139cd0c00466a4db93fdf1407a17a5670?trx_id=9999981000005892&merchant_id=99999&bill_no=20201222114107"
}
```

{% endtab %}
{% endtabs %}

### 2. Redirect customer to online debit's website

To redirect the customer to online debit's Website, use redirect\_url that retrieved from Post Data Transaction response (JSON Format) or follow the detailed API reference [Here](/merchant-integration/api-reference-1/debit-transaction/redirect-process.md)

### 3. Callback/Return URL

After the customer completes the payment via the online debit's website, the online debit website automatically redirects customer to Callback/Return URL. Please provide the URL and make sure it's already registered on Faspay system. For the detailed reference can be found [Here](/merchant-integration/api-reference-1/debit-transaction/url-callback-return-url.md)

### 4. Payment Notification

Payment notification from Faspay to Merchant backend will also be triggered on event of transacion status getting updated, to ensure merchant is securely informed. Please provide the URL and make sure it's already register on Faspay system

The detailed API reference can be found [here](/merchant-integration/api-reference-1/debit-transaction/payment-notification.md)&#x20;


---

# 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/debit-transaction/online-debit/b-secure.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.
