added

[ID] 2023-12-05 API Enhancements

API Enhancements

Target deployment date: 5th December 2023 (Tuesday) at 2:30 PM JKT

List of Enhancements

  1. New Currency Field
    1. We have added the currency field to provide information about the currency associated with the transaction. This addition is in preparation for our future support of multiple currencies. Currently, this parameter is optional.
  2. Enhanced Validation for the Reference ID and Description Field
    1. Strengthening validation on the referenceId and Description field to enhance security and mitigate potential vulnerabilities. This enhancement is now enabled in the Sandbox environment.

List of Impacted APIs

  1. Accept APIs
    1. Create a payment
    2. Get a payment
    3. Get a list of payments
    4. Get a list of payments for a payment method
    5. Webhook on Accept
  2. Send APIs
    1. Create a disbursement
    2. Get a disbursement
    3. Get a list of disbursements
    4. Webhook on Send
New Fields / New ValueMandatory / OptionalImpacted EndpointsExplanation
currencyOptional1. Accept APIs
2. Send APIs
To specify the currency of your transaction.

We only accept IDR as currency at the moment
referenceIdMandatory1. Create a payment
2. Create a payment method
3. Create a disbursement
New validation - we will only accept the following character sets as input:
1. Lowercase letters: a-z
2. Uppercase letters: A-Z
3. Numeric: 0-9
4. Special characters: ! # $ % & ' ( ) * + , - . / : ; '= ? @ [ ] ^ _ ` { | } ~
5. Space character
descriptionOptional1. Create a payment
2. Create a payment method
3. Create a disbursement
New validation - we will only accept the following character sets as input:
1. Lowercase letters: a-z
2. Uppercase letters: A-Z
3. Numeric: 0-9
4. Special characters: ! # $ % & ' ( ) * + , - . / : ; '= ? @ [ ] ^ _ ` { | } ~
5. Space character

Additional Currency Field

Create a payment API change

{
	"data": {
		"attributes": {
    "referenceId": "ORDER_0001",
    "description": "Order Number 0001",
		"amount": 15000,
    "paymentMethodType": "virtual_bank_account",
		"paymentMethodOptions": {
			"bankShortCode": "bri",
			"displayName": "Display Name"
			}
		}
	}
}
{
	"data": {
		"attributes": {
    "referenceId": "ORDER_0001",
    "description": "Order Number 0001",
		"amount": 15000,
    "currency": "IDR",
    "paymentMethodType": "virtual_bank_account",
		"paymentMethodOptions": {
			"bankShortCode": "bri",
			"displayName": "Display Name"
			}
		}
	}
}
{
	"data": {
		"id": "contract_63917646ebc64024b283b419607d0590",
        "type": "payment",
        "attributes": {
            "status": "pending",
            "amount": "11000.0",
            "createdAt": "2023-11-16T14:48:31+07:00",
            "description": "Order Number 0001",
            "expiredAt": "2023-11-17T07:48:30Z",
            "referenceId": "ORDER_0001",
            "fees": "3663.0",
            "paymentMethod": {
                "id": "va_7f52ac743b0f0cedd9e492523bd229c8",
                "type": "virtual_bank_account",
                "referenceId": "ORDER_0001",
                "instructions": {
                    "bankShortCode": "BRI",
                    "accountNo": "1234500000003006",
                    "displayName": "IKN-Display Name"
                }
            }
        }
    }
}
{
	"data": {
		"id": "contract_63917646ebc64024b283b419607d0590",
        "type": "payment",
        "attributes": {
            "status": "pending",
            "amount": "11000.0",
            "currency": "IDR",
            "createdAt": "2023-11-16T14:48:31+07:00",
            "description": "Order Number 0001",
            "expiredAt": "2023-11-17T07:48:30Z",
            "referenceId": "ORDER_0001",
            "fees": "3663.0",
            "paymentMethod": {
                "id": "va_7f52ac743b0f0cedd9e492523bd229c8",
                "type": "virtual_bank_account",
                "referenceId": "ORDER_0001",
                "instructions": {
                    "bankShortCode": "BRI",
                    "accountNo": "1234500000003006",
                    "displayName": "IKN-Display Name"
                }
            }
        }
    }
}

Get a payment API / Webhook on Accept change

