Rápido Pagos

Webhook events

The events that your organization's webhook endpoint receives, and how to apply them.

Each change to a subscription, an invoice, a payment, a saved card or an e-CF sends an event to your organization's webhook endpoint. An owner or admin sets the endpoint in the Webhooks section of the dashboard. The WebhookEvent schema of the API reference declares every event type and its data.

The envelope

Each event is a POST with this JSON body.

{
  "id": "9b2e7c41-5d8a-4f3e-b6c1-0a4d2e8f7b19:created",
  "type": "subscription.created",
  "createdAt": "2026-10-15T14:02:11.000Z",
  "data": {}
}
  • id is the event ID. The service builds it from the fact that the event reports, so every delivery of one event carries the same ID.
  • type is one of the event types below.
  • createdAt is the time of the change.
  • data is the object that the event type lists.

The x-hub-signature header carries the HMAC-SHA256 hex digest of the raw body, keyed with your organization's webhook secret, as for the payment notice. Verify the signature before you trust the event.

Event rules

  • Answer with a 2xx status within 10 seconds. Any other answer, or no answer, is a failed try.
  • The service tries the delivery right after the change. After a failed try, it tries again 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours later, then every 12 hours. An event that is not delivered 3 days after its createdAt is no longer sent.
  • A delivery can come more than once, and events can come in a different order than their changes. Store the id of each event that you applied, and ignore an event whose id you already applied.
  • Apply the subscription in an event only when its version is newer than the version that you hold. A lower or equal version is an older state of the subscription.
  • Apply an invoice by its status. An invoice that is paid, void or uncollectible does not change again.
  • Apply an e-CF by its status, buyerDelivery and commercialApproval. A final status and the end of a delivery do not change again, and a commercial approval changes only to conflicting.
  • After release 5.0.0, a new event type of a surface that your organization already receives is a major change of the API. The event types of a new surface, such as electronic invoicing, arrive with that surface in a minor release.

Event types

TypeEvent IDdata
subscription.created{subscriptionId}:createdThe subscription
subscription.activatedThe ID of the status changeThe subscription
subscription.past-dueThe ID of the status changeThe subscription
subscription.pausedThe ID of the status changeThe subscription
subscription.canceledThe ID of the status changeThe subscription
subscription.updated{subscriptionId}:v{version}The subscription
subscription.trial-will-end{subscriptionId}:trial-will-end:{trialEnd}The subscription
invoice.paid{invoiceId}:paidThe invoice
invoice.payment-failed{checkoutId}:declined, the checkout of the declined saleThe invoice
checkout.expired{checkoutId}:expiredThe checkout
payment.refunded{refundId}:succeededThe refund
payment-method.expiring{paymentMethodId}:expiring:{expiration}The saved card
ecf.accepted{ecfId}:accepted or {ecfId}:conditionally-acceptedThe e-CF
ecf.rejected{ecfId}:rejectedThe e-CF
ecf.errored{ecfId}:erroredThe e-CF
ecf.delivered{ecfId}:deliveryThe e-CF
ecf.delivery-refused{ecfId}:deliveryThe e-CF
ecf.delivery-failed{ecfId}:deliveryThe e-CF
ecf.commercial-approval-received{ecfId}:commercial-approval:{decision}The e-CF
received-ecf.created{receivedEcfId}:createdThe received e-CF
received-ecf.not-verified{receivedEcfId}:not-verifiedThe received e-CF
received-ecf.commercial-approval-sent{receivedEcfId}:commercial-approvalThe received e-CF
received-ecf.commercial-approval-failed{receivedEcfId}:commercial-approvalThe received e-CF
ecf-cancellation.accepted{cancellationId}:acceptedThe cancellation
ecf-cancellation.partially-accepted{cancellationId}:partially-acceptedThe cancellation
ecf-cancellation.rejected{cancellationId}:rejectedThe cancellation
ecf-issuer.certificate-expiring{issuerId}:certificate-expiring:{serialNumber}:{days}The issuer
ecf-sequence.running-low{sequenceId}:running-lowThe range
ecf-sequence.expiring{sequenceId}:expiringThe range

A paid sign-up sends subscription.created and invoice.paid, and no subscription.activated. Each later status change sends the event of the new status, a change of statusReason inside past-due included. Every other change of a field that the subscription shows sends subscription.updated.

The subscription

data is the subscription as GET /subscription/{id} returns it, at the version that the change produced.

  • status: trialing, active, past-due, paused or canceled. canceled is final.
  • statusReason and endReason: payment-approved, trial-started, payment-declined, payment-method-invalid, payment-method-missing, processor-setup, dunning-exhausted, hard-decline, trial-ended-without-payment-method, cancel-requested, pause-requested or sign-up-abandoned.
  • endInitiator: customer, merchant or system.
  • cancellationReason: too-expensive, missing-features, switched-service, unused, customer-service, low-quality, too-complex or other.
  • recurringInterval: week, month or year. onDunningExhausted and trialEndBehavior: cancel or pause.
  • paymentMethod: null, or the default card with id, brand, maskedPan, expiration (YYYYMM) and status (active, invalid or deleted).

The invoice

data is the invoice as GET /invoice/{id} returns it, with its subscriptionId, its lines and its payments. It carries no version.

  • reason: subscription-start, trial-end, renewal, update or resume.
  • status: open, paid, void or uncollectible.
  • heldReason: null, unknown-sale or processor-setup. A held invoice stays open.
  • Amounts are in cents of the subscription currency, ITBIS included. chargedAmount is in DOP cents.
  • Each payment carries paymentId, processorReference, chargedAmount, approvedAt and its refunds. Each refund carries id, amount, itbis, kind (refund or void), status (pending, succeeded, failed or unknown) and createdAt.

The checkout

data of checkout.expired is the checkout's id, status (expired), customer, items, amount, currency, metadata and subscriptionIntent. Nobody paid the checkout, and no card was charged.

subscriptionIntent is null for a one-off checkout. For a sign-up, it is the subscription that the payment would have started (recurringInterval, externalId, onDunningExhausted, metadata, trialDays and trialEndBehavior).

The refund

data of payment.refunded is the refund with its paymentId and its processorReference.

The saved card

data of payment-method.expiring is the card with its customerId and the subscriptionIds that it pays.

The e-CF

data of an ecf.* event is the e-CF as GET /ecf/{id} returns it (see Follow an e-CF).

  • status: pending, signed, submitted, accepted, conditionally-accepted, rejected or errored. The last four are final. ecf.accepted covers both acceptances, and status tells them apart.
  • buyerDelivery.status: pending, not-applicable, not-electronic, acknowledged, refused or failed. ecf.delivery-refused carries the receptor's code in buyerDelivery.reason.
  • commercialApproval: the buyer's decision (approved, rejected or conflicting), its reason and receivedAt. conflicting means that two approvals with different decisions arrived.
  • Amounts are in DOP cents.

The received e-CF

data of a received-ecf.* event is the received e-CF as GET /received-ecf/{id} returns it (see Receive e-CF).

  • dgiiVerification: pending, verified, rejected, not-found or not-available. Only a verified e-CF counts as the e-CF that the DGII holds.
  • commercialApproval.status: null before your decision, then pending, sent, failed or not-required.

On this page