POST
/
v1
/
payments
/
:id
/
capture
curl --location --request POST 'https://api.stateset.com/v1/payments/pay_0901f083-aa1c-43c5-af5c-0a9d2fc64e30/capture' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
    "amount": 15000
}'
{
  "id": "pay_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
  "object": "payment",
  "amount": 15000,
  "amount_capturable": 0,
  "amount_captured": 15000,
  "currency": "USD",
  "status": "succeeded",
  "captured": true,
  "captured_at": "2024-01-19T16:00:00Z",
  "created_at": "2024-01-19T15:30:00Z",
  "payment_method": {
    "type": "card",
    "card": {
      "last4": "4242",
      "brand": "visa"
    }
  },
  "capture_details": {
    "captured_amount": 15000,
    "capture_time": "2024-01-19T16:00:00Z",
    "processor_capture_id": "ch_capture_123456"
  }
}
This endpoint captures a previously authorized payment. Only payments created with capture: false can be captured.

Authentication

This endpoint requires a valid API key with payments:write permissions.
Authorization: Bearer YOUR_API_KEY

Path Parameters

id
string
required
The payment ID to capture

Request Body

amount
integer
Amount to capture in cents (defaults to full authorization amount)
statement_descriptor
string
Text for customer’s statement (max 22 chars)
metadata
object
Additional metadata to attach to the capture

Response

Returns the captured payment object.
curl --location --request POST 'https://api.stateset.com/v1/payments/pay_0901f083-aa1c-43c5-af5c-0a9d2fc64e30/capture' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
    "amount": 15000
}'
{
  "id": "pay_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
  "object": "payment",
  "amount": 15000,
  "amount_capturable": 0,
  "amount_captured": 15000,
  "currency": "USD",
  "status": "succeeded",
  "captured": true,
  "captured_at": "2024-01-19T16:00:00Z",
  "created_at": "2024-01-19T15:30:00Z",
  "payment_method": {
    "type": "card",
    "card": {
      "last4": "4242",
      "brand": "visa"
    }
  },
  "capture_details": {
    "captured_amount": 15000,
    "capture_time": "2024-01-19T16:00:00Z",
    "processor_capture_id": "ch_capture_123456"
  }
}