Skip to main content
Cancelling a debt that changed during the cancellation

Changes that can affect your integration

  • POST /debts/{id}/cancel: if the debt is paid or goes into debit right before the cancellation, it is no longer cancelled. It returns 422 BUSINESS_RULE_VIOLATION (before, 200 with the debt in PAID, or in CANCELLED if it was going into debit), and 409 RESOURCE_CONFLICT if it is a recurring debt that was left paid and active: retry to cancel it. It is the same rule POST /debts/cancel already applied. See Debts.
Payment methods: active adhesions of each method

What’s new

  • include=activeAdhesionsCount in GET /payment-methods: each method carries activeAdhesionsCount, the number of active adhesions with that method. They are the ones that get cancelled if you delete it; with more than 10, the deletion is rejected with 422 and the count still shows the total. See Active adhesions of each method.
  • No changes for your current integration: without the parameter, the response is the same as always.
CoDi in the SDKs

New

  • CoDi in the payment methods filter: CODI in paymentMethods of the web SDK (@npmtapi/embed 1.12.0) and the Android and iOS SDKs (0.3.0), and codi in the channel’s payment.methods@1. If you validate these values against a closed list, add them. See Payment methods SDK and App ↔ SDK channel.
  • CoDi events on web: codiPhoneFilled and codiPaymentSubmitted in tapipay.on (onCodiPhoneFilled and onCodiPaymentSubmitted in React), and the TAPIPAY_CODI_PHONE_FILLED and TAPIPAY_CODI_PAYMENT_SUBMITTED messages if you listen to the postMessage events. See Payment methods SDK and postMessage events.
  • CoDi events in the native SDKs: CodiPhoneFilled / .codiPhoneFilled (the user entered a valid phone number, last 4 digits only) and CodiPaymentSubmitted / .codiPaymentSubmitted (Tapipay sent the payment request to the user’s bank; it is not the settlement). On iOS, if your switch event has no @unknown default, add it. See Mobile SDK.
  • Android and iOS need 0.3.0: an earlier version rejects CODI and codi. On web the current checkout is enough; @npmtapi/embed 1.12.0 adds the TypeScript types.
Orders and order webhooks

What’s new

  • Orders page: how an order is created depending on the payment method, the order payment methods (BANK_ACCOUNT, CODI and DIRECT_PAYMENT), which notices you receive and its statuses.
  • source field: the order creation and payment webhooks and the payment method registered one carry source: "TAPIPAY".
  • paymentMethod always present in order creation: if there is no payment method, it arrives empty ({}) instead of not coming. It can carry details with additional data of the method.
  • additionalData never arrives as null, and it is added to the payment method registered webhook (empty for now).
If you validate the payload against a closed list of fields, add source and additionalData.
Contacts: payment portal link

What’s new

  • Contacts return paymentUrl: the URL of the payment portal with the contact’s debts, so you can share it with the debtor as soon as you create the contact. It comes in POST /contacts and GET /contacts/{id}, and can be null if the portal integration fails. The list (GET /contacts) and PATCH /contacts/{id} do not return it. It is a new field, so your current integration does not change. See Payment portal link.
Asynchronous payment orders

What’s new

  • POST /v2/debts/orders/async: creates a payment order without waiting for it to exist. It responds 200 with your externalOrderId and the result reaches you through the order creation webhook. It also accepts currency and webhookMetadata, which comes back in additionalData of the order’s webhooks. See Payment orders.
App ↔ SDK channel

What’s new

  • App ↔ SDK channel: two-way communication between your app and the open checkout, in the web SDK and in the Android and iOS SDKs. The checkout announces in a handshake (hello) the capabilities enabled for your organization and answers every piece of data you send with ack or with an error with a code. See App ↔ SDK channel.
  • v1 capabilities: domiciliation.prefill@1 (CLABE and account holder prefill, also with the checkout open) and payment.methods@1 (limit payment methods) are enabled per organization, on request. payment.submitted@1 (arrives with status: "pending") and payment.cancelled@1 (the user closed the checkout without paying, native SDKs only) are on by default.
  • Web SDK @npmtapi/embed 1.10.0: adds tapipay.channel. For the web channel to open, declare with Tapipay the exact origins of the pages that embed the widget. See Channel with the checkout.
  • Android SDK la.tapipay.ui:button:0.2.0 and iOS SDK 0.2.0: add Tapipay.presentWithChannel() (Android) and Tapipay.channel (iOS). On iOS, if you pinned the Up to Next Minor Version rule from 0.1.0, raise it to 0.2.0 to get this version. See Mobile apps SDK.
  • No changes for your current integration: the channel is optional. Without a channel (older SDK or an organization without the capability) everything works as before, with the usual events and the domiciliationPrefill and paymentMethods opening options. On Android, the channel does not open in WebViews without WEB_MESSAGE_LISTENER support.
