Skip to main content
POST
Refund invoice

Authorizations

x-api-key
string
header
required

API key for merchant authentication

Path Parameters

id
string
required

Invoice ID (MongoDB ObjectId)

Pattern: ^[a-f\d]{24}$

Body

application/json
amount
number
required

Amount to refund, in major currency units (e.g. 50 = $50.00 MXN). Must be positive. Pass the full invoice amount for a full refund.

Example:

50

Response

Invoice refunded successfully

Invoice details

_id
string

Invoice ID

customerId
string

Customer ID

merchantId
string

Merchant ID

Pattern: ^[a-f\d]{24}$
paymentOrderId
string

Payment order ID

Payment link ID

reference
string

Merchant reference

externalId
string

Merchant reference

orderNumber
string

Order number

invoiceNumber
string | null

Merchant-provided invoice number; shown to customers instead of orderNumber when present

products
object[]

Products in the invoice

totals
object
billingAddress
object

Address information

shippingAddress
object

Address information

paymentMethod
object

Payment method details

status
enum<string>

Invoice status

Available options:
pending,
paid,
cancelled,
refunded,
failed,
abandoned
customFields
object[]

Snapshot of the customer-submitted answers for the payment link's custom fields

metadata
object

Additional metadata

createdAt
string<date-time>

Creation timestamp

updatedAt
string<date-time>

Last update timestamp