Inbound transfers
Automatically track and reconcile your incoming payments in real time.
This API is available only for Mexico for the moment.
To start using Fintoc's incoming Transfer API, you just need to create an account on our Dashboard and follow these five steps:
- Get your test API Keys
- On your backend, create an
AccountNumber
โor a SPEI CLABEโ using your Secret key - Create a
WebhookEndpoint
to handle incoming transfer events - Receive a transfer at the created
AccountNumber
and get notified in real-time
The following diagram shows how Fintoc will interact with you and the counterparty creating the payin.
Step 1: Get your test API Keys
Every interaction with the Fintoc API must be authenticated with the API Keys of your Fintoc account. If an interaction does not include your API Key or includes an incorrect API Key, Fintoc will return an error.
Every Fintoc account has two key pairs: one corresponds to the test mode and the other to the live API environment. Every resource is stored either in test mode or in live mode, and resources from one environment cannot be manipulated by resources from the other environment.
Your API Keys will be available in the Dashboard. First, you need to create an account on the Fintoc Dashboard. Once your Fintoc account has been created, you will be able to get your API Keys. In this case, you must use the Secret Key from test mode. We added the prefix sk_test_to quickly identify it.
Step 2: Create an Account Number (SPEI CLABE)
An AccountNumber
represents a SPEI CLABE. You can think of an account number as a reference that you can assign to a customerโor orderโ to easily reconcile your incoming payments. Companies usually assign one Account Number per customer so that when they receive a transfer to that Account Number, they automatically know that it comes from that specific customer.
Account number limit
By default, you can create up to 10,000 Account Numbers per organization. If you need to create more than 10,000 Account Numbers, contact your sales rep.
Attach arbitrary key-value data to your account number
When you create an account number, you can attach arbitrary key-value data to it using the Metadata object. You can use metadata to store your unique identifier for that account number, such as your internal customer ID. When you receive an inbound transfer, the metadata object will be attached so you can easily reconcile the transfer against your internal records.
Example
Using your test Secret Key, create an AccountNumber
from your backend, attaching an internal customer ID id_cliente
:
curl --request POST \
--url https://api.fintoc.com/v1/account_numbers \
--header 'Authorization: sk_test_9c8d8CeyBTx1VcJzuDgpm4H' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"metadata": {
"id_cliente": "12343212"
}
}
'
The response should look like this:
{
"id": "acno_Kasf91034gj1AD",
"object": "account_number",
"account_number": "738969123456789120",
"created_at": "2024-03-01T20:09:42.949787176Z",
"mode": "test",
"metadata": {
"id_cliente": "12343212"
}
}
Step 3: Create a Webhook Endpoint to handle inbound transfer events
Whenever you receive an inbound transfer, Fintoc will send you transfer.inbound_received
event. Follow the webhook guide to learn how to create a Webhook Endpoint to receive these events and run actions.
The transfer.inbound_received
event looks like this:
{
"id": "evt_a4xK32BanKWYn",
"type": "transfer.inbound_received",
"object": "event",
"data": {
"id": "tr_jKaHD105H",
"object": "transfer",
"amount": 2864,
"created_at": "2020-04-22T21:10:19.254Z",
"post_date": "2020-04-17T00:00:00.000Z",
"transaction_date": "2020-04-17T05:12:41.462Z",
"currency": "mxn",
"comment": "Pago de gas",
"reference_id": "130824",
"receipt_url": "https://www.banxico.org.mx/cep/",
"tracking_key": "s2123423423324334",
"status": "succeeded",
"type": "inbound",
"mode": "test",
"account_number": {
"id": "acno_Kasf91034gj1AD",
"object": "account_number",
"account_number": "738969123456789120",
"created_at": "2024-03-01T20:09:42.949787176Z",
"mode": "test",
"metadata": {
"id_cliente": "12343212"
}
},
"counterparty": {
"holder_id": "OODC911119JL3",
"holder_name": "Carmen Marcela",
"account_number": "012969123456789120",
"type": "clabe",
"type_code": "40",
"institution": {
"id": "40012",
"name": "BBVA Mexico",
"country": "mx"
}
},
"created_at": "2020-04-22T21:10:19.254Z",
"mode": "test"
}
}
Step 4: Receive a transfer at the account number
Now that you have created an account number and added a webhook endpoint to handle notifications, you can transfer to it and start reconciling your payments.
If you want to try everything in test mode, you can use our /simulate/receive-transfer
endpoint to simulate an inbound transfer. The behavior is identical to what would happen if you send a real transfer to the specified account number. See our test guide to learn how you can simulate a transfer.
Updated about 1 month ago