Skip to main content
POST
Create a refund

Authorizations

Authorization
string
header
default:easner_sk_test_…
required

A secret key, easner_sk_test_… or easner_sk_live_…, as Authorization: Bearer. Each key has one business, one mode and fixed scopes. Transfer routes also accept a transfer's easner_ta_… secret for the customer.

Headers

Idempotency-Key
string

Up to 255 characters. Keys are scoped to your business and mode. Longer is 400 invalid_idempotency_key. Honoured only on the operations marked idempotent.

Maximum string length: 255

Body

application/json
payment
string

The payment id (UUID). Send this or checkout_session.

checkout_session
string

The checkout session id. Send this or payment.

Pattern: ^cs_
amount
integer

Amount in cents. Omit for the rest of the payment.

Required range: x >= 1
reason
enum<string>
Available options:
duplicate,
fraudulent,
requested_by_customer

Response

The refund.

A refund of a checkout payment. id is the provider's re_ id.

object
any
required
id
string
required
Pattern: ^re_
payment
string<uuid>
required
amount
integer
required
currency
string
required
status
string
required
reason
enum<string> | null
required
Available options:
duplicate,
fraudulent,
requested_by_customer,
null
amount_refunded_total
integer
required
fully_refunded
boolean
required
livemode
boolean
required