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
  • transaction_id
    Type: string · Transaction Id
    required

    The ID of the transaction to edit

Headers
  • Accept
    enum
    const:  
    application/json
    required

    Response format. Must be application/json.

    values
    • application/json
  • Content-Type
    enum
    const:  
    application/json
    required

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

    values
    • application/json
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.

  • authorized_amount
    Type: integer | null · Authorized Amount

    Replacement authorized amount in cents.

  • breakdown
    Type: object · TransactionEditBreakdown nullable

    Replacement breakdown used when editing passthrough transactions.

  • refunded
    Type: integer | null · Refunded

    Replacement cumulative refunded amount in cents.

  • reversed
    Type: integer | null · Reversed

    Replacement cumulative reversed amount in cents.

  • status
    Type: string · TransactionStatusenum nullable

    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
  • status_reason
    Type: string | null · Status Reason

    Replacement status reason for the transaction.

Responses
  • application/json
  • 400

    Validation failed

  • 401

    Transaction edits are not allowed for this processor

  • 404

    Transaction not found or not accessible

  • 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": 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
}