Tagih.id

Payment Notification

Payment Notification is a service that Espay uses to notify you that an invoice payment has been successfully made. You must respond in the specified format and register your Payment Notification URL in the Espay Sandbox Portal.

Flow

Whenever an invoice payment is successfully collected, Tagih.id will send a request to your server via the Payment Notification URL registered in the Espay Sandbox Portal. You are required to respond in JSON format using the format provided.

API URL

Method URL
HTTPS
https://yourwebsite.com/payment

HTTP Headers

Key Value
Method
POST
HTTP Version
HTTP/1.1
Accept
*/*
Content-Type
application/x-www-form-urlencoded
Content-Length
<dynamic>

Parameter Request

Parameter Type Mandatory Description
rq_uuid
String (64)
Y
Request identifier. A unique ID used to identify messages.

Format:
UUID V.4 Recommendation
rq_datetime
String (19)
Y
Date and time of the transaction request.

Format:
Y-m-d H:i:s

Example:
2024-12-16 14:30:45
sender_id
String
Y
Sender code.

Value:
sgoplus
receiver_id
String (10)
Y
The merchant community code shown in the Tagih.id app.
password
String (32)
Y
Password from Espay team. Merchant uses the password to identify and validate request.
comm_code
String (32)
Y
Merchant region code.

Example:
SGWYESSISHOP
member_code
String (32)
Y
Member code.
member_cust_id
String
O
Unique customer code from Espay.
member_cust_name
String
O
The member_name parameter from the Send Multiple request.
ccy
String (3)
Y
Transaction currency code.

Format:
  • Rupiah: IDR
amount
String (13.2)
Y
Total invoice amount.

Example:
200000
debit_from
String (19)
O
Source account (debited account).
debit_from_name
String (64)
O
Source account name.
debit_from_bank
String (20)
Y
Source account bank code.

Example :
008, 016, 002, dll.
credit_to
String (19)
O
Destination account (credited account).
credit_to_name
String (64)
O
Destination account name.
credit_to_bank
String (20)
Y
Destination account bank code.

Example :
008, 016, 002, dll.
payment_datetime
String (19)
Y
Tanggal dan waktu pembayaran.

Format:
YYYY-MM-DD hh:mm:ss

Contoh:
2025-08-11 15:42:30
payment_ref
String (16)
Y
Transaction ID from Espay.
payment_remark
String
O
Conditional note for the customer.
order_id
String (20)
Y
Unique code to identify the order/billing/invoice.

Example:
Transaction number, invoice ID, etc.
product_code
String (32)
Y
Product code. Click here
product_value
String (64)
O
Product value

Example:
Visa MANDIRI ID, 002, 411111xxxxxx1111, Tipe kartu Bin kartu Negara kartu, Bank acquirer, Masking kartu.
message
String (32)
O
Additional info from the bank.
status
String (1)
O
Espay internal info.
token
String (128)
O
Token credit card from bank.
fee_type
String (5)
O
Fee type.

Format:
  • Seller Fee: S
  • Buyer Fee: B
tx_fee
String (17)
Y
Transaction fee.

Format:
Desimal .00 (ISO 4217)

Example:
4400
is_snap
String (1)
O
SNAP status mapping.
invoices
JSON
Y
Detail invoices.
total_amount
String (13.2)
Y
Total amount has been collected.

Format:
250000
notes
String
O
Additional information.
member_id
Sting (20)
O
Merchant code registered in the Espay system.
signature
String
Y
Code used to validate transactions. Learn how to make a Tagih.id | Hash-Based Signature
Y: Yes, O: Optional, C: Conditional

Parameter Response

Parameter Type Mandatory Description
rq_uuid
String (64)
Y
Request identifier. A unique ID used to identify messages
rs_datetime
String
Y
Date and time of the transaction response.

Format:
yyyy-MM-dd hh:mi:ss

Format:
2024-03-14 07:49:28
error_code
String (4)
Y
Response code:

Format:
  • Success: 0000
  • Failure: XXXX
error_message
String
Y
Response description.
trx_id
String (16)
Y
Transaction ID from Espay.
reconcile_id
String (20)
Y
Reconciliation ID. Used to confirm that the partner has successfully received the notification.
reconcile_datetime
String
Y
Reconciliation date and time.

Format:
yyyy-MM- ddThh:mi:ssTZD (ISO 8601).

Example:
2022-08-21T14:56:11+07:00
Y: Yes, O: Optional, C: Conditional

URL Registration

Ensure your URL format and response comply with this documentation guidelines. Next, immediately register your Payment URL via the Espay Sandbox portal. Read how to add a URL here.






































Sample Request

POST /payment HTTP/1.1
Host: mechant-domain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*

rq_uuid=2e30622c-7c9a-4906-90e4-3f84b4d85d0f
rq_datetime=2025-08-06 16:36:03
sender_id=SGOPLUS
receiver_id=SGWMALLCIJANTUNGSC
password=MCHOGYPQ
comm_code=SGWMALLCIJANTUNGSC
member_code=1221-31013
member_cust_id=TAMBILUKSE175153155397M5W
member_cust_name=Tambiluk Serang
ccy=IDR
amount=20000
debit_from=8906578259381895
debit_from_name=8906578259381895
debit_from_bank=008
credit_to=
credit_to_name=
credit_to_bank=008
payment_datetime=2025-08-06 16:34:13
payment_ref=ESP1754472853Z4AW
payment_remark=
order_id=1221-31013
product_code=MANDIRIATM
product_value=8906578259381895
message=
status=0
token=
fee_type=S
tx_fee=0.00
is_snap=N
invoices={
    "1221-31013.SH_2107_00099.F": "",
    "1221-31013.SH_2107_00099.N": ""
}
total_amount=20000
notes={
    "1221-31013.SH_2107_00099.F": "",
    "1221-31013.SH_2107_00099.N": ""
}
member_id=1221-31013
signature=7732d2a77b1bdc4cb65acf31e31f52e036eaf0b8c8e733ae413467764f28daf1
           

























































































Sample Response

{
    "rq_uuid":"ebf8e9df-639e-424f-8148-94d2741edd03", 
    "rs_datetime":"2020-10-01T22:55:14+07:00", 
    "error_code":"0000",
    "error_message":"Success",
    "order_id":" ESP1624429732I2O3", 
    "reconcile_id":"2020100121183111", 
    "reconcile_datetime":"2020-10-01 22:56:13"
}
           




HTTP

POST /payment HTTP/1.1
Host: yourwebsite.com
Host: mechant-domain.com
Content-Type: application/x-www-form-urlencoded
Accept:  */*
Content-Length: 1323

