Refund a completed payment by its lcPaymentId.
Full refund
Omit amountCents to refund the entire payment:
curl https://payments.leffelconsulting.com/v1/payments/lcpay_9f2c.../refund \
-H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{ "reason": "requested_by_customer" }'
The payment’s status becomes refunded.
Partial refund
Pass an amountCents smaller than the payment total:
curl https://payments.leffelconsulting.com/v1/payments/lcpay_9f2c.../refund \
-H "X-Api-Key: lc_live_XXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{ "amountCents": 2000, "reason": "requested_by_customer" }'
The status becomes partially_refunded. You can issue multiple partial refunds up to the original
amount.
Options
| Field | Description |
|---|---|
amountCents | Amount to refund. Omit for a full refund. |
reason | requested_by_customer, duplicate, or fraudulent. |
refundApplicationFee | Whether to refund the platform fee proportionally. Defaults to true. |
Note
By default the platform fee is refunded in proportion to the refunded amount. Set
refundApplicationFee to false to keep the fee.
You’ll also receive a charge.refunded callback so your systems can update.