# SNAP Direct Debit

## API Services

## Header

### Header Request

Header parameters for transaction request.

<table><thead><tr><th width="192">Parameter</th><th width="95">M/O/C</th><th width="113">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>Content-Type</td><td>M</td><td>String</td><td>String represents indicate the media type of the resource (e.g. application/json, application/pdf)</td></tr><tr><td>X-TIMESTAMP</td><td>M</td><td>String</td><td>Client's current local time in yyyy-MM-ddTHH:mm:ss TZD format</td></tr><tr><td>X-SIGNATURE</td><td>M</td><td>String</td><td><p>Represents signature of a request.</p><p>Signature details <a href="https://docs.faspay.co.id/merchant-integration/api-reference-1/snap/signature-snap">here</a>.</p></td></tr><tr><td>ORIGIN</td><td>O</td><td>String</td><td>Origin Domain www.yourdomain.com</td></tr><tr><td>X-PARTNER-ID</td><td>M</td><td>String (36)</td><td>Unique ID for a partner. merchant_id mapped here</td></tr><tr><td>X-EXTERNAL- ID</td><td>M</td><td>String (36)</td><td>Numeric String. Reference number that should be unique in the same day</td></tr><tr><td>CHANNEL-ID</td><td>M</td><td>String (5)</td><td>Faspay’s channel id Device identification on which the API services is currently being accessed by the end user (customer)</td></tr></tbody></table>

### Header Response

Header parameters for transaction response.

<table><thead><tr><th width="179">Parameter</th><th width="97">M/O/C</th><th width="107">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>Content-Type</td><td>M</td><td>String</td><td>application/json</td></tr><tr><td>X-TIMESTAMP</td><td>M</td><td>String</td><td>Client's current local time in yyyy-MM-ddTHH:mm:ss TZD format</td></tr></tbody></table>

{% tabs %}
{% tab title="Header Request Sample" %}

```json
Content-type: application/json  
X-TIMESTAMP: 2020-12-17T10:55:00+07:00  
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5  
ORIGIN: www.hostname.com  
X-PARTNER-ID: 82150  
X-EXTERNAL-ID: 41807553358950093184162180797837
CHANNEL-ID: 77001  
```

{% endtab %}

{% tab title="Header Response Sample" %}

```json
Content-type: application/json 
X-TIMESTAMP: 2020-12-21T10:30:34+07:00
```

{% endtab %}
{% endtabs %}

## Body

### Direct Debit Payment

<mark style="color:green;">`POST`</mark> `/{version}/debit/payment-host-to-host`

This API service is used for payment using direct debit.

**Service Code:** 54

Notes: - `*`is required

&#x20;           \- Current version: v1.0

&#x20;          &#x20;

**URL Path**

