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.

Path Parameters

  • The ID of the transaction to edit

Headers

  • Response format. Must be application/json.

  • Request payload format. Must be application/json when a body is sent.

Body·

required
application/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.

  • Replacement authorized amount in cents.

  • Replacement breakdown used when editing passthrough transactions.

    Properties: 6
  • Replacement cumulative refunded amount in cents.

  • Replacement cumulative reversed amount in cents.

  • Current status of a transaction. The surcharge_pending status indicates the transaction is awaiting cardholder confirmation of a surcharge via the confirm endpoint. surcharge_declined_by_payer means the cardholder rejected the surcharge and the transaction was canceled.

    values
    • pending
    • authorized
    • captured
    • settled
    • declined
    • refunded
    • reversed
    • canceled
    • error
    • surcharge_pending
    • surcharge_declined_by_payer
  • Replacement status reason for the transaction.

    values
    • approved
    • declined
    • surcharge_expired
    • surcharge_pending
    • surcharge_declined_by_payer
    • merchant_blocked
    • merchant_not_found
    • unauthorized_terminal

Responses

  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/v1/transactions/{transaction_id}
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": "approved",
  "authorized_amount": null,
  "breakdown": {
    "subtotal": 1,
    "taxAmount": 0,
    "taxRate": 0,
    "tipAmount": 0,
    "tipRate": null,
    "tipType": "fixed"
  },
  "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": "approved",
  "subtotal": 1,
  "surcharge_amount": null,
  "surcharge_applied": false,
  "surcharge_rate": null,
  "tax_amount": null,
  "tax_rate": null,
  "tid": "string",
  "tip_amount": null,
  "tip_type": "fixed",
  "total_amount": 1,
  "transaction_id": "string",
  "transaction_type": null,
  "surcharge_basis": "total",
  "surcharge_confirmation_required": null,
  "tax_basis": "total",
  "device_type": null,
  "psp": null,
  "surcharge_source": "transaction",
  "tax_source": "transaction",
  "terminal_details": null,
  "tip_capture_mode": "tip_at_sale"
}