{
    "data": {
        "id": "contract_63917646ebc64024b283b419607d0590",
        "type": "payment",
        "attributes": {
            "status": "pending",
            "amount": "11000.0",
            "createdAt": "2023-11-16T14:48:31+07:00",
            "description": "Order number 001",
            "expiredAt": "2023-11-17T07:48:30Z",
            "referenceId": "order_001",
            "fees": "3663.0",
            "paymentMethod": {
                "id": "va_7f52ac743b0f0cedd9e492523bd229c8",
                "type": "virtual_bank_account",
                "referenceId": "order_001",
                "instructions": {
                    "bankShortCode": "BRI",
                    "accountNo": "1234500000003006",
                    "displayName": "IKN-gaby"
                }
            }
        }
    }
}
{
    "data": {
        "id": "contract_63917646ebc64024b283b419607d0590",
        "type": "payment",
        "attributes": {
            "status": "pending",
            "amount": "11000.0",
            "currency": "IDR",
            "createdAt": "2023-11-16T14:48:31+07:00",
            "description": "Order number 001",
            "expiredAt": "2023-11-17T07:48:30Z",
            "referenceId": "order_001",
            "fees": "3663.0",
            "paymentMethod": {
                "id": "va_7f52ac743b0f0cedd9e492523bd229c8",
                "type": "virtual_bank_account",
                "referenceId": "order_001",
                "instructions": {
                    "bankShortCode": "BRI",
                    "accountNo": "1234500000003006",
                    "displayName": "IKN-gaby"
                }
            }
        }
    }
}

Get a list of payments API change

{
    "data": [
        {
            "id": "contract_63917646ebc64024b283b419607d0590",
            "type": "payment",
            "attributes": {
                "status": "pending",
                "amount": "11000.0",
                "createdAt": "2023-11-16T14:48:31+07:00",
                "description": "Order number 001",
                "expiredAt": "2023-11-17T07:48:30Z",
                "referenceId": "order_001",
                "fees": "3663.0",
                "paymentMethod": {
                    "id": "va_7f52ac743b0f0cedd9e492523bd229c8",
                    "type": "virtual_bank_account",
                    "referenceId": "order_001",
                    "instructions": {
                        "bankShortCode": "BRI",
                        "accountNo": "1234500000003006",
                        "displayName": "IKN-gaby"
                    }
                }
            }
        }
    ]
}
{
    "data": [
        {
            "id": "contract_63917646ebc64024b283b419607d0590",
            "type": "payment",
            "attributes": {
                "status": "pending",
                "amount": "11000.0",
                "currency": "IDR",
                "createdAt": "2023-11-16T14:48:31+07:00",
                "description": "Order number 001",
                "expiredAt": "2023-11-17T07:48:30Z",
                "referenceId": "order_001",
                "fees": "3663.0",
                "paymentMethod": {
                    "id": "va_7f52ac743b0f0cedd9e492523bd229c8",
                    "type": "virtual_bank_account",
                    "referenceId": "order_001",
                    "instructions": {
                        "bankShortCode": "BRI",
                        "accountNo": "1234500000003006",
                        "displayName": "IKN-gaby"
                    }
                }
            }
        }
    ]
}

Get a list of payments for a payment method API change

{
    "data": [
        {
            "id": "contract_6d729eeebf0f4215bb0e7ce143e52c93",
            "type": "payment",
            "attributes": {
                "status": "completed",
                "amount": "25000.0",
                "createdAt": "2023-11-16T15:30:16+07:00",
                "description": null,
                "expiredAt": null,
                "referenceId": "external_id_783a067f08",
                "fees": "3663.0",
                "paymentMethod": {
                    "id": "va_4d94258a787131da23327e5925ffa867",
                    "type": "virtual_bank_account",
                    "referenceId": "ORDER_0002",
                    "instructions": {
                        "bankShortCode": "SAHABAT_SAMPOERNA",
                        "accountNo": "5021210000013133",
                        "displayName": "IKN-Display Name"
                    }
                }
            }
        },
        {
            "id": "contract_c0bbd9cbd1cd4138b409d2ffb1b978c2",
            "type": "payment",
            "attributes": {
                "status": "completed",
                "amount": "15000.0",
                "createdAt": "2023-11-16T15:30:04+07:00",
                "description": null,
                "expiredAt": null,
                "referenceId": "external_id_c90572cdcd",
                "fees": "3663.0",
                "paymentMethod": {
                    "id": "va_4d94258a787131da23327e5925ffa867",
                    "type": "virtual_bank_account",
                    "referenceId": "ORDER_0002",
                    "instructions": {
                        "bankShortCode": "SAHABAT_SAMPOERNA",
                        "accountNo": "5021210000013133",
                        "displayName": "IKN-Display Name"
                    }
                }
            }
        }
    ]
}
{
    "data": [
        {
            "id": "contract_6d729eeebf0f4215bb0e7ce143e52c93",
            "type": "payment",
            "attributes": {
                "status": "completed",
                "amount": "25000.0",
                "currency": "IDR",
                "createdAt": "2023-11-16T15:30:16+07:00",
                "description": null,
                "expiredAt": null,
                "referenceId": "external_id_783a067f08",
                "fees": "3663.0",
                "paymentMethod": {
                    "id": "va_4d94258a787131da23327e5925ffa867",
                    "type": "virtual_bank_account",
                    "referenceId": "ORDER_0002",
                    "instructions": {
                        "bankShortCode": "SAHABAT_SAMPOERNA",
                        "accountNo": "5021210000013133",
                        "displayName": "IKN-Display Name"
                    }
                }
            }
        },
        {
            "id": "contract_c0bbd9cbd1cd4138b409d2ffb1b978c2",
            "type": "payment",
            "attributes": {
                "status": "completed",
                "amount": "15000.0",
                "currency": "IDR",
                "createdAt": "2023-11-16T15:30:04+07:00",
                "description": null,
                "expiredAt": null,
                "referenceId": "external_id_c90572cdcd",
                "fees": "3663.0",
                "paymentMethod": {
                    "id": "va_4d94258a787131da23327e5925ffa867",
                    "type": "virtual_bank_account",
                    "referenceId": "ORDER_0002",
                    "instructions": {
                        "bankShortCode": "SAHABAT_SAMPOERNA",
                        "accountNo": "5021210000013133",
                        "displayName": "IKN-Display Name"
                    }
                }
            }
        }
    ]
}

