Confirm Surcharge
Confirm or decline a surcharge-pending transaction. This is the structured endpoint used by SDK flows.
When a payment or preauth returns surcharge_pending, the SDK presents the surcharge to the cardholder and calls this endpoint. The transaction ID is in the URL path and the body uses the typed ProcessConfirmRequest schema with optional amount and breakdown overrides.
- Type: string · Transaction Id
transaction _id requiredID of the surcharge-pending transaction.
- enum
Accept const:application/jsonrequiredResponse format. Must be
application/json.valuesapplication/json
- enum
Content - Type const:application/jsonrequiredRequest payload format. Must be
application/jsonwhen a body is sent.valuesapplication/json
Request body for confirming or declining a surcharge-pending transaction. After a payment returns surcharge_pending status, the client must present the surcharge to the cardholder and call confirm with the result.
- Type: boolean · Confirm
confirm requiredWhether the cardholder accepted the surcharge.
trueprocesses the payment with surcharge applied;falsecancels the transaction. - Type: integer | null · Amount
amount Optional override of the total transaction amount in cents. If not provided, the original calculated amount (including surcharge) is used.
- Type: object · Breakdown (with Surcharge) nullable
breakdown Enhanced payment amount breakdown with surcharge support. Rates can be sent as integers (old SDK format, e.g., 875 = 8.75%) or floats (new SDK format, e.g., 8.75). Values >= 100 are auto-converted from basis points.
- Type: string | null · Event Id
event _id Idempotency key for this confirmation event. If not provided, one is generated server-side.
- application/json
400 Missing
confirmfield or duplicateevent_id.404 Transaction not found.
- application/json
curl 'https://api.uat.koard.com/v1/payments/{transaction_id}/confirm' \
--request POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-koard-apikey: YOUR_SECRET_TOKEN' \
--data '{
"confirm": true,
"amount": 10850,
"breakdown": {
"subtotal": 10000,
"taxAmount": 500,
"surcharge": {
"percentage": 3.5
}
},
"event_id": "evt_confirm_001"
}'
{
"account_id": "string",
"additional_details": {},
"apple_transaction_id": "string",
"batch_id": null,
"card": "string",
"card_brand": "string",
"card_type": "string",
"created_at": 1,
"currency": "string",
"device_id": null,
"event_id": "string",
"gateway": null,
"gateway_transaction_id": null,
"gateway_transaction_response": null,
"history": [],
"location_id": null,
"merchant_name": "",
"mid": "string",
"owner_id": null,
"parent_account_ids": [
"string"
],
"payment_method": "string",
"processor": null,
"processor_mid": "string",
"processor_response_code": null,
"processor_response_message": null,
"processor_tid": "string",
"reader_identifier": "string",
"refunded": null,
"reversed": null,
"status": null,
"status_reason": null,
"subtotal": 1,
"surcharge_amount": null,
"surcharge_applied": false,
"surcharge_rate": null,
"tax_amount": null,
"tax_rate": null,
"tid": "string",
"tip_amount": null,
"tip_type": null,
"total_amount": 1,
"transaction_id": "string",
"transaction_type": null
}
