Refund a payment
Refunds all or part of a paid payment. Leave out amount to refund what is left. Our team returns the money to the buyer by bank transfer (QRIS and virtual account), so a live refund stays pending until it is done; you get refund.succeeded or refund.failed then. With a test key, a QRIS refund succeeds at once.
apiKeyheader
AuthorizationBearer <token>lbp_test_... or lbp_live_...
id*stringIdempotency-Key*stringLength
length <= 255application/json- body
amount?integerWhole rupiah. Defaults to the amount left to refund.
Range
1 <= valuereason*stringLength
1 <= length <= 256The refund
application/json- response
id*stringobject*"refund"Value in
"refund"payment_id*stringmode*stringValue in
"test""live"currency*"IDR"Value in
"IDR"amount*integerreason*stringstatus*stringValue in
"pending""succeeded""failed"created_at*stringFormat
date-timecompleted_at*|Format
date-timecurl -X POST 'https://pay.piti.id/v1/payments/pay_8Fq2.../refunds' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "amount": 50000, "reason": "Item out of stock"}'Contoh respons
{ "id": "string", "object": "refund", "payment_id": "string", "mode": "test", "currency": "IDR", "amount": 0, "reason": "string", "status": "pending", "created_at": "2019-08-24T14:15:22Z", "completed_at": "2019-08-24T14:15:22Z"}