Order creation webhooks

What’s new

  • ORDER_CREATION_SUCCESS and ORDER_CREATION_FAILED webhooks: notify you every time an order is created or its creation fails, with the reason in creationError when it fails. They share the endpoint and security with the payment order events and the payment method registered event. See Order creation.
Cancel debts in a batch

What’s new

  • POST /debts/cancel: cancels up to 50 debts in one request, with the same rule as POST /debts/{id}/cancel. It returns 200 if every debt was cancelled, 207 if some were, 422 if none was, and 500 if none could be confirmed because of a failure on our side. Retrying the same batch is safe. See Update and cancel.
Payment links: filter payment methods

What’s new

  • POST /payment-links accepts paymentMethods (optional): it limits the methods the payer sees on the link’s portal to the ones you asked for and that your organization has enabled. If you do not send it, every enabled method is still offered, so your current integration does not change. See Filter payment methods.
  • The link always returns paymentMethods: the filter, or null if the link has none. It comes in the creation, reads, the list, the PATCH, and the cancellation.
  • PATCH /payment-links/{id} accepts paymentMethods and successUrl, in addition to description, expiresAt, and metadata. null in either one clears it; in paymentMethods, it removes the filter. See Update without invalidating the URL.
  • Two new values in the payment methods enum: DIRECT_DEBIT and BBVA_PAY_BY_BANK. It is the same paymentMethods enum used by links and subscriptions. If you validate these values against a closed list, add them. See Payment methods.
User payment methods

What’s new

  • GET /payment-methods: lists the payment methods a user registered. Each method carries its externalPaymentMethodId (the identifier POST /v2/debts/orders/async accepts), whether it is the default one, and a summary of the account in bankAccount: account type (BANK_ACCOUNT for a CLABE or DEBIT_CARD for a debit card), bank code and name, and last four digits, so the user can tell their methods apart. See Query a user’s payment methods.
  • DELETE /payment-methods/{externalPaymentMethodId}: deletes one of the user’s methods and cancels the adhesions that used it. If it was the default one, the most recent of the remaining methods becomes the default. See Delete a payment method.
Payment method registered webhook

What’s new

  • PAYMENT_METHOD_REGISTERED webhook: notifies you when a user registers their bank account, with the externalPaymentMethodId you need to charge it. It reaches the same URL as the payment order events. See Payment method registered.
Adhesions, recurring debts and cancellation
This version adds the per-product adhesion endpoints, recurring debts, and fixed or open amounts, and adjusts debt cancellation. Review the changes that can affect your integration first.

Changes that can affect your integration

  • POST /debts/{id}/cancel: cancelling a debt that is already cancelled now returns 200 with the debt in CANCELLED (it used to return 422 BUSINESS_RULE_VIOLATION). If your code used that 422 to detect a double cancellation, adjust it. See Debts.
  • POST /debts/{id}/cancel: if the cancellation was requested but the debt is still active, it returns 409 RESOURCE_CONFLICT instead of 200. See Debts.
  • POST /v2/debts: the creation response includes the new recurring field (false by default). If you validate the response against a closed list of fields, add it. See Debts.
  • AUTO_DEBIT_FAILED webhook: includes the new attemptNumber field with the charge attempt number. If you validate the payload against a closed list of fields, add it. See Failed bank debit.
  • Every debt response (POST /v2/debts, GET /debts, GET /debts/{id}, PATCH /debts/{id}, and POST /debts/{id}/cancel) includes the new amountType field (CLOSED or OPEN). If you validate the response against a closed list of fields, add it. See Fixed or open amount.

