Refund a payment
Refund a payment in a workflow execution with an optional reason, in full by omitting the amount, and for payment links pass the ID of the payment.
Authorizations
You can use an OAuth2 JWT bearer token in the Authorization header of your API requests for supported endpoints: Authorization: Bearer <YOUR_JWT_HERE>.
These tokens are valid for 10 minutes and can be requested via the access token endpoint endpoint.
Headers
Path Parameters
Body
Reason for invoking the operation or action. Omit it if there is no reason. CustomerDontNeed is deprecated, use CustomerDoesNotNeed instead. With Other, reasonDescription is required for refunds: at least 3 characters after trimming. On refunds, reasonDescription is at most 255 characters for any reason.
BetterPrice, CustomerDoesNotNeed, CustomerDontNeed, DamagedProduct, Duplicate, FraudulentProduct, LateDelivery, Other, ProductMismatchDescription, WrongProduct, WrongProductSpecification Any necessary information for the refund action, at most 255 characters. Required when reason is Other: at least 3 characters after trimming whitespace. A violation returns 400 with reason.field set to reasonDescription.
255"Customer was charged twice for the same order."
Metadata for the context of an execution. Includes Payrails-defined structures for most common fields used in workflows, but can also be extended by merchant or provider-specific fields. For more information, visit our Meta Fields guide. See Meta for every field.
Response
The payment refund was requested.
Reason for invoking the operation or action. Omit it if there is no reason. CustomerDontNeed is deprecated, use CustomerDoesNotNeed instead. With Other, reasonDescription is required for refunds: at least 3 characters after trimming. On refunds, reasonDescription is at most 255 characters for any reason.
BetterPrice, CustomerDoesNotNeed, CustomerDontNeed, DamagedProduct, Duplicate, FraudulentProduct, LateDelivery, Other, ProductMismatchDescription, WrongProduct, WrongProductSpecification