Send Invoice To Generate Virtual Account

Merchant will send invoice to Espay and Espay will respond with JSON format containing VA number and other descriptions.


Flow

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:
Parameter Name Max Length Mandatory Description
rq_uuid 64 Yes Request identifier. Unique id to identify these messages with other messages
rq_datetime 19 Yes Date and time in Espay application server when messages sent
order_id 32 Yes Transaction Number / Invoice Id / unique id that identify the order / billing / invoice
amount 17 Yes Amount paid by the customer, with 2 decimal digits
ccy 3 Yes Transaction’s currency code. ex: IDR
comm_code 32 Yes Merchant code listed in the Espay application
remark1 17 No First description. Mandatory can be “Yes” follow the scheme. Filled with phone number
remark2 17 Yes Second description. Filled with name
remark3 17 No Third description. Filled with email address
remark4 32 No Fourth description. Filled with unique merchant ID that Espay will use to validate transactions. Especially VA Static.
update 1 Yes Enter Y if you want to update the data to the registered order_id
Enter N if you want to register a new order_id
bank_code 3 Yes The chosen Bank Code. Ex: 008, 016 or show this Table of Bank Code
va_expired 20 No How to set up the elapsed time of the VA (in minutes)
Example: 4000 (in explanation it will expire in 4000 minutes)
signature 64 Yes Signature required to validate by merchant, see page here for more detail


Parameter Response:
Parameter Name Max Length Mandatory Description
rq_uuid 4 Yes Request identifier. Unique id to identify these messages with other messages
rs_datetime 32 Yes Date and time in Espay application server when messages sent
error_code 4 Yes Error code of web service, 0000 means success
error_message 32 Yes Error description
va_number 16 Yes Virtual Account Number that customer used for payment.
expired 19 Yes Date and Time the Virtual Account Number will expired.
description 32 Yes Description.
total_amount 17 Yes Total Amount from Merchant + fee.
amount 17 Yes Total Amount from Merchant.
fee 17 Yes Administration Fee.
  
  

Sample Request

POST /rest/merchantpg/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=fbd39734-ed32-490d-98c4-e91bcd91037a &rq_datetime=2021-10-25 09:01:16 &order_id=21102509019CO9R &amount=754000.00 &ccy=IDR &comm_code=SGWTRAVELAJAOTAWEB &remark1=53620211011190253332 &remark2=TravelAja OTA Web Tiara Iyay &remark3=likesupa@gmail.com &remark4=invoiceid0001 &bank_code=008 &signature=49652ef7ada6326460230b841a231e89b28fe838a55f23836fdfa2f7be008ee2 &va_expired=10
  

Sample 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" }