Reverse (v2)

Reverse an authorization. The current reversal endpoint. Omit amount to reverse the full authorization, or supply it to reverse part of it. When an authorization is reversed to 0 the transaction status becomes canceled.

Path Parameters
  • transaction_id
    Type: string · Transaction Id
    required

    ID of the authorization to reverse.

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

Reversal payload using the enhanced breakdown. Omit amount to reverse the full authorization; supply it to reverse part of it.

  • amount
    Type: integer | null · Amount

    Amount to reverse, in cents. Omit to reverse the full amount.

  • breakdown
    Type: object · nullable

    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.

  • event_id
    Type: string | null · Event Id

    Optional UUID4 for idempotency.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v2/payments/{transaction_id}/reverse
curl 'https://api.uat.koard.com/v2/payments/{transaction_id}/reverse' \
  --request POST \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'x-koard-apikey: YOUR_SECRET_TOKEN' \
  --data '{
  "amount": null,
  "breakdown": {
    "subtotal": 1,
    "taxAmount": null,
    "taxRate": null,
    "tipAmount": null,
    "tipRate": null,
    "tipType": "fixed",
    "surcharge": {
      "amount": null,
      "percentage": null,
      "bypass": false
    }
  },
  "event_id": 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"
}