| Date | Description | Author |
|---|---|---|
| 10 Oktober 2017 | Peluncuran pertama | Deni Nurdiani |
| 15 Januari 2018 | Penambahan Daftar Produk, Inquiry Bill Payment Status, Get Balance, Biller Table of Error | Dadik Devanto |
| 27 Januari 2018 | Penambahan Get Provider Phone Number, Produk Pulsa Three 25.000, Payment Instruction. Update Biller Table of Error (Error Code: 800,801), Get Biller Products. |
Iryanto |
| 1 Maret 2018 | Penambahan field expired to Check Payment Status Service. Penambahan Update Expire Transaction Service. Penambahan Inquiry Merchant Penambahan Default Display Screen Shoot |
Iryanto |
| 8 Maret 2018 | Penambahan Tagih.id. Penambahan Merchant Payment Notification Service. Penambahan Merchant Check Invoice Service. Penambahan Tagih Check Invoice Service. |
Iryanto |
| 8 Maret 2018 | Update Wording Payment Gateway | Dadik Devanto |
| 26 Maret 2018 | Add Collection | Iryanto |
| 7 Mei 2018 | Add Credit Card | Iryanto |
| 10 Oktober 2018 | Penambahan Produk Biller: 1. Voucher Game 2. Digital Voucher |
Iryanto |
Sisipkan kode ini pada halaman yang digunakan oleh pelanggan untuk memilih metode pembayaran, atau halaman yang akan beralih ke halaman pembayaran. API ini akan otomatis mengalihkan halaman penjual ke halaman pembayaran. Beberapa parameter perlu diuraikan untuk digunakan pada halaman ini. Jika penjual membutuhkan untuk mengubah tampilan metode pembayaran maka penjual perlu menyisipkan bankCode dan bankProduct kemudian halaman ini akan otomatis beralih ke halaman pembayaran.
<iframe id="sgoplus-iframe" src="" scrolling="no" frameborder="0"></iframe>
<script type="text/javascript" src="https://sandbox-kit.espay.id/public/signature/js"></script>
<script type="text/javascript">
window.onload = function() {
var data = {
key: "",
paymentId: "",
backUrl: ""
},
sgoPlusIframe = document.getElementById("sgoplus-iframe");
if (sgoPlusIframe !== null) sgoPlusIframe.src = SGOSignature.getIframeURL(data);
SGOSignature.receiveForm();
};
</script>
| API JAVASCRIPT URL |
|---|
| Development : https://sandbox-kit.espay.id/public/signature/js |
| Production : https://kit.espay.id/public/signature/js |
| Nama Parameter | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| paymentId | String | Ya | Nomor transaksi / ID faktur / ID unik sebagai identitas pesanan / tagihan / faktur. |
| key | String | Ya | Key yang diberikan oleh Espay Integration Team |
| backUrl | String | Ya | URL penjual berisi halaman konfirmasi |
| bankCode | String | Tidak | Parameter AutoDIrect (seperti response dari Inquiry Merchant Info API) jika penjual ingin mengubah tampilan, parameter ini diharuskan ada |
| bankProduct | String | Tidak | Parameter AutoDIrect (seperti response dari Inquiry Merchant Info API) jika penjual ingin mengubah tampilan, parameter ini diharuskan ada |
| display | String | Tidak | Tampilan yang disediakan oleh Espay, disana ada pilihan yang disediakan oleh Espay, seperti tab, daftar pilihan, dan pilihan radio box, Default: select Untuk tampilan tab tentukan value = 'tab' Untuk tampilan radio box tentukan value = 'option' |
Semua request dari server Espay akan membutuhkan paramater signature, semua merchant harus validasi parameter ini untuk memastikan request hanya datang dari server espay.
Signature transaksi dihasilkan dengan cara menyatukan parameter dengan ##, uppercase paramater string tersebut lalu hash menggunakanan algoritma SHA256, berikut penjelasan dan contoh signature service Espay:
Send Invoice
untuk signature send invoice, parameter sesuai urutan sebagai berikut:
| contoh |
|---|
| ##7bc074f97c3131d2e290a4as##UUID001##2016-07-25 11:05:49##145000065##10000##IDR##SGWTES##SENDINVOICE## |
Closed Invoice
untuk signature closed invoice, parameter sesuai urutan sebagai berikut:
| contoh |
|---|
| ##7bc074f97c3131d2e290a4707a54a623##UUID001##2016-07-25 11:05:49##145000065##SGWTES##CLOSEDINVOiCE## |
Transaction Inquiry, Payment notification, Check Payment Status, Update Expire Transaction
memiliki urutan parameter yang sama ##KEY##rq_datetime##order_id##mode## berikut penjelasannya :
| contoh |
|---|
| ##7bc074f97c3131d2e290a4707a54a623##2016-07-25 11:05:49##145000065##INQUIRY## |
| ##7BC074F97C3131D2E290A4707A54A623##2016-07-25 11:05:49##145000065##PAYMENTREPORT## |
Berikut langkah generate signature :
First Step : Satukan paramater dengan ##
contoh string signature setelah disatukan
##7bc074f97c3131d2e290a4707a54a623##2016-07-25 11:05:49##145000065##INQUIRY##
Second Step : Uppercase string yang telah disatukan
uppercase
##7BC074F97C3131D2E290A4707A54A623##2016-07-25 11:05:49##145000065##INQUIRY## //contoh string signature setelah proses uppercase
Third Step : Hash dengan sha256
algoritma sha256
67747e2e6b219879563655eb012f77646b9792736f5693f2e44693fec5a67d26 //contoh string signature setelah proses sha256
Contoh menghasilkan kode signature menggunakan php :
<?php
$uppercase = strtoupper('##7bc074f97c3131d2e290a4707a54a623##2016-07-25 11:05:49##145000065##INQUIRY##');
$signature = hash('sha256', '$uppercase');
?>
Contoh menghasilkan kode signature menggunakan java :
import java.io.FileInputStream;
import java.security.MessageDigest;
/**
*
* @author root
*/
public class SHACheckSumExample {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws Exception{
// TODO code application logic here
String password ="##7bc074f97c3131d2e290a4707a54a623##2016-07-25 11:05:49##145000065##INQUIRY##";
Confidential © Espay Page 23 of 27 PT.Square Gate One
String data = password.toUpperCase();
System.err.println(data);
MessageDigest md = MessageDigest.getInstance("SHA-256");
md.update(data.getBytes());
byte byteData[] = md.digest();
//convert the byte to hex format method 1
StringBuffer sb = new StringBuffer();
for (int i = 0; i < byteData.length; i++) {
sb.append(Integer.toString((byteData[i] & 0xff) + 0x100,16).substring(1));
}
System.out.println("Hex format : " + sb.toString());
}
}
Ketika beralih ke halaman pembayaran, sistem Espay akan meminta rincian dari transaksi kepada sistem penjual berdasarkan ID pesanan yang penjual berikan, rincian transaksi ini akan ditampilkan kepada pelanggan ketika pelanggan telah di halaman pembayaran dan untuk membuat sistem bank mengetahui jumlah yang akan mereka butuhkan untuk diproses.
Sistem Espay akan mengirim request dan setelah penjual menerima request, penjual diharapkan untuk memberikan response dengan pemisah semicolon (;) dan berdasarkan pada jenis template
error_code;error_message;order_id;amount;ccy;description;trx_date
Contoh response sukses dari penjual :
0;Success;TX151028132832A001;50000.00;IDR;Payment For Me;28/10/2015 13:28:32;13051910361234614100;Y
Contoh response gagal dari penjual :
1;Invalid Order Id;;;;;
| Alur Pesan |
|---|
| Espay → Penjual |
| Metode |
|---|
| HTTP Post |
| API URL |
|---|
| http://www.yourwebsite.com/inquiry.php or https://www.yourwebsite.com/inquiry.php |
Parameter request :
| Nama Parameter | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | 64 | Ya | Pengidentifikasi request. ID unik untuk mengidentifikasi pesan-pesan tersebut dengan pesan yang lain |
| rq_datetime | 19 | Ya | Tanggal dan waktu di server aplikasi Espay ketika pesan dikirim |
| member_id | 20 | Tidak | Kode pelanggan jika terdaftar di aplikasi Espay |
| comm_code | 10 | Ya | Kode penjual yang terdaftar di aplikasi Espay |
| order_id | 20 | Ya | Nomor transaksi / ID faktur / ID unik yang mengidentifikasi pesanan / tagihan / faktur |
| password | 32 | Tidak | Password digunakan untuk mengidentifikasi dan mekanisme validasi oleh penjual untuk mengidentifikasi request secara menyeluruh dari aplikasi Espay |
| signature | 64 | Ya | Signature diperlukan untuk validasi oleh penjual |
Parameter response :
| Nama Parameter | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| error_code | 4 | Ya | Penjual akan memberikan informasi tentang request berdasarkan bidang ini. 0 = Sukses, proses di penjual telah sukses lainnya = failed, proses di penjual telah gagal (validasi bermasalah, proses bisnis tidak sesuai, atau masalah lainnya) |
| error_message | 32 | Ya | Jika error_code sama dengan 0 = Sukses Jika error_code tidak sama dengan 0, silahkan sisipkan pesan atau keterangan masalah pada bidang ini |
| order_id | 20 | Tidak | Nomor transaksi / ID faktur / ID unik yang mengidentifikasikan pesanan / tagihan / faktur |
| amount | 13.2 | Tidak | Jumlah yang harus dibayar oleh pelanggan Format : 100000.00 |
| ccy | 3 | Tidak | Kode mata uang transaksi. contoh: IDR / USD |
| description | 32 | Tidak | Deskripsi transaksi |
| trx_date | 19 | Tidak | Tanggal transaksi di server penjual Format : DD/MM/YYYYhh:mm:ss |
| token | 32 | Tidak | Token (credit card, dana) |
| is_installment | 1 | Tidak | Jika boleh cicilan diisi dengan parameter Y |
Ketika pelanggan telah selesai melakukan pembayaran, sistem Espay memberitahukan sistem penjual secara langsung mengenai status pembayaran dari transaksi yang sedang diproses.
Sistem Espay akan mengirim request dan setelah penjual menerima request, penjual diharapkan untuk memberi response dengan pemisah comma (,) dan berdasarkan jenis template
success_flag,error message,reconcile_id , order_id,reconcile_datetime
Contoh response sukses dari penjual :
0, Success, 0123162509216347301, TOP130123EBS58, 2013-01-23 16:26:00
Contoh response gagal dari penjual :
1, Invalid Order Id,,,
| Alur Pesan |
|---|
| Espay → Penjual |
| Metode |
|---|
| HTTP Post |
| API URL |
|---|
| http://www.yourwebsite.com/payment.php or https://www.yourwebsite.com/payment.php |
Parameter request :
| Nama Parameter | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | 64 | Ya | Pengidentifikasi request. ID unik untuk mengidentifikasi pesan-pesan tersebut dengan pesan yang lain |
| rq_datetime | 19 | Ya | Tanggal dan waktu di server aplikasi Espay ketika pesan dikirim |
| member_id | 20 | Tidak | Kode pelanggan jika terdaftar di aplikasi Espay |
| comm_code | 10 | Ya | Kode penjual yang terdaftar di aplikasi Espay |
| order_id | 20 | Ya | Nomor transaksi / ID faktur / ID unik yang mengidentifikasi pesanan / tagihan / faktur |
| password | 32 | Tidak | Password digunakan untuk mengidentifikasi dan mekanisme validasi oleh penjual untuk mengidentifikasi request secara menyeluruh dari aplikasi Espay |
| ccy | 3 | Ya | Mata uang transaksi. ex: IDR / USD |
| amount | 13.2 | Ya | Jumlah yang harus dibayarkan oleh customer. Format : 100000.00 |
| debit_from | 19 | Tidak | Asal rekening. (rekening yang digunakan untuk debit ) |
| debit_from_name | 64 | Tidak | Nama asal rekening |
| credit_to | 19 | Tidak | Tujuan rekening bank (rekening untuk kredit) |
| credit_to_name | 64 | Tidak | Tujuan nama pemilik rekening |
| product_code | 32 | Ya | Kode produk pembayaran |
| message | 32 | Tidak | Informasi tambahan untuk pembayaran |
| payment_datetime | 19 | Ya | Tanggal dan waktu saat pembayaran yang terdaftar di Espay application
Format : YYYY-MM-DD hh:mm:ss |
| payment_ref | 20 | Ya | Nomor referensi transaksi (digunakan untuk menidentifikasi transaksi) yang tercatat di sistem espay |
| debit_from_bank | 20 | Ya | Kode bank asal rekening. Contoh :008, 016, dll |
| credit_to_bank | 20 | Ya | Kode bank tujuan rekening. Contoh :008,016, dll |
| approval_code_full_bca | 4 | Tidak | Kode persetujuan dari BCA jika menggunakan kartu debit bca |
| approval_code_installment_bca | 4 | Tidak | Kode persetujuan dari BCA jika menggunakan kartu kredit bca |
| signature | 64 | Ya | Signature diperlukan untuk validasi oleh penjual |
Parameter response :
| Nama Parameter | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| error_code | 4 | Ya | Penjual akan memberikan informasi tentang request berdasarkan bidang ini. 0 = Sukses, proses di penjual telah sukses lainnya = failed, proses di penjual telah gagal (validasi bermasalah, proses bisnis tidak sesuai, atau masalah lainnya) |
| error_message | 32 | Ya | Jika error_code sama dengan 0 = Sukses Jika error_code tidak sama dengan 0, silahkan sisipkan pesan atau keterangan masalah pada bidang ini |
| reconcile_id | 20 | Tidak | Random unik string / nomor bukti / konfirmasi bahwa merchant tersebut sukses menerima payment notification. |
| order_id | 20 | Tidak | Nomor transaksi / ID faktur / ID unik yang mengidentifikasikan pesanan / tagihan / faktur |
| reconcile_datetime | 19 | Tidak | Tanggal transaksi di server penjual Format : 2020-07-09 16:57:12 |
Proses ini digunakan jika merchant ingin mengetahui apakah customer mereka sudah membayar transaksi mereka. Merchant akan mengirimkan request ke sistem Espay, lalu Espay akan memberikan response dengan format json seperti contoh dibawah
| Alur Pesan |
|---|
| Merchant → Espay |
| Method |
|---|
| HTTP Post |
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/merchant/status |
| Production : https://api.espay.id/rest/merchant/status |
Parameter Request :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| uuid | 64 | Ya | Request identifier. Id unik untuk mengidentifikasi pesan ini dengan pesan lainnya |
| rq_datetime | 19 | Ya | Tanggal dan waktu di server aplikasi Espay saat pesan terkirim |
| comm_code | 10 | Ya | Kode merchant yang terdaftar pada aplikasi Espay |
| order_id | 20 | Ya | Nomor transaksi / Id invoice / id unik untuk mengidentifikasi order/ billing/ invoice. |
| is_paymentnotif | 1 | No | Jika di Isi: Y = akan paymentnotif ulang ke url paymentnotif mitra N = akan mengupdate trx_status menjadi S di portal Espay Tidak kirim param ini/diisi "" = akan melakukan check payment status saja |
| signature | 64 | Ya | Signature yang harus divalidasi oleh merchant, lihat halaman ini untuk detailnya |
Parameter Response :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 4 | Ya | Request identifier. Id unik untuk mengindentifikasi pesan ini dan pesan lainnya |
| rs_datetime | 32 | Ya | Tanggal dan waktu server Espay saat messages response |
| error_code | 4 | Ya | Kode error web service, 0000 berarti success |
| error_message | 32 | Ya | Deskripsi error |
| comm_code | 19 | Tidak | Kode komunitas merchant yang terdaftar di aplikasi Espay |
| tx_id | 20 | Tidak | ID transaksi yang dihasilkan oleh bank |
| order_id | 32 | Tidak | Nomor transaksi/ Id invoice? id unik untuk mengidentifikasi order/ billing/ invoice. |
| ccy_id | 3 | No | Kode mata uang transaksi. Contoh : IDR / USD |
| amount | 13 | TIdak | Jumlah yang telah dibayar oleh pelanggan |
| tx_status | 2 | Tidak | Payment status : S = Success F = Failed SP = Suspect IP = In Process |
| tx_reason | 50 | Tidak | Penjelasan Pembayaran |
| tx_date | 10 | Tidak | Tanggal Pembayaran |
| created | 20 | Tidak | Waktu Transaksi dibuat |
| expired | 20 | Tidak | Batas waktu transaksi |
| bank_name | 32 | Tidak | Nama Bank untuk pembayaran |
| product_name | 32 | Tidak | Nama Channel Bank |
| product_value | 32 | Tidak | Kode Channel Bank |
| payment_ref | 32 | Tidak | Referensi nomor transaksi (digunakan untuk identitas transaksi) yang tercatat di sistem Espay |
| merchant_code | 32 | Tidak | Kode merchant yang diberikan oleh Espay |
Contoh response:
{
"rq_uuid": "baefa025e0ca44861a9076c8Z83fccxx",
"rs_datetime": "2018-02-27 11:57:45",
"error_code": "0000",
"error_message": "",
"comm_code": "SGWYESSI",
"tx_id": "SG31516158283435J",
"order_id": "5V94TSUH4W",
"ccy_id": "IDR",
"amount": "75000000",
"tx_status": "IP",
"tx_reason": "",
"tx_date": "2018-01-17",
"created": "2018-01-17 09:59:06",
"expired": "2018-01-17 11:59:06",
"bank_name": "BANK PERMATA",
"product_name": "PERMATA ATM",
"product_value": "",
"payment_ref": "",
"merchant_code": "01"
}
Info Inquiry Merchant bukan proses yang wajib, proses ini hanya dilakukan jika sistem merchant perlu mengetahui bankProduct dan productCode yang dibutuhkan untuk menyesuaikan tampilan pada metode pembayaran, menempatkan bankCode dan productCode di api redirector akan secera otomatis mengalihkan halaman merchant ke halaman pembayaran.
Merchant akan mengirimkan request ke sistem Espay, kemudia Espay akan memberikan response dengan format json seperti contoh berikut
{
"error_code": "0000",
"error_message": "",
"data": [
{
"bankCode": "014",
"productCode": "BCAKLIKPAY"
,
"productName": "BCA KlikPay"
},
{
"bankCode": "008",
"productCode": "MANDIRIIB",
"productName": "MANDIRI IB"
},
]
}
| Alur Pesan |
|---|
| Merchant → Espay |
| Method |
|---|
| HTTP Post |
| API URL |
|---|
| Development : Development : https://sandbox-api.espay.id/rest/merchant/merchantinfo |
| Production : Production : https://api.espay.id/rest/merchant/merchantinfo |
Parameter Request :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| Key | 32 | Ya | Merchant Key yang diberikan oleh Espay |
Parameters Response :
| Nama Parameter | Max Length | Mandatory | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| error_code | 4 | Ya | 0000 = Success. Other = Failed. |
||||||
| error_message | 32 | Ya | Tanggal dan waktu server Espay ketika mengirim response | ||||||
| error_code | 4 | Ya | Kode error web service, 0000 berarti success | ||||||
| error_message | 32 | Ya | jika error_code 0000 = Success jika error_code bukan 0000, maka penjelesannya akan ditampilkan di sini |
||||||
| data | Tidak | Terdiri dari:
|
Proses ini digunakan jika merchant ingin menggagalkan transaksi. Merchant akan mengirim request ke sistem Espay, lalu Espay akan mengirim response dengan format json seperti contoh dibawah ini
| Alur Pesan |
|---|
| Merchant → Espay |
| Method |
|---|
| HTTP Post |
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/merchant/updateexpire |
| Production : https://api.espay.id/rest/merchant/updateexpire |
Parameter Request :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| uuid | 64 | Ya | Request identifier. Id unik untuk mengidentifikasi pesan ini dengan pesan lainnya |
| rq_datetime | 19 | Ya | Tanggal dan waktu di server aplikasi Espay saat pesan terkirim |
| comm_code | 10 | Ya | Kode merchant yang terdaftar pada aplikasi Espay |
| order_id | 20 | Ya | Nomor transaksi/ Id invoice? id unik untuk mengidentifikasi order/ billing/ invoice. |
| tx_remark | 50 | Ya | Penjelasan untuk mengubah transaksi menjadi gagal/sudah lewat. |
| signature | 64 | Ya | Signature yang harus divalidasi oleh merchant, lihat halaman ini untuk detailnya |
Parameter Response :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 4 | Ya | Request identifier. Id unik untuk mengidentifikasi pesan ini dengan pesan lainnya |
| rs_datetime | 32 | Ya | Tanggal dan waktu di server aplikasi Espay saat pesan terkirim |
| error_code | 4 | Ya | Kode error pada web service, 0000 artinya success |
| error_message | 32 | Ya | Deskripsi error |
| tx_id | 20 | Tidak | ID Transaksi yang dihasilkan oleh Bank |
Contoh Response:
{
"rq_uuid": "baefa025e0ca44861a9076c8Z83fccxx",
"rs_datetime": "2018-02-27 11:57:45",
"error_code": "0000",
"error_message": "",
"tx_id": "SG31516158283435J"
}
Mitra akan mengirimkan invoice ke Espay kemudian Espay akan meresponse dengan JSON format berisi nomor va dan keterangan lain.
| Alur Pesan |
|---|
| Merchant → Espay |
| Method |
|---|
| HTTP Post |
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/merchantpg/sendinvoice |
| Production : https://api.espay.id/rest/merchantpg/sendinvoice |
Parameter Request :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 64 | Ya | Request identifier. Id unik untuk mengidentifikasi pesan ini dengan pesan lainnya |
| rq_datetime | 19 | Ya | Tanggal dan waktu di server aplikasi Espay saat pesan terkirim |
| order_id | 32 | Ya | Transaction Number / Invoice Id / unique id yang dapat mengidentifikasi tagihan yang dimiliki pelanggan mitra |
| amount | 17 | Ya | Jumlah total tagihan yang akan dibayarkan oleh pelanggan mitra dengan 2 digit terakhir adalah desimal dari pembayaran |
| ccy | 3 | Ya | Kode mata uang dari tagihan yang ingin yang dibayarkan contoh IDR |
| comm_code | 32 | Ya | Kode merchant yang terdaftar pada aplikasi Espay |
| remark1 | 32 | No | Deskripsi pertama. Mandatory bisa “Ya” mengkuti skema. Diisi dengan No Handphone |
| remark2 | 32 | Yes | Deskripsi kedua. Diisi dengan Nama |
| remark3 | 32 | No | Deskripsi ketiga. Diisi dengan alamat email |
| update | 1 | Yes | Di isi Y jika ingin mengupdate data terhadap order_id yang telah terdaftar Di isi N jika ingin mendaftarkan order_id baru |
| bank_code | 3 | Ya | Kode bank yang akan dijadikan pembayaran. Contoh: 008, 016 or show this Table of Bank Code |
| va_expired | 20 | No | Untuk setup waktu expired dari VA tersebut. (dalam satuan menit) Contoh: 4000 (artinya akan expired dalam 4000 menit) |
| signature | 64 | Ya | Signature yang harus divalidasi oleh Espay, lihat halaman ini untuk detailnya |
Parameter Response :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 4 | Ya | Request identifier. Id unik untuk mengidentifikasi pesan ini dengan pesan lainnya |
| rs_datetime | 32 | Ya | Tanggal dan waktu di server aplikasi Espay saat pesan terkirim |
| error_code | 4 | Ya | Kode error pada web service, 0000 artinya success |
| error_message | 32 | Ya | Deskripsi error |
| va_number | 16 | Ya | Virtual Account Number yang digunakan customer untuk membayar. |
| expired | 19 | Ya | Tanggal dan waktu Virtual Account Number akan kadaluarsa. |
| description | 32 | Ya | Deskripsi. |
| total_amount | 17 | Ya | Total Harga dari Merchant + biaya administrasi. |
| amount | 17 | Ya | Total Harga dari Merchant. |
| fee | 17 | Ya | biaya administrasi. |
Contoh Response:
{
"rq_uuid": "baefa025e0ca44861a9076c8Z83fccxx",
"rs_datetime": "2018-02-27 11:57:45",
"error_code": "0000",
"error_message": "",
"va_number": "6280615238775939",
"expired": "2018-05-17 14:00:00",
"description": "Test Pembayaran VA",
"total_amount": "10000.00",
"amount": "10000",
"fee": "0.00"
}
Mitra akan mengirimkan request untuk mengclosed invoice yang telah dibuat jika tagihan tersebut sudah dianggap selesai kemudian Espay akan memberikan invoice response berupa json yang menyatakan request telah sukses.
| Alur Pesan |
|---|
| Merchant → Espay |
| Method |
|---|
| HTTP Post |
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/merchant/closeinvoice |
| Production : https://api.espay.id/rest/merchant/closeinvoice |
Parameter Request :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 64 | Ya | Request identifier. Id unik untuk mengidentifikasi pesan ini dengan pesan lainnya |
| rq_datetime | 19 | Ya | Tanggal dan waktu di server aplikasi Espay saat pesan terkirim |
| order_id | 32 | Ya | Transaction Number / Invoice Id / unique id yang dapat mengidentifikasi tagihan yang dimiliki pelanggan mitra |
| comm_code | 32 | Ya | Kode merchant yang terdaftar pada aplikasi Espay |
| signature | 64 | Ya | Signature yang harus divalidasi oleh Espay, lihat halaman ini untuk detailnya |
Parameter Response :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 4 | Ya | Request identifier. Id unik untuk mengidentifikasi pesan ini dengan pesan lainnya |
| rs_datetime | 32 | Ya | Tanggal dan waktu di server aplikasi Espay saat pesan terkirim |
| error_code | 4 | Ya | Kode error pada web service, 0000 artinya success |
| error_message | 32 | Ya | Deskripsi error |
Contoh Response:
{
"rq_uuid": "baefa025e0ca44861a9076c8Z83fccxx",
"rs_datetime": "2018-02-27 11:57:45",
"error_code": "0000",
"error_message": ""
}
Contoh Kode
<!--<script type="text/javascript"
src="https://kit.espay.id/public/signature/js"></script>58962--->
<script type="text/javascript">
window.onload = function () {
var data = {
paymentId: '12',
key: '65ebeb3286bd3f0f860fcbe5adca9be4',
backUrl: encodeURIComponent ('http://www.google.com/'),
},
sgoPlusIframe = document.getElementById("sgoplus-iframe");
if (sgoPlusIframe !== null) {
sgoPlusIframe.src = SGOSignature.getIframeURL(data);
}
SGOSignature.receiveForm();
};
</script>
<div id="parentId"></div>
<iframe id="sgoplus-iframe" src="" scrolling="no" frameborder="0" height="500"></iframe>
Hasil
Contoh kode
<script type="text/javascript" src="https://sandboxkit.espay.id/public/signature/js"></script>
<script type="text/javascript">
window.onload = function () {
var data = {
paymentId: '12',
key: '65ebeb3286bd3f0f860fcbe5adca9be4',
backUrl: encodeURIComponent ('http://www.google.com/'),
display : 'option'
},
sgoPlusIframe = document.getElementById("sgoplus-iframe");
if (sgoPlusIframe !== null) {
Confidential © Espay Page 26 of 27 PT.Square Gate One
sgoPlusIframe.src = SGOSignature.getIframeURL(data);
}
SGOSignature.receiveForm();
};
</script>
<div id="parentId"></div>
<iframe id="sgoplus-iframe" src="" scrolling="no" frameborder="0" height="500"></iframe>
Hasil
Contoh kode
<!--<script type="text/javascript" src="https://kit.espay.id/public/signature/js">
</script>58962--->
<script type="text/javascript">
window.onload = function () {
var data = {
paymentId: '12',
key: '65ebeb3286bd3f0f860fcbe5adca9be4',
Confidential © Espay Page 27 of 27 PT.Square Gate One
backUrl: encodeURIComponent ('http://www.google.com/'),
display : ‘tab’
},
sgoPlusIframe = document.getElementById("sgoplus-iframe");
if (sgoPlusIframe !== null) {
sgoPlusIframe.src = SGOSignature.getIframeURL(data);
}
SGOSignature.receiveForm();
};
</script>
<div id="parentId"></div>
<iframe id="sgoplus-iframe" src="" scrolling="no" frameborder="0" height="500"></iframe>
Hasil
BankCode dan ProductCode :
| BankCode | ProductCode | Product Name |
|---|---|---|
| 002 | BRIATM | BRI VA |
| 002 | EPAYBRI | EPAYBRI |
| 008 | CCINSTALL12 | Credit Card Visa / Master 12 Months Installment |
| 008 | CCINSTALL3 | Credit Card Visa / Master 3 Months Installment |
| 008 | CCINSTALL6 | Credit Card Visa / Master 6 Months Installment |
| 008 | CCPROMO | Credit Card Visa / Master Promotion |
| 008 | CREDITCARD | Credit Card Visa / Master |
| 008 | FINPAY195 | Modern Channel |
| 008 | MANDIRIATM | MANDIRI ATM |
| 008 | MANDIRIIB | MANDIRI IB |
| 008 | TCASH | TELKOMSEL CASH |
| 009 | BNIATM | BNI VA |
| 011 | DANAMONATM | DANAMON ATM |
| 011 | DANAMONOB | Danamon Online Banking |
| 013 | PERMATAATM | PERMATA ATM |
| 013 | PERMATANETPAY | PermataNet |
| 013 | PERMATAPEB | Permata EBusiness |
| 014 | BCAATM | BCA VA Online |
| 014 | BCAB2B | BCA B2B |
| 014 | BCAKLIKPAY | BCA KlikPay |
| 014 | KLIKBCA | Klik BCA |
| 016 | BIIATM | BII ATM |
| 016 | IDEBITALTO | Alto iDebit |
| 022 | CIMBATM | ATM CIMB Niaga |
| 075 | JENIUSIB | Jenius IB |
| 157 | MASPIONATM | ATM MASPION |
Dokumen ini memuat spesifikasi teknis mengenai API biller Espay.
Setiap request harus akan diverivikasi dengan cara basic auth, jadi pada setiap request yang dikirim harus menyertai header Authorization dengan value Basic diikuti dengan username dan password dengan format username:password yang telah di encode dengan Base64 Encoding
Contoh
Username: Aladdin
Password: Smelana
Format sebelum di encode : Aladdin:Smelana
Hasil Base64 encoding: QWxhZGRpbjpTbWVsYW5h
Header yang dikirim :
Authorization : Basic QWxhZGRpbjpTbWVsYW5h
Setiap Authentication yang gagal akan menerima header http 401
Semua request yang masuk ke system espay akan mengalami validasi Signature. Signature dikirim pada tiap request dengan parameter signature. Setiap signature akan dihash dengan menggunakan algoritma sha256. Signature akan dibuat dengan menggambungkan beberapa value dari parameter value sebelumnya serta dengan sebuah key yang diberikan oleh espay. Format penggambungan signature berbeda tiap service. setiap parameter akan dimulai,dipisahkan, dan diakhiri dengan tanda ##. Setelah digambungkan semua value harus dirubah menjadi uppercase. Urutan pengambungan signature adalah seperti berikut
Jadi format penggambungan signature akan menjadi sebagai berikut
Bill Inquiry : ##sender_id##order_id##product_code##rq_uuid##key##
Bill payment : ##sender_id##order_id##product_code##amount##rq_uuid##key##
Contoh genarete signature
Format awal
##SGOPLUS##142921023##STCKAI####key##sgoplus201711aa##keyforsignature##
Dirubah ke uppercase
##SGOPLUS##142921023##STCKAI####key##SGOPLUS201711AA##KEYFORSIGNATURE##
Kemudian di has dengan algortitma sha256 menjadi
6767aa419fe1fbf8f8896c7a0857b5cea41a7e4f407262f0fc82a914137a9401
Espay server juga akan mengfilter alamat ip yang akan mengkases server espay. Untuk itu silakan kontak tim espay untuk mendaftarkan ip anda.
Dilakukan melalui webservice dengan protokol REST. Client mengirimkan sejumlah nilai/parameter dalam bentuk HTTP POST ke biller, untuk melakukan inquiry transaksi atau mendapatkan data dari transaksi seperti jumlah yang harus dibayarkan atau detail transaksi lainnya.
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/biller/inquirytransaction |
| Production: https://api.espay.id/rest/biller/inquirytransaction |
Format message yang dikirimkan harus dalam bentuk URL encoded.
Keterangan untuk setiap field dalam HTTP POST message tersebut:
Bill Inquiry Request Data
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. Formula : sender_id + unique ID Contoh : SENDERID123ABC-DEF456 |
| rq_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Contoh : 2014-12-17 12:30:45 |
| sender_id | ANS 50 | Ya | Identitas unik client yang terdaftar di Espay. (Akan diberikan untuk masing client). |
| password | ANS 32 | Ya | Password akses client yang terdaftar di Espay. (Akan ditentukan sesuai perjanjian). |
| order_id | ANS 64 | Ya | ID Transaksi. Bisa berupa nomor handphone, nomor kartu kredit, customer id, dll. |
| product_code | ANS 16 | Ya | Kode produk yg disupport. Lihat table Daftar Produk. |
| additional_data | ANS 999 | Tidak | Data pendukung yang diperlukan untuk produk tertentu dalam format JSON. Detailnya dapat dilihat di halaman Bill Inquiry dan Bill Payment additional data |
| signature | ANS 999 | Ya | Signature |
Contoh request :
POST /rest/biller/inquirytransaction HTTP/1.0
Host: 116.90.162.170:10809
Content-Length: 108
Authorization: Basic QWxhZGRpbjpTbWVsYW5h
Content-type: application/x-www-form-urlencoded
rq_uuid=5441217&rq_datetime=2014-12-09 17:53:20&sender_id=SENDERID&order_id=9900990099&product_code=STCKAI
Setelah melakukan request dengan contoh diatas, client akan mendapatkan response JSON dari biller. Dengan contoh sebagai berikut :
{
"rq_uuid":"5441217",
"rs_datetime":"2014-12-09 17:53:24",
"error_code":"0000",
"error_desc":"COMPLETED SUCCESFULLY",
"order_id":"9900990099",
"amount":"35300000",
"bill_amount":"35000000",
"admin_fee":"300000",
"description":"Biaya admin fee Rp 3.000",
"data":{
"ticket_no":"9900990099",
"reserved1":"",
"reserved2":"",
"bill_total":"1",
"passenger_name":"Andreanus Hendy",
"train_number":"KA 16",
"train_name":"ARGO GEDE",
"train_seat":"39A",
"info":[
{
"trip_info":"JKTSBY0000",
"trip_info_extended":"23072340"
}
]
}
}
Keterangan dari data diatas adalah sebagai berikut :
Bill Inquiry Response Data :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi message tersebut dengan message lainnya. Formula : sender_id + unique ID Contoh : SENDERID123ABC-DEF456 |
| rs_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi server pada saat response message di kirim Format : YYYY-MM-DD HH:MM:SS Contoh : 2014-12-17 12:30:45 |
| error_code | ANS 4 | Ya | Kode kesalahan. 0000 = Sukses, selain itu gagal. |
| error_desc | ANS 128 | Tidak | Deskripsi kesalahan jika ada. |
| order_id | ANS 64 | Ya | ID Transaksi. Bisa berupa nomor handphone, nomor kartu kredit, customer id, dll. |
| amount | NUM 17 | Ya | Jumlah yang harus dibayar. Terdapat default 2 digit desimal. Contoh : 10000000 = 100.000,00 |
| bill_amount | NUM 17 | Tidak | Jumlah yang harus dibayar sebelum ditambahkan admin_fee. Terdapat default 2 digit desimal. Contoh : 10000000 = 100.000,00 |
| admin_fee | NUM 17 | Tidak | Biaya admin fee jika ada. Terdapat default 2 digit desimal. Contoh : 10000000 = 100.000,00 |
| description | ANS 128 | Tidak | Keterangan transaksi |
| data | ANS 999 | Ya | Detail data transaksi dari biller dalam format JSON. Data ini dinamis berdasarkan produk yang di inquiry. Detailnya dapat dilihat di halaman Bill Inquiry dan Bill Payment data |
Dilakukan melalui webservice dengan protokol REST. Client mengirimkan sejumlah nilai/parameter dalam bentuk HTTP POST ke biller, untuk melakukan payment notifikasi kepada biller bahwa telah terjadi transfer sejumlah amount ke rekening biller tersebut sebagai bentuk pembayaran/pembelian/transaksi yang dilakukan oleh client.
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/biller/paymentreport |
| Production : https://api.espay.id/rest/biller/paymentreport |
Format message yang dikirimkan harus dalam bentuk URL encoded.
Keterangan untuk setiap field dalam HTTP POST message tersebut:
Bill Payment Request Data :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. Formula : sender_id + unique ID Contoh : SENDERID123ABC-DEF456 |
| rq_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Contoh : 2014-12-17 12:30:45 |
| sender_id | ANS 50 | Ya | Identitas unik client yang terdaftar di Espay. (Akan diberikan untuk masing client). |
| channel_code | ANS 32 | Tidak | Code channel yang digunakan oleh client, sebagai pembeda aplikasi client |
| password | ANS 32 | Ya | Password akses client yang terdaftar di Espay. (Akan ditentukan sesuai perjanjian). |
| order_id | ANS 64 | Ya | ID Transaksi. Bisa berupa nomor handphone, nomor kartu kredit, customer id, dll. |
| product_code | ANS 16 | Ya | Kode produk yg disupport. Lihat table Daftar Produk. |
| amount | NUM 17 | Ya | Jumlah yang harus dibayar atau didebet. Terdapat 2 digit decimal. Contoh : 35000000 = 350.000,00 |
| data | ANS 999 | Ya | Detail data transaksi dari biller dalam format JSON. Sesuai dengan hasil inquiry (jika ada). Detailnya dapat dilihat di halaman Bill Inquiry dan Bill Payment data |
| additional_data | ANS 999 | Tidak | Data pendukung yang diperlukan untuk produk tertentu dalam format JSON. Detailnya dapat dilihat di halaman Bill Inquiry dan Bill Payment additional data |
| signature | ANS 999 | Ya | Signature |
Contoh request :
POST /rest/biller/paymentreport HTTP/1.0
Host: 116.90.162.170:10809
Authorization: Basic QWxhZGRpbjpTbWVsYW5h
Content-Length: 124
Content-type: application/x-www-form-urlencoded
rq_uuid=4328662&rq_datetime=2014-12-11 15:21:15&sender_id=SENDERID&order_id=9900990099&product_code=STCKAI&amount=35000000&data={"ticket_no":"9900990099","reserved1":"","reserved2":"","bill_total":"1","passenger_name":"Andreanus Hendy","train_number":"KA 16","train_name":"ARGO GEDE","train_seat":"39A","info":[{"trip_info":"JKTSBY0000","trip_info_extended":"23072340"}]}
Setelah melakukan request dengan contoh diatas, client akan mendapatkan response JSON dari biller. Dengan contoh sebagai berikut :
{
"rq_uuid":"4328662",
"rs_datetime":"2014-12-09 15:21:15",
"error_code":"0000",
"error_desc":"COMPLETED SUCCESFULLY",
"order_id":"9900990099",
"description":"Pembayaran tiket KAI",
"data":{
"ticket_no":"9900990099",
"reserved1":"",
"reserved2":"",
"bill_total":"1",
"passenger_name":"Andreanus Hendy",
"train_number":"KA 16",
"train_name":"ARGO GEDE",
"train_seat":"39A",
"info":[
{
"trip_info":"JKTSBY0000",
"trip_info_extended":"23072340"
}
]
}
}
Keterangan dari data diatas adalah sebagai berikut :
Bill Payment Response Data :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi message tersebut dengan message lainnya. Formula : sender_id + unique ID Contoh : SENDERID123ABC-DEF456 |
| rs_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi server pada saat response message di kirim Format : YYYY-MM-DD HH:MM:SS Contoh : 2014-12-17 12:30:45 |
| error_code | ANS 4 | Ya | Kode kesalahan. 0000 = Sukses, selain itu gagal |
| error_desc | ANS 128 | Tidak | Deskripsi kesalahan jika ada |
| order_id | ANS 64 | Ya | ID Transaksi. Bisa berupa nomor handphone, nomor kartu kredit, customer id, dll |
| description | ANS 128 | Tidak | Keterangan transaksi |
| data | ANS 999 | Ya | Detail data transaksi yang telah dibayar dari biller dalam format JSON. Detailnya dapat dilihat di halaman Bill Inquiry dan Bill Payment data |
Message :
1. Inquiry Response
2. Payment Request
3. Payment Reponse
Telkom (PSTN, Speedy, Flexy Classy) :
| Message | JSON String |
|---|---|
| 1,2,3 | { "phone_no":"01217777771", "divre_code":"01", "datel_code":"1234", "bill_total":"1", "customer_name":"I Kadek Suparjana", "npwp":"779882321823", "info":{ "bill_ref":"9571057361", "bill_amount":"000000050000" } } |
Kartu Kredit Citibank :
| Message | JSON String |
|---|---|
| 3 | { "card_no":"2838591830372", "amount":"300000", "ref_no":"463810382033" } |
Kartu Kredit Bank Lain :
| Message | JSON String |
|---|---|
| 3 | { "card_no":"4238591830312", "amount":"300000", } |
Payment Lainnya (Cicilan, TV Cable, Asuransi, Internet):
| Message | JSON String |
|---|---|
| 3 | { "customer_id":"2693337293756", "amount":"300000", } |
BPJS Kesahatan :
| Message | JSON String |
|---|---|
| 1,2 | { "va_number": "898880001234568", "customer_id": "000001234568", "customer_name": "Customer BPJS", "family_number": "01", "bill_period": "01", "bill_amount": 85000, "admin_fee": 2500, "amount": 87500, "remain_payment": 0, "reff_code": "00000001235600000000000000000000", "branch_code": "0901", "branch_name": "JAKARTA PUSAT", "remark": "" } |
| 3 | { "reff": "59E8F8C9EB565D0B17831D6B91905BF1", "product": "bpjsks", "va_number": "898880001234568", "customer_id": "000001234568", "customer_name": "Customer BPJS", "family_number": "01", "bill_period": "01", "bill_amount": 85000, "admin_fee": 2500, "amount": 87500, "remain_payment": 0, "message": "Rincian tagihan dapat diakses di www.bpjskesehatan.go.id" } |
Pulsa Pascabayar (Telkomsel, Indosat, Smartfren, Esia) :
| Message | JSON String |
|---|---|
| 1, 2, 3 | { "phone_no":"0251112233444", "bill_total":"1", "bill_ref":"108A000000", "bill_amount":"000000100000", "customer_name":"ESIA CUSTOMER POSTPAID", "region_code":"00" } |
Pulsa Pascabayar XL :
| Message | JSON String |
|---|---|
| 1, 2, 3 | { "phone_no":"0818112233445", "bill_total":"1", "bill_ref":"8530", "bill_amount":"000000050000", "customer_name":"XL CUSTOMER POSTPAID", "customer_nbr":"8530", "due_date":"08012015", "approval_code":"592806" } |
PLN Postpaid :
| Message | JSON String |
|---|---|
| 1, 2 | { "customer_id":"127521081154", "customer_name":"PLN Customer Postpaid", "fare_power":"S2/1300 VA", "bill_period":"MAY16", "message":"Informasi hubungi call center 123", "arrears":"", "bill_amount":"105000", "admin_fee":"2500", "upj":"" } |
| 3 | { "customer_id":"127521081154", "customer_name":"PLN Customer Postpaid", "fare_power":"S2/1300 VA", "bill_period":"MAY16", "reff_no":"0322210Z9728065653D29587D6C5867E", "message":"Informasi hubungi call center 123", "arrears":"", "bill_amount":"105000", "admin_fee":"2500", "upj":"", "reff_no":"0322210Z9728065653D29587D6C5867E" } |
PLN Non-Taglis :
| Message | JSON String |
|---|---|
| 1, 2 | { "customer_id":"5221111006588", "customer_name":"PLN Customer Non-Taglis", "class":"PENYAMBUNGAN BARU", "registration_date":"20110919", "bill_amount":"778000", "admin_fee":"2500" } |
| 3 | { "customer_id":"5221111006588", "customer_name":"PLN Customer Non-Taglis", "class":"PENYAMBUNGAN BARU", "registration_date":"20110919", "bill_amount":"778000", "admin_fee":"2500", "reff_no":"0322210Z9728065653D29587D6C5867E" } |
PLN Prabayar :
| Message | JSON String |
|---|---|
| 1, 2 | { "customer_id":"544103450881", "customer_name":"PLN Customer Prepaid", "meter_serial":"14070243887", "class":"R3 /16500 VA", "token_unsold1":"0", "token_unsold2":"0", "reff_no":"0322210Z9728065653D29587D6C5867E", "price":"20000", "admin_fee":"2500" } |
| 3 | { "customer_id":"544103450881", "customer_name":"PLN Customer Prepaid", "meter_serial":"14070243887", "class":"R3 /16500 VA", "token_unsold1":"0", "token_unsold2":"0", "reff_no":"0322210Z9728065653D29587D6C5867E", "price":"20000", "admin_fee":"2500", "reff_no":"0322210Z9728065653D29587D6C5867E" } |
PAM :
| Message | JSON String |
|---|---|
| 1, 2 | { "provider_code":"11", "customer_id":"132233445566", "customer_name":"CUSTOMER MITRACOM 3 BILL", "bill_total":"03", "bill_date":"201108", "bill_amount":"000000020000", "penalty":"00000000", "cubication":"00000000-00000000" } |
| 3 | { "provider_code":"11", "customer_id":"132233445566", "customer_name":"CUSTOMER MITRACOM 3 BILL", "bill_total":"03", "bill_date":"201108", "bill_amount":"000000020000", "penalty":"00000000", "cubication":"00000000-00000000", "ref_no":"54819371" } |
PDAM :
| Message | JSON String |
|---|---|
| 1, 2 | { "customer_id":"00000021", "customer_name":"Dummy Pelanggan 1", "bill_period":"JAN2012-FEB2012", "bill_amount":"11110", "admin_fee":"1200” } |
| 3 | { "customer_id":"00000021", "customer_name":"Dummy Pelanggan 1", "bill_period":"JAN2012-FEB2012", "bill_amount":"11110", "used_meters":"00000402-00000458", "admin_fee":"1200” , "reff":"3499039” } |
Tiket Pesawat (kecuali Sriwijaya Air):
| Message | JSON String |
|---|---|
| 1, 2, 3 | { "order_id":"1269210", "airline_code":"GA 720", "airline_code2":"GA 720", "total_flight":"1", "passenger_name":"Garuda Airlines", "pnr_code":"273343870293326", "info":{ "number_of_passengers":"1", "carrier":"1", "class":1, "from":"Jakarta", "to":"Denpasar", "flight_number":"GA 720", "depart_date":"1712", "depart_time":"1815" } } |
Tiket Pesawat Sriwijaya Air :
| Message | JSON String |
|---|---|
| 1, 2, 3 | { "unique_number":"7771234567890", "language":"0", "product_code":"ABCDEF", "date":"20141205", "time":"181500", "name":"Sriwijaya Air", "amount":"000000500000", "admin_fee":"000000010000", "ref_no":"271938239183032" } |
Kereta Api :
| Message | JSON String |
|---|---|
| 1, 2, 3 | { "ticket_no":"9900990099", "reserved1":"", "reserved2":"", "bill_total":"1", "passenger_name":"Andreanus Hendy", "train_number":"KA 16", "train_name":"ARGO GEDE", "train_seat":"39A", "info":[ { "trip_info":"JKTSBY0000", "trip_info_extended":"23072340" } ] } |
Pulsa Prabayar (seluruh Provider) & GO-PAY :
| Message | JSON String |
|---|---|
| 1, 2 | { "denomination":"100", "price":"98200" |
| 3 | { "price":"98200", "refnum":"15363858646949", "message":"INPROSES harga: 98200" } |
Voucher Game :
| Message | JSON String |
|---|---|
| 1, 2 | { "denomination":"20", "price":"22500" |
| 3 | { "amount":"20000", "admin_fee":"2500", "bill_amount":"22500", "phone_no":"081311112222", "sn":"E6CB3ABCDD3F6E987F6E536CA9DA3CBC", "ref_id":"1GMVC207K4NX5FLP1S84WGKSW8", "voucher_code":"13123123123213123", "struk":"STRUK PEMBELIAN VOUCHER GAME|| VOUCHER CODE : 13123123123213123|SERIAL NUMBER : 212121212121|VOUCHER PASSWORD : 9999|PIN : : Shell 33 123|NOMINAL : 10|KETERANGAN Cash" } |
Digital Voucher :
| Message | JSON String |
|---|---|
| 1, 2 | { "amount":"48500", "admin_fee":"1500", "bill_amount":"50000", "phone_no":"082310424287", "inq_ref_id":"DGVC50CXF3B2USX28KWG400GS" |
| 3 | { "amount":"48500", "admin_fee":"1500", "bill_amount":"50000", "phone_no":"082310424287", "sn":"VC50-20180830-0962", "ref_id":"1DGVC50CXF3B2USX28KWG400GS", "voucher_code": [{ "voucher": "MzExNSAyODcwIDEyMzQgMTIxMg==", "tgl_expired": "2021-11-05" }] } |
Message :
1. Inquiry Request
2. Payment Request
BPJS Kesehatan :
| Message | JSON String |
|---|---|
| 1,2 | { "period_month":"6" } |
Digital Voucher :
| Message | JSON String |
|---|---|
| 1 | { "qty":"2" } |
PLN Prabayar :
| Message | JSON String |
|---|---|
| 1,2 | { "msisdn":"081218811881" } |
Dilakukan melalui webservice dengan protokol REST. Client mengirimkan sejumlah nilai/parameter dalam bentuk HTTP POST ke sistem ESPAY untuk mendapatkan transaksi yang telah selesai.
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/billertools/gettransactioninfo |
| Production: https://api.espay.id/rest/billertools/gettransactioninfo |
Get Payment Status Request Data :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya.
Formula : sender_id+ Unique ID Contoh: ESPAY123ABC-456DEF |
| rq_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client pada saat message di kirim.
Format : YYYY-MM-DD HH:MM:SS Contoh: 2017-12-17 12:22:32 |
| sender_id | AN...32 | Ya | Identitas unik client yang terdaftar di Espay. (Akan diberikan untuk masing client) |
| password | AN...32 | Ya | Password akses client yang terdaftar di Espay. (Akan ditentukan sesuai perjanjian) |
| signature | ANs...128 | Ya | Signature |
| ref_id | AN...32 | Ya | Referensi ID yang didapatkan di Bill Payment API |
Contoh Request :
POST /rest/biller/inquirytransaction HTTP/1.0
Host: api.espay.idContent-Length: 197
Authorization: Basic QWxhZGRpbjpTbWVsYW5h
Content-type: application/x-www-form-urlencoded
rq_uuid=ESPAY123ABC-456DEF&rq_datetime=2017-12-17
12:22:32&sender_id=ESPAY&password=espaypass&signature=c26a2a9901941a2eefd
9c529c38822fabbd470c2693d40465616fa3fd58a0b26&ref_id=TX1712171209991FA
Setelah melakukan request dengan contoh diatas, client akan mendapatkan response. Dengan contoh sebagai berikut :
{
"rq_uuid":"ESPAY123ABC-456DEF,
"rs_datetime":"2017-12-17 12:22:32",
"error_code":"0000",
"error_desc":"COMPLETED SUCCESFULLY",
"product_code":"SVHTS50",
"order_id":"081218816222",
"status_code":"00",
"status_desc":"SUCCESS",
"serial_number":"41001621787608"
}
Penjelasan data di atas sebagai berikut :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya.
Formula : sender_id+ Unique ID Contoh: ESPAY123ABC-456DEF |
| rq_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client pada saat message di kirim.
Format : YYYY-MM-DD HH:MM:SS Contoh: 2017-12-17 12:22:32 |
| error_code | ANS...4 | Ya | Error Code(lihat Tabel Error) |
| error_desc | AN...32 | Ya | Keterangan Error |
| product_code | ANs...16 | Tidak | Kode produk |
| order_id | AN...64 | Tidak | Order ID / Payment ID |
| status_code | AN...4 | Tidak | Kode Status Transaksi (lihat Kode Status) |
| status_desc | AN...64 | Tidak | Keterangan Status |
| serial_number | AN...64 | Tidak | Prepaid voucher serial number |
Kode Status
| Code | Description |
|---|---|
| 00 | Succes |
| 10 | Pending |
| 33 | Failed |
| Kode Produk | Nama Produk | Transaction Type |
|---|---|---|
| Pembayaran Cicilan | ||
| SINNZP | ANZ PL | PAYMENT |
| SINCTC | Citibank PL / Ready Cash | PAYMENT |
| SINOMB | OTO Mobil | PAYMENT |
| SINOMT | OTO Motor | PAYMENT |
| Layanan Umum | ||
| SCCCTB | Citibank | PAYMENT |
| SCCAEI | American Express (AMEX) | PAYMENT |
| SCCBNI | BNI | PAYMENT |
| SCCANZ | ANZ | PAYMENT |
| SCCPMT | Permata Bank | PAYMENT |
| SCCDNM | Bank Danamon | PAYMENT |
| SCCUOB | UOB | PAYMENT |
| SCCICB | ICB Bumiputera | PAYMENT |
| SCCBKP | Bukopin | PAYMENT |
| SCCPAN | Panin | PAYMENT |
| Layanan Umum | ||
| SLYPLJ | PAM Palyja | PAYMENT |
| SLYATR | PAM Aetra | PAYMENT |
| SLYATG | PAM Aetra Tangerang | PAYMENT |
| SLYPDB | PDAM Kab. Bogor | PAYMENT |
| SLYPDD | PDAM Kota Bandung | PAYMENT |
| SLYPDK | PDAM Kota Depok | PAYMENT |
| SLYPDL | PDAM Lampung | PAYMENT |
| SLYPDM | PDAM Kota Mataram | PAYMENT |
| SLYPDP | PDAM Palembang | PAYMENT |
| SLYTPN | Telkom | PAYMENT |
| SLYLPO | PLN Postpaid | PAYMENT |
| SLYLNT | PLN Non-Taglis | PAYMENT |
| SLYLPR | 20 PLN Prabayar 20.000 | PURCHASE |
| SLYLPR | 50 PLN Prabayar 50.000 | PURCHASE |
| SLYLPR | 100 PLN Prabayar 100.000 | PURCHASE |
| SLYLPR | 200 PLN Prabayar 200.000 | PURCHASE |
| SLYLPR | 500 PLN Prabayar 500.000 | PURCHASE |
| SLYLPR | 1000 PLN Prabayar 1.000.000 | PURCHASE |
| SLYLPR | 5000 PLN Prabayar 5.000.000 | PURCHASE |
| SLYLPR | 10000 PLN Prabayar 10.000.000 | PURCHASE |
| SLYLPR | 50000 PLN Prabayar 50.000.000 | PURCHASE |
| Pembayaran Tagihan Handphone | ||
| SPBTHL | Telkomsel (Kartu HALO) | PAYMENT |
| SPBIMT | Indosat (MATRIX) | PAYMENT |
| SPBXPL | Excelcomindo (Xplor) | PAYMENT |
| SPBBRU | PSN / BYRU | PAYMENT |
| SLYTFC | Telkom Flexi Classy | PAYMENT |
| SPBFRE | Smartfren (Smart/Fren/Hepi) | PAYMENT |
| SPBERE | Esia | PAYMENT |
| STCLWA | Lion Air / Wings Air / Batik Air | PAYMENT |
| STCGRI | Garuda Indonesia | PAYMENT |
| STCSWJ | Sriwijaya Air | PAYMENT |
| STCKAI | Kereta Api | PAYMENT |
| Pembayaran TV Cable | ||
| STBIDV | Indovision | PAYMENT |
| STBTOP | Indovision Top TV | PAYMENT |
| STBOKV | Indovision Oke Vision | PAYMENT | STBFRM | First Media | PAYMENT |
| SLYYTV | Yes | PAYMENT |
| Pembayaran Tagihan Asuransi | ||
| STASMF | Sinarmas Life PAYMENT | PAYMENT |
| STASMS | Sinar Mas | PAYMENT |
| STAAIA | AIA Financial | PAYMENT |
| STAPRU | Prudential | PAYMENT |
| BPJSKS | BPJS Kesehatan | PAYMENT |
| Pembayaran Tagihan ISP (Internet) | ||
| SINCBN | CBN | PAYMENT |
| SINISN | Indosatnet | PAYMENT |
| SINCTR | Centrinnet | PAYMENT |
| SLYTSD | Telkom Speedy | PAYMENT |
| Pulsa Prabayar | ||
| SVHAX1 | Axis 1.000 | PURCHASE |
| SVHAX5 | Axis 5.000 | PURCHASE |
| SVHAX10 | Axis 10.000 | PURCHASE |
| SVHAX20 | Axis 20.000 | PURCHASE |
| SVHAX25 | Axis 25.000 | PURCHASE |
| SVHAX50 | Axis 50.000 | PURCHASE |
| SVHAX100 | Axis 100.000 | PURCHASE |
| SVHES1 | Esia 1.000 | PURCHASE |
| SVHES5 | Esia 5.000 | PURCHASE |
| SVHES10 | Esia 10.000 | PURCHASE |
| SVHES11 | Esia 11.000 | PURCHASE |
| SVHES15 | Esia 15.000 | PURCHASE |
| SVHES20 | Esia 20.000 | PURCHASE |
| SVHES25 | Esia 25.000 | PURCHASE |
| SVHES50 | Esia 50.000 | PURCHASE |
| SVHES100 | Esia 100.000 | PURCHASE |
| SVHFL5 | Flexi 5.000 | PURCHASE |
| SVHFL10 | Flexi 10.000 | PURCHASE |
| SVHFL20 | Flexi 20.000 | PURCHASE |
| SVHFL25 | Flexi 25.000 | PURCHASE |
| SVHFL50 | Flexi 50.000 | PURCHASE |
| SVHFL100 | Flexi 100.000 | PURCHASE |
| SVHFL150 | Flexi 150.000 | PURCHASE |
| SVHFL250 | Flexi 250.000 | PURCHASE |
| SVHFR5 | Smartfren 5.000 | PURCHASE |
| SVHFR10 | Smartfren 10.000 | PURCHASE |
| SVHFR20 | Smartfren 20.000 | PURCHASE |
| SVHFR25 | Smartfren 25.000 | PURCHASE |
| SVHFR30 | Smartfren 30.000 | PURCHASE |
| SVHFR50 | Smartfren 50.000 | PURCHASE |
| SVHFR75 | Smartfren 75.000 | PURCHASE |
| SVHFR100 | Smartfren 100.000 | PURCHASE |
| SVHFR150 | Smartfren 150.000 | PURCHASE |
| SVHFR200 | Smartfren 200.000 | PURCHASE |
| SVHFR225 | Smartfren 225.000 | PURCHASE |
| SVHFR300 | Smartfren 300.000 | PURCHASE |
| SVHFR500 | Smartfren 500.000 | PURCHASE |
| SVHIG5 | Indosat GPRS 5.000 | PURCHASE |
| SVHIG10 | Indosat GPRS 10.000 | PURCHASE |
| SVHIG25 | Indosat GPRS 25.000 | PURCHASE |
| SVHIR5 | Indosat 5.000 | PURCHASE |
| SVHIR10 | Indosat 10.000 | PURCHASE |
| SVHIR12 | Indosat 12.000 | PURCHASE |
| SVHIR25 | Indosat 25.000 | PURCHASE |
| SVHIR50 | Indosat 50.000 | PURCHASE |
| SVHIR100 | Indosat 100.000 | PURCHASE |
| SVHIS5 | Indosat SMS 5.000 | PURCHASE |
| SVHIS10 | Indosat SMS 10.000 | PURCHASE |
| SVHIS25 | Indosat SMS 25.000 | PURCHASE |
| SVHTR1 | Three 1.000 | PURCHASE |
| SVHTR5 | Three 5.000 | PURCHASE |
| SVHTR10 | Three 10.000 | PURCHASE |
| SVHTR20 | Three 20.000 | PURCHASE |
| SVHTR25 | Three 25.000 | PURCHASE |
| SVHTR30 | Three 30.000 | PURCHASE |
| SVHTR50 | Three 50.000 | PURCHASE |
| SVHTR100 | Three 100.000 | PURCHASE |
| SVHTI5M | Three Internet 500 MB | PURCHASE |
| SVHTI1G | Three Internet 1 GB | PURCHASE |
| SVHTI2G | Three Internet 2 GB | PURCHASE |
| SVHTI5G | Three Internet 5 GB | PURCHASE |
| SVHTS5 | Telkomsel 5.000 | PURCHASE |
| SVHTS10 | Telkomsel 10.000 | PURCHASE |
| SVHTS20 | Telkomsel 20.000 | PURCHASE |
| SVHTS25 | Telkomsel 25.000 | PURCHASE |
| SVHTS50 | Telkomsel 50.000 | PURCHASE |
| SVHTS100 | Telkomsel 100.000 | PURCHASE |
| SVHXR5 | XL 5.000 | PURCHASE |
| SVHXR10 | XL 10.000 | PURCHASE |
| SVHXR25 | XL 25.000 | PURCHASE |
| SVHXR50 | XL 50.000 | PURCHASE |
| SVHXR100 | XL 100.000 | PURCHASE |
| SVHXR200 | XL 200.000 | PURCHASE |
| SVHBT25 | BOLT 25.000 | PURCHASE |
| SVHBT50 | BOLT 50.000 | PURCHASE |
| SVHBT100 | BOLT 100.000 | PURCHASE |
| SVHBT150 | BOLT 150.000 | PURCHASE |
| SVHBT200 | BOLT 200.000 | PURCHASE |
| GO-PAY | ||
| SVHGJ20 | GO-PAY 20.000 | PURCHASE |
| SVHGJ25 | GO-PAY 25.000 | PURCHASE |
| SVHGJ30 | GO-PAY 30.000 | PURCHASE |
| SVHGJ40 | GO-PAY 40.000 | PURCHASE |
| SVHGJ50 | GO-PAY 50.000 | PURCHASE |
| SVHGJ75 | GO-PAY 75.000 | PURCHASE |
| SVHGJ100 | GO-PAY 100.000 | PURCHASE |
*List produk-produk yang disebutkan diatas dapat juga diakses melalui webservice.
Dilakukan melalui webservice dengan protokol REST. Client mengirimkan sejumlah nilai/parameter dalam bentuk HTTP POST untuk mendapatkan daftar produk yang disupport.
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/billertools/getregisteredproducts |
| Production : https://api.espay.id/rest/billertools/getregisteredproducts |
Get Biller Products Request Data :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. |
| rq_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client
pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| sender_id | AN 32 | Ya | Identitas unik client yang terdaftar di Espay. (Akan diberikan untuk masing client) |
| password | AN 32 | Ya | Password akses client yang terdaftar di Espay. (Akan ditentukan sesuai perjanjian)) |
Contoh request :
POST /rest/billertools/getregisteredproducts HTTP/1.0
Host: sandbox-api.espay.id
Content-Length: 108
Content-type: application/x-www-form-urlencoded
rq_uuid=5441217&rq_datetime=2014-12-09
17:53:20&sender_id=SENDERID&password=590biller
Setelah melakukan request dengan contoh diatas, client akan mendapatkan response JSON dari biller. Dengan contoh sebagai berikut :
{
"rq_uuid":"5441217",
"rs_datetime":"2014-12-09 17:53:24",
"error_code":"0000",
"error_desc":"COMPLETED SUCCESFULLY",
"products":[
{
"product_code":"SINCBN",
"product_name":"CBN"
}
{
"product_code":"SCCCTB",
"product_name":"CITIBANK CREDIT CARD"
}
{
"product_code":"STBFRM",
"product_name":"FIRST MEDIA (d/h KABELVISION)"
}
{
"product_code":"STCGRI",
"product_name":"GARUDA INDONESIA"
}
{
"product_code":"SVHTS50",
"product_name":"TELKOMSEL 50000""
}
{
"product_code":"STBTOP",
"product_name":"TOP TV"
}
{
"product_code":"SLYYTV",
"product_name":"YES TV"
}
]
}
Dilakukan melalui webservice dengan protokol REST. Client mengirimkan sejumlah nilai/parameter dalam bentuk HTTP POST untuk mendapatkan informasi saldo.
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/billertools/getbalance |
| Production : https://api.espay.id/rest/billertools/getbalance |
Get Balance Request Data :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. |
| rq_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client
pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| sender_id | AN 32 | Ya | Identitas unik client yang terdaftar di Espay. (Akan diberikan untuk masing client) |
| password | AN 32 | Ya | Password akses client yang terdaftar di Espay. (Akan ditentukan sesuai perjanjian) |
| signature | AN 32 | Ya | Signature diperlukan untuk validasi oleh penjual |
Contoh request :
POST /rest/billertools/getbalance HTTP/1.1
Host: sandbox-api.espay.id
Content-Length: 176
Authorization: Basic RU5TRVZBTDprVXVYUjVNUkRtcHZrY1lk
Content-Type: application/x-www-form-urlencoded
rq_uuid=getbalance018&rq_datetime=2018-01-15 10:33:43&sender_id=SENDERID&password=p45w0rd&
signature=db420be770fef07ebdc23378456a1c6b7c6b3cd9aadef39cb2784f0bb48bf869
Setelah melakukan request dengan contoh diatas, client akan mendapatkan response. Dengan contoh sebagai berikut :
{
"rq_uuid":"getbalance018",
"rs_datetime":"2018-01-15 10:45:50",
"error_code":"0000",
"error_desc":"Success",
"balance":"16127451.00"
}
Dilakukan melalui webservice dengan protokol REST. Client mengirimkan sejumlah nilai/parameter dalam bentuk HTTP POST untuk mendapatkan informasi provider.
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/billertools/getmno |
| Production : https://api.espay.id/rest/billertools/getmno |
Get Provider Phone Number Request Data :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. |
| rq_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client
pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| sender_id | AN 32 | Ya | Identitas unik client yang terdaftar di Espay. (Akan diberikan untuk masing client) |
| password | AN 32 | Ya | Password akses client yang terdaftar di Espay. (Akan ditentukan sesuai perjanjian) |
| phone_num | AN 15 | Ya | Nomor handphone Contoh: +6281284620888 / 6281284620888 / 081284620888 |
Contoh request :
POST /rest/billertools/getmno HTTP/1.1
Host: sandbox-api.espay.id
Content-Length: 176
Authorization: Basic RU5TRVZBTDprVXVYUjVNUkRtcHZrY1lk
Content-Type: application/x-www-form-urlencoded
rq_uuid=5326eaca-f715-f39f-36e1-432b1253cf49&rq_datetime=2018-01-16 15:07:20&sender_id=SENDERID&password=p45w0rd&phone_num=+6281284620888
Setelah melakukan request dengan contoh diatas, client akan mendapatkan response. Dengan contoh sebagai berikut :
{
"rq_uuid":"5326eaca-f715-f39f-36e1-432b1253cf49",
"rs_datetime":"2018-01-16 15:07:20",
"error_code":"0000",
"error_desc":"COMPLETED SUCCESFULLY",
"operator":{
"group_code":"GSVHTS",
"provider_name":"TELKOMSEL"
}
}
| Response Code | Description |
|---|---|
| 0000 | COMPLETED SUCCESFULLY |
| 9999 | SUSPECT / TIMEOUT |
| 802 | MAX/MIN PAYMENT AMOUNT EXCEEDED |
| 801 | TRANSACTION ERROR, INQUIRY DATA NOT FOUND |
| 800 | INSUFFICIENT FUNDS |
| 614 | TIDAK DAPAT MELAKUKAN TRANSAKSI PADA PUKUL TERTENTU |
| 612 | UNABLE TO PROCESS TRANSACTION, PLEASE TRY AGAIN LATER |
| 611 | TRANSACTION DECLINE, PLEASE CONTACT YOUR ADMINISTRATOR |
| 610 | ANDA BISA MELAKUKAN TRANSAKSI YANG SAMA SETELAH 5 MENIT |
| 601 | IP ADDRESS REJECTED / UNREGISTERED |
| 406 | inquiry data is invalid |
| 405 | PRODUCT DENIED |
| 404 | PRODUCT NOT AVAILABLE |
| 403 | AMOUNT IS NOT SET |
| 300 | INQUIRY NOT AVAILABLE |
| 210 | DUPLICATE UUID |
| 205 | INVALID REQUEST |
| 040 | BILLER SYSTEM MALFUNCTION |
| 09 | REQUEST IN PROGRESS |
| 13 | TXN AMT IS DIFFER WITH TOTAL BILL AMT |
| 14 | PAYMENT NBR NOT FOUND |
| 15 | NO SUCH ISSUER |
| 17 | SERVICE UNAVAILABLE (MAINTENANCE) |
| 18 | DISPUTE |
| 22 | SUSPECTED MALFUNCTION |
| 34 | SUSPECTED FRAUD |
| 36 | RESTRICTED |
| 60 | CARD ACCEPTOR CONTACT ACQUIRER |
| 61 | TRANSACTION EXCEEDS APPROVAL AMOUNT LIMIT |
| 64 | ORIGINAL AMOUNT INCORRECT |
| 65 | EXCEED FREQUENCY LIMIT |
| 66 | CARD ACCEPTOR, CALL ACQUIRER SECURITY |
| 67 | HOT CARD RETAIN CARD |
| 68 | LATE RESPONSE FROM BILLER |
| 72 | VOUCHER / DENOM NOT AVAILABLE |
Dokumen ini memuat dibuat untuk standar komunikasi antara aplikasi mitra ESPay dengan system ESPay. File ini menjelaskan webservice, data flow, dan field-field untuk penggunaan webservice B2B Online Banking
Seluruh service Payment Instruction dilakukan dengan ketentuan sebagai berikut :
- Two-Way communication, setiap request akan dibalas dengan response.
- Menggunakan protokol HTTPS.
- Client mengirimkan parameter dalam format HTTP POST.
- Server akan membalas dengan response format JSON.
Setiap request yang masuk ke sistem ESPay akan selalu diverifikasi dengan metode basic auth. Client akan diberikan username dan password di media terpisah dan harus dijaga kerahasiannya. Pada setiap request yang dikirim harus menyertai header Authorization dengan value Basic diikuti dengan username dan password dengan format username:password yang telah di encode dengan encoding base64.
Contoh
Username: Romeo
Password: Juliet
Format sebelum di encode : Romeo:Juliet
Hasil Base64 encoding: Um9tZW86SnVsaWV0
Header yang dikirim :
Authorization : Basic Um9tZW86SnVsaWV0
Setiap request service harus dilengkapi parameter signature untuk divalidasi. Client akan diberikan Secret Key di dokumen atau media terpisah dan diharuskan menjaga kerahasian Secret Key agar tidak disalahgunakan oleh pihak yang tidak berkepentingan. Secret Key yang dimiliki Client akan diolah untuk menjadi signature dari kombinasi parameter di setiap webservice.
Berikut contoh langkah-langkah pembuatan signature untuk webservice Inquiry Name :
Step 1:
Gabungkan parameter-parameter yang digunakan dengan urutan sebagai berikut :
rq_uuid + rq_datetime + sender_id + beneficiary_bank_code + beneficiary_account_number + Secret Key
Contoh:
Request UUID : CLIENTID123abc-def456
Request Datetime : 2017-12-13 09:17:45
Sender ID : CLIENTID
Beneficiary Bank Code : 014
Beneficiary Account Number : 2731726215
Secret Key : b2bS3cr317kEY
Sehingga akan menjadi rangkaian string sebagai berikut :
Result = CLIENTID123abc-def4562017-12-13 09:17:45CLIENTID014
Step 2:
Uppercase kombinasi parameter pada Step 1 lalu ditambahkan Secret Key pada di akhir :
$tmpSignature = CLIENTID123ABC-DEF4562017-12-13 09:17:45CLIENTID0142731726215
$plainSignature = CLIENTID123ABC-DEF4562017-12-13 09:17:45CLIENTID0142731726215b2bS3cr317kEY
Step 3:
Hash hasil dari Step 2 dengan menggunakan hashing sha256 :
$hash = hash(sha256, CLIENTID123ABC-DEF4562017-12-13 09:17:45CLIENTID0142731726215b2bS3cr317kEY)
Result = 1fa3db27eb462827cad9f77862180f44238615291799a8af9c2e9ddf52d3b412
Hasil dari Step 3 inilah yang akan digunakan sebagai value dari parameter signature.
Digunakan untuk mendapatkan informasi atau nama dari pemilik rekening tujuan
| API URL |
|---|
| Development : https://sandbox-api.espay.id/b2b/inquiry/name |
| Production : https://api.espay.id/b2b/inquiry/name |
Inquiry Name Request Data :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. Format : Client ID + Unique ID Ex : CLIENTID123abc-def456 |
| rq_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client
pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| sender_id | AN 32 | Ya | Identitas unik aplikasi Client yang terdaftar di sistem ESPay |
| signature | AN 255 | Ya | Signature (lihat Signature Validation) |
| beneficiary_bank_code | AN 5 | Ya | Kode bank tujuan |
| beneficiary_account_number | AN 32 | Ya | Nomor rekening tujuan |
Contoh request :
POST /b2b/inquiry/account HTTP/1.1
Host: sandbox-api.espay.id
Connection: keep-alive
Content-Length: 196
Authorization: Basic Um9tZW86SnVsaWV0
Content-Type: application/x-www-form-urlencoded
Accept: */*
rq_uuid=CLIENTIDUUID171214001&rq_datetime=2017-12-14 15:30:00&sender_id=CLIENTID
&signature= 58ee167fb041c237c9759398e4d7ca017f113c77c33c82396e895acb64d5901e
&beneficiary_bank_code=014&beneficiary_account_number=2731726215
Inquiry Name Response Data :
Setelah melakukan request dengan contoh diatas, client akan mendapatkan response. Dengan rincian dan contoh sebagai berikut :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya (echoed from request). Format : Client ID + Unique ID Ex : CLIENTID123abc-def456 |
| rs_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client
pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| error_code | ANS 4 | Ya | Kode error |
| error_message | ANS 255 | Ya | Keterangan error |
| beneficiary_account_number | AN 32 | Ya | Nomor rekening tujuan |
| beneficiary_account_name | AN 32 | Ya | Nama pemilik rekening tujuan |
| beneficiary_account_currency | AN 3 | Tidak | Kode mata uang | beneficiary_account_status | AN 5 | Tidak | Status rekening | beneficiary_account_type | AN 32 | Tidak | Tipe rekening | beneficiary_bank_name | AN 32 | Ya | Nama bank tujuan | transfer_reff | AN 32 | No | Nomor referensi untuk Fund Transfer |
{
"rq_uuid":"CLIENTIDUUID171214001",
"rs_datetime":"2017-12-14 15:30:02",
"error_code":"0000",
"error_message":"Success",
"beneficiary_account_number":"2731726215",
"beneficiary_account_name":"PT. Pembayaran Lintas Usaha Sukses",
"beneficiary_account_currency":"N/A",
"beneficiary_account_status":"N/A",
"beneficiary_account_type":"N/A",
"beneficiary_bank_name":"Bank Central Asia",
"transfer_reff":"N/A"
}
Digunakan untuk mendapatkan jumlah available balance Client. Service ini hanya dapat digunakan apabila Client telah mendaftarkan dan menginformasikan data rekeningnya kepada ESPay
| API URL |
|---|
| Development : https://sandbox-api.espay.id/b2b/inquiry/balance |
| Production : https://api.espay.id/b2b/inquiry/balance |
Inquiry Balance Request Data :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. Format : Client ID + Unique ID Ex : CLIENTID123abc-def456 |
| rq_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client
pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| sender_id | AN 32 | Ya | Identitas unik aplikasi Client yang terdaftar di sistem ESPay |
| signature | AN 255 | Ya | Signature (lihat Signature Validation) |
| bank_code | AN 5 | Ya | Kode bank |
| account_number | AN 32 | Tidak | Nomor rekening, jika tidak diisi maka sistem ESPay melakukan eksekusi kepada rekening default |
Contoh request :
POST /b2b/inquiry/balance HTTP/1.1
Host: sandbox-api.espay.id
Connection: keep-alive
Content-Length: 170
Authorization: Basic Um9tZW86SnVsaWV0
Content-Type: application/x-www-form-urlencoded
Accept: */*
rq_uuid=CLIENTIDUUID171214002&rq_datetime=2017-12-14 15:31:00&signature=1f5e3532b1f4f17845ae15c2f9a0256249f87f541db42f075be7c07594d7e3f2
&sender_id=CLIENTID&bank_code=008
Inquiry Balance Response Data :
Setelah melakukan request dengan contoh diatas, client akan mendapatkan response. Dengan rincian dan contoh sebagai berikut :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya (echoed from request). Format : Client ID + Unique ID Ex : CLIENTID123abc-def456 |
| rs_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| error_code | ANS 4 | Ya | Kode error |
| error_message | ANS 255 | Ya | Keterangan error |
| account_number | AN 32 | Ya | Nomor rekening terdaftar |
| account_name | AN 32 | Ya | Nama pemilik rekening |
| account_currency | AN 3 | Ya | Kode mata uang rekening | account_status | AN 5 | Tidak | Status rekening | account_balance | NUM 15,2 | Ya | Saldo yang tersedia Format: 1000000.00 |
{
"rq_uuid":"CLIENTIDUUID171214002",
"rs_datetime":"2017-12-14 15:30:02",
"error_code":"0000",
"error_message":"Success",
"account_number":"90000038726114",
"account_name":"PT. Square Gate One",
"account_currency":"IDR",
"account_status":"1",
"account_balance":"11284555229.67"
}
Digunakan untuk mendapatkan status terakhir dari transaksi sebelumnya
| API URL |
|---|
| Development : https://sandbox-api.espay.id/b2b/inquiry/status |
| Production : https://api.espay.id/b2b/inquiry/status |
Inquiry Status Transfer / Transaksi Request Data :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. Format : Client ID + Unique ID Ex : CLIENTID123abc-def456 |
| rq_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client
pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| sender_id | AN 32 | Ya | Identitas unik aplikasi Client yang terdaftar di sistem ESPay |
| signature | AN 255 | Ya | Signature (lihat Signature Validation) |
| transaction_id | AN 32 | Ya | Nomor transaksi yang digunakan pada service Fund Transfer |
Contoh request :
POST /b2b/inquiry/status HTTP/1.1
Host: sandbox-api.espay.id
Connection: keep-alive
Content-Length: 184
Authorization: Basic Um9tZW86SnVsaWV0
Content-Type: application/x-www-form-urlencoded
Accept: */*
rq_uuid=CLIENTIDUUID171214004&rq_datetime=2017-12-14 15:35:00
&signature= 3fda772700296c7179b985b37c6112affedeba0b79482bb53f2ab8ffd8b3ae79&sender_id=CLIENTID&transaction_id=TRX171214001
Inquiry Status Transfer / Transaksi Response Data :
Setelah melakukan request dengan contoh diatas, client akan mendapatkan response. Dengan rincian dan contoh sebagai berikut :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya (echoed from request). Format : Client ID + Unique ID Ex : CLIENTID123abc-def456 |
| rs_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| error_code | ANS 4 | Ya | Kode error |
| error_message | ANS 255 | Ya | Keterangan error |
| source_bank_code | AN 32 | Tidak | Kode bank pengirim |
| source_account_number | AN 32 | Tidak | Nomor rekening pengirim |
| beneficiary_bank_code | AN 3 | Ya | Kode bank penerima |
| beneficiary_account_number | AN 5 | Ya | Nomor rekening penerima |
| amount | NUM 15,2 | Ya | Jumlah transaksi Format: 1000000.00 |
| transaction_datetime | Datetime | Ya | Waktu transaksi |
| status_code | ANS 5 | Ya | Kode status transaksi |
| status_description | ANS 255 | Ya | Keterangan status transaksi |
{
"rq_uuid":"CLIENTIDUUID171214002",
"rs_datetime":"2017-12-14 15:30:02",
"error_code":"0000",
"error_message":"Success",
"source_bank_code":"N/A",
"source_account_number":"N/A",
"beneficiary_bank_code":"002",
"beneficiary_account_number":"720801001600505",
"amount":"1000000.00",
"transaction_datetime":"2017-12-14 15:33:02",
"status_code":"0000",
"status_descriptioin":"Success"
}
Digunakan untuk melakukan pemindah bukuan dari rekening yang sudah didaftarkan di ESPay atau dari balance deposit mitra di ESPay ke nomor rekening yang diinginkan
| API URL |
|---|
| Development : https://sandbox-api.espay.id/b2b/transfer/fund |
| Production : https://api.espay.id/b2b/transfer/fund |
Fund Transfer Request Data :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. Format : Client ID + Unique ID Ex : CLIENTID123abc-def456 |
| rq_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client
pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| sender_id | AN 32 | Ya | Identitas unik aplikasi Client yang terdaftar di sistem ESPay |
| signature | AN 255 | Ya | Signature (lihat Signature Validation) |
| transfer_type | N 1 | Ya | Jenis transfer : 0 : Online transfer 1 : SKN 2 : RTGS (Apabila tidak diset, Espay menentukan sebagai online transfer) |
| source_bank_code | AN 32 | Tidak | Kode bank pengirim, jika tidak diisi sistem ESPay melakukan eksekusi kepada rekening default |
| source_account_number | AN 32 | Tidak | Nomor rekening pengirim, jika tidak diisi sistem ESPay melakukan eksekusi kepada rekening default |
| beneficiary_bank_code | AN 5 | Ya | Kode bank penerima |
| beneficiary_bank_name | AN 5 | Ya | Nama bank penerima. (Mandatory apabila menggunakan source account dari Bank Permata) |
| swift_code | AN 10 | Ya | Kode swift bank penerima. (Mandatory untuk transfer type SKN dan RTGS) |
| beneficiary_account_number | AN 32 | Ya | Nomor rekening penerima |
| beneficiary_account_name | AN 32 | Ya | Nama penerima |
| beneficiary_phone_number | ANS 16 | Tidak | Nomor telephone penerima (Mandatory untuk transfer type SKN dan RTGS Source Bank Permata) |
| beneficiary_email | ANS 64 | Tidak | Alamat email penerima (Mandatory untuk transfer type SKN dan RTGS) |
| beneficiary_address1 | AN 64 | Tidak | Alamat tinggal penerima (Mandatory untuk transfer type SKN dan RTGS) |
| beneficiary_address2 | AN 32 | Tidak | Alamat tinggal penerima (Mandatory untuk transfer type SKN dan RTGS Source Bank Permata) |
| beneficiary_district | AN 32 | Tidak | Kawasan tinggal penerima (Mandatory untuk transfer type SKN dan RTGS Source Bank Permata) |
| beneficiary_category | N 1 | Tidak | Kategori penerima : 0 : Individu 1 : Perusahaan 2 : Pemerintah (Mandatory untuk transfer type SKN dan RTGS) |
| beneficiary_citizenship | N 1 | Tidak | Kewarganegaraan penerima : 0 : Resident 1 : Non Resident (Mandatory untuk transfer type SKN dan RTGS) |
| beneficiary_nationality | N 1 | Tidak | Kewarganegaraan penerima : 0 : WNI 1 : WNA (Mandatory untuk transfer type SKN dan RTGS Source Bank Permata) |
| amount | NUM 15,2 | Ya | Jumlah transaksi Format: 1000000.00 |
| transaction_id | AN 32 | Ya | ID transaksi Client. Diharuskan berbeda untuk setiap transaksi (Tanpa karakter spasi) |
| transfer_reff | AN 32 | Tidak | Nomor referensi dari service Inquiry Name (jika ada) |
| description | AN 128 | Tidak | Keterangan transaksi |
| description_detail | AN 128 | Tidak | Keterangan transaksi (tambahan) |
Contoh request :
POST /b2b/transfer/fund HTTP/1.1
Host: sandbox-api.espay.id
Connection: keep-alive
Content-Length: 293
Authorization: Basic Um9tZW86SnVsaWV0
Content-Type: application/x-www-form-urlencoded
Accept: */*
rq_uuid=CLIENTIDUUID171214003&rq_datetime=2017-12-14 15:34:00&signature= 547b56a2a2ff08dab4d3baa73beff19a9c93f615ca912579d2bc64beba67b633
&sender_id=CLIENTID&beneficiary_bank_code=002&beneficiary_account_number=720801001600505&amount=1000000.00
&description=Pembayaran Transaksi TRX171214001&transaction_id=TRX171214001
Fund Transfer Response Data :
Setelah melakukan request dengan contoh diatas, client akan mendapatkan response. Dengan rincian dan contoh sebagai berikut :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | Ya | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya (echoed from request). Format : Client ID + Unique ID Ex : CLIENTID123abc-def456 |
| rs_datetime | ANS 19 | Ya | Tanggal dan waktu di server aplikasi client
pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| error_code | ANS 4 | Ya | Kode error |
| error_message | ANS 255 | Ya | Keterangan error |
| source_bank_code | AN 32 | Tidak | Kode bank pengirim, jika tidak diisi sistem ESPay melakukan eksekusi kepada rekening default |
| source_account_number | AN 32 | Tidak | Nomor rekening pengirim, jika tidak diisi sistem ESPay melakukan eksekusi kepada rekening default |
| beneficiary_bank_code | AN 5 | Ya | Kode bank penerima |
| beneficiary_account_number | AN 32 | Ya | Nomor rekening penerima |
| transaction_id | AN 32 | Ya | Kode transaksi Client |
| reference_id | AN 32 | Ya | Kode referensi sistem ESPay |
| reference_bank | AN 32 | Tidak | Kode referensi bank |
{
"rq_uuid":"CLIENTIDUUID171214003",
"rs_datetime":"2017-12-14 15:30:02",
"error_code":"0000",
"error_message":"Success",
"beneficiary_bank_code":"002",
"beneficiary_account_number":"720801001600505",
"transaction_id":"TRX171214001",
"reference_id":"B9AO10293U381011",
"reference_bank":"799102077483101"
}
| Bank Code | Bank Name |
|---|---|
| 002 | Bank BRI |
| 008 | Bank Mandiri |
| 009 | Bank BNI |
| 009 | Bank BNI Syariah |
| 011 | Bank Danamon |
| 014 | Bank BCA |
| 013 | Bank Permata |
| 016 | Bank Maybank |
| 022 | Bank CIMB Niaga |
| 022 | Bank CIMB Niaga Syariah |
| 026 | Bank Lippo |
| 028 | Bank OCBC NISP |
| 031 | CITIBANK |
| 147 | Bank Muamalat |
| 153 | Bank Sinarmas |
| 157 | Bank Maspion |
| 200 | Bank Tabungan Negara (BTN) |
| 422 | Bank BRI Syariah |
| 426 | Bank MEGA |
| 441 | Bank BUKOPIN |
| 451 | Bank Syariah Mandiri |
| 536 | Bank BCA Syariah |
| Response Code | Description |
|---|---|
| 0000 | Success |
| 0011 | Invalid Signature |
| 0032 | Error while execution |
| 0033 | Internal error |
| 0037 | Service maintenance |
| 0050 | Incomplete field / mandatory field empty or not set |
| 0051 | Zero amount |
| 0052 | Invalid account or currency |
| 0060 | Transaction rejected |
| 0061 | Timeout from core banking |
| 0062 | Request not set to core banking, please retry |
| 9999 | Suspect / timeout |
Setiap request harus dilengkapi signature untuk divalidasi. Client akan diberikan Secret Key di dokumentasi terpisah dari document ini. Key tersebut akan diolah untuk menjadi signature dengan langkah-langkah sebagai berikut :
Parameter yang digunakan :
- Request UUID
- Request Datetime
- Community Code
- Key
- Service Name
Step 1 :
Gabungkan parameter-parameter yang digunakan dengan urutan sebagai berikut :
##Request UUID##Request Datetime##Community Code##Key##Service Name ##
Contoh :
Request UUID : 123ABC-DEF456
Request Datetime : 2017-08-08 09:17:45
Community Code : MYCOMMCODE
Key : S3cr317kEY
Service Name : SendInvoice
Sehingga akan menjadi rangkaian string sebagai berikut :
Result = ##123ABC-DEF456##2017-08-08 09:17:45##MYCOMMCODE##S3cr317kEY##SendInvoice##
Step 2 :
Hasil dari Step 1 di uppercase menjadi seperti ini:
##123ABC-DEF456##2017-08-08 09:17:45##MYCOMMCODE##S3CR317KEY##SENDINVOICE##
Step 3 :
Hash hasil dari Step 2 dengan menggunakan sha256 : $sha256 = hash(sha256, '##123ABC-DEF456##2017-08-08 09:17:45##MYCOMMCODE##S3CR317KEY##SENDINVOICE##')
Result = 638f5fd9f590ce81b15570d32edaec03dab1498aa2525947411be6d6e2aa7a2d
Hasil dari Step 3 inilah yang akan digunakan sebagai value dari parameter signature.
Description: Partner mengirimkan beberapa invoice yang akan dibayarkan. Maksimal invoice yang dapat dikirim dalam service ini adalah 500 invoice.
Sender: Espay Partner
Receiver: Espay System
| API URL |
|---|
| Endpoint Development: https://sandbox-api.espay.id/rest/virtualaccount/sendinvoice |
| Endpoint Production: https://api.espay.id/rest/virtualaccount/sendinvoice |
Request Field :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | TRUE | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. Ex : 123ABC-DEF456 |
| rq_datetime | ANS 19 | TRUE | Tanggal dan waktu di server aplikasi client pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| signature | ANS 64 | TRUE | Signature (lihat Signature Algorithm) |
| comm_code | AN 32 | TRUE | Community Code |
| ccy | AN 3 | TRUE | Mata uang transaksi |
| invoices | JSON | TRUE |
Maksimum 500 baris JSON Contoh: { "INVZSKSK022": { "member_code":"18032018", "member_name":"Arief", "amount":20000, "total_amount":20000, "jumlah_cicilan":"12", "amount_cicilan":"2000000", "pelunasan_amount":"2000000", "description":"Test Pembayaran VA", "tanggal_penagihan":"05" }, "INVZSKSK023": { "member_code":"18032019", "member_name":"Sahid", "amount":30000, "total_amount":30000, "jumlah_cicilan":"12", "amount_cicilan":"3000000", "pelunasan_amount":"3000000", "description":"Test Pembayaran VA", "tanggal_penagihan":"05" } } Detail: {"doc_no":{"member_code":"18032018","member_name":"Arief (Tidak mandatory)", "amount":20000,"total_amount":20000,"jumlah_cicilan":"12", "amount_cicilan":"2000000","pelunasan_amount":"2000000 (Tidak mandatory)","description":"Test Pembayaran VA (Tidak mandatory)","tanggal_penagihan":"05"}} |
| total_invoices | N 3 | TRUE |
Maksimum 500 baris JSON Jumlah baris invoices harus sama dengan total_invoices. Contoh: 500 |
Response Field :
| Nama Field | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | ANS 255 | TRUE | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. Ex : 123ABC-DEF456 |
| rs_datetime | ANS 19 | TRUE | Tanggal dan waktu di server aplikasi server pada saat request dari client di response. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| error_code | AN | TRUE | Kode Error |
| error_message | ANS | FALSE | Deskripsi Error |
| invoices | JSON | TRUE | Keterangan invoices Contoh: { "INVZSKSK022": { "error_code":"0002", "error_msg":"Data tidak terdaftar = Document No", "doc_ref_no":"" }, "INVZSKSK023": { "error_code":"0000", "error_msg":"success", "doc_ref_no":"DOC010101", "list_va": { "008": { "bank_code": "008", "va_number": "6280615238775939", "expired": "2018-05-17 14:00:00", "description": "Test Pembayaran VA" }, "009": { "bank_code": "009", "va_number": "8871215238775939", "expired": "2018-05-17 14:00:00", "description": "Test Pembayaran VA" } } } } - 0000 = Success - else = Fail |
| invoices_success | JSON | TRUE | Keterangan invoices Contoh: { "INVZSKSK022": { "error_code":"0002", "error_msg":"Data tidak terdaftar = Document No", "doc_ref_no":"" }, "INVZSKSK023": { "error_code":"0000", "error_msg":"success", "doc_ref_no":"DOC010101", "list_va": { "008": { "bank_code": "008", "va_number": "6280615238775939", "expired": "2018-05-17 14:00:00", "description": "Test Pembayaran VA" }, "009": { "bank_code": "009", "va_number": "8871215238775939", "expired": "2018-05-17 14:00:00", "description": "Test Pembayaran VA" } } } } - 0000 = Success - else = Fail |
| invoices_error | JSON | TRUE | Keterangan invoices Contoh: { "INVZSKSK024" : { "doc_ref_no" : "", "error_code" : "0001", "error_msg" : "Mandatory field dikosongkan = Tanggal Penagihan" }, "INVZSKSK025" : { "doc_ref_no" : "", "error_code" : "0002", "error_msg" : "Data sudah terdaftar = Document No" } } |
| total_invoice | ANS | TRUE | Jumlah baris invoices yang sudah diproses |
Setiap request harus dilengkapi signature untuk divalidasi. Client akan diberikan Secret Key di dokumentasi terpisah dari document ini. Key tersebut akan diolah untuk menjadi signature dengan langkah-langkah sebagai berikut :
Web Service untuk melakukan Push to Pay ke Aplikasi Pembayaran
| Alur Pesan |
|---|
| Merchant → Espay |
| Metode |
|---|
| HTTP Post |
| API URL |
|---|
| Endpoint Development: https://sandbox-api.espay.id/rest/digitalpay/pushtopay |
| Endpoint Production: https://api.espay.id/rest/digitalpay/pushtopay |
Parameter request :
| Nama Parameter | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | 64 | Ya | Pengidentifikasi request. ID unik untuk mengidentifikasi pesan-pesan tersebut dengan pesan yang lain |
| rq_datetime | 19 | Ya | Tanggal dan waktu di server aplikasi Espay ketika pesan dikirim |
| comm_code | 10 | Ya | Kode penjual yang terdaftar di aplikasi Espay |
| order_id | 20 | Ya | Nomor transaksi / ID faktur / ID unik yang mengidentifikasi pesanan / tagihan / faktur |
| product_code | 10 | Ya | Kode Produk yang diinginkan. 1. OVO 2. JENIUS 3. GOPAY 4. LINKAJA |
| amount | 13 | Ya | Jumlah tagihan yang harus dibayarkan |
| customer_id | 64 | Ya | Data customer 1. OVO = Nomor Handphone 2. JENIUS = Cashtag ($cashtag) 3. GOPAY = Nomor Handphone 4. LINKAJA = Nomor Handphone |
| promo_code | 64 | Tidak | Promo Code |
| is_sync | 1 | Tidak | 1 = Sync / 0 = Async Default Async |
| branch_id | 64 | Optional | Branch ID |
| pos_id | 64 | Optional | POS ID Machine |
| description | 20 | Ya | Order Description |
| signature | 64 | Ya | Signature diperlukan untuk validasi oleh penjual |
Parameter response :
| Nama Parameter | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| error_code | 4 | Ya | Jika error_code sama dengan 0000 = Sukses Jika error_code tidak sama dengan 0000 = Gagal call request ke Aplikasi Pembayaran |
| error_message | 32 | Ya | Jika error_code sama dengan 0000 = Sukses Jika error_code tidak sama dengan 0000 = Gagal call request ke Aplikasi Pembayaran |
| trx_id | 32 | Ya | Transaksi ID dari Espay |
| QRLink | 64 | Ya | URL QR https://api.espay.id/gojek/QR/uafu-134fd-erdf-353--erdf-353-/ |
| QRCode | BLOB | Ya | data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGB gcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UxwcKDcpLDAxNDQ0Hyc5PTgyP….. |
| order_id | 20 | Optional | Nomor transaksi / ID faktur / ID unik yang mengidentifikasikan pesanan / tagihan / faktur |
| customer_id | 32 | Optional | Data customer 1. OVO = Nomor Handphone 2. JENIUS = Cashtag ($cashtag) 3. GOPAY = Nomor Handphone 4. LINKAJA = Nomor Handphone |
| trx_status | 2 | Optional | Status transaksi |
| amount | 13 | Optional | Jumlah tagihan |
| approval_code | 64 | Optional | Approval code, reference dari Bank |
| product_code | 10 | Optional | Kode product |
Web Service untuk melakukan Void ke Aplikasi Pembayaran
| Alur Pesan |
|---|
| Merchant → Espay |
| Metode |
|---|
| HTTP Post |
| API URL |
|---|
| Endpoint Development: https://sandbox-api.espay.id/rest/digitalpay/void |
| Endpoint Production: https://api.espay.id/rest/digitalpay/void |
Parameter request :
| Nama Parameter | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| rq_uuid | 64 | Ya | Pengidentifikasi request. ID unik untuk mengidentifikasi pesan-pesan tersebut dengan pesan yang lain |
| rq_datetime | 19 | Ya | Tanggal dan waktu di server aplikasi Espay ketika pesan dikirim |
| comm_code | 10 | Ya | Kode penjual yang terdaftar di aplikasi Espay |
| order_id | 20 | Ya | Nomor transaksi / ID faktur / ID unik yang mengidentifikasi pesanan / tagihan / faktur |
| trx_id | 20 | Ya | Nomor transaksi ID generate dari Espay |
| product_code | 10 | Ya | Kode Produk yang diinginkan. 1. OVO 2. JENIUS 3. GOPAY 4. LINKAJA |
| signature | 64 | Ya | Signature diperlukan untuk validasi oleh penjual |
Parameter response :
| Nama Parameter | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| error_code | 4 | Ya | Jika error_code sama dengan 0000 = Sukses Jika error_code tidak sama dengan 0000 = Gagal call request ke Aplikasi Pembayaran |
| error_message | 32 | Ya | Jika error_code sama dengan 0000 = Sukses Jika error_code tidak sama dengan 0000 = Gagal call request ke Aplikasi Pembayaran |
| order_id | 20 | Ya | Nomor transaksi / ID faktur / ID unik yang mengidentifikasikan pesanan / tagihan / faktur |
| trx_id | 32 | Ya | Transaksi ID dari Espay |
| trx_status | 2 | Ya | Status transaksi |
Berikut ini adalah gambaran secara garis besar untuk flow pertukaran pesan/data yang terjadi. Komunikasi yang terjadi pada flow berikut bisa secara synchronous (request di-proses saat itu juga dan setelah request berhasil/gagal di-proses response berhasil/gagal dikembalikan saat itu juga).
Format pesan yang dibahas pada bagian ini adalah format pesan request dan response yang terjadi antara Server Mitra dengan Plus. Dengan ketentuan sebagai berikut :
✔ Message dikirimkan melalui Webservice
✔ Protokol komunikasi yang digunakan HTTP/HTTPS
✔ Format messaging yang digunakan adalah REST-JSON. Nilai field/variable pada request dikirimkan lewat protocol HTTP dengan method POST, dan response yang diberikan adalah dalam format JSON.
✔ Enkripsi dilakukan pada field-field tertentu pada message request dan message response. Algoritma enkripsi yang digunakan adalah AES-128 dengan ketentuan :
- Panjang Key 128 bit
- Cipher mode CBC
- Panjang IV 128 bit
- Karakter padding null byte
Setiap parameter mempunyai atribut / tipe data dengan ketentuan yang bisa berbeda. Penulisan atribut / tipe data pada dokumen ini dituliskan dengan contoh ANS 100, yang artinya parameter tersebut dapat berupa alphanumeric dan special character dengan panjang maksimal 100 karakter. Adapun ketentuan lengkapnya adalah sebagai berikut :
| Atribut | Keterangan |
|---|---|
| A | Alpha character |
| N | Numeric character |
| S | Special character |
| AN | Alphanumeric character |
| AS | Alpha dan special character |
| NS | Numeric dan special character |
| ANS | Alphanumeric dan special character |
Setiap request harus dilengkapi signature untuk divalidasi. Client akan diberikan Secret Key di dokumentasi terpisah dari document ini. Key tersebut akan diolah untuk menjadi signature dengan langkah-langkah sebagai berikut :
Parameter yang digunakan :
- Request UUID
- Request Datetime
- Community Code
- Key
- Service Name
Step 1 :
Gabungkan parameter-parameter yang digunakan dengan urutan sebagai berikut :
##Request UUID##Request Datetime##Community Code##Key##Service Name ##
Contoh :
Request UUID : 123ABC-DEF456
Request Datetime : 2017-08-08 09:17:45
Community Code : MYCOMMCODE
Key : S3cr317kEY
Service Name : SendInvoice
Sehingga akan menjadi rangkaian string sebagai berikut :
Result = ##123ABC-DEF456##2017-08-08 09:17:45##MYCOMMCODE##S3cr317kEY##SendInvoice##
Step 2 :
Hasil dari Step 1 di uppercase menjadi seperti ini:
##123ABC-DEF456##2017-08-08 09:17:45##MYCOMMCODE##S3CR317KEY##SENDINVOICE##
Step 3 :
Hash hasil dari Step 2 dengan menggunakan sha256 : $sha256 = hash(sha256, '##123ABC-DEF456##2017-08-08 09:17:45##MYCOMMCODE##S3CR317KEY##SENDINVOICE##')
Result = 638f5fd9f590ce81b15570d32edaec03dab1498aa2525947411be6d6e2aa7a2d
Hasil dari Step 3 inilah yang akan digunakan sebagai value dari parameter signature.
Service Name: SendInvoice
Description: Partner mengirimkan invoice yang akan dibayarkan.
Sender: Espay Partner
Receiver: Espay System
| API URL |
|---|
| Endpoint Development: https://sandbox-api.espay.id/rest/lesscash/sendinvoice |
| Endpoint Production: https://api.espay.id/rest/lesscash/sendinvoice |
Request Field :
| Nama Field | Atribut | Mandatory | Encryption | Keterangan |
|---|---|---|---|---|
| rq_uuid | ANS 255 | TRUE | FALSE | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. Ex : 123ABC-DEF456 |
| rq_datetime | ANS 19 | TRUE | FALSE | Tanggal dan waktu di server aplikasi client pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| signature | ANS 64 | TRUE | FALSE | Signature (lihat Signature Algorithm) |
| sender_id | ANS 32 | TRUE | FALSE | Sender Identifier, akan diberikan oleh Espay. |
| comm_code | AN 32 | TRUE | TRUE | Community Code |
| member_code | AN 32 | TRUE | TRUE | Kode Member / Kode Toko |
| doc_no | ANS 32 | TRUE | TRUE | Nomor dokumen / nomor invoice |
| ccy | AN 3 | TRUE | TRUE | Mata uang transaksi |
| amount | N 19 | TRUE | TRUE | Jumlah transaksi. Total keseluruhan harga yang harus dibayar oleh agen / reseller / member dari seluruh item yang dipesan.
Format amount menggunakan 2 digit decimal, dengan karakter titik (.) sebagai decimal point. Ex: 50000.24 |
| issue_date | ANS 10 | TRUE | TRUE | Tanggal issued (YYYY-MM-DD) |
| due_date | ANS 10 | TRUE | TRUE | Tanggal jatuh tempo (YYYY-MM-DD) |
| sales_code | AN 32 | TRUE | TRUE | Kode sales / canvasser code |
| va_only | A 1 | TRUE | TRUE | Flag Virtual Account only
Ex: Y / N |
| remark | ANS 100 | FALSE | TRUE | Description |
Response Field :
| Nama Field | Atribut | Mandatory | Encryption | Keterangan |
|---|---|---|---|---|
| rq_uuid | ANS 255 | TRUE | FALSE | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. Ex : 123ABC-DEF456 |
| rs_datetime | ANS 19 | TRUE | FALSE | Tanggal dan waktu di server aplikasi server pada saat request dari client di response. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| error_code | AN | TRUE | TRUE | Kode Error |
| error_message | ANS | FALSE | TRUE | Deskripsi Error |
| doc_ref_no | ANS 50 | TRUE | TRUE | Nomor reference dari MAVA + Mobile Collection |
Service Name: SendInvoiceMulti
Description: Partner mengirimkan beberapa invoice yang akan dibayarkan. Maksimal invoice yang dapat dikirim dalam service ini adalah 500 invoice.
Sender: Espay Partner
Receiver: Espay System
| API URL |
|---|
| Endpoint Development: https://sandbox-api.espay.id/rest/lesscash/sendinvoicemulti |
| Endpoint Production: https://api.espay.id/rest/lesscash/sendinvoicemulti |
Request Field :
| Nama Field | Atribut | Mandatory | Encryption | Keterangan |
|---|---|---|---|---|
| rq_uuid | ANS 255 | TRUE | FALSE | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. Ex : 123ABC-DEF456 |
| rq_datetime | ANS 19 | TRUE | FALSE | Tanggal dan waktu di server aplikasi client pada saat message di kirim. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| signature | ANS 64 | TRUE | FALSE | Signature (lihat Signature Algorithm) |
| sender_id | ANS 32 | TRUE | FALSE | Sender Identifier, akan diberikan oleh Espay. |
| comm_code | AN 32 | TRUE | TRUE | Community Code |
| ccy | AN 3 | TRUE | TRUE | Mata uang transaksi |
| invoices | JSON | TRUE | TRUE |
Maksimum 500 baris JSON Contoh: {"INVZSKSK022":{"member_code":"18032018","amount":20000,"due_date":"2018-03-22","issue_date":"2018-03-22"},"INVZSKSK023":{"member_code":"18032018","amount":30000,"due_date":"2018-03-22","issue_date":"2018-03-22"}} Detail: {"doc_no":{"member_code":"18032018","amount":20000,"due_date":"2018-03-22","issue_date":"2018-03-22"}} |
| total_invoices | N 3 | TRUE | TRUE |
Maksimum 500 baris JSON Jumlah baris invoices harus sama dengan total_invoices. Contoh: 500 |
Response Field :
| Nama Field | Atribut | Mandatory | Encryption | Keterangan |
|---|---|---|---|---|
| rq_uuid | ANS 255 | TRUE | FALSE | Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya. Ex : 123ABC-DEF456 |
| rs_datetime | ANS 19 | TRUE | FALSE | Tanggal dan waktu di server aplikasi server pada saat request dari client di response. Format : YYYY-MM-DD HH:MM:SS Ex : 2014-12-17 12:30:45 |
| error_code | AN | TRUE | TRUE | Kode Error |
| error_message | ANS | FALSE | TRUE | Deskripsi Error |
| invoices | JSON | TRUE | TRUE | Keterangan invoices Contoh yang sudah terdecrypt: {"INVZSKSK022":{"error_code":"0002","error_msg":"Data sudah terdaftar = Document No","doc_ref_no":""},"INVZSKSK023":{"error_code":"0000","error_msg":"success","doc_ref_no":"DOC010101"}} - 0000 = Success - else = Fail |
| invoices_success | JSON | TRUE | TRUE | Keterangan invoices yang sukses Contoh yang sudah terdecrypt: {"INVZSKSK023":{"error_code":"0000","error_msg":"success","doc_ref_no":"DOC010101"}} - 0000 = Success - else = Fail |
| invoices_failed | JSON | TRUE | TRUE | Keterangan invoices yang gagal Contoh yang sudah terdecrypt: {"INVZSKSK022":{"error_code":"0002","error_msg":"Data sudah terdaftar = Document No","doc_ref_no":""}} - 0000 = Success - else = Fail |
| total_success | N | TRUE | TRUE | Total invoices yang sukses |
| total_failed | N | TRUE | TRUE | Total invoices yang gagal |
| total_row_execute | N | TRUE | TRUE | Total invoices yang diproses |
Semua request dari dan ke server Espay akan membutuhkan paramater signature, semua merchant harus validasi parameter ini untuk memastikan request hanya datang dari server Espay dan dari server Merchant.
Signature transaksi dihasilkan menggunakan algoritma hash SHA256 dan untuk menghasilkan signature transaksi, berikut penjelasannya:
Urutan pengambungan signature adalah seperti berikut:
Fields ini harus diatur dalam urutan berikut, dipisahkan oleh sebuah ##
##KEY##rq_uuid##tx_id##mode##
Selanjutnya, string harus dikonversi ke UPPERCASE sebelum hash dilakukan.
Contoh :
##7bc074f97c3131d2e290a4707a54a623##baefa025e0ca44861D-D12afzs##145000065##MERCHANTPAYMENTNOTIF##
Uppercase semua string menjadi seperti berikut :
##7BC074F97C3131D2E290A4707A54A623##BAEFA025E0CA44861D-D12AFZS##145000065##MERCHANTPAYMENTNOTIF##
Hasil setelah hash dan algoritmasha256
0e9d06cd4d2cfff90e666ffaeafe49bdb227b4f9409215b874841cdba45ed740
Proses ini digunakan jika merchant ingin mengirimkan notifikasi pembayaran atas transaksi yang terdaftar di sistem Tagih.id namun tidak dibayarkan melalui Tagih.id. Merchant akan mengirimkan request ke sistem Tagih.id, lalu Tagih.id akan memberikan response dengan format json seperti contoh dibawah
| Alur Pesan |
|---|
| Merchant → Tagih.id |
| Method |
|---|
| HTTP Post |
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/tagih/merchantpaymentnotif |
| Production : https://api.espay.id/rest/tagih/merchantpaymentnotif |
Parameter Request :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 64 | Ya | Request identifier. Id unik untuk mengidentifikasi pesan ini dengan pesan lainnya |
| rq_datetime | 19 | Ya | Tanggal dan waktu di server aplikasi Tagih.id saat pesan terkirim |
| comm_code | 10 | Ya | Kode merchant yang terdaftar pada aplikasi Tagih.id |
| member_code | 20 | Ya | Kode member yang terdaftar pada aplikasi Tagih.id |
| signature | 64 | Ya | Signature yang digenerate oleh merchant dan akan di validasi oleh Tagih.id, lihat halaman ini untuk detailnya |
| tx_id | 32 | Ya | Nomor transaksi id unik untuk mengidentifikasi order/ billing/ invoice. |
| tx_date | 19 | Ya | Tanggal dan waktu saat transaksi terjadi Format: yyyy-MM- dd hh:mm:ss |
| invoices | JSON | Ya | Detail transaksi Format: {invoice_no:amount} Contoh: {INV001: 90000,INV002:50000} |
| bank | 25 | Tidak | Nama Bank dimana customer membayar transaksi |
| payment_type | 25 | Tidak | Cara customer membayar Contoh: cash, VA, CC, dll |
Parameter Response :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 4 | Ya | Request identifier. Id unik untuk mengindentifikasi pesan ini dan pesan lainnya |
| rs_datetime | 32 | Ya | Tanggal dan waktu server Espay saat messages response |
| error_code | 4 | Ya | Kode error web service, 0000 berarti success |
| error_message | 32 | Ya | Deskripsi error |
| invoices | JSON | Tidak | Detail Transaksi Contoh: {"IN-DGI773246": "Success"} |
| total_invoice | 5 | Tidak | Total Invoice yang dikirim |
| total_success | 5 | Tidak | Total Invoice yang berhasil diproses |
| total_error | 5 | Tidak | Total Invoice yang gagal diproses |
Contoh response:
{
"rq_uuid": "baefa025e0ca44861a9076c8Z83fccxx",
"rs_datetime": "2018-02-27 11:57:45",
"error_code": "0000",
"error_message": "Success",
"invoices": {
"IN-DGI773246": "Success"
},
"total_invoice": 1,
"total_success": 1,
"total_error": 0
}
Proses ini digunakan jika merchant ingin mengetahui apakah customer sudah membayar transaksi melalui Tagih.id. Merchant akan mengirimkan request ke sistem Tagih.id, lalu Tagih.id akan memberikan response dengan format json seperti contoh dibawah
| Alur Pesan |
|---|
| Merchant → Tagih.id |
| Method |
|---|
| HTTP Post |
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/tagih/merchantcheckinvoice |
| Production : https://api.espay.id/rest/tagih/merchantcheckinvoice |
Parameter Request :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 64 | Ya | Request identifier. Id unik untuk mengidentifikasi pesan ini dengan pesan lainnya |
| rq_datetime | 19 | Ya | Tanggal dan waktu di server aplikasi Tagih.id saat pesan terkirim |
| comm_code | 10 | Ya | Kode merchant yang terdaftar pada aplikasi Tagih.id |
| member_code | 20 | Ya | Kode member yang terdaftar pada aplikasi Tagih.id |
| signature | 64 | Ya | Signature yang digenerate oleh merchant dan akan di validasi oleh Tagih.id, lihat halaman ini untuk detailnya |
| invoices | JSON | Ya | Detail transaksi Format: {invoice_no:amount} Contoh: {INV001: 90000,INV002:50000} |
Parameter Response :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 4 | Ya | Request identifier. Id unik untuk mengindentifikasi pesan ini dan pesan lainnya |
| rs_datetime | 32 | Ya | Tanggal dan waktu server Espay saat mengirim response |
| error_code | 4 | Ya | Kode error web service, 0000 berarti success |
| error_message | 32 | Ya | Deskripsi error |
| invoices | JSON | Tidak | Detail Transaksi Contoh: {"IN-DGI773246": "0000","IN-DGI773247": "0001"} 0000 = Success 0001 = InvoiceNot Found 0002 = Invoice Is Already Paid 0003 = Invoice is rejected 0004 = Amount is not valid |
Contoh response:
{
"rq_uuid": "baefa025e0ca44861a9076c8Z83fccxx",
"rs_datetime": "2018-02-27 11:57:45",
"error_code": "0000",
"error_message": "Success",
"invoices": {
"IN-DGI773246": "0000",
"IN-DGI773247": "0001"
}
}
Proses ini digunakan jika Tagih.id ingin mengetahui apakah customer sudah membayar transaksi melalui merchant. Sistem Tagih.id akan mengirimkan request ke merchant, lalu merchant akan memberikan response dengan format json seperti contoh dibawah ini:
{"invoices": {"no invoice": "status invoice"}}
Contoh response sukses dari penjual :
{"invoices": {"IN-DGI773246": "0000", "IN-DGI773247": "0001"}}
| Alur Pesan |
|---|
| Tagih.id → Merchant |
| Method |
|---|
| HTTP Post |
| API URL |
|---|
| http://www.yourwebsite.com/checkinvoice.php or https://www.yourwebsite.com/checkinvoice.php |
Parameter Request :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 64 | Ya | Request identifier. Id unik untuk mengidentifikasi pesan ini dengan pesan lainnya |
| rq_datetime | 19 | Ya | Tanggal dan waktu di server aplikasi Tagih.id saat pesan terkirim |
| comm_code | 10 | Ya | Kode merchant yang terdaftar pada aplikasi Tagih.id |
| member_code | 20 | Ya | Kode member yang terdaftar pada aplikasi Tagih.id |
| signature | 64 | Ya | Signature yang harus divalidasi oleh merchant, lihat halaman ini untuk detailnya |
| invoices | JSON | Ya | Detail transaksi Format: {invoice_no:amount} Contoh: {INV001: 90000,INV002:50000} |
Parameter Response :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| invoices | JSON | Tidak | Detail Transaksi Contoh: {"IN-DGI773246": "0000","IN-DGI773247": "0001"} 0000 = Success 0001 = InvoiceNot Found 0002 = Invoice Is Already Paid 0003 = Invoice is rejected 0004 = Amount is not valid |
Semua request dari dan ke server Espay akan membutuhkan paramater signature, semua merchant harus validasi parameter ini untuk memastikan request hanya datang dari server Espay dan dari server Merchant.
Signature transaksi dihasilkan menggunakan algoritma hash SHA256 dan untuk menghasilkan signature transaksi, berikut penjelasannya:
Urutan pengambungan signature adalah seperti berikut:
Fields ini harus diatur dalam urutan berikut, dipisahkan oleh sebuah ##
##comm_code##trx_id##amount##
Selanjutnya, string harus dikonversi ke UPPERCASE sebelum hash dilakukan.
Contoh :
##SGWTEST##test001##100000##
Uppercase semua string menjadi seperti berikut :
##SGWTEST##TEST001##100000##
Hasil setelah hash dan algoritmasha256
d0f8d02e651802c0c6984794adc78c9b09cd53d504ee13456d8ee2121d20e3be
Proses ini digunakan jika merchant sudah memiliki data token kartu kredit yang diberikan Espay dan ingin melakukan transaksi menggunakan token tersebut.
| Alur Pesan |
|---|
| Merchant → Espay |
| Method |
|---|
| HTTP Post |
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/creditcard/tokenpayment |
| Production : https://api.espay.id/rest/creditcard/tokenpayment |
Parameter Request :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| comm_code | 10 | Ya | Kode merchant yang terdaftar di Espay |
| masked_card_no | 20 | Ya | Nomor kartu kredit yang di masking |
| store_card_number | 20 | Ya | Token yang diberikan oleh Espay |
| trx_id | 32 | Ya | Nomor transaksi id unik untuk mengidentifikasi order/ billing/ invoice. |
| description | 19 | Ya | Deskripsi pembayaran |
| cardname | 32 | Ya | Nama pemegang kartu kredit |
| 32 | Ya | Email pemegang kartu kredit | |
| ccy | 5 | Ya | Mata uang |
| amount | 20 | Ya | Jumlah pembayaran |
| call_back_url | 32 | Tidak | Url kembali |
| signature | 64 | Ya | Signature yang digenerate oleh merchant dan akan di validasi oleh Espay, lihat halaman ini untuk detailnya |
Parameter Response :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| trx_id | 32 | Ya | Nomor transaksi id unik untuk mengidentifikasi order/ billing/ invoice. |
| error_code | 4 | Ya | Kode error web service, 0000 = success, 9999 = failed/timeout error_code ini untuk menyatakan sukses/gagal dari service ini saja, untuk status pembayaran berhasil/gagal akan dikirim melalu service Payment Notification |
| error_message | 32 | Ya | Deskripsi error |
Contoh response:
{
"trx_id": "test001",
"error_code": "0000",
"error_message": "Success"
}
Proses ini digunakan jika merchant ingin melakukan capture terhadap transaksi yang sedang In Progress.
| Alur Pesan |
|---|
| Merchant → Espay |
| Method |
|---|
| HTTP Post |
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/creditcard/capturepayment |
| Production : https://api.espay.id/rest/creditcard/capturepayment |
Parameter Request :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 64 | Ya | Request identifier. Id unik untuk mengidentifikasi pesan ini dengan pesan lainnya |
| rq_datetime | 19 | Ya | Tanggal dan waktu di server Mitra saat pesan dikirim |
| comm_code | 10 | Ya | Kode merchant yang terdaftar di Espay |
| trx_id | 32 | Ya | Nomor transaksi id unik untuk mengidentifikasi order/ billing/ invoice. |
| amount | 20 | Ya | Jumlah pembayaran |
| signature | 64 | Ya | Signature yang digenerate oleh merchant dan akan di validasi oleh Espay, lihat halaman ini untuk detailnya |
Parameter Response :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 4 | Ya | Request identifier. Id unik untuk mengindentifikasi pesan ini dan pesan lainnya |
| rs_datetime | 32 | Ya | Tanggal dan waktu server Espay saat messages response |
| trx_id | 32 | Ya | Nomor transaksi id unik untuk mengidentifikasi order/ billing/ invoice. |
| status_transaction | 32 | Ya | Menyatakan status transaksi saat ini S: Success F: Failed |
| error_code | 4 | Ya | Kode error web service, 0000 = success, 9999 = failed/timeout error_code ini untuk menyatakan sukses/gagal dari service ini saja, untuk status pembayaran berhasil/gagal akan dikirim melalu service Payment Notification |
| error_message | 32 | Ya | Deskripsi error |
Contoh response:
{
"rq_uuid": "capturepay001",
"rs_datetime": "2018-08-15 10:33:00",
"trx_id": "ESP1534245432RZRH",
"status_transaction": "F",
"error_code": "0000",
"error_message": "Success"
}
Proses ini digunakan jika merchant ingin melakukan void terhadap transaksi yang sedang In Progress.
| Alur Pesan |
|---|
| Merchant → Espay |
| Method |
|---|
| HTTP Post |
| API URL |
|---|
| Development : https://sandbox-api.espay.id/rest/creditcard/voidpayment |
| Production : https://api.espay.id/rest/creditcard/voidpayment |
Parameter Request :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 64 | Ya | Request identifier. Id unik untuk mengidentifikasi pesan ini dengan pesan lainnya |
| rq_datetime | 19 | Ya | Tanggal dan waktu di server Mitra saat pesan dikirim |
| comm_code | 10 | Ya | Kode merchant yang terdaftar di Espay |
| trx_id | 32 | Ya | Nomor transaksi id unik untuk mengidentifikasi order/ billing/ invoice. |
| signature | 64 | Ya | Signature yang digenerate oleh merchant dan akan di validasi oleh Espay, lihat halaman ini untuk detailnya |
Parameter Response :
| Nama Parameter | Max Length | Mandatory | Description |
|---|---|---|---|
| rq_uuid | 4 | Ya | Request identifier. Id unik untuk mengindentifikasi pesan ini dan pesan lainnya |
| rs_datetime | 32 | Ya | Tanggal dan waktu server Espay saat messages response |
| trx_id | 32 | Ya | Nomor transaksi id unik untuk mengidentifikasi order/ billing/ invoice. |
| status_transaction | 32 | Ya | Menyatakan status transaksi saat ini S: Success F: Failed |
| error_code | 4 | Ya | Kode error web service, 0000 = success, 9999 = failed/timeout error_code ini untuk menyatakan sukses/gagal dari service ini saja, untuk status pembayaran berhasil/gagal akan dikirim melalu service Payment Notification |
| error_message | 32 | Ya | Deskripsi error |
Contoh response:
{
"rq_uuid": "capturepay001",
"rs_datetime": "2018-08-15 10:33:00",
"trx_id": "ESP1534245432RZRH",
"status_transaction": "F",
"error_code": "0000",
"error_message": "Success"
}
Parameter request
| Nama Parameter | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| from | Ya | Nomor seluler pengirim | |
| to | Ya | Nomor seluler penerima | |
| text | Ya | Isi pesan request |
Parameter response
| Nama Parameter | Atribut | Mandatory | Keterangan |
|---|---|---|---|
| status | Ya | Status request yang telah dikirim | |
| description | Tidak | Deskripsi dari request jika ada | |
| reference | Ya | Referensi bahwa pesan request telah diterima oleh sistem Espay |