API Reference

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.

HTTP Response Code

Remarks

200

Everything work as expected

400

Bad request

401

Unauthorized

422

Validation Error

404

Not found

409

Conflict

429

Too many requests

50X

Server errors

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.indodana.com/chermes/merchant for production environment.

You can find our IP list here.

post
Get Installment Options

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.
Request
Response
Request
Headers
Authorization
required
string
The generated Authentication signature with format Bearer {api_key}:{nonce}:{signature}
Body Parameters
amount
required
string
Total amount of the transaction. Should be equal to the sum of all the <Item>s' costs below.
items
required
array
Array of <Item>. Details of the shopping items in the transaction.
Response
200: OK
{
"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
}
]
}
401: Unauthorized
{
"status": "ERROR",
"error": {
"kind": "Unauthorized"
"message": "<String>"
}
}
404: Not Found
{
"status": "ERROR",
"error": {
"kind": "NotFoundError"
"message": "<String>"
}
}
422: Unprocessable Entity
{
"status": "ERROR",
"error": {
"kind": "GenericValidationError"
"message": "<Object>"
}
}
500: Internal Server Error
{
"status": "ERROR",
"error": {
"kind": "InternalServerError"
"message": "InternalServerError"
}
}

post
Purchase Transaction Checkout

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.
Request
Response
Request
Headers
Authorization
required
string
The generated Authentication signature with format Bearer {api_key}:{nonce}:{signature}
Body Parameters
transactionDetails
required
object
<Transaction> - Detail of the transaction.
customerDetails
required
object
<Customer> - Detail of the customer.
sellers
required
object
Array of <Seller> - Detail of the sellers involved in the transaction. May contain more than 1 seller.
billingAddress
required
object
<Address> - Billing address of the customer for the transaction.
shippingAddress
required
string
(Required only for goods, for service / digital product is not required) <Address> - Shipping address of the customer for the transaction.
paymentType
optional
string
Installment options / payment terms chosen by the customer. Possible values: 30_days, 3_months, 6_months, 12_months, 15_months, 18_months
approvedNotificationUrl
required
string
The URL that will be called by Indodana when the transaction is approved and successful.
cancellationRedirectUrl
optional
string
backToStoreUrl
required
string
expirationAt
optional
string
Response
200: OK
// Checkout successful
{
"redirectUrl": "https://sandbox01.indodana.com/product-installment/payment?purchaseTransactionId=<generated-purchase-transaction-id>&tenure=3",
"transactionId": "<INDODANA-TRANSACTION-ID>"
}
422: Unprocessable Entity
{
"status": "ERROR",
"error": {
"kind": "GenericValidationError"
"message": "<Object>"
}
}

get
Check Transaction Status

https://{base_url}/v1/transactions/check_status
You can use this endpoint to check the transaction status on Indodana.
Request
Response
Request
Headers
Authorization
required
string
The generated Authentication signature with format Bearer {api_key}:{nonce}:{signature}
Query Parameters
merchantOrderId
optional
string
The transaction order ID that is sent by merchant on the checkout
Response
200: OK
{
"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>"
}
404: Not Found
{
"status": "ERROR",
"error": {
"kind": "NotFound"
"message": "<String>"
}
}

post
Transaction Cancellation / Refund V2

