PaymentsPayment operationsCancel

Cancel

Void an authorization before capture, releasing the reserved hold immediately.

View as MarkdownInstall skills

A cancellation voids an authorization before any funds are captured. The pending hold on the customer's card is removed immediately — no settlement entry is created and no processing fee is incurred.

Use a cancellation when:

  • An order is cancelled before it ships.
  • A customer switches to a different payment method.
  • A pre-authorization adjustment flow is abandoned.

Use a refund if any amount has already been captured. Use a reversal if the payment was captured but has not yet settled.

Cancel via APIAsk

import { Vinr } from '@vinr/sdk';

const vinr = new Vinr({ secretKey: process.env.VINR_SECRET_KEY });

const cancellation = await vinr.payments.void('pay_3Nf8x2a');

// cancellation.status → "cancelled"
curl -X POST https://api.vinr.com/v1/payments/pay_3Nf8x2a/void \
  -H "X-Api-Key: $VINR_SECRET_KEY"

A cancellation only succeeds while the payment is in authorized status. If any amount has been captured, the call returns 400 with code already_captured.

Cancel in VINR DashboardAsk

  1. Go to Dashboard → Payments.
  2. Open the payment.
  3. Select Cancel authorization and confirm.

The payment status moves to cancelled immediately.

Partial cancellationAsk

Card schemes do not support partial voids on most rails. To release part of a hold, capture the amount you intend to keep — the uncaptured remainder is released automatically. See Capture → Partial captures.

WebhooksAsk

EventWhen it fires
payment.cancelledAuthorization successfully voided.
const event = vinr.webhooks.verify(rawBody, req.headers['x-vinr-signature']);

if (event.type === 'payment.cancelled') {
  const { paymentId } = event.data;
  await markOrderCancelled(paymentId);
}

Next stepsAsk

Was this page helpful?
Edit on GitHub

Last updated on

On this page