What’s new

  • Fixed or open amount: POST /v2/debts accepts the optional amountType field (CLOSED by default, or OPEN so the debtor chooses the amount). It takes precedence over allowPartialPayments, and in an OPEN debt amountPaid is the sum of the payments received. See Fixed or open amount.
  • Per-product adhesion: POST /adhesions subscribes a user to a product (or reactivates the adhesion) and POST /adhesions/cancel cancels it. There are new error codes: NO_ACTIVE_PAYMENT_METHOD and COMPANY_WITHOUT_PRODUCT_MODALITY (422). See Direct debit and Error handling.
  • Recurring debts: POST /v2/debts accepts the optional recurring field (boolean, default false). A recurring debt keeps being offered to the debtor after a payment, and each payment is added to the same debt. See Recurring debts.
  • Cancelling recurring PAID debts: a recurring debt in PAID can be cancelled with POST /debts/{id}/cancel. PAID debts that are not recurring still return 422 BUSINESS_RULE_VIOLATION.
  • amountPaid on recurring debts: it is the larger of the amount settled according to the status and the sum of the payments received, so it can exceed amount.
Direct debit per product
Direct debit is no longer triggered when you create a debt. It is now managed per product, with POST /adhesions and POST /adhesions/cancel. If your integration reads the POST /v2/debts response to find out whether automatic collection was enabled, this change affects you.

Changes that may affect your integration

  • POST /v2/debts no longer returns autopay, autopayReason or autopayInstrument. Creating a debt no longer evaluates or requests direct debit, so those three fields have nothing to report. If your code reads them, stop before this release: autopay becomes undefined, and a check like if (!debt.autopay) starts returning true every time.
  • autopayReason is gone along with all of its values, including NO_PRODUCT. If you validate it against a closed list, you can drop that validation.
  • GET /debts and GET /debts/{id} are unchanged: they still return autopay, which is a flag on the debt itself and never meant “there is an active direct debit agreement”.

What to do instead

Creating a debt and enrolling in direct debit are now two separate things:
  1. You create the debt with POST /v2/debts, same as before.
  2. You subscribe the user to the product with POST /adhesions and unsubscribe them with POST /adhesions/cancel. See Subscribe and unsubscribe a product.
If a debt belongs to a product the user is already enrolled in, it is collected automatically. If not, it is paid through its paymentUrl, same as before.
API contract revision
This version makes input validation stricter and fixes several responses so they match what is documented. Review the list of changes that can affect your integration first.

Changes that can affect your integration

These are changes where a request that used to pass (or returned 5xx) now returns 4xx, or where a response value your code might be reading changes.
  • Strict booleans in POST /v2/debts and POST/PATCH /subscriptions: allowOverduePayment, allowPartialPayments, autopay, and enforcePaymentOrder only accept true/false. "true", 1, etc. return 400 with details[]. description must be a string (400). See API conventions.
  • additionalData in POST /v2/debts, POST /payment-links, and POST/PATCH /subscriptions: it must be a flat object and cannot use reserved keys (description, paymentMethods, productName, etc.). Otherwise, 400. See API conventions.
  • POST /payment-links: an externalClientId that does not match a contact returns 422 BUSINESS_RULE_VIOLATION (the link used to be created anyway). See Payment links.
  • POST/PATCH /payment-links: expiresAt must be an RFC 3339 date-time (2026-12-31 23:59 or a date alone return 400). In the PATCH, expiresAt: null returns 400 (it used to be 500; links always expire), metadata null or not an object returns 400, and an empty description returns 400. See Payment links.
  • PATCH /subscriptions/{id}: validates types, the paymentMethods enum, and the exclusion between autopay: true and paymentMethods (400). A CANCELLED or ENDED subscription returns 422 (it used to be 200). See Subscriptions.
  • POST /subscriptions: intervalUnit is case-sensitive (MONTH returns 400) and, if the scheduling is invalid, neither the product nor the inline contact is created. See Subscriptions.
  • PATCH /contacts/{id}: phones: [] returns 400 (it used to be 200 with no effect). See Contacts.
  • GET /contacts: identifier and externalClientId with different values return 400. See Contacts.
  • GET /products: an active value other than true/false returns 400 (it used to be read as false). See Products.
  • GET /payment-links: createdAtFrom/createdAtTo with an invalid format return 400 (they used to be compared as text). See Payment links.
  • GET /subscriptions: externalClientId now filters (it used to be ignored and returned subscriptions of other contacts). Empty or blank returns 400. See Subscriptions.
  • GET /debts/{id}, PATCH /debts/{id}, POST /debts/{id}/cancel: a canceled debt can be read (200, status: CANCELLED); canceling it again or sending a PATCH returns 422 (it used to be 404). See Debts.
  • POST /v2/debts: new value autopayReason: "NO_PRODUCT". If you validate autopayReason against a closed list, add it. See Direct debit.
  • Dates in contacts, debts, and link payments: date-time values are returned in UTC with milliseconds and Z (2026-09-24T21:09:41.835Z). They used to come without a zone, with +00:00, or with microseconds. See API conventions.
  • PATCH /debts/{id}: dueDate in the response becomes YYYY-MM-DD (it used to be a date-time). See Debts.
  • POST /payment-links without a debtor: paymentUrl becomes the short URL (it no longer contains the identifierValue) and can be null if its generation fails. Treat it as an opaque URL. See Payment links.
  • Payment links, every response: expiresAt is always returned in UTC with milliseconds and Z (2026-12-31T23:59:59.000Z), even if it was sent with an offset (-06:00). Older links stored with a date alone (2026-12-01) come out as the start of that UTC day (2026-12-01T00:00:00.000Z). See Payment links.
  • Payment links without an external key, all responses: externalPaymentLinkId is null when the link was created without externalPaymentLinkId or an Idempotency-Key header (it used to return a plk_<uuid> value equal to the paymentLinkId). See Payment links.
  • GET /debts and GET /payment-links/{id}/payments: createdAtTo as a date alone now includes that day (it used to filter up to its start). If you sent the next day to compensate, you now get one extra day. createdAtFrom later than createdAtTo returns 400 with the message createdAtFrom must be earlier than or equal to createdAtTo. See Debts.

