Dokumentasi API
Integrasikan layanan RemitCepat dengan mudah menggunakan API kami yang andal dan lengkap.
Spesifikasi API Virtual Account
Panduan teknis untuk integrasi layanan Virtual Account RemitCepat.
1. Introduction
Secara umum terdapat 3 service API yang diperlukan untuk H2H dengan VA RemitCepat (1 untuk authentifikasi and 2 untuk transaksi):
- AUTH (Turunan dari OAuth 2.0)
- AUTH REQUEST: Digunakan untuk request authentication dengan mengirimkan data credential untuk mendapatkan access token. API ini harus di-hit sebelum melakukan hit inquiry dan payment.
- AUTH RESPONSE: Field AccessToken dari response ini digunakan sebagai authentifikasi pada saat hit service INQUIRY dan PAYMENT. AccessToken ini hanya sekali pakai, dan jika tidak digunakan, maka akan expired dalam waktu 15 menit setelah direquest.
- INQUIRY
- INQUIRY REQUEST: Mitra me-request data tagihan ke API RemitCepat dengan mengirimkan informasi tagihan/virtual account.
- INQUIRY RESPONSE: API RemitCepat memberikan respon yang berisi informasi tagihan/virtual account (nama tagihan, jumlah tagihan, dll).
- PAYMENT
- PAYMENT REQUEST: Mitra mengirimkan permintaan pembayaran ke API RemitCepat dengan mengirimkan nomor VA, jumlah pembayaran, waktu transaksi, dll.
- PAYMENT RESPONSE: API RemitCepat bisa menerima ataupun menolak permintaan pembayaran dan mengirimkan respon pembayaran.
2. Authentication
AUTH REQUEST header
Parameter | Description |
---|---|
X-TIMESTAMP | yyyy-MM-ddTHH:mm:ss.SSSTZD format |
X-CLIENT-KEY | CLIENT_ID |
X-SIGNATURE | openssl_sign(CLIENT_ID + "|" + X_TIMESTAMP, SBI_PRIVATE_KEY) |
Content-Type | application/json |
Example Header
X-TIMESTAMP: 2024-12-23T20:52:00.110+07:00
X-CLIENT-KEY: {YOUR_CLIENT_ID}
X-SIGNATURE: {GENERATED_SIGNATURE}
Content-Type: application/json
AUTH Parameters
Request Parameters | ||
---|---|---|
grantType | Type of request | client_credentials |
Response Parameters | ||
---|---|---|
responseCode | Response Code (see Appendix 1) | 2000000 (OK) |
responseMessage | Message | Auth success |
accessToken | Access Token to be used for transaction | ... |
tokenType | Token Type | BearerToken |
expiresIn | Expires in (seconds from request) | 900 |
Sample Request & Response Auth
JSON Request Example
{
"grantType": "client_credentials"
}
JSON Response Example
{
"responseCode": "2000000",
"responseMessage": "Auth Success",
"accessToken": "{GENERATED_ACCESS_TOKEN}",
"tokenType": "BearerToken",
"expiresIn": "900"
}
3. Inquiry VA
INQUIRY REQUEST header
Parameter | Description |
---|---|
Authorization | Bearer {accessToken} |
X-TIMESTAMP | yyyy-MM-ddTHH:mm:ss.SSSTZD format |
X-SIGNATURE | HMAC_SHA512 (CLIENT_SECRET, stringToProcess) |
X-PARTNER-ID | Mitra_Id |
CHANNEL-ID | 87899 |
X-EXTERNAL-ID | Transaction ID from SBI |
Endpoint-Url | Endpoint URL PATH (without Host & Port) |
Content-Type | application/json |
stringToProcess = HTTPMethod+":"+ EndpointUrl +":"+ AccessToken+":"+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":" +TimeStamp
INQUIRY Parameters
Request Parameters
Parameter | Description | Type | Example |
---|---|---|---|
partnerServiceId | KODE_SBI (left padding with spaces) [M] | String(8) | " 1234" |
customerNo | Customer Number [M] | String | "xxxxxxxxxxxx" |
virtualAccountNo | partnerServiceId + Customer Number [M] | String(20) | " 1234xxxxxxxxxxxx" |
inquiryRequestId | Inquiry Request ID (same as X-EXTERNAL-ID) [M] | String | 3646... |
Response Parameters
Parameter | Description |
---|---|
responseCode | Response Code [M] |
responseMessage | Response Message [M] |
virtualAccountData | JSON data, only if response is success [M] |
> partnerServiceId | KODE_SBI [M] |
> customerNo | Customer No [M] |
> virtualAccountNo | VA Number [M] |
> virtualAccountName | Customer Name [M] |
> virtualAccountEmail | Customer Email [O] |
> inquiryRequestId | Unique Request ID [M] |
> totalAmount | Value Information [M] |
>> value | Total Amount Value |
>> currency | Currency |
> additionalInfo | JSON additional Info [M], at least 1 item |
>> label | Label Info |
>> value | Value Info |
Sample Request & Response Inquiry
JSON Request Example
{
"partnerId": "{YOUR_PARTNER_ID}",
"customerNo": "xxxxxxxxxxxxxxxx",
"virtualAccountNo": "xxxxxxxxxxxxxxxx",
"inquiryRequestId": "{YOUR_REQUEST_ID}"
}
JSON Response Example
{
"responseCode": "2002400",
"responseMessage": "Successful",
"virtualAccountData": {
"virtualAccountNo": "xxxxxxxxxxxxxxxx",
"virtualAccountName": "John Doe",
"customerNo": "xxxxxxxxxxxxxxxx",
"totalAmount": {
"value": "3200000.00",
"currency": "IDR"
},
...
}
}
Inquiry Response Codes
HTTP | Code | Message | Description |
---|---|---|---|
200 | 2002400 | Success | Normal Inquiry Response |
400 | 4002401 | Invalid Field Format | Invalid Field Format |
401 | 4012400 | Unauthorized Access | Unauthorized Access |
404 | 4042412 | Bill not found | Biller cannot find billing info |
404 | 4042414 | Bill already paid | When VA already paid |
500 | 5002400 | General Error | General Error |
504 | 5042400 | Timeout | Timeout |
4. Payment VA
PAYMENT REQUEST header
Parameter | Description |
---|---|
Authorization | Bearer {accessToken} |
X-TIMESTAMP | yyyy-MM-ddTHH:mm:ss.SSSTZD format |
X-SIGNATURE | HMAC_SHA512 (CLIENT_SECRET, stringToProcess) |
X-PARTNER-ID | Mitra_Id |
CHANNEL-ID | 87899 |
X-EXTERNAL-ID | Transaction ID from SBI |
Endpoint-Url | Endpoint URL PATH |
Content-Type | application/json |
PAYMENT Parameters
Request Parameters
Parameter | Description |
---|---|
partnerServiceId | KODE_SBI (left padding with spaces) [M] |
customerNo | Customer Number [M] |
trxDateTime | Transaction DateTime (same as AUTH) [M] |
paidAmount | Paid Amount JSON (value & currency) [M] |
virtualAccountNo | partnerServiceId + Customer Number [M] |
paymentRequestId | Payment Request ID (same as X-EXTERNAL-ID) [M] |
Response Parameters
Parameter | Description |
---|---|
responseCode | Response Code [M] |
responseMessage | Response Message [M] |
virtualAccountData | JSON data, only if response is success [M] |
Sample Request & Response Payment
JSON Request Example
{
"partnerServiceId": "{YOUR_PARTNER_ID}",
"paymentRequestId": "{REQUEST_ID}",
"trxDateTime": "2024-12-24T11:18:56+07:00",
"paidAmount": {
"currency": "360",
"value": "3201000"
},
"customerNo": "xxxxxxxxxxxxxxxx",
"virtualAccountNo": "xxxxxxxxxxxxxxxx",
...
}
JSON Response Example
{
"responseCode": "2002500",
"responseMessage": "Successful",
"virtualAccountData": {
"partnerServiceId": "{YOUR_PARTNER_ID}",
"paymentRequestId": "{REQUEST_ID}",
"virtualAccountName": "John Doe",
"paidAmount": "3201000",
"customerNo": "xxxxxxxxxxxxxxxx",
"virtualAccountNo": "xxxxxxxxxxxxxxxx",
...
}
}
Payment Response Codes
HTTP | Code | Message | Description |
---|---|---|---|
200 | 2002500 | Success | Normal Payment Response |
400 | 4002501 | Invalid Field Format | Invalid Field Format |
401 | 4012500 | Unauthorized Access | Unauthorized Access |
404 | 4042513 | Payment Amount not valid | Payment amount is not valid |
500 | 5002500 | General Error | General Error |
504 | 5042500 | Timeout | Timeout. Fund will be suspended |