Create a disbursement API change

{
    "data": {
        "attributes": {
            "amount": 10000,
            "referenceId": "TRANSFER_0001",
            "description": "Transfer 0001",
            "disbursementMethod": {
                "type": "bank_transfer",
                "bankShortCode": "BRI",
                "bankAccountNo": "000501003192307",
                "bankAccountHolderName": "John Doe"
            }
        }
    }
}
{
    "data": {
        "attributes": {
            "amount": 10000,
            "currency": "IDR",
            "referenceId": "TRANSFER_0001",
            "description": "Transfer 0001",
            "disbursementMethod": {
                "type": "bank_transfer",
                "bankShortCode": "BRI",
                "bankAccountNo": "000501003192307",
                "bankAccountHolderName": "John Doe"
            }
        }
    }
}
{
    "data": {
        "id": "contract_2eb15a3d25ea4551a78a270fdfbddbba",
        "type": "disbursement",
        "attributes": {
            "referenceId": "TRANSFER_0001",
            "description": "Transfer 0001",
            "amount": "10000.0",
            "status": "processing",
            "createdAt": "2023-11-16T15:37:08+07:00",
            "fees": "3885.0",
            "disbursementMethod": {
                "type": "bank_transfer",
                "serverBankAccountHolderName": "PROD ONLY",
                "bankAccountNo": "000501003192307",
                "bankShortCode": "BRI",
                "bankAccountHolderName": "John Doe",
                "bankName": "Bank Rakyat Indonesia",
                "failureReason": null,
                "bankReferenceNumber": "b9324b9cdc4b2a60"
            }
        }
    }
}
{
    "data": {
        "id": "contract_2eb15a3d25ea4551a78a270fdfbddbba",
        "type": "disbursement",
        "attributes": {
            "referenceId": "TRANSFER_0001",
            "description": "Transfer 0001",
            "amount": "10000.0",
            "status": "processing",
            "currency": "IDR",
            "createdAt": "2023-11-16T15:37:08+07:00",
            "fees": "3885.0",
            "disbursementMethod": {
                "type": "bank_transfer",
                "serverBankAccountHolderName": "PROD ONLY",
                "bankAccountNo": "000501003192307",
                "bankShortCode": "BRI",
                "bankAccountHolderName": "John Doe",
                "bankName": "Bank Rakyat Indonesia",
                "failureReason": null,
                "bankReferenceNumber": "b9324b9cdc4b2a60"
            }
        }
    }
}

Get a disbursement API / Webhook on Send change

