Reversal
Obsolete
POST
/reversal
Single
Request
Header Params
Authorization
string
optional
if using Oauth2 Authentication
Signature
string
required
request body or query string
hash value using HMAC method. algorithm=sha256
, key = API_KEY
Accept
string
required
Example:
application/json
Body Params application/json
payment_ref
string
optional
payment_ref
amount
number
optional
reference_id
string
optional
virtual_account
string
optional
channel
string
optional
Default:
bank_name
prefix
string
optional
Example
{
"payment_ref": "1234567890",
"amount": 10000,
"reference_id": "abcRef13456789",
"virtual_account": "1234567890",
"channel": "bank_name",
"prefix": "857399"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/reversal' \
--header 'Authorization;' \
--header 'Signature;' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"payment_ref": "1234567890",
"amount": 10000,
"reference_id": "abcRef13456789",
"virtual_account": "1234567890",
"channel": "bank_name",
"prefix": "857399"
}'
Responses
🟢200OK
application/json
Body
rc
string
read-onlyoptional
message
string
optional
timestamp
string
optional
data
object (Payment Model)
optional
Example:
{"hash":"string","va_number":"8575991234567890","invoice_number":"string","type":"open","name":"SPP Januari 2022","customer_name":"string","customer_email":"string","customer_phone":"string","customer_address":"string","total_amount":0,"billed_amount":0,"paid_amount":0,"status":"paid","ext_description":"string","description":"string","valid_until":"2022-04-05T13:32:08+07:00","created_at":"2022-04-05T13:32:08+07:00","components":[{"id":"string","name":"string","qty":1,"price":"string","total":"string"}]}
hash
string
required
va_number
string
required
Example:
8575991234567890
invoice_number
string
required
type
enum<string>
required
Allowed values:
openclosepartial
transaction_ref_id
string
required
name
string
required
Example:
SPP Januari 2022
customer_name
string
required
customer_email
string
optional
customer_phone
string
optional
customer_address
string
optional
total_amount
integer | number
required
billed_amount
integer | number
required
total_amount
paid_amount
integer | number
required
total_amount
status
enum<string>
required
Allowed values:
paidactivevoidreversalexpired
ext_description
string
optional
description
string
optional
valid_until
string
required
Date Time is in
ISO8601
formatExample:
2022-04-05T13:32:08+07:00
created_at
string
required
ISO8601
formatExample:
2022-04-05T13:32:08+07:00
components
array[object (Bill's component) {5}]
required
additional_data
object (additional-data)
optional
payment channel
able to display clearer information to customers about bill (if supported by channel
)Example:
{"key":"kelas","label":"Kelas / Angkatan","value":"8A"}
payment
object
optional
Example
{
"rc": "SUCCESS",
"message": "success",
"timestamp": "2022-04-05T06:11:58+07:00",
"data": {
"hash": "x24da1dF",
"va_number": "8673011234567890",
"type": "open",
"name": "SPP Bulan Januari",
"customer_name": "John Doe",
"customer_email": "john.doe@example.com",
"customer_phone": "+621234567890",
"customer_address": "Surabaya, Indonesia",
"total_amount": 100000,
"billed_amount": 100000,
"paid_amount": 0,
"description": "Pembayaran SPP Bulan Januari",
"ext_description": "-",
"valid_until": "2022-04-05T13:32:08+07:00",
"status": "active",
"created_at": "2022-04-04T06:32:08+07:00",
"components": [
{
"id": "95f5c77f-79de-4c12-a151-ef7c68e9b7d2",
"name": "SPP Januari",
"qty": "1",
"price": "100000",
"total": "100000"
}
],
"additional_data": [
{
"key": "class (programming safe), alphanum, snake_case, lowercase",
"label": "Kelas / Angkatan",
"value": ""
}
]
}
}