v1

latestOpenAPI 3.0.12026-07-242871595.3 MB
REFUNDS

Create a refund

Creates a new refund that must be associated with an existing charge. Refunds are applied to the source used for the original payment. Partial refunds are allowed up to the original charge amount.

post/v1/refunds

Headers

User-Agentstring required

Identifies the application, operating system, vendor, and/or version of the requesting user agent. Format: <AppName>/<Version> <Comment>

Request body

chargestring required

Unique identifier (ID) of the charge to refund. The charge parameter is available in the Get charges and Get a charge endpoints.

amountinteger

Refund amount in cents from the remaining, unrefunded amount of the charge.

external_reference_idstring

Unique dentifier (ID), such as an invoice or purchase order (PO) number, that is passed to the merchant's gateway and displays in settlement records. Format: Supported for US—alphanumeric characters with in-between spaces Length: Max 12, including spaces and alphanumeric characters.

reason'duplicate' | 'fraudulent' | 'requested_by_customer'

Reason for the refund.

Response

Successful response. Refund created.

idstring required

Refund identifier.

amountinteger required

Refund amount from the balance of unrefunded amount of the charge. Format: Cents

createdinteger required

Displays results based on the object's created field. Values: String with a Unix timestamp (in milliseconds). Dictionary of multiple options describing a time range.

currencystring required
descriptionstring

Description about the refund.

external_reference_idstring

Unique identifier (ID), such as an invoice or purchase order (PO) number, that is sent to the merchant's gateway and displayed in settlement records. Format: Supported for US—alphanumeric characters with in-between spaces. Length: Max 12, including spaces and alphanumeric characters.

failure_reason'lost_or_stolen_card' | 'expired_or_canceled_card' | 'unknown'

Reason of the cancellation of the refund.

chargestring required

Charge identifier.

metadataobject required

Indicates whether a US merchant with the gateway group Ids 40001 or 10001, and merchant category codes (MCC) 6012 or 6051 can process Visa® consumer debit transactions that have an existing debt. Values: True - Merchant can process transactions that have an existing debt. False - Default; Transactions do not have an existing debt.

object'refund' required

Object of the refund.

reason'duplicate' | 'fraudulent' | 'requested_by_customer' nullable

Reason for the refund.

receipt_numberstring nullable

Transaction receipt number that appears on the receipt emailed for this charge

status'succeeded (card or non-card)' | 'failed (card or non-card)' | 'pending (non-card only)' | 'canceled (non-card only)' nullable required

Status of the refund. Values: For credit cards - succeeded or failed For other methods - pending, succeeded, failed, or canceled