# QuickPay Transaction API\*

\* Only available for Online Merchant Partners with ISO 27001/27701 Certification&#x20;

This section will show you how you can tokenize the user and make the payment more seamless with Indodana. With this QuickPay checkout integration, Indodana user can enjoy the easy & fast checkout experience on your platform. Contrast to normal checkout, user with QuickPay checkout activated won't have to input credentials / sign-in to Indodana platform on every transaction. The user will directly proceed to checkout your transaction if we don't detect any suspicious behavior after you redirect the user to our checkout page.&#x20;

This section only covers the specific QuickPay API integration, so we recommend you to read the [Direct API Integration](https://dev.indodana.id/indodana-paylater/integration/direct-api) first for general integration information.

## User Tokenization Options

This section will guide you on how to get the Indodana QuickPay user token. The Indodana QuickPay user token is a long live unique token per-user that you can store in your system. You need to pass this Indodana QuickPay user token when checkout to enable seamless transaction experience without user sign-in process.&#x20;

Indodana provides two tokenization flows :

* Explicit user tokenization from merchant's platform menu\
  The explicit user tokenization is a flow when user explicitly says that he/she wants to tokenize Indodana account on your platform menu. Upon successful authorization, your system will get the Indodana QuickPay user token via callback request.
* User tokenization on checkout\
  User tokenization on checkout is a flow when user does tokenization while he/she checkouts transactions on your platform using Indodana. Upon successful transaction, your system will get Indodana QuickPay user token via callback request.

## API Method References

## Indodana Connect Account&#x20;

<mark style="color:green;">`POST`</mark> `https://{baseUrl}/v1/connect`

Use this API to initiate user tokenization. After calling this API, you will get a redirection URL for the user to authorize your tokenization request. You need to redirect the user to the redirection URL and upon successful authorization, you will get the Indodana QuickPay user token from the callback.

`*` means the parameter is required

#### Headers

| Name                                            | Type   | Description                                                                                                      |
| ----------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | <p>The generated authentication signature with format <br><code>Bearer {api\_key}:{nonce}:{signature}</code></p> |

#### Request Body

| Name                                              | Type   | Description                                                                                                                                       |
| ------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| merchantUserKey<mark style="color:red;">\*</mark> | string | User identifier in merchant's platform. Indodana will send the Indodana QuickPay token alongside this information so you know the owner of token. |
| phoneNumber<mark style="color:red;">\*</mark>     | string | Phone number of user in merchant's platform.                                                                                                      |
| backToStoreUrl<mark style="color:red;">\*</mark>  | string | Url to be redirected by Indodana to user after the connect process is complete.                                                                   |
| metadata                                          | object | Key value pair of additional information of user / transaction.                                                                                   |

{% tabs %}
{% tab title="200 Connect request successful response with provided redirect url from Indodana. Merchant needs to redirect user to the redirectUrl to continue the connect authorization process from user side. " %}

```
{
    "status": "OK",
    "requestId": "4dbc33a5-86ee-11eb-a301-cddc223655fd",
    "redirectUrl": “https://quickpay.indodana.com/product-installment/connect?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXF1ZXN0SWQiOiI0ZGJjMzNhNS04NmVlLTExZWItYTMwMS1jZGRjMjIzNjU1ZmQiLCJtZXJjaGFudElkIjoiNGZlZjBjY2EtNmE3Ni0xMWU5LWE5MjMtMTY4MWJlNjYzZDNlIiwic2FsdCI6MTYxNTk2NDM2MiwiaWF0IjoxNjE1OTY0MzYyLCJleHAiOjE2MTU5Njc5NjJ9.xWv0CJPUC_saPOIj_gxVYPOSaAY-PV94ZsVL_YRNZoo”
}

```

{% endtab %}

{% tab title="401 " %}

```
{
  "status": "ERROR",
  "error": {
    "kind": "Unauthorized"
    "message": "<String>"
  }
}
```

{% endtab %}
{% endtabs %}

When you initiate checkout with `null` / invalid Indodana QuickPay user token, it will give the signed-in user an option to do tokenization on Indodana checkout page. With this method, you don't need to create a dedicated menu for connecting Indodana account to your platform.

Please refer to [checkout using QuickPay](#purchase-transaction-checkout-1) for the API specification.&#x20;

## Get Payment Calculation

<mark style="color:green;">`POST`</mark> `https://{baseUrl}/v3/payment_calculation`

Once the user is tokenized, you can use this API to know installment options available for the current user based on his/her limit balance.\
\
If you pass a valid Indodana QuickPay user token to call this API, this API will respond with additional properties `currentAvailableLimitBalance` and `isEligible`. When the user's current limit balance is insufficient on the particular tenure option, the property `isEligible` will be false, so you can gray out the payment option based on your platform UI/UX design.

`*` means the parameter is required

#### Headers

| Name                                            | Type   | Description                                                                                                     |
| ----------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------- |
| X-User-Token<mark style="color:red;">\*</mark>  | string | Indodana QuickPay user token                                                                                    |
| Authorization<mark style="color:red;">\*</mark> | string | <p>The generated authentication signature with format<br><code>Bearer {api\_key}:{nonce}:{signature}</code></p> |

#### Request Body

| Name                                     | Type   | Description                                                                                   |
| ---------------------------------------- | ------ | --------------------------------------------------------------------------------------------- |
| items<mark style="color:red;">\*</mark>  | array  | Array of ***\<Item>***. Details of shopping items in the transaction.                         |
| amount<mark style="color:red;">\*</mark> | number | Total amount of the transaction. Should be equal to the sum of all the ***\<Item>***'s costs. |

{% tabs %}
{% tab title="200 " %}

```
{
    "status": "OK",
    "payments": [
        {
            "amount": 7402500,
            "installmentAmount": 8292000,
            "monthlyInstallment": 8292000,
            "tenure": 1,
            "totalInterest": 889500,
            "provision": 352500,
            "paymentType": "Bayar dalam 30 hari",
            "rate": 4,
            "id": "30_days",
            "merchantDiscountRate": 352500,
            "currentAvailableLimitBalance": 7027500,
            "isEligible": false
        },
        {
            "amount": 7402500,
            "installmentAmount": 8292000,
            "monthlyInstallment": 2764000,
            "tenure": 3,
            "totalInterest": 889500,
            "provision": 352500,
            "paymentType": "Bayar dalam 3 bulan",
            "rate": 4,
            "id": "3_months",
            "merchantDiscountRate": 352500,
            "currentAvailableLimitBalance": 7027500,
            "isEligible": false
        },
        {
            "amount": 7404000,
            "installmentAmount": 9183000,
            "monthlyInstallment": 1530500,
            "tenure": 6,
            "totalInterest": 1779000,
            "provision": 354000,
            "paymentType": "Bayar dalam 6 bulan",
            "rate": 4,
            "id": "6_months",
            "merchantDiscountRate": 352500,
            "currentAvailableLimitBalance": 14055000,
            "isEligible": true
        },
        {
            "amount": 7404000,
            "installmentAmount": 10962000,
            "monthlyInstallment": 913500,
            "tenure": 12,
            "totalInterest": 3558000,
            "provision": 354000,
            "paymentType": "Bayar dalam 12 bulan",
            "rate": 4,
            "id": "12_months",
            "merchantDiscountRate": 352500,
            "currentAvailableLimitBalance": 28110000,
            "isEligible": true
        }
    ]
}


```

{% endtab %}

{% tab title="401 " %}

```
{
    "status": "ERROR",
    "error": {
        "kind": "Unauthorized",
        "message": "User token is invalid"
    }
}
```

{% endtab %}
{% endtabs %}

## Purchase Transaction Checkout

<mark style="color:green;">`POST`</mark> `https://{baseUrl}/v3/checkout_url`

This checkout API v3 enables QuickPay integration. You need to pass valid `x-user-token` on the header so user can enjoy the easy & fast checkout experience. \
\
Don't worry if you don't have the Indodana QuickPay user token for current checkout user in the first place, our checkout page already handle the flow and **you need to store the token every time Indodana sends the token via callback to your system and use this token for subsequent transaction**.

`*` means the parameter is required

#### Headers

| Name                                            | Type   | Description                                                                                                     |
| ----------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------- |
| X-User-Token<mark style="color:red;">\*</mark>  | string | Indodana QuickPay user token. You can pass `null` if user account not connected yet in your platform.           |
| Authorization<mark style="color:red;">\*</mark> | string | <p>The generated authentication signature with format<br><code>Bearer {api\_key}:{nonce}:{signature}</code></p> |

#### Request Body

| Name                                                      | Type            | Description                                                                                                                                                                          |
| --------------------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| merchantUserKey<mark style="color:red;">\*</mark>         | string          | User identifier in merchant's platform. Indodana will send the Indodana QuickPay user token alongside this information so you know the owner of the token.                           |
| transactionDetails<mark style="color:red;">\*</mark>      | object          | ***\<Transaction>*** - Detail of the transaction.                                                                                                                                    |
| customerDetails<mark style="color:red;">\*</mark>         | object          | ***\<Customer>*****&#x20;-** Detail of the customer.                                                                                                                                 |
| sellers<mark style="color:red;">\*</mark>                 | array           | Array of ***\<Seller>*****&#x20;-** Detail of the sellers involved in the transaction. May contain more than 1 seller.                                                               |
| billingAddress<mark style="color:red;">\*</mark>          | object          | ***\<Address>*****&#x20;-** Billing address of the customer for the transaction.                                                                                                     |
| shippingAddress<mark style="color:red;">\*</mark>         | string          | (Required only for goods, for service / digital product is not required) <***Address>*****&#x20;-** Shipping address of the customer for the transaction.                            |
| paymentType<mark style="color:red;">\*</mark>             | string          | (Required for active Indodana QuickPay user token) Installment options / payment terms chosen by the customer. ***Possible values:*** `30_days`, `3_months`, `6_months`, `12_months` |
| approvedNotificationUrl<mark style="color:red;">\*</mark> | string          | The URL that will be called by Indodana when the transaction is approved and successful.                                                                                             |
| cancellationRedirectUrl<mark style="color:red;">\*</mark> | string          | The URL for user to be redirected if transaction's cancelled in Indodana's checkout page.                                                                                            |
| backToStoreUrl<mark style="color:red;">\*</mark>          | string          | The URL for user to be redirected after completes the checkout process.                                                                                                              |
| expirationAt                                              | string          | Timestamp when the transaction expired on merchant's platform.                                                                                                                       |
| metadata                                                  | object          | Key value pair contains additional information of transaction.                                                                                                                       |
| couponCodes                                               | Array of String | Coupon Code                                                                                                                                                                          |

{% tabs %}
{% tab title="200 Checkout successful with QuickPay" %}

```
{
  "status": "OK",
  "redirectUrl": "https://quickpay.indodanafinance.co.id/product-installment/quickpay?purchaseTransactionId=aa5023a7-8803-11eb-9b88-7947f72d641d&pid=wat-wat&c=checkout&utm_source=wat-wat&utm_campaign=wat-wat&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwdXJjaGFzZVRyYW5zYWN0aW9uSWQiOiJhYTUwMjNhNy04ODAzLTExZWItOWI4OC03OTQ3ZjcyZDY0MWQiLCJ1c2VySWQiOiI1ZjUwMDBkMS1mM2NlLTQ4NDgtYWNiNS0xZmM5YzZkZjU2ZTAiLCJpc3MiOiJJTkRPREFOQSIsInNjb3BlIjoiUVVJQ0tQQVkiLCJpYXQiOjE2MTYwODM0ODgsImV4cCI6MTYxNjA4NTI4OH0.tOEOdk44iMxCO8quk2_mvcc4A38oZL3iE0Kdh_zkCmY",
  "transactionId": "aa5023a7-8803-11eb-9b88-7947f72d641d"
}
```

{% endtab %}

{% tab title="422 " %}

```
{
  "status": "ERROR",
  "error": {
    "kind": "GenericValidationError"
    "message": "<Object>"
  }
}
```

{% endtab %}
{% endtabs %}

#### Object Type References

For object specification of **Transaction**, **Customer**, **Seller,** **Address**, and **Metadata** can refer to this [API reference](https://dev.indodana.id/indodana-paylater/api-reference#object-type-references).

## QuickPay User Token Revocation

<mark style="color:green;">`POST`</mark> `https://{baseUrl}/v1/revoke_user_token`

You can revoke the Indodana QuickPay user token from your platform permanently. When token is revoked, the token will be invalid and system will trigger tokenization again on next user checkout from your platform. \
\
The token itself can be revoked from your side and Indodana side. So for the integration, we expect you to always save the token from our callback to your system with the purpose to always have the valid token of the user.

`*` means the parameter is required

#### Headers

| Name                                            | Type   | Description                                                                                                     |
| ----------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------- |
| X-User-Token<mark style="color:red;">\*</mark>  | string | Indodana QuickPay user token to be revoked                                                                      |
| Authorization<mark style="color:red;">\*</mark> | string | <p>The generated authentication signature with format<br><code>Bearer {api\_key}:{nonce}:{signature}</code></p> |

{% tabs %}
{% tab title="200 Success revoke provided user token" %}

```
{
    "status": "OK",
    "isActive":false,
    "merchantUserKey": "<merchant user key that has been sent during connect process>"
}

```

{% endtab %}

{% tab title="204 Indodana QuickPay user token previously already revoked (idempotent state). You can mark it as success." %}

```
{
    "status": "OK"
}
```

{% endtab %}

{% tab title="401 Invalid user token" %}

```
{
    "status": "ERROR",
    "error": {
        "kind": "Unauthorized",
        "message": "User token is invalid"
    }
}
```

{% endtab %}
{% endtabs %}

#### Object Type References

For object specification of **Item**, can refer to this [API reference](https://dev.indodana.id/indodana-paylater/api-reference#object-type-references).

## User QuickPay Eligibility

<mark style="color:blue;">`GET`</mark> `https://{baseUr}/v1/users/check_eligibility`

This API is used to check whether a user is eligible to connect QuickPay or not. Eligible means the user has active PayLater Limit

#### Headers

| Name                                            | Type   | Description                                                                                                         |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | <p>The generated authentication signature with the format<br><code>Bearer {api\_key}:{nonce}:{signature}</code></p> |

#### Request Body

| Name                                          | Type   | Description                  |
| --------------------------------------------- | ------ | ---------------------------- |
| phoneNumber<mark style="color:red;">\*</mark> | String | User Registered Phone Number |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "status": "OK",
  "isEligible": true
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
  "status": "ERROR",
  "error": {
    "kind": "Unauthorized",
    "message": "Request is unauthorize"
  }
}
```

{% endtab %}
{% endtabs %}

## User Credit Details

<mark style="color:blue;">`GET`</mark> `https://{base_url}/v1/user_details`

Once user is tokenized, you can use this API to know about user information details including account status and remaining credit limit.

`*` means the parameter is required

#### Headers

| Name                                            | Type   | Description                                                                                |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------------------------ |
| X-User-Token<mark style="color:red;">\*</mark>  | string | Indodana QuickPay user token                                                               |
| Authorization<mark style="color:red;">\*</mark> | string | The generated authentication signaturee with format `Bearer {api_key}:{nonce}:{signature}` |

{% tabs %}
{% tab title="200 " %}

```
{
  "status": "OK",
  "userDetail" : {
        "name" : "Nicholas",
        "email" : "Nicholas@gmail.com",
        "phoneNumber": "+62812xxxx0957",
        "connectedOn": "2021-03-19T17:35:25+0700"
   },
   "creditLimitDetail" : {
        "status" : "ACTIVE",
        "bucketizedCreditLimits":[
            {
                "tenure":"1",
                "limit":1000000,
                "limitBalance":1000000
            }
            {
                "tenure":"3",
                "limit":2000000,
                "limitBalance":2000000
            }
            {
                "tenure":"6",
                "limit":4000000,
                "limitBalance":4000000
            }
            {
                "tenure":"12",
                "limit":8000000,
                "limitBalance":8000000
            }
        ]
    }
}


```

{% endtab %}

{% tab title="401 " %}

```
{
    "status": "ERROR",
    "error": {
        "kind": "Unauthorized",
        "message": "User token is invalid"
    }
}
```

{% endtab %}
{% endtabs %}

## Sample API Request and Response

### Indodana Connect Account

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

```
{
  "merchantUserKey": "+6281221815339",
  "backToStoreUrl": "https://example.merchant/",
  "phoneNumber": "+6281221815339"
}
```

{% endtab %}

{% tab title="API Response" %}

```
{
    "status": "OK",
    "requestId": "4dbc33a5-86ee-11eb-a301-cddc223655fd",
    "redirectUrl": “https://quickpay.indodana.id/product-installment/connect?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXF1ZXN0SWQiOiI0ZGJjMzNhNS04NmVlLTExZWItYTMwMS1jZGRjMjIzNjU1ZmQiLCJtZXJjaGFudElkIjoiNGZlZjBjY2EtNmE3Ni0xMWU5LWE5MjMtMTY4MWJlNjYzZDNlIiwic2FsdCI6MTYxNTk2NDM2MiwiaWF0IjoxNjE1OTY0MzYyLCJleHAiOjE2MTU5Njc5NjJ9.xWv0CJPUC_saPOIj_gxVYPOSaAY-PV94ZsVL_YRNZoo”
}
```

{% endtab %}
{% endtabs %}

### Purchase Transaction Checkout

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

```
{
    "merchantUserKey": "<MERCHANT-USER-KEY>",
    "transactionDetails": {
      "merchantOrderId": "<MERCHANT-ORDER-ID>",
      "amount": 4500000,
      "items": [
        {
          "id": "<MERCHANT-ITEM-ID>",
          "name": "iPhone 6S",
          "category": "<ITEM-CATEGORY>",
          "price": 4500000,
          "url": "http://merchant.com/phone/iphone-6s",
          "imageUrl": "http://merchant.com/phone/iphone-6s/cover.jpg",
          "type": "Mobile Phone",
          "quantity": 1,
          "parentType": "SELLER",
          "parentId": "<MERCHANT-SELLER-ID>"
        }
      ]
    },
    "customerDetails": {
      "firstName": "First",
      "lastName": "Last",
      "email": "first.last@gmail.com",
      "phone": "081212345678"
    },
    "sellers": [
      {
        "id": "<MERCHANT-SELLER-ID>",
        "name": "Penjual iPhone",
        "url": "https://merchant.com/shop",
        "sellerIdNumber": "<MERCHANT-SELLER-ID-NUMBER>",
        "email": "seller@merchant.com",
        "officialSeller": false,
        "address": {
          "firstName": "Merchant",
          "lastName": "Seller",
          "address": "Kelapa Gading",
          "city": "Jakarta Utara",
          "postalCode": "11240",
          "phone": "081812345678",
          "countryCode": "IDN"
        }
      }
    ],
    "billingAddress": {
      "firstName": "First",
      "lastName": "Last",
      "address": "Tomang",
      "city": "Jakarta Barat",
      "postalCode": "11430",
      "phone": "081987654321",
      "countryCode": "IDN"
    },
    "shippingAddress": {
      "firstName": "First",
      "lastName": "Last",
      "address": "Tomang",
      "city": "Jakarta Barat",
      "postalCode": "11430",
      "phone": "081987654321",
      "countryCode": "IDN"
    },
    "paymentType": "3_months",
    "approvedNotificationUrl": "https://payment-notification.merchant.com/transaction-approval-handler",
    "cancellationRedirectUrl": "http://merchant.com/phone/iphone-6s",
    "backToStoreUrl": "http://merchant.com/phone/iphone-6s",
    "expirationAt": "2019-12-31T18:00:00+07:00"
}
```

{% endtab %}

{% tab title="API Response with QuickPay \[200]" %}

```
{
  "status": "OK",
  "redirectUrl": "https://quickpay.indodanafinance.co.id/product-installment/quickpay?purchaseTransactionId=aa5023a7-8803-11eb-9b88-7947f72d641d&pid=wat-wat&c=checkout&utm_source=wat-wat&utm_campaign=wat-wat&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwdXJjaGFzZVRyYW5zYWN0aW9uSWQiOiJhYTUwMjNhNy04ODAzLTExZWItOWI4OC03OTQ3ZjcyZDY0MWQiLCJ1c2VySWQiOiI1ZjUwMDBkMS1mM2NlLTQ4NDgtYWNiNS0xZmM5YzZkZjU2ZTAiLCJpc3MiOiJJTkRPREFOQSIsInNjb3BlIjoiUVVJQ0tQQVkiLCJpYXQiOjE2MTYwODM0ODgsImV4cCI6MTYxNjA4NTI4OH0.tOEOdk44iMxCO8quk2_mvcc4A38oZL3iE0Kdh_zkCmY",
  "transactionId": "aa5023a7-8803-11eb-9b88-7947f72d641d"
}

```

{% endtab %}

{% tab title="API Response without QuickPay \[200]" %}

```
{
  "status": "OK",
  "redirectUrl": "https://quickpay.indodanafinance.co.id/product-installment/payment?purchaseTransactionId=d820eb22-8802-11eb-9b88-c5e7c9c9cd17&pid=wat-wat&c=checkout&utm_source=wat-wat&utm_campaign=wat-wat&targetTab=Daftar&T38044Flow=false",
  "transactionId": "d820eb22-8802-11eb-9b88-c5e7c9c9cd17"
}

```

{% endtab %}
{% endtabs %}

### Handling Transaction Confirmation Notification

{% hint style="info" %}
Note that for this section, the ***API Request*** would be the payload that the merchant receives in their endpoint, and the ***API Response*** would be the payload that the merchant expected to send to Indodana as acknowledgement.
{% endhint %}

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

```json
{
    "amount": 1876000.00,    
    "paymentType": "30_days",
    "transactionStatus": "PAID",
    "merchantOrderId": "<MERCHANT-ORDER-ID>",
    "transactionTime": "2018-12-21T18:18:18+07:00",
    "transactionId": "<INDODANA-TRANSACTION-ID>"
}
```

{% endtab %}

{% tab title="API Response (OK)" %}

```json
{
  "status":"OK",
  "message":"Message from merchant if any"
}
```

{% endtab %}

{% tab title="API Response (Reject)" %}

```json
{
  "status":"REJECT",
  "message":"Message from merchant if any"
}
```

{% endtab %}
{% endtabs %}

### Get Payment Calculation

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

```json
{
  "amount": 4500000,
  "items": [
    {
      "id": "<MERCHANT-ITEM-ID>",
      "name": "iPhone 6S",
      "category": "<ITEM-CATEGORY>",
      "price": 4500000,
      "url": "http://merchant.com/phone/iphone-6s",
      "imageUrl": "http://merchant.com/phone/iphone-6s/cover.jpg",
      "type": "Mobile Phone",
      "quantity": 1,
      "parentType": "SELLER",
      "parentId": "<MERCHANT-SELLER-ID>"
    }
  ]
}
```

{% endtab %}

{% tab title="API Response with QuickPay \[200]" %}

```json
{
  "status": "OK",
  "payments": [
    {
      "downPayment": 0,
      "paymentType": "Bayar dalam 3 bulan",
      "amount": 9450000,
      "installmentAmount": 10584000,
      "rate": 4,
      "monthlyInstallment": 3528000,
      "discountedMonthlyInstallment": 0,
      "tenure": 3,
      "id": "3_months",
      "currentAvailableLimitBalance": 11000000,
      "isEligible": true
    },
    {
      "downPayment": 0,
      "paymentType": "Bayar dalam 6 bulan",
      "amount": 9450000,
      "installmentAmount": 11718000,
      "rate": 4,
      "monthlyInstallment": 1953000,
      "discountedMonthlyInstallment": 0,
      "tenure": 6,
      "id": "6_months",
      "currentAvailableLimitBalance": 12000000,
      "isEligible": true
    },
    {
      "downPayment": 0,
      "paymentType": "Bayar dalam 12 bulan",
      "amount": 9450000,
      "installmentAmount": 13986000,
      "rate": 4,
      "monthlyInstallment": 1165500,
      "discountedMonthlyInstallment": 0,
      "tenure": 12,
      "id": "12_months",
      "currentAvailableLimitBalance": 13000000,
      "isEligible": false
    }
  ]
}
```

{% endtab %}

{% tab title="API Response without QuickPay \[200]" %}

```json
{
  "status": "OK",
  "payments": [
    {
      "downPayment": 0,
      "paymentType": "Bayar dalam 3 bulan",
      "amount": 9450000,
      "installmentAmount": 10584000,
      "rate": 4,
      "monthlyInstallment": 3528000,
      "discountedMonthlyInstallment": 0,
      "tenure": 3,
      "id": "3_months"
    },
    {
      "downPayment": 0,
      "paymentType": "Bayar dalam 6 bulan",
      "amount": 9450000,
      "installmentAmount": 11718000,
      "rate": 4,
      "monthlyInstallment": 1953000,
      "discountedMonthlyInstallment": 0,
      "tenure": 6,
      "id": "6_months"
    },
    {
      "downPayment": 0,
      "paymentType": "Bayar dalam 12 bulan",
      "amount": 9450000,
      "installmentAmount": 13986000,
      "rate": 4,
      "monthlyInstallment": 1165500,
      "discountedMonthlyInstallment": 0,
      "tenure": 12,
      "id": "12_months"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

### Callback User Token

&#x20;This step is used to retrieve the Indodana QuickPay user token from callback after the authorization from user already completed.&#x20;

**You need to inform us the URL to be registered on Indodana side**. After successful store token in your system, you need to response with status code 200 like defined in the response example tab below to acknowledge the token.

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

```json
{
  "type": "INDODANA_QUICKPAY_USER_TOKEN",
  "data": {
    "requestId": "<requestId>",
    "merchantUserKey": "<merchantUserKey>",
    "token": "<token>",
    "isActive": true
  }
}
```

{% endtab %}

{% tab title="API Response OK \[200]" %}

```json
{
  "status":"OK",
  "message":"Message from merchant if any"
}
```

{% endtab %}

{% tab title="API Response REJECT \[non 200] " %}

```
{
  "status":"REJECT",
  "message":"Message from merchant if any"
}
```

{% endtab %}
{% endtabs %}
