Skip to content

Files

Latest commit

 

History

History
39 lines (30 loc) · 2.85 KB

refund-payment-request.md

File metadata and controls

39 lines (30 loc) · 2.85 KB

Refund Payment Request

Describes a request to refund a payment using RefundPayment.

Structure

Refund Payment Request

Fields

Name Type Tags Description
idempotency_key String Required A unique string that identifies this RefundPayment request. The key can be any valid string
but must be unique for every RefundPayment request.

Keys are limited to a max of 45 characters - however, the number of allowed characters might be
less than 45, if multi-byte characters are used.

For more information, see Idempotency.
Constraints: Minimum Length: 1
amount_money Money Hash Required Represents an amount of money. Money fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
Working with Monetary Amounts
for more information.
app_fee_money Money Hash Optional Represents an amount of money. Money fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
Working with Monetary Amounts
for more information.
payment_id String Optional The unique ID of the payment being refunded. Must be provided and non-empty.
reason String Optional A description of the reason for the refund.
Constraints: Maximum Length: 192
payment_version_token String Optional Used for optimistic concurrency. This opaque token identifies the current Payment
version that the caller expects. If the server has a different version of the Payment,
the update fails and a response with a VERSION_MISMATCH error is returned.
If the versions match, or the field is not provided, the refund proceeds as normal.
team_member_id String Optional An optional TeamMember ID to associate with this refund.
Constraints: Maximum Length: 192

Example (as JSON)

{
  "amount_money": {
    "amount": 1000,
    "currency": "USD"
  },
  "app_fee_money": {
    "amount": 10,
    "currency": "USD"
  },
  "idempotency_key": "9b7f2dcf-49da-4411-b23e-a2d6af21333a",
  "payment_id": "R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY",
  "reason": "Example"
}