Sandbox: [`https://debit-sandbox.faspay.co.id/v1.0/debit/payment-host-to-host`](https://debit-sandbox.faspay.co.id/v1.0/debit/payment-host-to-host)

#### Request Body

| Parameter                                            | Data Type    | Description                                                                                                                                                                                                                                                                                                                                                                             |
| ---------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| partnerReferenceNo<mark style="color:red;">\*</mark> | String(32)   | <p>Transaction identifier on</p><p>service consumer system</p>                                                                                                                                                                                                                                                                                                                          |
| bankCardToken                                        | String(560)  | <p>Card token for payment <strong>(Conditional parameter)</strong></p><p></p><p><strong>Notes:</strong> </p><p><strong>Mandatory for</strong> payment channel <strong>BRI Direct Debit</strong></p>                                                                                                                                                                                     |
| validUpTo<mark style="color:red;">\*</mark>          | String(25)   | <p>The time when the payment will be automatically expired. </p><p>(ISO8601)</p>                                                                                                                                                                                                                                                                                                        |
| currency<mark style="color:red;">\*</mark>           | String(3)    | Currency                                                                                                                                                                                                                                                                                                                                                                                |
| value<mark style="color:red;">\*</mark>              | String(16,2) | <p>Net amount of the transaction. If it's IDR then value includes 2 decimal digits. </p><p><strong>e.g.</strong> IDR 10.000,- will be placed with 10000.00</p><p>(ISO4217)</p>                                                                                                                                                                                                          |
| amount                                               | Object       | An object that contains information about an amount or value within a specific context.                                                                                                                                                                                                                                                                                                 |
| merchantId<mark style="color:red;">\*</mark>         | String(5)    | Merchant identifier that is unique per each merchant                                                                                                                                                                                                                                                                                                                                    |
| billDate<mark style="color:red;">\*</mark>           | String(25)   | <p>Transaction/Order Date</p><p>(ISO 8601)</p>                                                                                                                                                                                                                                                                                                                                          |
| channelCode<mark style="color:red;">\*</mark>        | String(32)   | <p>Payment Channel Code</p><p> </p><p><strong>List Channel Code:</strong></p><p>814: Maybank2U</p><p>704: SAKUKU</p><p>714: BRI Direct Debit</p><p>713: Shopeepay App</p><p>716: Linkaja App</p><p>812: OVO</p><p>819: DANA</p><p>700: CIMB Clicks</p><p>701: D-Bank Pro</p><p>401: BRI E-PAY</p><p>405: BCA KlikPay</p><p>302: LinkAja</p><p>722: DANA Subs</p><p>720: OVO OpenAPI</p> |
| additionalInfo                                       | Object       | Additional Information                                                                                                                                                                                                                                                                                                                                                                  |
| items                                                | Object(50)   | List item product                                                                                                                                                                                                                                                                                                                                                                       |
| email                                                | String(128)  | <p>Customer email <strong>(Conditional parameter)</strong></p><p></p><p><strong>Notes:</strong> </p><p><strong>Mandatory for</strong> payment channel <strong>OVO Tokenized</strong></p>                                                                                                                                                                                                |
| phoneNo                                              | String(30)   | <p>Customer Phone Number <strong>(Conditional parameter)</strong></p><p></p><p><strong>Notes:</strong> </p><p><strong>Mandatory for</strong> payment channel <strong>OVO Tokenized</strong></p>                                                                                                                                                                                         |
| customerName                                         | String(128)  | <p>Customer name <strong>(Conditional parameter)</strong></p><p></p><p><strong>Notes:</strong> </p><p><strong>Mandatory for</strong> payment channel <strong>Dana Subs</strong></p>                                                                                                                                                                                                     |
| billDescription<mark style="color:red;">\*</mark>    | String(128)  | Bill description                                                                                                                                                                                                                                                                                                                                                                        |
| externalGoodsId                                      | String(10)   | Item code                                                                                                                                                                                                                                                                                                                                                                               |
| subscriptionIntervalValue                            | String(1)    | <p>Determine how many months/week</p><p>(e.g 1/2/3/4)</p>                                                                                                                                                                                                                                                                                                                               |
| subscriptionIntervalType                             | String(10)   | <p>Determine months/week</p><p>(e.g MONTHLY/WEEKLY)</p>                                                                                                                                                                                                                                                                                                                                 |
| subscriptionMessage                                  | String(50)   | Product Subscription detail                                                                                                                                                                                                                                                                                                                                                             |
| product                                              | String(50)   | Product name                                                                                                                                                                                                                                                                                                                                                                            |
| items                                                | Object(50)   | <p>List item product <strong>(Conditional parameter)</strong></p><p></p><p><strong>Notes:</strong> </p><p><strong>Mandatory for</strong> payment channel <strong>LinkAja</strong></p>                                                                                                                                                                                                   |
| amount                                               | Object       | <p>An object that contains information about an amount or value within a specific context.<strong>(Conditional parameter)</strong></p><p></p><p><strong>Notes:</strong> </p><p><strong>Mandatory for</strong> payment channel <strong>LinkAja</strong></p>                                                                                                                              |
| product                                              | String(50)   | <p>Product Name <strong>(Conditional parameter)</strong></p><p></p><p><strong>Notes:</strong> </p><p><strong>Mandatory for</strong> payment channel <strong>LinkAja</strong></p>                                                                                                                                                                                                        |
| id                                                   | String(32)   | <p>Product Id <strong>(Conditional parameter)</strong></p><p></p><p><strong>Notes:</strong> </p><p><strong>Mandatory for</strong> payment channel <strong>LinkAja</strong></p>                                                                                                                                                                                                          |
| currency                                             | String(3)    | <p>Currency <strong>(Conditional parameter)</strong></p><p></p><p><strong>Notes:</strong> </p><p><strong>Mandatory for</strong> payment channel <strong>LinkAja</strong></p>                                                                                                                                                                                                            |
| value                                                | String(16,2) | <p>Net amount of the transaction <strong>(Conditional parameter)</strong></p><p></p><p>If it's IDR then value includes 2</p><p>decimal digits. <strong>e.g.</strong> IDR 10.000,- will be placed with 10000.00<br>(ISO4217)</p><p></p><p><strong>Notes:</strong> </p><p><strong>Mandatory for</strong> payment channel <strong>LinkAja</strong></p>                                     |
| quantity                                             | String(32)   | <p>Item Quantity <strong>(Conditional parameter)</strong></p><p></p><p><strong>Notes:</strong> </p><p><strong>Mandatory for</strong> payment channel <strong>LinkAja</strong></p>                                                                                                                                                                                                       |
|                                                      | String       | **Items parameters for Dana Subs payment channel (channel code: 722)**                                                                                                                                                                                                                                                                                                                  |

{% hint style="info" %}
Please take note of request parameters there are specific parameters exclusively utilized for particular payment channels, such as for payment channels Dana Subs, LinkAja, and BRI Direct Debit.
{% endhint %}

#### Response Parameters Direct Debit Payment

<table><thead><tr><th width="224">Parameter</th><th width="100">M/O/C</th><th width="102">Type</th><th width="101">Length</th><th>Description</th></tr></thead><tbody><tr><td>responseCode</td><td>M</td><td>String</td><td>7</td><td>Response code</td></tr><tr><td>responseMessage</td><td>M</td><td>String</td><td>150</td><td>Response description</td></tr><tr><td>referenceNo</td><td>M</td><td>String</td><td>16</td><td>Transaction identifier on service provider system. Must be filled upon successful transaction</td></tr><tr><td>partnerReferenceNo</td><td>M</td><td>String</td><td>32</td><td><p>Transaction identifier on</p><p>service consumer system</p></td></tr><tr><td>appRedirectUrl</td><td>C</td><td>String</td><td>256</td><td>Returns an URL scheme to PJP AIS payment page in native app.</td></tr><tr><td>webRedirectUrl</td><td>C</td><td>String</td><td>256</td><td><p>Returns a universal link to PJP AIS Payment page. This link is recommended when the Client is unable to implement a check for</p><p>whether PJP AlS app is installed on the user's device before redirect.</p></td></tr><tr><td>additionalInfo</td><td>O</td><td>Object</td><td> </td><td>Additional information</td></tr><tr><td>merchantId</td><td>M</td><td>String</td><td>5</td><td>Merchant identifier that is unique per each merchant</td></tr><tr><td>webUrl</td><td>C</td><td>String</td><td>256</td><td>The redirect url for the next process, available only on JSON format</td></tr><tr><td>amount</td><td>M</td><td>Object</td><td> </td><td>An object that contains information about an amount or value within a specific context.</td></tr><tr><td>value</td><td>M</td><td>String </td><td>16,2</td><td><p>Net amount of the transaction. If it's IDR then value includes 2 decimal digits. </p><p><strong>e.g.</strong> IDR 10.000,- will be placed with 10000.00<br>(ISO4217)</p></td></tr><tr><td>currency</td><td>M</td><td>String</td><td>3</td><td>Currency</td></tr></tbody></table>

{% tabs %}
{% tab title="DD Payment Request Sample" %}

```json
{
    "partnerReferenceNo":"2020102900000000000008",
    "merchantId":"99999",
    "amount":{
        "value":"100.00",
        "currency":"IDR"
    },
    "validUpTo":"2023-03-31T23:00:00+07:00",
    "additionalInfo":{
        "channelCode":"722",
        "billDate":"2023-03-31T23:00:00+07:00",
        "billDescription":"SNAP Transaction",
        "phoneNo":"081274657847",
    }
}

```

{% endtab %}

{% tab title="DD Payment Request Sample(Dana Subs)" %}

```json
{
    "partnerReferenceNo": "2020102900000000000001",
    "merchantId": "99999",
    "amount":
    {
        "value": "2000.00",
        "currency": "IDR"
    },
    "validUpTo": "2023-10-12T23:00:00+07:00",
    "additionalInfo":
    {
        "channelCode": "722",
        "billDate": "2023-10-12T14:30:00+07:00",
        "billDescription": "SNAP Transaction",
        "customerName": "John Dokul",
        "phoneNo": "081382826301",
        "email": "denis@faspay.co.id",
        "items":
        {
            "product": "Black and white",
            "subscriptionMessage": "box office",
            "subscriptionIntervalType": "MONTHLY",
            "subscriptionIntervalValue": "1",
            "externalGoodsId": "cart-123"
        }
    }
}
```

{% endtab %}

{% tab title="DD Payment Request Sample(LinkAja)" %}

```json
{
    "partnerReferenceNo": "2020102900000000000001",
    "merchantId": "99999",
    "amount":
    {
        "value": "2000.00",
        "currency": "IDR"
    },
    "validUpTo": "2023-10-12T23:00:00+07:00",
    "additionalInfo":
    {
        "channelCode": "302",
        "billDate": "2023-10-12T14:30:00+07:00",
        "billDescription": "SNAP Transaction",
        "customerName": "John Dokul",
        "phoneNo": "081382826301",
        "email": "denis@faspay.co.id",
        "items":
        {
            "id": "1",
            "product": "Black and white",
            "amount":
            {
                "value": "1000.00",
                "currency": "IDR"
            },
            "quantity": "2",
        }
    }
}

```

{% endtab %}

{% tab title="DD Payment Request Sample(BRI Direct Debit)" %}

```json
{
    "bankCardToken":"card_.eyJpYXQiOjE2OTYyMzA2MTIsImlzcyI6IkJhbmsgQlJJIC0gRENFIiwianRpIjoiOWJlNDE3MWYtNTljNS00MzJiLWI5ODktNmQyYWUzNDVhNGIxIiwicGFydG5lcklkIjoi77-9Iiwic2VydmljZU5hbWUiOiJERF9FWFRFUk5BTF9TRVJWSUNFIn0.rJBUCGvNqIuCcvQo_gih9rLEMRBqu74YzWOJU6kt-E3rlXWcUTwFA66dWDxIBUbMMtVT3FbPD3jICSYJ75ULopT8ibUrecafTg4XzYf2-mGglUBCd9KCC3xdo9pccZwG_VYIWeH8gk7cqw-jKs440WYX4Znf5R2-CE7-P13yDqS9-xfoggM4E0H5jvqSrBTswQ5MgfryX5FtdJ0TV0pNPmEZ5p7V_qzQnUFxgZxL6ueYaAF5EfG3bQcBRhHuXJ_YDnhEuH4oGFET5esbM_wT-R40X0flXEBC4JDqripwGt0-KqaTAtfp4zZ0udj-08RmkMPFCJGfNSz1-r3BRGYzcw",
    "partnerReferenceNo":"2020102900000000000001",
    "merchantId":"99999",
    "amount":{
        "value":"1000.00",
        "currency":"IDR"
    },
    "validUpTo":"2023-10-27T23:00:00+07:00",
    "additionalInfo":{
        "channelCode":"714",
        "billDate":"2023-10-27T14:00:00+07:00",
        "billDescription":"SNAP Transaction",
        "customerName":"John Dokul",
        "phoneNo":"081382826301",
        "email":"denis@faspay.co.id"
    }
}
```

{% endtab %}

{% tab title="DD Payment Request Sample(OVO Tokenized)" %}

```json
{
    "partnerReferenceNo": "2020102900000000000001",
    "merchantId": "99999",
    "amount":
    {
        "value": "2000.00",
        "currency": "IDR"
    },
    "validUpTo": "2023-10-23T23:00:00+07:00",
    "additionalInfo":
    {
        "channelCode": "720",
        "billDate": "2023-10-23T16:30:00+07:00",
        "billDescription": "SNAP Transaction",
        "customerName": "John Dokul",
        "phoneNo": "081382826301",
        "email": "denis@faspay.co.id"
    }
}

```

{% endtab %}

{% tab title="DD Payment Response Sample" %}

```json
{
    "responseCode": "2005400",
    "responseMessage": "Request has been processed successfully",
    "referenceNo": "9999972270967929",
    "partnerReferenceNo": "2020102900000000000008",
    "webRedirectUrl":"https://debit-staging.faspay.co.id/pws/100003/0830000010100000/f6b92da317d40ffbc40c98ffa80cc924d7b35dd5?trx_id=9999972270967929&merchant_id=99999&bill_no=2020102900000000000008",
    "additionalInfo":
    {
        "merchantId": "99999",
        "amount":
        {
            "value": "100.00",
            "currency": "IDR"
        }
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
To use the OVO Tokenized payment channel, users need to initially activate their phone numbers
{% endhint %}

### Direct Debit Payment Status

<mark style="color:green;">`POST`</mark> `/{version}/debit/status`

This API service is used to check the direct debit payment status.

**Service Code:** 55

Notes: - `*`is required

&#x20;           \- Current version: v1.0

**URL Path**

Sandbox: [`https://debit-sandbox.faspay.co.id/v1.0/debit/status`](https://debit-sandbox.faspay.co.id/v1.0/debit/status)

#### Request Body

<table><thead><tr><th width="262">Parameter</th><th>Data Type</th><th>Description</th></tr></thead><tbody><tr><td>originalPartnerReferenceNo<mark style="color:red;">*</mark></td><td>String(32)</td><td>Original transaction identifier on service consumer system</td></tr><tr><td>originalReferenceNo<mark style="color:red;">*</mark></td><td>String(16)</td><td>Original transaction identifier on service provider system</td></tr><tr><td>serviceCode<mark style="color:red;">*</mark></td><td>String(2)</td><td>Transaction type indicator (service code of the original transaction request)</td></tr><tr><td>merchantId<mark style="color:red;">*</mark></td><td>String(5)</td><td><p>Merchant identifier that is</p><p>unique per each merchant</p></td></tr><tr><td>additionalInfo</td><td>Object</td><td>Additional Information</td></tr><tr><td>  channelCode<mark style="color:red;">*</mark></td><td>String(32)</td><td><p>Payment Channel Code</p><p> </p><p><strong>List Channel Code:</strong></p><p>814: Maybank2U</p><p>704: SAKUKU</p><p>714: BRI Direct Debit</p><p>713: Shopeepay App</p><p>716: Linkaja App</p><p>812: OVO</p><p>819: DANA</p><p>700: CIMB Clicks</p><p>701: D-Bank Pro</p><p>401: BRI E-PAY</p><p>405: BCA KlikPay</p><p>302: LinkAja</p><p>722: DANA Subs</p><p>720: OVO OpenAPI</p></td></tr></tbody></table>

#### Response Parameters Direct Debit Payment Status

<table><thead><tr><th width="254">Parameter</th><th width="103">M/O/C</th><th width="94">Data Type</th><th width="91">Length</th><th>Description</th></tr></thead><tbody><tr><td>responseCode</td><td>M</td><td>String</td><td>7</td><td>Response code</td></tr><tr><td>responseMessage</td><td>M</td><td>String</td><td>150</td><td><p>Response</p><p>description</p></td></tr><tr><td>originalPartnerReferenceNo</td><td>M</td><td>String</td><td>32</td><td>Original transaction identifier on service consumer system</td></tr><tr><td>originalReferenceNo</td><td>M</td><td>String</td><td>16</td><td>Original transaction identifier on service provider system. Must be filled upon successful transaction</td></tr><tr><td>serviceCode</td><td>M</td><td>String</td><td>2</td><td>Transaction type indicator (service code of the original transaction request)</td></tr><tr><td>latestTransactionStatus</td><td>M</td><td>String</td><td>2</td><td><p>Status code list:</p><p>00  - Success</p><p>01  - Initiated</p><p>03  - Pending</p><p>04  - Refunded</p><p>05  - Canceled</p><p>06  - Failed</p><p>07 - Not found<br>07 - Expired</p></td></tr><tr><td>transactionStatusDesc</td><td>M</td><td>String</td><td>32</td><td>Description status transaction</td></tr><tr><td>paidTime</td><td>C</td><td>String</td><td>25</td><td><p>Transaction date : ISO 8601.</p><p> </p><p><strong>Notes:</strong></p><ul><li>Mandatory when payment Happened</li></ul></td></tr><tr><td>additionalInfo</td><td>O</td><td>Object</td><td> </td><td>Additional information</td></tr><tr><td>merchantId</td><td>M</td><td>String</td><td>5</td><td><p>Merchant identifier that is</p><p>unique per each merchant</p></td></tr><tr><td>amount</td><td>C</td><td>Object</td><td> </td><td>An object that contains information about an amount or value within a specific context.</td></tr><tr><td>value</td><td>C</td><td>String </td><td>16,2</td><td><p>Amount of customer payment. If it's IDR then value includes 2 decimal digits.</p><p>e.g. IDR 10.000,- will be placed with 10000.00.</p><p> </p><p><strong>Notes:</strong></p><ul><li>Mandatory when payment Happened</li></ul><p>(ISO4217)</p></td></tr><tr><td>currency</td><td>C</td><td>String</td><td>3</td><td>Currency</td></tr><tr><td>paymentReff</td><td>C</td><td>String</td><td>16</td><td><p>Payment Reff (from Payment Channel).</p><p> </p><p><strong>Notes:</strong></p><ul><li>Mandatory when payment Happened</li></ul></td></tr></tbody></table>

{% tabs %}
{% tab title="DD Payment Status Request Sample" %}

```json
{
    "originalPartnerReferenceNo": "2020102900000000000001",
    "originalReferenceNo": "7139999985808445",
    "serviceCode": "55",
    "merchantId": "99999",
    "additionalInfo":
    {
        "channelCode": "713"
    }
}
```

{% endtab %}

{% tab title="DD Payment Status Response Sample" %}

```json
{
    "responseCode": "2005500",
    "responseMessage": "Request has been processed successfully",
    "originalPartnerReferenceNo": "2020102900000000000001",
    "originalReferenceNo": "7139999985808445",
    "serviceCode": "55",
    "latestTransactionStatus": "00",
    "transactionStatusDesc": "Success",
    "paidTime": "2023-10-17 15:22:43",
    "additionalInfo":
    {
        "merchantId": "99999",
        "amount":
        {
            "value": "1000.00",
            "currency": "IDR"
        },
        "paymentReff": "164897256163543860"
    }
}
```

{% endtab %}
{% endtabs %}

### Direct Debit Payment Cancel

<mark style="color:green;">`POST`</mark> `/{version}/debit/cancel`

The Direct Debit Payment Cancel API is used when there are cancelation of the payment.

**Service Code**: 57

Notes: - `*`is required

&#x20;           \- Current version: v1.0

**URL Path**

Sandbox: [`https://debit-sandbox.faspay.co.id/v1.0/debit/cancel`](https://debit-sandbox.faspay.co.id/v1.0/debit/cancel)

#### Request Body

<table><thead><tr><th width="262">Parameter</th><th>Data Type</th><th>Description</th></tr></thead><tbody><tr><td>originalpartnerReferenceNo<mark style="color:red;">*</mark></td><td>String(32)</td><td>Transaction identifier on service consumer system</td></tr><tr><td>originalReferenceNo<mark style="color:red;">*</mark></td><td>String(16)</td><td>Original transaction identifier on service provider system</td></tr><tr><td>merchantId<mark style="color:red;">*</mark></td><td>String(5)</td><td>Merchant identifier that is unique per each merchant</td></tr><tr><td>reason<mark style="color:red;">*</mark></td><td>String(50)</td><td>Cancellation reason.</td></tr><tr><td>additionalInfo</td><td>String</td><td>Additional information</td></tr><tr><td>  channelCode<mark style="color:red;">*</mark></td><td>String(32)</td><td><p>Payment Channel Code</p><p> </p><p><strong>List Channel Code:</strong></p><p>814: Maybank2U</p><p>704: SAKUKU</p><p>714: BRI Direct Debit</p><p>713: Shopeepay App</p><p>716: Linkaja App</p><p>812: OVO</p><p>819: DANA</p><p>700: CIMB Clicks</p><p>701: D-Bank Pro</p><p>401: BRI E-PAY</p><p>405: BCA KlikPay</p><p>302: LinkAja</p><p>722: DANA Subs</p><p>720: OVO OpenAPI</p></td></tr></tbody></table>

#### Response Parameters Direct Debit Payment Cancel

<table><thead><tr><th width="286">Parameter</th><th width="102">M/O/C</th><th width="118">Data Type</th><th width="102">Length</th><th>Description</th></tr></thead><tbody><tr><td>responseCode</td><td>M</td><td>String</td><td>7</td><td>Response code</td></tr><tr><td>responseMessage</td><td>M</td><td>String</td><td>150</td><td>Response description</td></tr><tr><td>originalPartnerReferenceNo</td><td>M</td><td>String</td><td>32</td><td>Original transaction identifier on service consumer system</td></tr><tr><td>originalReferenceNo</td><td>M</td><td>String</td><td>16</td><td>Original transaction identifier on service provider system</td></tr><tr><td>cancelTime</td><td>C</td><td>String</td><td>25</td><td>Cancel time (ISO-8601). Must be filled if cancelled transaction success</td></tr><tr><td>additionalInfo</td><td>O</td><td>Object</td><td> </td><td>Additional information</td></tr><tr><td>    merchantId</td><td>M</td><td>String</td><td>5</td><td>Unique identifier of merchant in client system.</td></tr><tr><td>    latestTransactionStatus</td><td>M</td><td>String</td><td>2</td><td><p>Status code list:</p><p>00  - Success</p><p>01  - Initiated</p><p>03  - Pending</p><p>04  - Refunded</p><p>05  - Canceled</p><p>06  - Failed</p><p>07 - Not found<br>07 - Expired</p></td></tr><tr><td>    transactionStatusDesc</td><td>M</td><td>String</td><td>32</td><td>Transaction Status Description</td></tr></tbody></table>

{% tabs %}
{% tab title="DD Payment Cancel Request Sample" %}

```json
{ 
   "originalPartnerReferenceNo":"2020102900000000000001", 
   "originalReferenceNo":"1653473625364758", 
   "merchantId":"99999", 
   "reason":"Network timeout", 
   "additionalInfo":{ 
       "channelCode":"302" 
   } 
} 
```

{% endtab %}

{% tab title="DD Payment Cancel Response Sample" %}

```json
{
    "responseCode": "2005700",
    "responseMessage": "Request has been processed successfully",
    "originalPartnerReferenceNo": "2020102900000000000001",
    "originalReferenceNo": "7139999910232541",
    "cancelTime": "2023-03-21T10:42:40+07:00",
    "additionalInfo":
    {
        "merchantId": "99999",
        "latestTransactionStatus": "05",
        "transactionStatusDesc": "Cancelled"
    }
}
```

{% endtab %}
{% endtabs %}

### Payment Notification

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

The detailed API reference can be found [here ](https://docs.faspay.co.id/merchant-integration/api-reference-1/debit-transaction/payment-notification)

## Integration Requirement&#x20;

Integration need API & Credential Key.

### Response Code

Response status consists of 2 components, the code (response code) and the description (response message).

<table><thead><tr><th width="187">Component</th><th width="86">Type</th><th width="101">Length</th><th>Description</th></tr></thead><tbody><tr><td>responseCode</td><td>String</td><td>7</td><td>response code = HTTP status code + service code + case code</td></tr><tr><td>responseMessage</td><td>String</td><td>150</td><td></td></tr></tbody></table>

### Response Code List

<table><thead><tr><th width="147">Category</th><th width="90">HTTP Code</th><th width="103">Service Code</th><th width="72">Case Code</th><th width="159">Response Message</th><th width="383">Description</th></tr></thead><tbody><tr><td>Success</td><td>200</td><td>any</td><td>0</td><td>Successful</td><td>Successful</td></tr><tr><td>Success</td><td>202</td><td>any</td><td>0</td><td>Request In Progress</td><td>Transaction still on process</td></tr><tr><td>System</td><td>400</td><td>any</td><td>0</td><td>Bad Request</td><td>General request failed error, including message parsing failed.</td></tr><tr><td>Message</td><td>400</td><td>any</td><td>1</td><td>Invalid Field Format {field name}</td><td>Invalid format</td></tr><tr><td>Message</td><td>400</td><td>any</td><td>2</td><td>Invalid Mandatory Field {field name}</td><td>Missing or invalid format on mandatory field</td></tr><tr><td>System</td><td>401</td><td>any</td><td>0</td><td>Unauthorized. [reason]</td><td><p>General unauthorized error (No Interface Def,</p><p>API is Invalid, Oauth</p><p>Failed, Verify Client</p><p>Secret Fail, Client</p><p>Forbidden Access API,</p><p>Unknown Client, Key not</p><p>Found)</p></td></tr><tr><td>System</td><td>401</td><td>any</td><td>1</td><td>Invalid Token (B2B)</td><td><p>Token found in request is invalid (Access Token Not Exist, Access Token</p><p>Expiry)</p></td></tr><tr><td>System</td><td>401</td><td>any</td><td>2</td><td>Invalid Customer Token</td><td><p>Token found in request is invalid (Access Token Not Exist, Access Token</p><p>Expiry)</p></td></tr><tr><td>System</td><td>401</td><td>any</td><td>3</td><td>Token Not Found (B2B)</td><td>Token not found in the system. This occurs on any API that requires token as input parameter</td></tr><tr><td>System</td><td>401</td><td>any</td><td>4</td><td>Customer Token Not Found</td><td>Token not found in the system. This occurs on any API that requires token as input parameter</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>0</td><td>Transaction Expired</td><td>Transaction expired</td></tr><tr><td>System</td><td>403</td><td>any</td><td>1</td><td>Feature Not Allowed [Reason]</td><td>This merchant is not allowed to call Direct Debit APIs</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>2</td><td>Exceeds Transaction Amount Limit</td><td>Exceeds Transaction Amount Limit</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>3</td><td>Suspected Fraud</td><td>Suspected Fraud</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>4</td><td>Activity Count Limit Exceeded</td><td><p>Too many request,</p><p>Exceeds Transaction Frequency Limit</p></td></tr><tr><td>Business</td><td>403</td><td>any</td><td>5</td><td>Do Not Honor</td><td>Account or User status is abnormal</td></tr><tr><td>System</td><td>403</td><td>any</td><td>6</td><td>Feature Not Allowed At This Time. [reason]</td><td>Cut off In Progress</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>7</td><td>Card Blocked</td><td>The payment card is blocked</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>8</td><td>Card Expired</td><td>The payment card is expired</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>9</td><td>Dormant Account</td><td>The account is dormant</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>10</td><td><p>Need To Set Token</p><p>Limit</p></td><td>Need to set token limit</td></tr><tr><td>System</td><td>403</td><td>any</td><td>11</td><td>OTP Blocked</td><td>OTP has been blocked</td></tr><tr><td>System</td><td>403</td><td>any</td><td>12</td><td>OTP Lifetime Expired</td><td>OTP has been expired</td></tr><tr><td>System</td><td>403</td><td>any</td><td>13</td><td>OTP Sent To Cardholer</td><td>initiates request OTP to the issuer</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>14</td><td>Insufficient Funds</td><td>Insufficient Funds</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>15</td><td><p>Transaction Not</p><p>Permitted.[reason]</p></td><td>Transaction Not Permitted</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>16</td><td>Suspend Transaction</td><td>Suspend Transaction</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>17</td><td>Token Limit Exceeded</td><td>Purchase amount exceeds the token limit set prior</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>18</td><td><p>Inactive</p><p>Card/Account/Customer</p></td><td>Indicates inactive account</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>19</td><td>Merchant Blacklisted</td><td>Merchant is suspended from calling any APIs</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>20</td><td>Merchant Limit Exceed</td><td><p>Merchant aggregated purchase amount on that</p><p>day exceeds the agreed limit</p></td></tr><tr><td>Business</td><td>403</td><td>any</td><td>21</td><td>Set Limit Not Allowed</td><td>Set limit not allowed on particular token</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>22</td><td>Token Limit Invalid</td><td>The token limit desired by the merchant is not within the agreed range between the merchant and the Issuer</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>23</td><td>Account Limit Exceed</td><td><p>Account aggregated purchase amount on that</p><p>day exceeds the agreed limit</p></td></tr><tr><td>Business</td><td>404</td><td>any</td><td>0</td><td>Invalid Transaction Status</td><td>Invalid transaction status</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>1</td><td>Transaction Not Found</td><td>Transaction not found</td></tr><tr><td>System</td><td>404</td><td>any</td><td>2</td><td>Invalid Routing</td><td>Invalid Routing</td></tr><tr><td>System</td><td>404</td><td>any</td><td>3</td><td>Bank Not Supported By Switch</td><td>Bank not supported by switch</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>4</td><td>Transaction Cancelled</td><td>Transaction is cancelled by customer</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>5</td><td><p>Merchant Is Not</p><p>Registered For Card</p><p>Registration Services</p></td><td>Merchant is not registered for Card Registration services</td></tr><tr><td>System</td><td>404</td><td>any</td><td>6</td><td>Need To Request OTP</td><td>Need to request OTP</td></tr><tr><td>System</td><td>404</td><td>any</td><td>7</td><td>Journey Not Found</td><td>The journeyID cannot be found in the system</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>8</td><td>Invalid Merchant</td><td>Merchant does not exist or status abnormal</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>9</td><td>No Issuer</td><td>No issuer</td></tr><tr><td>System</td><td>404</td><td>any</td><td>10</td><td>Invalid API Transition</td><td>Invalid API transition within a journey</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>11</td><td><p>Invalid</p><p>Card/Account/Customer</p><p>[info]/Virtual Account</p></td><td><p>Card information may be invalid, or the card account may be</p><p>blacklisted, or Virtual</p><p>Account number maybe invalid.</p></td></tr><tr><td>Business</td><td>404</td><td>any</td><td>12</td><td>Invalid Bill/Virtual Account [Reason]</td><td>The bill is blocked/ suspended/not found. Virtual account is suspend/not found.</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>13</td><td>Invalid Amount</td><td>The amount doesn't match with what supposed to</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>14</td><td>Paid Bill</td><td>The bill has been paid</td></tr><tr><td>System</td><td>404</td><td>any</td><td>15</td><td>Invalid OTP</td><td>OTP is incorrect</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>16</td><td>Partner Not Found</td><td>Partner number can't be found</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>17</td><td>Invalid Terminal</td><td>Terminal does not exist in the system</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>18</td><td>Inconsistent Request</td><td><p>same partner reference number/transaction id It can be considered as failed in transfer debit, but it should be considered as success in transfer credit.</p><p> </p><p>Considered as success:</p><p>'- Transfer credit = (i)</p><p>Intrabank transfer; (ii)</p><p>Interbank transfer; (iii)</p><p>RTGS transfer; (iv)</p><p>SKNBI transfer;</p><p>'- Virtual account = (i)</p><p>Payment VA; (ii)</p><p>Payment to VA;</p><p>'- Transfer debit = (i) </p><p>Refund payment; (ii)</p><p>Void;</p><p> </p><p>Considered as failed:</p><p>'- Transfer credit = (i)</p><p>Transfer to OTC;</p><p>'- Transfer debit = (i)</p><p>Direct debit payment; (ii)</p><p>QR CPM payment; (iii)</p><p>Auth payment; (iv)</p><p>Capture;</p></td></tr><tr><td>Business</td><td>404</td><td>any</td><td>19</td><td><p>Invalid Bill/Virtual</p><p>Account</p></td><td>The bill is expired.  Virtual account is expired.</td></tr><tr><td>System</td><td>405</td><td>any</td><td>0</td><td>Requested Function Is Not Supported</td><td>Requested function is not supported</td></tr><tr><td>Business</td><td>405</td><td>any</td><td>1</td><td>Requested Opearation Is Not Allowed</td><td>Requested operation to cancel/refund transaction Is not allowed at this time.</td></tr><tr><td>System</td><td>409</td><td>any</td><td>0</td><td>Conflict</td><td>Cannot use same XEXTERNAL-ID in same day</td></tr><tr><td>System</td><td>409</td><td>any</td><td>1</td><td>Duplicate partnerReferenceNo</td><td><p>Transaction has previously been processed indicates the same</p><p>partnerReferenceNo already success</p></td></tr><tr><td>System</td><td>429</td><td>any</td><td>0</td><td>Too Many Requests</td><td>Maximum transaction limit exceeded</td></tr><tr><td>System</td><td>500</td><td>any</td><td>0</td><td>General Error</td><td>General Error</td></tr><tr><td>System</td><td>500</td><td>Any</td><td>1</td><td>Internal Server Error</td><td>Unknown Internal Server Failure, Please retry the process again</td></tr><tr><td>System</td><td>500</td><td>Any</td><td>2</td><td>External Server Error</td><td>Backend system failure, etc</td></tr><tr><td>System</td><td>504</td><td>any</td><td>0</td><td>Timeout</td><td>timeout from the issuer</td></tr></tbody></table>