https://{base_url}/v2/order_cancellation
Request
Response
Request
Headers
Authorization
required
string
The generated Authentication signature with format Bearer {api_key}:{nonce}:{signature}
Body Parameters
refundId
required
string
Refund Id for each unique Refund Request.
merchantOrderId
required
string
Merchant Order Id from Purchase Transactions.
cancellationAmount
required
number
If cancellation amount > transaction amount, OR cancellation amount <= 0, will return ERROR
cancellationReason
required
string
Reason why cancellation happens.
cancelledBy
required
string
Who requested the cancellation.
cancellationDate
required
string
Timestamp of cancellation. Please follow ISO 8601 (ex: 2020-05-15) for timestamp format.
Response
200: OK
// For Partial Cancellation
{
"status": "OK",
"fraudStatus": "ACCEPT",
"merchantOrderId": "<MERCHANT-ORDER-ID>",
"originalTransactionAmount": 4500000,
"cancellationAmount": 50000,
"afterCancellationTransactionAmount": 4450000,
"transactionStatus": "INITIATED",
"transactionTime": "2019-09-26T06:24:26+0000",
"paymentType": "3_months"
}
//For Completed Cancellation
{
"status": "OK",
"fraudStatus": "ACCEPT",
"merchantOrderId": "<MERCHANT-ORDER-ID>",
"originalTransactionAmount": 4500000,
"cancellationAmount": 4500000,
"afterCancellationTransactionAmount": 0,
"transactionStatus": "CANCELLED",
"transactionTime": "2019-09-26T09:01:57+0000",
"paymentType": "3_months"
}
404: Not Found
{
"status": "ERROR",
"error": {
"kind": "NotFound"
"message": "<String>"
}
}
422: Unprocessable Entity
{
"status": "ERROR",
"error": {
"kind": "GenericValidationError"
"message": "<Object>"
}
}

post
Transaction Cancellation / Refund V3

https://{base_url}/v3/order_cancellation
Request
Response
Request
Headers
Authorization
required
string
The generated Authentication signature with format Bearer {api_key}:{nonce}:{signature}
Body Parameters
merchantOrderId
required
string
Merchant Order Id from Purchase Transactions
refundId
required
string
Refund Id for each unique Refund Request
cancellationAmount
required
number
If cancellation amount > transaction amount, OR cancellation amount <= 0, will return ERROR
cancelationReason
required
string
Reason why cancellation happens
cancelledBy
required
string
Who requested the cancellation
cancellationDate
required
string
Timestamp of cancellation. Please follow ISO 8601 (ex: 2020-05-15) for timestamp format.
Response
200: OK
{
"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",
"refundTime": "2020-10-01T15:30:03.325085+07:00"
}
422: Unprocessable Entity
{
"status": "ERROR",
"error": {
"kind": "DuplicateRefundError",
"message": "Duplicate refund detected with refund id refund-1",
"body": {
"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",
"refundTime": "2020-10-01T15:30:03.325085+07:00"
}
}
}

Object Type References

Payment

Name

Type

Length

Remarks

id

string

64

Payment type / installment option identifier. Possible values : 30_days, 3_months, 6_months, 12_months

tenure

integer

4

Installment option tenure

rate

decimal

16, 2

Interest rate

transitionTermRate

decimal

16, 2

Special case interest rate

amount

decimal

16, 2

Total amount for the transaction

monthlyInstallment

decimal

16, 2

Amount of monthly installment need to be paid

discountedMonthlyInstallment

decimal

16, 2

Amount of monthly installment after taking into account the discounts

installmentAmount

decimal

16, 2

Total installment amount

downPayment

decimal

16, 2

Total down payment amount

Transaction

Name

Type

Length

Remarks

merchantOrderId

string

32

The ID of the transaction that should be generated by merchant.

Allowed characters: a-z, A-Z, 0-9, =, ., -, _, +, @, :, &, ^, %, !, $

amount

decimal

16, 2

Total amount of transaction

items

Array<Item>

Detail of items in the transaction

Item

Name

Type

Length

Remarks

id

string

64

Can be product SKU. For item fee such as: shipping fee, admin fee etc you have to use one of these: shippingfee, adminfee, taxfee, discount, additionalfee, insurancefee.

name

string

128

Product name

price

decimal

16, 2

Price for the product

url

string

256

URL of the product in the merchant site / platform

imageUrl

string

256

URL of the image of the product in the merchant site / platform

category

enum

256

Category of the product, one of these:

airlines arts-crafts-and-collectibles automotive baby beauty-and-fragrances biller books-and-magazines business-to-business-including-mlm charity-and-non-profit clothing community digital-content electronics-and-telecom entertainment-and-media financial-services-and-technology financial-services-and-products food-and-beverages food-retail-and-service games-voucher gifts-and-flowers government home-and-garden hotel-and-travel insurance nonprofit offline-store others over-the-air overseas pets-and-animals property public-services religion-and-spirituality retail services sports-and-outdoors telco ticketing transportation travel vehicle-sales vehicles-service-and-accessories health-and-personal-care marketplace overseas toys-and-hobbies

