PlexySDK DOCS

Reversal

Learn about automatic reversals and when they occur

Reversal

A reversal voids a captured payment before it settles. Unlike refunds, reversals prevent the funds from ever being transferred, making them faster and more cost-effective.

How Reversals Differ from Refunds

AspectReversalRefund
TimingBefore settlementAfter settlement
Funds movementPreventedReversed
Processing timeSame day5-10 business days
Interchange feesAvoidedAlready charged
Customer experienceHold released quicklyFunds returned later

When Reversals Occur

Automatic Reversals

Plexy automatically triggers reversals in certain scenarios:

  1. Same-day cancellation after capture - If you cancel a payment the same day it was captured, Plexy attempts a reversal before settlement
  2. Failed settlement - If settlement fails, the capture is automatically reversed
  3. Fraud detection - If fraud is detected before settlement, Plexy may reverse the payment
  4. Compliance holds - Payments held for compliance review that are ultimately rejected

Manual Reversals

You can request a reversal for payments that haven't settled:

curl -X POST https://api.plexypay.com/v2/payments/pay_1234567890/reversals \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_id": "merchant_abc123",
    "reason": "Order cancelled before shipment"
  }'

API Endpoint

POST https://api.plexypay.com/v2/payments/{payment_id}/reversals

Request Parameters

ParameterTypeRequiredDescription
merchant_idstringYesYour merchant identifier
reasonstringNoReason for the reversal
referencestringNoYour internal reference
idempotency_keystringNoUnique key to prevent duplicates

Response

{
  "payment_id": "pay_1234567890",
  "reversal_id": "rev_0987654321",
  "status": "reversed",
  "merchant_id": "merchant_abc123",
  "amount": {
    "value": 10000,
    "currency": "KZT"
  },
  "reason": "Order cancelled before shipment",
  "reversed_at": "2026-03-25T10:30:00Z"
}

Settlement Windows

Reversals are only possible before the payment settles. Settlement timing varies:

RegionTypical Settlement Time
KazakhstanSame day (if captured before 15:00) or next business day
EuropeNext business day
US1-2 business days

Once a payment has settled, reversal is no longer possible. You must use a refund instead.

Checking Settlement Status

Retrieve the payment to check its settlement_status:

curl -X GET https://api.plexypay.com/v2/payments/pay_1234567890 \
  -H "x-api-key: YOUR_API_KEY"

If settlement_status is pending, a reversal is possible:

curl -X POST https://api.plexypay.com/v2/payments/pay_1234567890/reversals \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_id": "merchant_abc123"
  }'

If settlement_status is settled, use a refund instead:

curl -X POST https://api.plexypay.com/v2/payments/pay_1234567890/refunds \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_id": "merchant_abc123",
    "reason": "CUSTOMER_REQUEST"
  }'

Webhook Events

REVERSAL

Sent when a reversal is successfully processed.

{
  "event_type": "REVERSAL",
  "event_id": "evt_abc123",
  "created_at": "2026-03-25T10:30:00Z",
  "data": {
    "payment_id": "pay_1234567890",
    "reversal_id": "rev_0987654321",
    "merchant_id": "merchant_abc123",
    "amount": {
      "value": 10000,
      "currency": "KZT"
    },
    "status": "reversed",
    "trigger": "merchant_request",
    "reversed_at": "2026-03-25T10:30:00Z"
  }
}

REVERSAL_FAILED

Sent when a reversal attempt fails (usually because settlement already occurred).

{
  "event_type": "REVERSAL_FAILED",
  "event_id": "evt_def456",
  "created_at": "2026-03-25T10:30:00Z",
  "data": {
    "payment_id": "pay_1234567890",
    "merchant_id": "merchant_abc123",
    "error": {
      "code": "ALREADY_SETTLED",
      "message": "Payment has already settled, use refund instead"
    }
  }
}

Automatic Reversal Webhooks

When Plexy automatically reverses a payment, the webhook includes the trigger reason:

{
  "event_type": "REVERSAL",
  "event_id": "evt_ghi789",
  "created_at": "2026-03-25T10:30:00Z",
  "data": {
    "payment_id": "pay_1234567890",
    "reversal_id": "rev_0987654321",
    "merchant_id": "merchant_abc123",
    "amount": {
      "value": 10000,
      "currency": "KZT"
    },
    "status": "reversed",
    "trigger": "settlement_failure",
    "trigger_details": {
      "reason": "Acquiring bank rejected settlement",
      "original_settlement_attempt": "2026-03-25T08:00:00Z"
    },
    "reversed_at": "2026-03-25T10:30:00Z"
  }
}

Possible trigger values:

TriggerDescription
merchant_requestYou requested the reversal
settlement_failureSettlement failed
fraud_detectionFraud was detected
compliance_rejectionCompliance review rejected
same_day_cancelSame-day cancellation after capture

Error Handling

Error CodeDescriptionResolution
PAYMENT_NOT_FOUNDPayment ID does not existVerify the payment_id
ALREADY_SETTLEDPayment has already settledUse refund instead
INVALID_PAYMENT_STATEPayment not in captured stateCheck payment status
REVERSAL_NOT_SUPPORTEDPayment method doesn't support reversalUse refund

Example: Automatic Fallback to Refund

First retrieve the payment to verify its status and settlement state:

curl -X GET https://api.plexypay.com/v2/payments/pay_1234567890 \
  -H "x-api-key: YOUR_API_KEY"

If settlement_status is pending, attempt a reversal:

curl -X POST https://api.plexypay.com/v2/payments/pay_1234567890/reversals \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_id": "merchant_abc123"
  }'

If the reversal returns ALREADY_SETTLED, fall back to a refund:

curl -X POST https://api.plexypay.com/v2/payments/pay_1234567890/refunds \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_id": "merchant_abc123",
    "reason": "CUSTOMER_REQUEST"
  }'

Reversal vs Cancel vs Refund Decision Tree

Implementation: retrieve the payment status first, then issue the appropriate request.

If status is authorized, cancel:

curl -X POST https://api.plexypay.com/v2/payments/pay_1234567890/cancels \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_id": "merchant_abc123"
  }'

If status is captured and settlement_status is pending, reverse:

curl -X POST https://api.plexypay.com/v2/payments/pay_1234567890/reversals \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_id": "merchant_abc123"
  }'

If status is captured and settlement_status is settled, refund:

curl -X POST https://api.plexypay.com/v2/payments/pay_1234567890/refunds \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_id": "merchant_abc123",
    "reason": "CUSTOMER_REQUEST"
  }'

Best Practices

When possible, cancel or reverse payments before settlement to avoid interchange fees and provide faster resolution.

Know your region's settlement cutoff times to determine when reversal is still possible.

Always have refund as a fallback in case reversal fails due to timing.

Listen for REVERSAL and REVERSAL_FAILED webhooks to keep your systems synchronized.

Monitor automatic reversals to identify potential issues with your payment flow.

Viewing Reversals in Plexy Dashboard

View reversals in the Plexy Dashboard:

  1. Navigate to Payments
  2. Filter by Status: Reversed
  3. Click on a payment to see reversal details

The dashboard shows:

  • Reversal trigger (manual or automatic)
  • Original capture details
  • Reversal timestamp
  • Associated webhook events

On this page