Online Transaction API

HTTP Response Code

All the APIs here are based on the HTTP request. The following are the response codes of an HTTP request that the Indodana Paylater API may response.

API Method References

In this section, {base_url} will correspond to https://sandbox01-api.indodana.com/chermes/merchant for sandbox environment. Subsequently, the {base_url} will correspond to https://api.indodanafinance.co.id/chermes/merchant for production environment.

You can find our IP list here.

Get Payment Calculation

POST https://{base_url}/v2/payment_calculation

This endpoint is used when you want to display the list of eligible payment types on your page to calculate and display the installment breakdown on your checkout page. It is recommended to show this calculation in your website to provide a better experience to the Customer.

* means the parameter is required

Headers

Request Body

{
  "status": "OK",
  "payments": [
    {
      "amount": 4961500,
      "installmentAmount": 5160000,
      "monthlyInstallment": 5160000,
      "tenure": 1,
      "totalInterest": 198500,
      "paymentType": "Bayar dalam 30 hari",
      "rate": 4,
      "id": "30_days",
      "merchantDiscountRate": 236250
    },
    {
      "amount": 4962000,
      "installmentAmount": 5557500,
      "monthlyInstallment": 1852500,
      "tenure": 3,
      "totalInterest": 595500,
      "paymentType": "Bayar dalam 3 bulan",
      "rate": 4,
      "id": "3_months",
      "merchantDiscountRate": 236250
    },
    {
      "amount": 4962000,
      "installmentAmount": 6153000,
      "monthlyInstallment": 1025500,
      "tenure": 6,
      "totalInterest": 1191000,
      "paymentType": "Bayar dalam 6 bulan",
      "rate": 4,
      "id": "6_months",
      "merchantDiscountRate": 236250
    },
    {
      "amount": 4962000,
      "installmentAmount": 7344000,
      "monthlyInstallment": 612000,
      "tenure": 12,
      "totalInterest": 2382000,
      "paymentType": "Bayar dalam 12 bulan",
      "rate": 4,
      "id": "12_months",
      "merchantDiscountRate": 236250
    }
  ]
}

Purchase Transaction Checkout

POST https://{base_url}/v2/checkout_url

This endpoint is used once the customer has confirmed their installment option and you want to initiate checkout through Paylater by Indodana as the payment method.

* means the parameter is required

Headers

Request Body

// Checkout successful
{
  "redirectUrl": "https://sandbox01.indodana.com/product-installment/payment?purchaseTransactionId=<generated-purchase-transaction-id>&tenure=3",
  "transactionId": "<INDODANA-TRANSACTION-ID>"
}

Check Transaction Status

GET https://{base_url}/v1/transactions/check_status

You can use this endpoint to check the transaction status on Indodana.

* means the parameter is required

Query Parameters

Headers

{
  "status": "OK",
  "fraudStatus": "ACCEPT",
  "legalName": "<INDODANA-CUSTOMER-NAME>",
  "amount": 4500000,
  "indodanaUserId": "<INDODANA-USER-ID>",
  "paymentType": "3_months",
  "transactionStatus": "INITIATED",
  "merchantOrderId": "<MERCHANT-ORDER-ID>",
  "transactionTime": "2019-09-26T06:24:26+0000",
  "transactionId": "<INDODANA-TRANSACTION-ID>"
}

Transaction Cancellation / Refund

POST https://{base_url}/v3/order_cancellation

* means the parameter is required

Headers

Request Body

{
    "status": "OK",
    "fraudStatus": "ACCEPT",
    "merchantOrderId": "ns-01-10-20-02",
    "originalTransactionAmount": 30000,
    "transactionAmountWithMDR": 30518.82,
    "cancellationAmount": 10000,
    "afterCancellationTransactionAmount": 20000,
    "afterCancellationTransactionAmountWithMDR": 20518.82,
    "transactionStatus": "PROCESSED",
    "transactionTime": "2020-10-01T15:28:01+0700",
    "paymentType": "30_days",
    "refundId": "refund-1",
    "refundRequestId": "95e99289-2a43-11eb-8d0f-d7fd2743d6f4",
    "refundTime": "2020-10-01T15:30:03.325085+07:00"
}

Object Type References

Payment

Transaction

Item

Customer

Seller

Address

Metadata

Sample API Request & Response

Get Installment Options

{
  "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>"
    }
  ]
}

Purchase Transaction Checkout

{
    "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": "ID"
        }
      }
    ],
    "billingAddress": {
      "firstName": "First",
      "lastName": "Last",
      "address": "Tomang",
      "city": "Jakarta Barat",
      "postalCode": "11430",
      "phone": "081987654321",
      "countryCode": "ID"
    },
    "shippingAddress": {
      "firstName": "First",
      "lastName": "Last",
      "address": "Tomang",
      "city": "Jakarta Barat",
      "postalCode": "11430",
      "phone": "081987654321",
      "countryCode": "ID"
    },
    "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"
}

Handling Transaction Confirmation Notification

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.

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

Check Transaction Status

{
  "status": "OK",
  "fraudStatus": "ACCEPT",
  "legalName": "<INDODANA-CUSTOMER-NAME>",
  "amount": 4500000,
  "indodanaUserId": "<INDODANA-USER-ID>",
  "paymentType": "3_months",
  "transactionStatus": "<INDODANA-TRANSACTION-STATUS>",
  "merchantOrderId": "<MERCHANT-ORDER-ID>",
  "transactionTime": "2019-09-26T06:24:26+0000",
  "transactionId": "<INDODANA-TRANSACTION-ID>"
}

Purchase Transaction Cancellation / Refund

{
  "refundId":"<REFUND-ID>",
  "merchantOrderId":"<MERCHANT-ORDER-ID>",
  "cancellationAmount" : 4500000,  
  "cancellationReason":"Out of stock",
  "cancelledBy":"<SELLER/CUSTOMER>",
  "cancellationDate": "2019-09-12T18:18:18+07:00"
}

Last updated