Palbase Payments · API
/payments/intents/{intent_id}/pending-refundSettle a pending refund
The project's word on a refund that was asked of its provider and never written down — the provider did not answer, or the answer was lost — after which every refund of the payment answers 409 refund_pending. Look the refund up at the provider and say what it did: made: true and the same request, sent again under its Idempotency-Key, writes the refund without asking the provider; made: false and the key is let go, the payment refunded as before; on Stripe the same request sent again goes under its own key, and is answered with the refund were it made after all. A refund the provider refused for certain is asked for again as a new request: a provider that keeps a key keeps its first answer with it. With a refund of the payment being made at the moment the answer is 409 refund_in_progress: ask again. With nothing pending the answer is 409 no_pending_refund. Palbase does not guess: a provider that takes the key for a name only would give the money back twice.
Called by your server, with the project's secret key.
Path
intent_idstring · requiredPaymentIntent UUID.Headers
Idempotency-Keystring · optionalUnique client-supplied idempotency key (1-255 chars) ensuring safe retries without duplicate charges, refunds, or ledger movements.Request body
madeboolean · requiredtrue when the provider made the refund, false when it did not.curl -X POST "https://<your-ref>.palbase.studio/payments/intents/<intent_id>/pending-refund" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"made":false}'Responses
200Settled
defaultStandard Palbase JSON error envelope (`error` and `error_description`).
Operation SettlePendingRefund of payments's contract.