Fixes

  • PATCH /debts/{id} and PATCH /subscriptions/{id}: the PATCH no longer resets allowPartialPayments to false, and amountPaid comes out correctly (not null). See Debts.
  • GET /debts/{id} and GET /debts: description appears in reads. See Debts.
  • POST /v2/debts and POST /subscriptions: contact.contactId comes with the con_ prefix also when the contact is created inline. See Direct debit.
  • GET /contacts: identifier filters, and contactCode accepts the con_ prefix. See Contacts.
  • Contacts: contacts without an email created inline return email: null (it used to be the text "null"), also when reading existing ones. See Contacts.
  • GET /payment-links?externalPaymentLinkId=: no longer returns 500. See Payment links.
  • POST /payment-links: a repeated externalPaymentLinkId returns 409 without creating the debt. A link with a debtor no longer fails with 500 if the portal configuration does not respond. See Payment links.
  • PATCH /payment-links/{id}: expiresAt also updates the due date of the link’s debt. If that debt was already cancelled, only the link is updated (the PATCH used to fail). See Payment links.
  • Payment link response: always carries externalPaymentLinkId, expiresAt, successUrl, metadata, identifierValue, contact, and product, with null when there is no value. See Payment links.
  • POST /products: returns what was stored (timestamps, externalProductId, active) instead of echoing the request. See Products.
  • PATCH /products/{id}: active: false deactivates the product; renaming to a name already in use, including one used by an inactive product, returns 409 (it used to be 500); invalid types return 400 (they used to be 500). See Products.
  • POST /subscriptions: paymentUrl is no longer null, and scheduling.billingDay is inferred from startDate (for month and year). See Subscriptions.
  • GET /debts and GET /payment-links/{id}/payments: createdAtFrom/createdAtTo accept an RFC 3339 date-time in addition to a date. The same date in both returns that day’s debts (it used to be 400), and a future createdAtFrom without createdAtTo returns an empty page (it used to be 400). See Debts.
  • PATCH of contacts, products, payment links, subscriptions, and debts: companyCode in the body is taken as context and is no longer rejected as a non-editable field. See API conventions.
  • POST /v2/debts (batch): each error in details[] carries field. See Direct debit.
  • PATCH /debts/{id}: impossible dates (2026-02-30) return 400. See Debts.
  • POST /v2/debts, POST /payment-links, and subscriptions: additionalData sent as an object is stored on the debt (it used to be lost in debts and links). See API conventions.
  • PATCH /subscriptions/{id}: if updating one of the subscription’s debts fails, the response is 207 with error.code: PARTIAL_UPDATE (it used to be 500 INTERNAL_ERROR). The subscription is updated. See Subscriptions.
  • paymentUrl in debts, subscriptions and payment links: if your company has no private links configuration, paymentUrl is no longer null: it returns your company’s portal URL. Still treat it as an opaque URL. See Debts.