Charge

Refund a paid charge.

Changed on

Issue a refund for a successfully paid charge. The refund is created as a new payout linked to the original charge through related_payments. The customer receives the funds back at the bank account they paid from. Each charge can be refunded once; partial and full refunds are both supported.

post/v1/charges/{id}/refund

Request

  • Base URL
    https://sandbox.straddle.com
  • URL
    https://sandbox.straddle.com/v1/charges/{id}/refund
  • Auth
    HTTP bearer

Path parameters

idstring uuid required

Headers

Straddle-Account-Idstring uuid

For use by platforms to specify an account id and set scope of a request.

Request-Idstring

Optional client generated identifier to trace and debug a request.

Correlation-Idstring

Optional client generated identifier to trace and debug a series of requests.

Idempotency-Keystring

Optional client generated value to use for idempotent requests.

Request body

amountinteger nullable required

The refund amount in cents. Must be greater than 0 and no more than the original charge amount.

descriptionstring nullable

Optional reason recorded on the refund payout. Appended to the system-generated description Refund for Charge ID: {id}.

external_idstring nullable

Optional unique identifier for this refund, used to correlate with your internal records. Defaults to a new value if not specified.

payment_datestring date nullable

The date on which to submit the refund for processing. Defaults to today if not specified.

metadataobject nullable

Optional key-value pairs for storing additional structured data. Keys and values must be strings.

Example request

{
  "amount": 5000
}

Response

Created

response_type'object' | 'array' | 'error' | 'none' required

Indicates the structure of the returned content.

  • "object" means the data field contains a single JSON object.
  • "array" means the data field contains an array of objects.
  • "error" means the data field contains an error object with details of the issue.
  • "none" means no data is returned.

Example response

{
  "data": {
    "customer_details": {
      "name": "Ron Swanson",
      "email": "ron@swanson.com",
      "phone": "+1234567890"
    },
    "paykey_details": {
      "label": "Bank of America ****1234"
    },
    "device": {
      "ip_address": "192.168.1.1"
    },
    "status_details": {
      "message": "Payment successfully created and awaiting validation."
    },
    "status_history": [
      {
        "message": "Payment successfully created and awaiting validation."
      }
    ]
  }
}

Changes