Skip to main content

Create a refund

POST 

/refunds

When you create a new refund, you must specify a Charge on which to create it.

Creating a new refund will refund a charge that has previously been created but not yet refunded.

Funds will be refunded to the credit or debit card that was originally charged.

Once entirely refunded, a charge can’t be refunded again. This method will return an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge.

Request

Body

required

    id uuid

    Possible values: <= 36 characters, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

    UUID v4

    idempotency_key uuidrequired

    Possible values: <= 36 characters, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

    UUID v4

    charge_id uuidrequired

    Possible values: <= 36 characters, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

    UUID v4

    amount

    object

    Money representation

    value MoneyAmount (integer)required

    Possible values: <= 9999999999

    Amount expressed in cents. 1 USD should be submitted as 100 cents

    currency /[A-Z]{3}/required

    ISO 4217 representation of the currency

    reason stringrequired

    Possible values: [duplicate, fraudulent, requested_by_customer]

    String indicating the reason for the refund. If set, possible values are duplicate, fraudulent, and requested_by_customer. If you believe the charge to be fraudulent, specifying fraudulent as the reason will help us improve our fraud detection algorithms.

    description string

    Possible values: <= 255 characters

    Description for this refund

Responses

Refund created successfully

Schema

    status string

    Possible values: [success]

    code integer

    Possible values: [200]

    message string

    Possible values: [Successful request]

Loading...