Refund (v2)
Refund a captured transaction. The current refund endpoint. Omit amount for a full refund, or supply it to refund part of the transaction. Card-present refunds may include card_reader_data or the raw emv_card_data / emv_general_data captured at the tap.
- Type: string · Transaction Idtransaction
_id requiredID of the transaction to refund.
- enumAcceptconst:application/jsonrequired
Response format. Must be
application/json.values- application/json
- enumContent
- Type const:application/jsonrequiredRequest payload format. Must be
application/jsonwhen a body is sent.values- application/json
Refund request model. Supports card-present refunds with reader data.
- Type: integer | null · Amountamount
Refund amount in cents. If omitted, the full original transaction amount is refunded.
- Type: object · nullablecard
_reader _data Optional card reader data for card-present refunds.
- Type: string | null · Emv Card Dataemv
_card _data Raw EMV card data captured at the tap, for card-present refunds.
- Type: string | null · Emv General Dataemv
_general _data Raw EMV general data captured at the tap, for card-present refunds.
- Type: string | null · Event Idevent
_id Idempotency key. Auto-generated if omitted.
- Type: string | null · Transaction Idtransaction
_id ID of the original transaction to refund.
- application/json
- application/json
- application/json
- application/json
curl 'https://api.uat.koard.com/v2/payments/{transaction_id}/refund' \
--request POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-koard-apikey: YOUR_SECRET_TOKEN' \
--data '{
"transaction_id": null,
"amount": null,
"card_reader_data": {
"id": "",
"paymentCardData": "",
"generalCardData": "",
"outcome": 1,
"pinBypassed": false,
"isPINFallback": false
},
"event_id": null,
"emv_card_data": null,
"emv_general_data": 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"
}
