Capture
Capture a previously authorized (pre-auth) transaction. Uses the enhanced breakdown which includes a surcharge sub-object, allowing surcharge details to be passed at capture time.
The breakdown.surcharge object accepts:
percentage— surcharge percentage (e.g., 3.0 for 3%)amount— fixed surcharge amount in centsbypass— set totrueto skip surcharge for this transaction
If a surcharge is included and the account has surcharging enabled, the surcharge amount is calculated and added to the total. The resulting surcharge_amount and surcharge_rate are returned on the Transaction response.
Path Parameters
- Type: stringtransaction
_id requiredID of the pre-authorized transaction to capture.
Headers
- enumAcceptconst:application/jsonrequired
Response format. Must be
application/json. - enumContent
- Type const:application/jsonrequiredRequest payload format. Must be
application/jsonwhen a body is sent.
Body·
Capture request model. Supports optional tip adjustment at capture time.
- Type: integer | nullamount
Optional capture amount in cents. If omitted, the full authorized amount is captured.
- Type: nullablebreakdownProperties: 6
Optional payment breakdown for the capture.
- Type: string | nullevent
_id Idempotency key. Auto-generated if omitted.
- Type: integer | nulltip
_amount Optional tip amount in cents to apply at capture time. This allows adding or adjusting the tip when capturing a pre-authorized transaction.
Responses
- application/json
- application/json
- application/json
- application/json
curl 'https://api.uat.koard.com/v3/payments/{transaction_id}/capture' \
--request POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-koard-apikey: YOUR_SECRET_TOKEN' \
--data '{
"amount": null,
"breakdown": {
"subtotal": 1,
"taxAmount": 1,
"taxRate": 1,
"tipAmount": 1,
"tipRate": 1,
"tipType": "fixed"
},
"event_id": null,
"tip_amount": null
}'
{
"transaction_id": "string",
"event_id": "string",
"mid": "string",
"tid": "string",
"processor_mid": "string",
"processor_tid": "string",
"account_id": "string",
"device_id": null,
"processor": null,
"gateway": null,
"currency": "string",
"location_id": null,
"gateway_transaction_id": null,
"subtotal": 1,
"tip_amount": 0,
"tip_type": "string",
"tip_capture_mode": "string",
"tax_amount": 0,
"tax_rate": 0,
"tax_source": "string",
"tax_basis": "string",
"total_amount": 1,
"surcharge_applied": false,
"surcharge_amount": 0,
"surcharge_rate": 0,
"surcharge_source": "string",
"surcharge_basis": "string",
"surcharge_confirmation_required": null,
"refunded": 0,
"reversed": 0,
"created_at": 1,
"status": null,
"status_reason": "string",
"payment_method": "string",
"card_type": "string",
"card_brand": "string",
"card": "string",
"metadata": {
"additionalProperty": "anything"
},
"additional_details": {},
"gateway_transaction_response": {
"additionalProperty": "anything"
},
"processor_response_code": null,
"processor_response_message": null,
"transaction_type": null,
"apple_transaction_id": "string",
"reader_identifier": "string",
"owner_id": null,
"parent_account_ids": [
"string"
],
"merchant_name": "",
"psp": null,
"batch_id": null,
"device_type": null,
"terminal_details": {
"additionalProperty": "anything"
},
"history": []
}
