Lewati ke konten

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.

Otorisasi

apiKey
headerAuthorizationBearer <token>

lbp_test_... or lbp_live_...

Parameter path

id*string

Parameter header

Idempotency-Key*string
Lengthlength <= 255

Body permintaan

application/json
  1. body
amount?integer

Whole rupiah. Defaults to the amount left to refund.

Range1 <= value
reason*string
Length1 <= length <= 256

Body respons

The refund

application/json
  1. response
id*string
object*"refund"
Value in"refund"
payment_id*string
mode*string
Value in"test""live"
currency*"IDR"
Value in"IDR"
amount*integer
reason*string
status*string
Value in"pending""succeeded""failed"
created_at*string
Formatdate-time
completed_at*|
Formatdate-time
Contoh permintaan
curl -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"}