Send Invoice and Generate Virtual Account

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

Contoh Request:
Nama Field Atribut Mandatory Keterangan
rq_uuid ANS 255 Benar Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya.
Ex : 123ABC-DEF456
rq_datetime ANS 19 Benar 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 Benar Signature (lihat Signature Algorithm)
comm_code AN 32 Benar Community Code
ccy AN 3 Benar Mata uang transaksi
invoices JSON Benar 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 Benar Maksimum 500 baris JSON
Jumlah baris invoices harus sama dengan total_invoices.
Contoh: 500

Contoh Response:
Nama Field Atribut Mandatory Keterangan
rq_uuid ANS 255 Benar Request Identifier. ID unik untuk mengidentifikasi request message tersebut dengan message lainnya.
Ex : 123ABC-DEF456
rs_datetime ANS 19 Benar 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 Benar Kode Error
error_message ANS Salah Deskripsi Error
invoices JSON Benar 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 Benar 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 Benar 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 Benar Jumlah baris invoices yang sudah diproses
  

Contoh Request

POST /rest/virtualaccount/sendinvoice HTTP/1.1 Host: sandbox-api.espay.id Connection: keep-alive Content-Length: 250 Content-Type: application/x-www-form-urlencoded Accept: */* rq_uuid=80784df2-accb-46fc-92f4-8d3103b38408 &rq_datetime=2021-10-23 22:51:45 &signature=e7bb3339e618b6fb8ce3035edc83456813efb962e9f2c2b286e92387615b6f15 &comm_code=SGWBUKUKUSC &ccy=IDR &invoices=[{"INVZSKSK023": {"member_code":"18032019","member_name":"Sahid","amount":30000,"total_amount":30000,"number_of_installment":"12","installment_amount":"3000000","balance_payment_amount":"3000000","description":"VA Payment Test","billing_date":"05"}}Detail: {"doc_no":{"member_code":"18032018","member_name":"Arief (Non mandatory)","amount":20000,"total_amount":20000"number_of_installment":"12","installment_amount":"2000000","balance_payment_amount":"2000000 (Non mandatory)","description":"VA Payment Test (Non mandatory)","billing_date":"05"}}] &total_invoices=1
  

Contoh Response:

{ "rq_uuid": "80784df2-accb-46fc-92f4-8d3103b38408", "rs_datetime": "2021-10-23 22:51:45", "error_code": "0000", "error_message": "", "invoices" : { "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" } } } }, "invoices_success" :{ "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" } } } }, "invoices_error" : "", "total_invoice" : "1" }