Skip to main content
POST
/
v1
/
charges
/
{id}
/
refund
cURL
curl --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
  --url https://sandbox.straddle.com/v1/charges/<uuid>/refund \
  --header 'Content-Type: application/json' \
  --data '{
    "amount": 5000,
    "description": "Customer returned damaged item"
  }'
{
  "meta": {
    "api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "api_request_timestamp": "2023-11-07T05:31:56Z"
  },
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "paykey": "<string>",
    "description": "<string>",
    "amount": "10000",
    "currency": "USD",
    "payment_date": "2023-12-25",
    "device": {
      "ip_address": "192.168.1.1"
    },
    "external_id": "<string>",
    "config": {
      "auto_hold": true,
      "auto_hold_message": "<string>"
    },
    "status": "created",
    "status_details": {
      "message": "Payment successfully created and awaiting validation.",
      "reason": "OK",
      "source": "system",
      "changed_at": "2023-11-07T05:31:56Z",
      "code": null
    },
    "status_history": [
      {
        "message": "Payment successfully created and awaiting validation.",
        "changed_at": "2023-11-07T05:31:56Z",
        "status": "created",
        "code": null
      }
    ],
    "funding_ids": [
      "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    ],
    "trace_ids": {},
    "customer_details": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "Ron Swanson",
      "email": "[email protected]",
      "phone": "+1234567890"
    },
    "paykey_details": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "label": "Bank of America ****1234",
      "balance": "100.00"
    },
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "processed_at": "2023-11-07T05:31:56Z",
    "effective_at": "2023-11-07T05:31:56Z",
    "metadata": {},
    "related_payments": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.straddle.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use your Straddle API Key in the Authorization header as Bearer to authorize API requests.

Headers

Straddle-Account-Id
string<uuid>

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

Request-Id
string

Optional client generated identifier to trace and debug a request.

Correlation-Id
string

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

Idempotency-Key
string

Optional client generated value to use for idempotent requests.

Required string length: 10 - 40

Path Parameters

id
string<uuid>
required

Body

amount
integer<int32>
required

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

Example:

5000

description
string | null

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

Response

Created

meta
object
required

Metadata about the API request, including an identifier and timestamp.

response_type
enum<string>
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.
Available options:
object,
array,
error,
none
data
object
required