Refunds
Create a refund
Creates a refund. Refund allows you to return a payment that has previously been created as long as there have been no incremental payments or payment attempts, including unsuccessful payment attempts. You can refund the full amount or a partial amount.
post/payment-intents/{paymentIntentId}/refunds
Request
- Base URLhttps://api.dojo.tech
- AuthAPI key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
paymentIntentIdstring nullable required
The unique identifier of the payment intent.
Headers
versionstring date required
The API version with format yyyy-mm-dd. The current version is 2026-02-27.
idempotencyKeystring nullable required
An idempotency key is used to recognize subsequent retries of the same request. How you generate the idempotency key is up to you. The key must be unique for each new refund processed on the payment intent.
Request body
Example request
{
"amount": 1000,
"refundReason": "Demo refund"
}Response
OK
Example response
{
"paymentIntentId": "pi_sandbox_RBMHTJ4fIkmSppDILZVCGw",
"refundId": "rfnd_127usj",
"refundReason": "Demo refund",
"notes": null
}Changes
No recorded changes to this operation across all 1 revision of this API.