Both paths require asynchronous mandate approval before you can charge the payment method. Completing checkout is different from receiving approval.
1. Prepare your integration
Use a test secret API key on your server and configure webhooks to receive enrollment and payment results. Checkout Sessions for this payment method require an organization configured for Mexico and currencyMXN.
Send Fintoc-Version: 2026-02-01 on API requests. The Node examples use the official fintoc SDK, and the Python examples use the official fintoc package. The Node SDK uses your organization’s default API version, which must be 2026-02-01 or later for these examples. See Authentication for API version selection.
Every payment method belongs to a Customer. For the API path, create a customer first and use its id. For Checkout Sessions, send an existing customer ID or customer_data to create one during session creation. The examples below use customer_data. For later sessions with the same billing customer, send its customer ID instead of creating it again. Repeating a tax ID in customer_data returns a conflict.
When a setup or subscription Checkout Session offers Mexican direct debit, Fintoc takes the holder’s contact details from the Customer. Don’t send customer_email or customer_phone together with customer or customer_data in that session. The request returns 400 Bad Request with error.code set to mutually_exclusive_params, and param names the extra field.
For the API path, the account holder must have an email and a phone number. Provide them in mx_direct_debit.account_holder.email and mx_direct_debit.account_holder.phone, or omit either field to use the Customer’s email or phone. If a value is missing from both the request and the Customer, enrollment returns 400 Bad Request with missing_parameter, and param names the missing field, for example mx_direct_debit[account_holder][phone]. If you send mx_direct_debit.account_holder.phone, it must use E.164 format, such as +525511111111. Otherwise, the request returns 400 Bad Request with invalid_phone_number. Fintoc doesn’t check the format of a phone number it takes from the Customer.
The account holder’s identity is separate from the billing customer’s details. The holder provides a Mexican tax ID (RFC). The bank account is identified by its 18-digit standardized Mexican bank account number (CLABE).
Prepare live enrollment
Contact Fintoc to get access to the direct_debit_charges product and to configure Mexican direct debit for your organization before you use a live secret key. live enrollment and live charges require both. If your organization doesn’t have access to the product, live enrollment and charge requests return 403 Forbidden with error.code set to product_access_required. If it has access to the product but lacks the configuration, these requests return 422 Unprocessable Entity with error.code set to payment_method_type_not_available. If Fintoc suspends direct debit for your organization, these requests return 422 Unprocessable Entity with error.code set to direct_debit_suspended.
live enrollment accepts only a CLABE from a supported bank. An account at an unsupported bank returns 422 with invalid_account_for_direct_debit. The examples in this guide use test keys and sandbox fixtures; in live, send your customer’s authorized CLABE and their consent documents.
2. Enroll a payment method by API
Use this path when you collect the holder’s details and consent in your own interface. If your customer will authorize in Fintoc’s checkout, skip to Create a Checkout Session in sandbox. Send onemultipart/form-data request to Create a payment method. Replace cus_000000001 with your customer’s ID and the four file paths with your local files. The account number and RFC in this example are published sandbox fixtures.
Server
201 Created with a payment method whose mandate is pending. Save the payment method id and wait for the approval event before charging it.
The enrollment request accepts these parameters:
Provide the signed mandate as
contract, a photo of the holder with their identity document as selfie, and the front and back of that document as id_front and id_back. Each file must be a PDF, JPEG, or PNG, at least 100 bytes and smaller than 10 MiB (10,485,760 bytes). Fintoc checks the file content instead of relying only on the extension. An invalid document returns 422 and creates neither a mandate nor a payment method.
In live mode, Fintoc rejects the enrollment when the holder’s RFC or the account is blocked for direct debit. The request returns 422 with the account_blocked_for_direct_debit error code and creates neither a mandate nor a payment method. Fintoc doesn’t run this check in test mode.
The official Node and Python SDKs do not expose payment method creation with file uploads. Use the HTTP endpoint for this step. You do not send
consent_source; Fintoc assigns it from the enrollment path.3. Create a Checkout Session in sandbox
Use this path when your customer will complete enrollment in Fintoc’s checkout. Setpayment_method_types explicitly to ['mx_direct_debit'], or include card to offer both. Direct debit is available for setup and subscription sessions in test mode with MXN currency. It is not a payment method for payment flow sessions.
Save the payment method for future charges
Create a session withflow: 'setup'. This enrolls the payment method without creating a subscription or charging the customer.
Set the mandate terms in payment_method_options.mx_direct_debit. If you omit them, max_amount defaults to 1000000 cents ($10,000.00 MXN) and interval defaults to month. Supported intervals are week, month, and year. The example authorizes up to $350.00 MXN per month.
Server
201 Created. payment_method is null until the customer completes enrollment. Use redirect_url to open checkout; the public response’s session_token is null for this flow.
Create a subscription with the payment method
Create a session withflow: 'subscription'. Fintoc derives the mandate limit from the sum of each line item’s unit_amount × quantity, and derives the mandate period from recurring.interval. The example authorizes $350.00 MXN monthly.
All line items must use the same interval, and interval_count must be 1 when direct debit is available, including sessions that also offer cards. Use week, month, or year. Do not send direct debit mandate terms in payment_method_options for a subscription.
Server
201 Created. Both payment_method and subscription are null until enrollment completes. customer_data creates the billing customer. Checkout uses the customer’s RFC, email, and phone to prefill the holder details, as described in Redirect your customer to checkout.
4. Redirect your customer to checkout
Returnredirect_url from your backend and redirect the customer’s browser to it. Keep your secret key on the server.
Client
- Enters the holder’s first and last name, then completes the email, mobile phone number, and RFC that checkout didn’t prefill. The phone number can be from any country; Mexico is the default.
- Continues through identity verification, with front and back images of an Instituto Nacional Electoral (INE) voter ID and a selfie. Sandbox uses simulated documents.
- Enters a CLABE.
- Confirms the account and mandate terms, then authorizes the direct debit.
- Sees the confirmation and can download the mandate document.
Customer, and your customer can’t edit the prefilled values. Checkout prefills the RFC only when the Customer has tax_id.type set to mx_rfc and tax_id.value is a valid individual’s RFC. Checkout leaves a field empty and editable when the Customer lacks the value or the value fails the form’s validation. Because prefilled values can’t change, send an RFC, email, or phone in customer_data only when it belongs to the account holder.
Keep these enrollment rules in mind:
- A rejected identity does not create a mandate or payment method. The session’s setup intent fails with
error_reasonset toidentity_verification_failed, and the Checkout Session ends withstatusset tofinished. Your customer can’t choose another payment method in that session. - When enrollment succeeds, Fintoc saves the holder’s email and phone number to the session’s
Customerfor each value theCustomerlacks. Fintoc doesn’t overwrite existing values or copy the RFC. A failed or expired enrollment doesn’t change theCustomer. - Enrollment expires one hour after its last status change. The status changes when the customer submits the holder details, starts identity verification, and finishes identity verification. Entering the account or moving between other screens doesn’t extend the deadline. The deadline is independent of the Checkout Session’s public
expires_at. - After enrollment expires or fails for any reason other than a rejected identity, the customer cannot resume direct debit in that session. The customer can return to your site or choose another payment method if the session still allows it.
- Starting identity verification again within the same session is not supported in this release.
- When enrollment fails or expires, the session’s setup intent reports the cause in
error_reason. Useidentity_verification_failedwhen Fintoc rejects the identity,expiredwhen enrollment expires, andinternal_errorfor any other failure.
5. Handle enrollment and mandate events
Handle webhooks on your backend rather than treating the redirect tosuccess_url as proof that you can charge the payment method. Events can arrive out of order, so use the resource IDs to reconcile your stored state. Follow the webhook verification and delivery guide.
Wait for live mandate verification
A live mandate stays pending while Fintoc verifies it. Creating the payment method doesn’t approve the mandate. Fintoc runs three checks:
- Account: Fintoc sends a verification transfer to the CLABE and compares the RFC and name on the bank’s transfer receipt with the declared holder.
- Identity: Fintoc reviews the identity document and selfie against the declared holder.
- Contract: Fintoc checks that the mandate is signed and matches the holder and the mandate terms in your request.
active and Fintoc sends payment_method.activated. If a check fails, the mandate becomes rejected. If verification doesn’t finish before the approval deadline, the mandate becomes expired with verification_expired. In both cases Fintoc sends payment_method.canceled; read mx_direct_debit.error_reason for the cause, as listed in MX Direct Debit error reasons. live verification has no fixed duration.
Use Get a payment method to reconcile its current state. The mx_direct_debit.status values are pending, active, rejected, expired, and canceled. Only active permits charges.
For subscriptions, follow Manage invoices for billing and collection. Mandate activation does not itself confirm payment of the first invoice or change the subscription’s billing dates.
6. Charge the enrolled payment method
Afterpayment_method.activated, use the payment method ID to create an on-demand charge or create a subscription by API. A subscription created through checkout already has its payment method attached.
Charges must use MXN and stay within the mandate’s remaining authorized limit for the current period. Fintoc rejects a charge at creation with 422 Unprocessable Entity and one of these codes:
Charge creation and the charge result are separate. Handle the payment or invoice result webhooks before marking an order as paid. If the bank rejects a charge for exceeding a limit, the charge fails with
amount_limit_reached.
Wait for the live charge result
A successful create response means Fintoc accepted the charge, not that the bank debited the account. Fintoc submits live charges to the bank once each business day at 14:00 Mexico City time. Charges created at or after 14:00 wait for the next business day’s submission. The bank usually returns the result on the business day after submission, and it can take longer.
Fintoc fails a charge before submission if its mandate is no longer active or Fintoc suspended direct debit for your organization. Some bank failures, such as a closed account or a revoked mandate, also cancel the mandate and trigger payment_method.canceled. Fintoc doesn’t retry a failed direct debit charge automatically, including subscription invoice charges. Create another charge, or follow Manage invoices to collect a failed invoice.
Refund a direct debit charge
You can fully or partially refund asucceeded direct debit charge that Fintoc processed to a CLABE. Charges that Belvo processed don’t support refunds. Create a refund with the charge’s payment ID and set resource_type to payment_intent. Fintoc sends the refund through the Electronic Interbank Payment System (SPEI) to the mandate’s CLABE. You can’t refund a charge that has a chargeback. See Refund payments for refund statuses and how your balance funds them.
Handle live chargebacks
Direct debit chargebacks have no defense process. Fintoc creates the Dispute as lost, sends only dispute.lost, and doesn’t request supporting documents. The Dispute object has payment_method_type set to mx_direct_debit and documentation_upload_deadline set to null. Use Get a dispute to reconcile the reversal.
A chargeback blocks the holder’s RFC and the account for live direct debit with every merchant. Fintoc cancels the matching pending and active live mandates and sends payment_method.canceled with mx_direct_debit.error_reason set to chargeback to each affected merchant. New enrollments with that RFC or account return account_blocked_for_direct_debit.
Fintoc monitors your organization’s chargeback rate. If the rate exceeds the threshold Fintoc set for your organization, Fintoc suspends direct debit: new live mandates and charges return direct_debit_suspended, and charges not yet submitted to the bank fail with the same reason.
7. Download the mandate document
Call Get a payment method mandate document with your secret key to obtain a temporary download URL. This works for both enrollment paths once the contract is stored, including while the mandate ispending.
Server
download_url expires after five minutes. expires_at is an ISO 8601 datetime in UTC, and filename is the stored file’s name. Request a fresh URL when needed; do not store the URL as a permanent document link. This endpoint is not exposed by the official Node or Python SDKs.
A missing payment method, wrong organization, or wrong API key mode returns 404 with missing_resource. A payment method without a downloadable native direct debit contract returns 422 with invalid_payment_method_state, including legacy Belvo payment methods.
For checkout enrollment, Fintoc sends a confirmation email to the Checkout Session’s resolved customer email when enrollment completes, unless receipt emails are suppressed by your branding configuration. If the session’s Customer has no email, Fintoc first saves the holder’s email to the Customer, so the confirmation goes to the holder’s email. The holder email doesn’t replace an email the Customer already has. The confirmation email is not proof that the mandate is active. The widget also offers document download; it does not offer a manual email-send action.
8. Test the integration
Sandbox andlive share the API workflow, but verification and settlement differ:
Use your
test secret key and the fixtures below. Run API enrollment with local sample files, or create a Checkout Session and complete it on desktop and mobile. Verify the returned resources and received webhooks as well as the confirmation screen.
Simulate identity verification in checkout
These RFCs apply to the Checkout Session path. API enrollment accepts the consent documents you supply and does not run the checkout identity simulator.
The last three characters select the scenario. Use a 13-character individual RFC with a valid date and check digit. Retrying identity verification within the same Checkout Session is not part of this release.
Simulate mandate outcomes in either path
Use the following published sandbox CLABEs. Mandates first returnpending, then resolve asynchronously. In the Checkout Session path, enrollment succeeds when your customer authorizes, and Fintoc verifies the account on the mandate afterwards. The sandbox resolution delay defaults to five seconds; allow additional time for webhook delivery.
CLABEs ending in
1111 simulate rejection; CLABEs ending in 8888 simulate no bank response and expiry. Other valid CLABEs simulate approval. Fintoc rejects CLABEs with an invalid format or checksum, and CLABEs from unsupported banks, before enrollment.
Simulate charges
After the payment method becomesactive, create a charge within the mandate limit. Valid amounts of at least 500 MXN cents ($5.00 MXN) succeed; amounts from 100 to 499 simulate insufficient_funds. Resolution is asynchronous and defaults to five seconds in sandbox. Verify the charge result instead of only the create response.
Also verify that Fintoc rejects a charge exceeding the mandate’s remaining authorized limit with mandate_limit_exceeded. Charging a pending, rejected, or expired mandate returns payment_method_inactive, and charging a canceled mandate returns payment_method_canceled.