curl --request POST \
--url https://api.fintoc.com/v2/payment_methods \
--header 'Authorization: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form type=mx_direct_debit \
--form customer=cus_0ujsswThIGTUYm2K8FjOOfXtY1K \
--form 'mx_direct_debit={
"account_number": "000000000000000000",
"account_type": "clabe",
"interval": "month",
"max_amount": 100000,
"consent_documents": {
"contract": "<string>",
"selfie": "<string>",
"id_front": "<string>",
"id_back": "<string>"
},
"institution_id": "mx_banco_banorte",
"account_holder": {
"name": "Test Customer 1",
"email": "test.customer.1@example.com",
"rfc": "AAA010101AA1"
}
}'import requests
url = "https://api.fintoc.com/v2/payment_methods"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nmx_direct_debit\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer\"\r\n\r\ncus_0ujsswThIGTUYm2K8FjOOfXtY1K\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mx_direct_debit\"\r\n\r\n{\r\n \"account_number\": \"000000000000000000\",\r\n \"account_type\": \"clabe\",\r\n \"interval\": \"month\",\r\n \"max_amount\": 100000,\r\n \"consent_documents\": {\r\n \"contract\": \"<string>\",\r\n \"selfie\": \"<string>\",\r\n \"id_front\": \"<string>\",\r\n \"id_back\": \"<string>\"\r\n },\r\n \"institution_id\": \"mx_banco_banorte\",\r\n \"account_holder\": {\r\n \"name\": \"Test Customer 1\",\r\n \"email\": \"test.customer.1@example.com\",\r\n \"rfc\": \"AAA010101AA1\"\r\n }\r\n}\r\n-----011000010111000001101001--"
headers = {
"Authorization": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('type', 'mx_direct_debit');
form.append('customer', 'cus_0ujsswThIGTUYm2K8FjOOfXtY1K');
form.append('mx_direct_debit', '{
"account_number": "000000000000000000",
"account_type": "clabe",
"interval": "month",
"max_amount": 100000,
"consent_documents": {
"contract": "<string>",
"selfie": "<string>",
"id_front": "<string>",
"id_back": "<string>"
},
"institution_id": "mx_banco_banorte",
"account_holder": {
"name": "Test Customer 1",
"email": "test.customer.1@example.com",
"rfc": "AAA010101AA1"
}
}');
const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
options.body = form;
fetch('https://api.fintoc.com/v2/payment_methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fintoc.com/v2/payment_methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nmx_direct_debit\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer\"\r\n\r\ncus_0ujsswThIGTUYm2K8FjOOfXtY1K\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mx_direct_debit\"\r\n\r\n{\r\n \"account_number\": \"000000000000000000\",\r\n \"account_type\": \"clabe\",\r\n \"interval\": \"month\",\r\n \"max_amount\": 100000,\r\n \"consent_documents\": {\r\n \"contract\": \"<string>\",\r\n \"selfie\": \"<string>\",\r\n \"id_front\": \"<string>\",\r\n \"id_back\": \"<string>\"\r\n },\r\n \"institution_id\": \"mx_banco_banorte\",\r\n \"account_holder\": {\r\n \"name\": \"Test Customer 1\",\r\n \"email\": \"test.customer.1@example.com\",\r\n \"rfc\": \"AAA010101AA1\"\r\n }\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v2/payment_methods"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nmx_direct_debit\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer\"\r\n\r\ncus_0ujsswThIGTUYm2K8FjOOfXtY1K\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mx_direct_debit\"\r\n\r\n{\r\n \"account_number\": \"000000000000000000\",\r\n \"account_type\": \"clabe\",\r\n \"interval\": \"month\",\r\n \"max_amount\": 100000,\r\n \"consent_documents\": {\r\n \"contract\": \"<string>\",\r\n \"selfie\": \"<string>\",\r\n \"id_front\": \"<string>\",\r\n \"id_back\": \"<string>\"\r\n },\r\n \"institution_id\": \"mx_banco_banorte\",\r\n \"account_holder\": {\r\n \"name\": \"Test Customer 1\",\r\n \"email\": \"test.customer.1@example.com\",\r\n \"rfc\": \"AAA010101AA1\"\r\n }\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fintoc.com/v2/payment_methods")
.header("Authorization", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nmx_direct_debit\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer\"\r\n\r\ncus_0ujsswThIGTUYm2K8FjOOfXtY1K\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mx_direct_debit\"\r\n\r\n{\r\n \"account_number\": \"000000000000000000\",\r\n \"account_type\": \"clabe\",\r\n \"interval\": \"month\",\r\n \"max_amount\": 100000,\r\n \"consent_documents\": {\r\n \"contract\": \"<string>\",\r\n \"selfie\": \"<string>\",\r\n \"id_front\": \"<string>\",\r\n \"id_back\": \"<string>\"\r\n },\r\n \"institution_id\": \"mx_banco_banorte\",\r\n \"account_holder\": {\r\n \"name\": \"Test Customer 1\",\r\n \"email\": \"test.customer.1@example.com\",\r\n \"rfc\": \"AAA010101AA1\"\r\n }\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v2/payment_methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nmx_direct_debit\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer\"\r\n\r\ncus_0ujsswThIGTUYm2K8FjOOfXtY1K\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mx_direct_debit\"\r\n\r\n{\r\n \"account_number\": \"000000000000000000\",\r\n \"account_type\": \"clabe\",\r\n \"interval\": \"month\",\r\n \"max_amount\": 100000,\r\n \"consent_documents\": {\r\n \"contract\": \"<string>\",\r\n \"selfie\": \"<string>\",\r\n \"id_front\": \"<string>\",\r\n \"id_back\": \"<string>\"\r\n },\r\n \"institution_id\": \"mx_banco_banorte\",\r\n \"account_holder\": {\r\n \"name\": \"Test Customer 1\",\r\n \"email\": \"test.customer.1@example.com\",\r\n \"rfc\": \"AAA010101AA1\"\r\n }\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "pm_1zXcVbNmAsDfGhJk",
"object": "payment_method",
"created_at": "2026-01-10T11:05:00.000Z",
"customer": "cus_0ujsswThIGTUYm2K8FjOOfXtY1K",
"mode": "test",
"mx_direct_debit": {
"account_holder_id": "AAAA010101AA0",
"account_number_last4": "0000",
"account_type": "clabe",
"consent_source": "api",
"error_reason": null,
"institution": {
"country": "mx",
"id": "mx_banco_santander",
"name": "Banco Santander"
},
"interval": "month",
"max_amount": 100000,
"status": "pending"
},
"type": "mx_direct_debit"
}Create a payment method
Enrolls a Mexican direct debit mandate and returns the payment method that represents the mandate. Send the request as multipart/form-data, with the mandate fields and the four documents under mx_direct_debit[consent_documents] in the same request. Fintoc registers the mandate with the account’s bank and returns the payment method with its mx_direct_debit status set to pending. The account holder authorizes the mandate with their bank. The request is atomic. If a document is invalid, Fintoc creates nothing and returns a 422 Unprocessable Entity error. A document is invalid if it is outside the 100 bytes to 10 MB range, or is not a PDF, JPEG, or PNG.
curl --request POST \
--url https://api.fintoc.com/v2/payment_methods \
--header 'Authorization: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form type=mx_direct_debit \
--form customer=cus_0ujsswThIGTUYm2K8FjOOfXtY1K \
--form 'mx_direct_debit={
"account_number": "000000000000000000",
"account_type": "clabe",
"interval": "month",
"max_amount": 100000,
"consent_documents": {
"contract": "<string>",
"selfie": "<string>",
"id_front": "<string>",
"id_back": "<string>"
},
"institution_id": "mx_banco_banorte",
"account_holder": {
"name": "Test Customer 1",
"email": "test.customer.1@example.com",
"rfc": "AAA010101AA1"
}
}'import requests
url = "https://api.fintoc.com/v2/payment_methods"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nmx_direct_debit\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer\"\r\n\r\ncus_0ujsswThIGTUYm2K8FjOOfXtY1K\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mx_direct_debit\"\r\n\r\n{\r\n \"account_number\": \"000000000000000000\",\r\n \"account_type\": \"clabe\",\r\n \"interval\": \"month\",\r\n \"max_amount\": 100000,\r\n \"consent_documents\": {\r\n \"contract\": \"<string>\",\r\n \"selfie\": \"<string>\",\r\n \"id_front\": \"<string>\",\r\n \"id_back\": \"<string>\"\r\n },\r\n \"institution_id\": \"mx_banco_banorte\",\r\n \"account_holder\": {\r\n \"name\": \"Test Customer 1\",\r\n \"email\": \"test.customer.1@example.com\",\r\n \"rfc\": \"AAA010101AA1\"\r\n }\r\n}\r\n-----011000010111000001101001--"
headers = {
"Authorization": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('type', 'mx_direct_debit');
form.append('customer', 'cus_0ujsswThIGTUYm2K8FjOOfXtY1K');
form.append('mx_direct_debit', '{
"account_number": "000000000000000000",
"account_type": "clabe",
"interval": "month",
"max_amount": 100000,
"consent_documents": {
"contract": "<string>",
"selfie": "<string>",
"id_front": "<string>",
"id_back": "<string>"
},
"institution_id": "mx_banco_banorte",
"account_holder": {
"name": "Test Customer 1",
"email": "test.customer.1@example.com",
"rfc": "AAA010101AA1"
}
}');
const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
options.body = form;
fetch('https://api.fintoc.com/v2/payment_methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fintoc.com/v2/payment_methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nmx_direct_debit\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer\"\r\n\r\ncus_0ujsswThIGTUYm2K8FjOOfXtY1K\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mx_direct_debit\"\r\n\r\n{\r\n \"account_number\": \"000000000000000000\",\r\n \"account_type\": \"clabe\",\r\n \"interval\": \"month\",\r\n \"max_amount\": 100000,\r\n \"consent_documents\": {\r\n \"contract\": \"<string>\",\r\n \"selfie\": \"<string>\",\r\n \"id_front\": \"<string>\",\r\n \"id_back\": \"<string>\"\r\n },\r\n \"institution_id\": \"mx_banco_banorte\",\r\n \"account_holder\": {\r\n \"name\": \"Test Customer 1\",\r\n \"email\": \"test.customer.1@example.com\",\r\n \"rfc\": \"AAA010101AA1\"\r\n }\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v2/payment_methods"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nmx_direct_debit\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer\"\r\n\r\ncus_0ujsswThIGTUYm2K8FjOOfXtY1K\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mx_direct_debit\"\r\n\r\n{\r\n \"account_number\": \"000000000000000000\",\r\n \"account_type\": \"clabe\",\r\n \"interval\": \"month\",\r\n \"max_amount\": 100000,\r\n \"consent_documents\": {\r\n \"contract\": \"<string>\",\r\n \"selfie\": \"<string>\",\r\n \"id_front\": \"<string>\",\r\n \"id_back\": \"<string>\"\r\n },\r\n \"institution_id\": \"mx_banco_banorte\",\r\n \"account_holder\": {\r\n \"name\": \"Test Customer 1\",\r\n \"email\": \"test.customer.1@example.com\",\r\n \"rfc\": \"AAA010101AA1\"\r\n }\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fintoc.com/v2/payment_methods")
.header("Authorization", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nmx_direct_debit\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer\"\r\n\r\ncus_0ujsswThIGTUYm2K8FjOOfXtY1K\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mx_direct_debit\"\r\n\r\n{\r\n \"account_number\": \"000000000000000000\",\r\n \"account_type\": \"clabe\",\r\n \"interval\": \"month\",\r\n \"max_amount\": 100000,\r\n \"consent_documents\": {\r\n \"contract\": \"<string>\",\r\n \"selfie\": \"<string>\",\r\n \"id_front\": \"<string>\",\r\n \"id_back\": \"<string>\"\r\n },\r\n \"institution_id\": \"mx_banco_banorte\",\r\n \"account_holder\": {\r\n \"name\": \"Test Customer 1\",\r\n \"email\": \"test.customer.1@example.com\",\r\n \"rfc\": \"AAA010101AA1\"\r\n }\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v2/payment_methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nmx_direct_debit\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customer\"\r\n\r\ncus_0ujsswThIGTUYm2K8FjOOfXtY1K\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mx_direct_debit\"\r\n\r\n{\r\n \"account_number\": \"000000000000000000\",\r\n \"account_type\": \"clabe\",\r\n \"interval\": \"month\",\r\n \"max_amount\": 100000,\r\n \"consent_documents\": {\r\n \"contract\": \"<string>\",\r\n \"selfie\": \"<string>\",\r\n \"id_front\": \"<string>\",\r\n \"id_back\": \"<string>\"\r\n },\r\n \"institution_id\": \"mx_banco_banorte\",\r\n \"account_holder\": {\r\n \"name\": \"Test Customer 1\",\r\n \"email\": \"test.customer.1@example.com\",\r\n \"rfc\": \"AAA010101AA1\"\r\n }\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "pm_1zXcVbNmAsDfGhJk",
"object": "payment_method",
"created_at": "2026-01-10T11:05:00.000Z",
"customer": "cus_0ujsswThIGTUYm2K8FjOOfXtY1K",
"mode": "test",
"mx_direct_debit": {
"account_holder_id": "AAAA010101AA0",
"account_number_last4": "0000",
"account_type": "clabe",
"consent_source": "api",
"error_reason": null,
"institution": {
"country": "mx",
"id": "mx_banco_santander",
"name": "Banco Santander"
},
"interval": "month",
"max_amount": 100000,
"status": "pending"
},
"type": "mx_direct_debit"
}Body
Unique identifier of the customer the payment method belongs to. The customer must have an email and a phone number. Customers can't be updated yet, so if the customer is missing either one, create a new customer with both. Leave out its tax_id, which belongs to the existing customer, and send the Mexican tax ID (RFC) in mx_direct_debit[account_holder][rfc].
"cus_0ujsswThIGTUYm2K8FjOOfXtY1K"
Response
The payment method Fintoc created for the mandate. The payment method's mx_direct_debit status is pending until the account holder authorizes the mandate with their bank.
- Option 1
- Option 2
- Option 3
- Option 4
A payment method represents a customer's stored payment instrument, ready to be charged without the customer going through the full authorization flow again. The shape of the object depends on its type: the type-specific details live under a key named after the type (bank_transfer, card, mx_direct_debit, or pac).
Was this page helpful?