rq_uuid=4445a53b-4bac-4159-ac69-f02149f53302&rq_datetime=2021-06-23%2013%3A29%3A49&password=y1eh1rg&comm_code=SGWMERCHANTTGR&trx_id=ESP1624429732I2O3&trx_date=2021-06-23%2013%3A29%3A49&total_amount=4000&outstanding_amount=4000&invoices=%7B%0A%20%20%20%20%22invoice%20number%22%3A%20%2221190633%22%2C%0A%20%20%20%20%220020510494%22%3A%20%22442055%22%2C%0A%20%20%20%20%220020510495%22%3A%20%225175625%22%2C%0A%20%20%20%20%220020510496%22%3A%20%2222982074%22%2C%0A%20%20%20%20%220020510497%22%3A%20%2211032255%22%2C%0A%20%20%20%20%220020510498%22%3A%20%22157317%22%2C%0A%20%20%20%20%2220210004046882%22%3A%20%22-74171%22%2C%0A%20%20%20%20%2220210004046883%22%3A%20%22-18052%22%2C%0A%20%20%20%20%2220210004046884%22%3A%20%22-1272000%22%2C%0A%20%20%20%20%2220210004046885%22%3A%20%22-4033000%22%2C%0A%20%20%20%20%2220210004046886%22%3A%20%22-1250000%22%2C%0A%20%20%20%20%2220210004046887%22%3A%20%22-2500000%22%2C%0A%20%20%20%20%2220210004046888%22%3A%20%22-2250000%22%2C%0A%20%20%20%20%2220210004048138%22%3A%20%22-600000%22%2C%0A%20%20%20%20%2220210004048139%22%3A%20%22-2092934%22%2C%0A%20%20%20%20%2220210004048140%22%3A%20%22-600000%22%2C%0A%20%20%20%20%2220210004048141%22%3A%20%22-1597893%22%2C%0A%20%20%20%20%2220210004048168%22%3A%20%22-550000%22%0A%7D&collector=budi%40gmail.com&pay_type=cash&signature=437cd81ccdc09d0f
               


CURL

curl --location 'https://yourwebsite.com/payment' \
--header 'Host: mechant-domain.com' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept:  */*' \
--data-urlencode 'rq_uuid=4445a53b-4bac-4159-ac69-f02149f53302' \
--data-urlencode 'rq_datetime=2021-06-23 13:29:49' \
--data-urlencode 'password=y1eh1rg' \
--data-urlencode 'comm_code=SGWMERCHANTTGR' \
--data-urlencode 'trx_id=ESP1624429732I2O3' \
--data-urlencode 'trx_date=2021-06-23 13:29:49' \
--data-urlencode 'total_amount=4000' \
--data-urlencode 'outstanding_amount=4000' \
--data-urlencode 'invoices={
    "invoice number": "21190633",
    "0020510494": "442055",
    "0020510495": "5175625",
    "0020510496": "22982074",
    "0020510497": "11032255",
    "0020510498": "157317",
    "20210004046882": "-74171",
    "20210004046883": "-18052",
    "20210004046884": "-1272000",
    "20210004046885": "-4033000",
    "20210004046886": "-1250000",
    "20210004046887": "-2500000",
    "20210004046888": "-2250000",
    "20210004048138": "-600000",
    "20210004048139": "-2092934",
    "20210004048140": "-600000",
    "20210004048141": "-1597893",
    "20210004048168": "-550000"
}' \
--data-urlencode '[email protected]' \
--data-urlencode 'pay_type=cash' \
--data-urlencode 'signature=437cd81ccdc09d0f'
               
Scroll to Top