quantity

integer

8

Quantity of the product / item bought

parentType

string

16

Possible values: SELLER

parentId

string

32

It will correspond to the SELLER ID if the parentType is SELLER

Customer

Name

Type

Length

Remarks

firstName

string

16

First name of the customer

lastName

string

16

Last name of the customer

email

string

64

Email of the customer that is registered in the merchant site / platform

phone

string

16

Phone number of the customer that is registered in the merchant site / platform

Seller

Name

Type

Length

Remarks

id

string

16

Seller's ID

name

string

16

Seller's name

url

string

256

Seller's shop URL

sellerIdNumber

string

32

Seller's identifier number (KTP / SIM / etc)

email

string

64

Seller's email

address

Address

Seller's shop address

officialSeller

boolean

Whether Seller is if official or not. Non Mandatory

Address

Name

Type

Length

Remarks

firstName

string

16

First name of customer

lastName

string

16

Last name of customer

address

string

256

Address for billing or shipping activity

city

string

32

City description for the address

postalCode

string

8

Postal code for the address

phone

string

16

Phone number for billing or shipping activity

countryCode

string

16

ISO 3166-1 alpha-3 (ex: IDN for Indonesia)

Sample API Request & Response

Get Installment Options

API Request
API Response
API Request
{
"amount": 4500000,
"items": [
{
"id": "<MERCHANT-ITEM-ID>",
"name": "iPhone 6S",
"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>"
}
]
}
API Response
{
"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"
}
]
}

Purchase Transaction Checkout

API Request
API Response
API Request
{
"transactionDetails": {
"merchantOrderId": "<MERCHANT-ORDER-ID>",
"amount": 4500000,
"items": [
{
"id": "<MERCHANT-ITEM-ID>",
"name": "iPhone 6S",
"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": "[email protected]",
"phone": "081212345678"
},
"sellers": [
{
"id": "<MERCHANT-SELLER-ID>",
"name": "Penjual iPhone",
"url": "https://merchant.com/shop",
"sellerIdNumber": "<MERCHANT-SELLER-ID-NUMBER>",
"email": "[email protected]",
"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"
}
API Response
{
"status": "OK",
"redirectUrl": "https://sandbox01.indodana.com/product-installment/payment?purchaseTransactionId=<generated-purchase-transaction-id>&tenure=3",
"transactionId": "<INDODANA-TRANSACTION-ID>"
}

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.

API Request
API Response [OK]
API Response [REJECT]
API Request
{
"amount": 1876000.00,
"paymentType": "30_days",
"transactionStatus": "PAID",
"merchantOrderId": "<MERCHANT-ORDER-ID>",
"transactionTime": "2018-12-21T18:18:18+07:00",
"transactionId": "<INDODANA-TRANSACTION-ID>"
}
API Response [OK]
{
"status":"OK",
"message":"Message from merchant if any"
}
API Response [REJECT]
{
"status":"REJECT",
"message":"Message from merchant if any"
}

Check Transaction Status

API Response
API Response
{
"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

API Request
API Response
(Failed) API Response
API Request
{
"refundId":"<REFUND-ID>",
"merchantOrderId":"<MERCHANT-ORDER-ID>",
"cancellationAmount" : 4500000,
"cancellationReason":"Out of stock",
"cancelledBy":"<SELLER/CUSTOMER>",
"cancellationDate": "2019-09-12T18:18:18+07:00"
}
API Response
{
"status": "OK",
"fraudStatus": "ACCEPT",
"merchantOrderId": "<MERCHANT-ORDER-ID>",
"originalTransactionAmount": 4500000,
"cancellationAmount": 4500000,
"afterCancellationTransactionAmount": 0,
"transactionStatus": "CANCELLED",
"transactionTime": "2019-09-26T09:01:57+0000",
"paymentType": "3_months"
}
(Failed) API Response
{
"status": "ERROR",
"error": {
"kind": "BadRequest",
"message": "Refund with purchase transaction id: <INDODANA-TRANSACTION-ID> is failed because refund amount: 9990000 is larger than purchase transaction total amount: 4450000.00"
}
}