Skip to main content
POST
Creates Refund

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

JSON A full refund object.

Note:

  • Transaction details are required as part of the Refund object.
  • A refund amount is required. If an amount is not provided or provided as 0, the full transaction amount will be refunded.
  • If tax calculation for a refund is desired, use the refund_distribution_strategy, SpecifiedItems or RemainingBalance options. If refund_distribution_strategy is defaulted or set to "None", tax calculation is not performed.

The Refund object provides a way to reverse a charge, refunding money to the customer. You can create, and retrieve individual Refunds; as well as list all existing Refunds. Refunds require a transaction – a refund can only be executed against an existing, successfully captured transaction. Refunds can be issued for any valid amount (in the currency of the original transaction) up to the as-yet un-refunded balance of the original transaction. You can issue any number of refunds on a given transaction (until it has been fully refunded).

object
enum<string>

Value is “Refund”

Available options:
Refund
id
string

A unique identifier. Optionally, this object can also be identified by its vid. Using a unique custom identifier is strongly encouraged.

Maximum string length: 128
vid
string

A Globally Unique Identifier (GUID) for this object. This value is generated by Vindicia.

Maximum string length: 128
created
string<datetime>

The date/time at which the refund was requested.

transaction
object

The Transaction object provides a way to charge a customer. You can create one-time transactions, retrieve individual transactions, fetch individual transactions, and list all Transactions for a given account or subscription. Posting with a new Transaction creates a new one-time Transaction object. If “to_be_captured” is false, the request will trigger an authorization attempt (based on the provided payment method’s authorization process). If successfully authorized, a subsequent post to the transaction’s actions/capture endpoint will capture the authorized transaction. If you post a new transaction with “to_be_captured” true, it will authorize and immediately capture the transaction if successful. To refund transactions, use the refunds endpoint.

refund_items
object[]

For item-level refunds, specifies the transaction items to refund with details.

refund_distribution_strategy
enum<string>

Defines strategy for distributing refund amount across the original TransactionItems. Default is None.

Available options:
None,
SpecifiedItems,
RemainingBalance
amount
number

Amount of the refund. Must be positive (non-zero) and less than or equal to the as-yet-un-refunded balance of the specified transaction. Ignored if refundItems are specified.

amount_includes_tax
boolean

whether the amount is tax-inclusive or -exclusive

currency
string

The ISO 4217 Currency Code of this transaction; defaults to USD.

metadata
object

Metadata are sets of key-value pairs and are useful for storing additional, structured information on an object. This object is used to store a list of keys, which you create and associate with text string values. You use these key-value pairs to store custom data for your own internal tracking purposes, or to store CashBox specific data for defined CashBox purposes.

The metadata field supports key-value pairs with the following limitations:

Keys can be up to 256 characters

Keys can be any string that is needed, except only CashBox can prefix keys with vin:

Values can be up to 1024 characters

In some cases metadata from one object will be inherited automatically from one object to another that is spawned from it. e.g. metadata on a Subscription and SubscriptionItem will be inherited by all Transactions and TransactionItems that result from them.

reference_string
string

Read-only. Information provided by payment processor.

note
string

Free-form CSP-specified notes about refund.

token_action
enum<string>

Action to take with any Tokens paid on transaction. Default None.

Available options:
CancelNegativeBalance,
CancelZeroBalance,
None
credit
object

The Credit object represents a service credit granted to an account or subscription, taking the form of either currency, token, or time amounts.

status
enum<string>

Processing status of refund.

Available options:
Complete,
Failed,
Processing,
Reported
refunded_by
string

Refund initiated by

Response

JSON A full Refund object.

The Refund object provides a way to reverse a charge, refunding money to the customer. You can create, and retrieve individual Refunds; as well as list all existing Refunds. Refunds require a transaction – a refund can only be executed against an existing, successfully captured transaction. Refunds can be issued for any valid amount (in the currency of the original transaction) up to the as-yet un-refunded balance of the original transaction. You can issue any number of refunds on a given transaction (until it has been fully refunded).

object
enum<string>

Value is “Refund”

Available options:
Refund
id
string

A unique identifier. Optionally, this object can also be identified by its vid. Using a unique custom identifier is strongly encouraged.

Maximum string length: 128
vid
string

A Globally Unique Identifier (GUID) for this object. This value is generated by Vindicia.

Maximum string length: 128
created
string<datetime>

The date/time at which the refund was requested.

transaction
object

The Transaction object provides a way to charge a customer. You can create one-time transactions, retrieve individual transactions, fetch individual transactions, and list all Transactions for a given account or subscription. Posting with a new Transaction creates a new one-time Transaction object. If “to_be_captured” is false, the request will trigger an authorization attempt (based on the provided payment method’s authorization process). If successfully authorized, a subsequent post to the transaction’s actions/capture endpoint will capture the authorized transaction. If you post a new transaction with “to_be_captured” true, it will authorize and immediately capture the transaction if successful. To refund transactions, use the refunds endpoint.

refund_items
object[]

For item-level refunds, specifies the transaction items to refund with details.

refund_distribution_strategy
enum<string>

Defines strategy for distributing refund amount across the original TransactionItems. Default is None.

Available options:
None,
SpecifiedItems,
RemainingBalance
amount
number

Amount of the refund. Must be positive (non-zero) and less than or equal to the as-yet-un-refunded balance of the specified transaction. Ignored if refundItems are specified.

amount_includes_tax
boolean

whether the amount is tax-inclusive or -exclusive

currency
string

The ISO 4217 Currency Code of this transaction; defaults to USD.

metadata
object

Metadata are sets of key-value pairs and are useful for storing additional, structured information on an object. This object is used to store a list of keys, which you create and associate with text string values. You use these key-value pairs to store custom data for your own internal tracking purposes, or to store CashBox specific data for defined CashBox purposes.

The metadata field supports key-value pairs with the following limitations:

Keys can be up to 256 characters

Keys can be any string that is needed, except only CashBox can prefix keys with vin:

Values can be up to 1024 characters

In some cases metadata from one object will be inherited automatically from one object to another that is spawned from it. e.g. metadata on a Subscription and SubscriptionItem will be inherited by all Transactions and TransactionItems that result from them.

reference_string
string

Read-only. Information provided by payment processor.

note
string

Free-form CSP-specified notes about refund.

token_action
enum<string>

Action to take with any Tokens paid on transaction. Default None.

Available options:
CancelNegativeBalance,
CancelZeroBalance,
None
credit
object

The Credit object represents a service credit granted to an account or subscription, taking the form of either currency, token, or time amounts.

status
enum<string>

Processing status of refund.

Available options:
Complete,
Failed,
Processing,
Reported
refunded_by
string

Refund initiated by