Mintcash
ConceptsWebhooks

Event types

Every webhook event Mintcash sends for payments, subscriptions, refunds and saved cards: when each one fires and which ones are terminal.

Every webhook's event field follows the pattern <entity>.<status>. The type field tells you what's inside data. The event field tells you which state transition fired.

Payment events (type: "payment")

EventWhen it firesTerminal
payment.pendingPSP accepted the charge, awaiting capture or 3DS completionNo
payment.authorizedA manual-capture payment was authorised and waits for your capture or void, before captureBefore (two minutes)No
payment.succeededCharge captured — fulfil the order on this eventNo¹
payment.failedCharge declined or PSP returned an errorYes
payment.partially_refundedA partial refund succeeded; further refunds are still possibleNo
payment.voidedVoided before capture, by you, by the deadline or by the provider. Nothing was chargedYes

No webhook fires when the payment row is first created — the synchronous POST /payments response covers that state. Refund events (payment.refund_created, payment.refund_processing, payment.partially_refunded, payment.refunded, payment.refund_failed) keep the payment. event prefix but are delivered with type: "refund" — see Refund events below.

¹ succeeded is not strictly terminal because the payment can still be refunded (delivered as a type: "refund" event). Once you receive a terminal event for a paymentId, no further events fire for it.

Subscription events (type: "subscription")

Subscription events mirror payment events for the underlying invoice charges, plus the lifecycle transitions of the subscription itself.

EventWhen it fires
subscription.pendingA subscription charge was accepted by the PSP, awaiting capture or 3DS
subscription.succeededFirst charge or a renewal charge succeeded
subscription.failedA subscription charge attempt failed (first charge, renewal, or retry), or a renewal was due on a blocked card and wasn't charged. A retry step that skips a blocked card sends nothing
subscription.cancelledThe subscription terminated — merchant cancel via DELETE /subscriptions/{id}, or nothing was paid by the end of the retry schedule, including after a hard decline (terminal)
subscription.payment_method_updatedThe subscription moved onto a different card through a card-update link: a customer settled a failed renewal, or replaced the card on an active subscription. On an active subscription this is the only event sent, and its payment is a card check with amount: 0

Treat subscription.succeeded after the first one as "renewal — extend the customer's access by another billingIntervalDays." The event string is the same for the first charge and every renewal, but each cycle is a distinct event with its own eventId — dedupe on eventId and count each subscription.succeeded as one cycle. data.currentPeriodStart / data.currentPeriodEnd tell you which period that charge paid for.

Refund events (type: "refund")

EventWhen it fires
payment.refund_createdA refund was requested, through the API or the dashboard
payment.refund_processingThe PSP accepted the refund and is still processing it
payment.partially_refundedA partial refund succeeded; further refunds still possible
payment.refundedThe payment is now fully refunded
payment.refund_failedA refund failed or the PSP cancelled it; the payment is unchanged

Every refund sends payment.refund_created when it starts, whether you created it with the API or someone on your team issued it from the dashboard (dashboard refunds have an externalId starting with dash_). If the PSP doesn't settle it straight away, payment.refund_processing follows. Every refund then ends with exactly one of payment.partially_refunded / payment.refunded (succeeded) or payment.refund_failed (data.status is failed or cancelled).

Webhooks can arrive out of order, so a late payment.refund_created can already show data.status: "succeeded". Act on the final events, and treat payment.refund_created and payment.refund_processing as progress updates.

Payment method events (type: "payment_method")

EventWhen it fires
payment_method.updatedA saved card changed: Mintcash blocked it after a hard decline, or lifted the block because a charge or card check on it succeeded or the card network reported a new expiry date. Also sent when the card network updates the card's details, such as after the bank reissues it

It's only sent for cards the customer saved, the ones you have a card.token for. Blocking a card that's already blocked, or clearing one that isn't, sends nothing. data.card.blocked and data.card.blockedCode give the card's current state. Some updates from the card network change nothing you can see in the payload, so treat each event as the card's current state and overwrite your copy. See the payload.

A card that isn't saved can be blocked too. You see that on the card inside subscription.failed, not through this event.

What "terminal" means in practice

When a payment hits failed or refunded, no further events will fire for that paymentId. A subscription that hits failed or cancelled is finished too, with one exception: a charge that was still in flight can report afterwards, so a subscription.failed or subscription.succeeded can arrive with data.status: "cancelled". Decide from data.status.

Use this to safely clean up state: archive the order record, close the dunning ticket, mark the customer record. You won't get any more updates about that resource.