{
    "data": {
        "id": "contract_2eb15a3d25ea4551a78a270fdfbddbba",
        "type": "disbursement",
        "attributes": {
            "referenceId": "TRANSFER_0001",
            "description": "Transfer 0001",
            "amount": "10000.0",
            "status": "processing",
            "createdAt": "2023-11-16T15:37:08+07:00",
            "fees": "3885.0",
            "disbursementMethod": {
                "type": "bank_transfer",
                "serverBankAccountHolderName": "PROD ONLY",
                "bankAccountNo": "000501003192307",
                "bankShortCode": "BRI",
                "bankAccountHolderName": "John Doe",
                "bankName": "Bank Rakyat Indonesia",
                "failureReason": null,
                "bankReferenceNumber": "b9324b9cdc4b2a60"
            }
        }
    }
}
{
    "data": {
        "id": "contract_2eb15a3d25ea4551a78a270fdfbddbba",
        "type": "disbursement",
        "attributes": {
            "referenceId": "TRANSFER_0001",
            "description": "Transfer 0001",
            "amount": "10000.0",
            "status": "processing",
            "currency": "IDR",
            "createdAt": "2023-11-16T15:37:08+07:00",
            "fees": "3885.0",
            "disbursementMethod": {
                "type": "bank_transfer",
                "serverBankAccountHolderName": "PROD ONLY",
                "bankAccountNo": "000501003192307",
                "bankShortCode": "BRI",
                "bankAccountHolderName": "John Doe",
                "bankName": "Bank Rakyat Indonesia",
                "failureReason": null,
                "bankReferenceNumber": "b9324b9cdc4b2a60"
            }
        }
    }
}

Get a list of disbursements API change

{
    "data": [
        {
            "id": "contract_dcae4117a3814b7d99e0989637571e69",
            "type": "disbursement",
            "attributes": {
                "referenceId": "TRANSFER_0002",
                "description": "Transfer 0002",
                "amount": "10000.0",
                "status": "processing",
                "createdAt": "2023-11-16T17:22:54+07:00",
                "fees": "3885.0",
                "disbursementMethod": {
                    "type": "bank_transfer",
                    "serverBankAccountHolderName": "PROD ONLY",
                    "bankAccountNo": "000501003192307",
                    "bankShortCode": "BRI",
                    "bankAccountHolderName": "John Doe",
                    "bankName": "Bank Rakyat Indonesia",
                    "failureReason": null,
                    "bankReferenceNumber": "153cdac23c29c820"
                }
            }
        },
        {
            "id": "contract_2eb15a3d25ea4551a78a270fdfbddbba",
            "type": "disbursement",
            "attributes": {
                "referenceId": "TRANSFER_0001",
                "description": "Transfer 0001",
                "amount": "10000.0",
                "status": "processing",
                "createdAt": "2023-11-16T15:37:08+07:00",
                "fees": "3885.0",
                "disbursementMethod": {
                    "type": "bank_transfer",
                    "serverBankAccountHolderName": "PROD ONLY",
                    "bankAccountNo": "000501003192307",
                    "bankShortCode": "BRI",
                    "bankAccountHolderName": "John Doe",
                    "bankName": "Bank Rakyat Indonesia",
                    "failureReason": null,
                    "bankReferenceNumber": "b9324b9cdc4b2a60"
                }
            }
        }
	]
}
{
    "data": [
        {
            "id": "contract_dcae4117a3814b7d99e0989637571e69",
            "type": "disbursement",
            "attributes": {
                "referenceId": "TRANSFER_0002",
                "description": "Transfer 0002",
                "amount": "10000.0",
                "status": "processing",
                "currency": "IDR",
                "createdAt": "2023-11-16T17:22:54+07:00",
                "fees": "3885.0",
                "disbursementMethod": {
                    "type": "bank_transfer",
                    "serverBankAccountHolderName": "PROD ONLY",
                    "bankAccountNo": "000501003192307",
                    "bankShortCode": "BRI",
                    "bankAccountHolderName": "John Doe",
                    "bankName": "Bank Rakyat Indonesia",
                    "failureReason": null,
                    "bankReferenceNumber": "153cdac23c29c820"
                }
            }
        },
        {
            "id": "contract_2eb15a3d25ea4551a78a270fdfbddbba",
            "type": "disbursement",
            "attributes": {
                "referenceId": "TRANSFER_0001",
                "description": "Transfer 0001",
                "amount": "10000.0",
                "status": "processing",
                "currency": "IDR",
                "createdAt": "2023-11-16T15:37:08+07:00",
                "fees": "3885.0",
                "disbursementMethod": {
                    "type": "bank_transfer",
                    "serverBankAccountHolderName": "PROD ONLY",
                    "bankAccountNo": "000501003192307",
                    "bankShortCode": "BRI",
                    "bankAccountHolderName": "John Doe",
                    "bankName": "Bank Rakyat Indonesia",
                    "failureReason": null,
                    "bankReferenceNumber": "b9324b9cdc4b2a60"
                }
            }
        }
	]
}