Edit Transaction
Edit a transaction by ID. This endpoint is only available when Koard is acting as a passthrough for EMV data and the transaction was created by EncryptedTlvPassthroughProcessor. Transactions from any other processor cannot be modified through this endpoint. Returns 404 when the transaction does not exist or is outside the authenticated account hierarchy.
- Type: string · Transaction Id
transaction _id requiredThe ID of the transaction to edit
- 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
Passthrough-only transaction edit payload. Use only for PSP flows where Koard forwards EMV data and later receives the final transaction state back from the PSP.
Partial-update semantics: omitted fields and fields set to null are preserved (unchanged). Only fields with an explicit non-null value are updated. A provided breakdown fully replaces the existing breakdown — sub-amounts are not merged.
- Type: integer | null · Authorized Amount
Replacement authorized amount in cents.
- Type: object · TransactionEditBreakdown nullable
breakdown Replacement breakdown used when editing passthrough transactions.
- Type: integer | null · Refunded
refunded Replacement cumulative refunded amount in cents.
- Type: integer | null · Reversed
reversed Replacement cumulative reversed amount in cents.
- Type: string · TransactionStatusenum nullable
status Current status of a transaction. The
surcharge_pendingstatus indicates the transaction is awaiting cardholder confirmation of a surcharge via the confirm endpoint.surcharge_declined_by_payermeans the cardholder rejected the surcharge and the transaction was canceled.valuespending authorized captured settled declined
- Type: string | null · Status Reason
status _reason Replacement status reason for the transaction.
- application/json
400 Validation failed
401 Transaction edits are not allowed for this processor
404 Transaction not found or not accessible
- application/json
curl 'https://api.uat.koard.com/v1/transactions/{transaction_id}' \
--request PUT \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-koard-apikey: YOUR_SECRET_TOKEN' \
--data '{
"status": "pending",
"status_reason": null,
"authorized_amount": null,
"breakdown": {
"subtotal": 1,
"taxAmount": 0,
"taxRate": 0,
"tipAmount": 0,
"tipRate": null,
"tipType": null
},
"refunded": null,
"reversed": null
}'
{
"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
}
