Authenticate
Exchange API credentials for a short-lived Bearer token (~20 minutes). Reuse the same token string on every later call in this flow.
| Content-Type | application/json |
{ "user_id": "cli_demo_mx_clabebacked01",User IDRequirediAPI user id issued by Cobre (cli_…). "secret": "sk_live_MxCb5tW8kR3n"SecretRequirediAPI secret from key creation — treat like a password.}{ "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjbGlfZGVtb19teF9jbGFiZWJhY2tlZDAxIn0.MxCb8pT2nQ7xL9mYd4vBw6aF3cR1eH5tJ0gZ",Access TokeniShort-lived bearer token. Attach as Authorization: Bearer on later calls. "type": "Bearer",TypeiResource or movement type as defined by the Cobre API for this rail/product (e.g. breb_credit for Cobre Key payins). "expiration_time": 1200Expiration TimeiToken lifetime in seconds.}Subscribe to Payin Events
Register webhooks for Cobre Balance credits. CLABE-Backed payins are passive — no Money Movement is created. Subscribe to accounts.balance.credit (spei_credit on arrival). Verify deliveries with HMAC-SHA256.
| Authorization | Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjbGlfZGVtb19teF9jbGFiZWJhY2tlZDAxIn0.MxCb8pT2nQ7xL9mYd4vBw6aF3cR1eH5tJ0gZ |
| Content-Type | application/json |
{ "url": "https://yourplatform.mx/webhooks/cobre",Notification URLRequirediHTTPS endpoint that receives Cobre POST notifications. "description": "CLABE-Backed payin lifecycle",DescriptioniLabel for this subscription in the Cobre portal. "events": [EventsiList of webhook event types this subscription listens to. "accounts.balance.credit" ], "event_signature_key": "WHcb9xZ"Signature keyRequirediSecret you provide; Cobre HMAC-signs each delivery.}{ "id": "sub_ClabeBackedPayin01",IdiUnique Cobre identifier for this resource. "url": "https://yourplatform.mx/webhooks/cobre",Notification URLRequirediHTTPS endpoint that receives Cobre POST notifications. "description": "CLABE-Backed payin lifecycle",DescriptioniLabel for this subscription in the Cobre portal. "events": [EventsiList of webhook event types this subscription listens to. "accounts.balance.credit" ], "event_signature_key": "******9xZ",Signature keyRequirediSecret you provide; Cobre HMAC-signs each delivery. "created_at": "2026-08-19T09:00:00Z"Created AtiTimestamp when the resource was created (ISO 8601, UTC).}Create the CLABE-Backed Cobre Balance
Create a dedicated MXN Cobre Balance on provider pr_mex_cobre3. The response's account_number is an 18-digit CLABE issued to this balance itself — share it directly with the payer. Create one balance per collection point; there is no separate reference resource layered on top.
| Authorization | Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjbGlfZGVtb19teF9jbGFiZWJhY2tlZDAxIn0.MxCb8pT2nQ7xL9mYd4vBw6aF3cR1eH5tJ0gZ |
| Content-Type | application/json |
{ "provider_id": "pr_mex_cobre3",ProviderRequirediCobre Balance Mexico 3 — the CLABE-Backed provider for MXN. "action": "create",ActionRequirediCobre field at "action" in this payload. "alias": "Collection point 001"AliasiDisplay name that helps identify it and clarify its purpose.}{ "id": "acc_ClabeBackedMx01",IdiUnique Cobre identifier for this resource. "account_number": "646180303700100016",Account NumberiBank account or CLABE number for the counterparty. "account_type": "clabe",Account TypeiCobre field at "account_type" in this payload. "provider_id": "pr_mex_cobre3",ProviderRequirediCobre Balance Mexico 3 — the CLABE-Backed provider for MXN. "provider_name": "Cobre Balance Mexico 3",Provider NameiCobre field at "provider_name" in this payload. "geo": "mex",GeoiGeography code (e.g. col = Colombia, mex = Mexico). "currency": "mxn",CurrencyiISO currency code (e.g. cop, mxn). "alias": "Collection point 001",AliasiDisplay name that helps identify it and clarify its purpose. "connectivity": {ConnectivityiConnection/registration status for keys or accounts. "status": "connected",StatusiLifecycle status object for the resource or movement. "description": ""DescriptioniHuman-readable label or note. }, "obtained_balance": 0,Obtained BalanceiCobre field at "obtained_balance" in this payload. "obtained_balance_at": "2026-08-19T09:05:00Z",Obtained Balance AtiCobre field at "obtained_balance_at" in this payload. "created_at": "2026-08-19T09:05:00Z",Created AtiTimestamp when the resource was created (ISO 8601, UTC). "updated_at": "2026-08-19T09:05:00Z"Updated AtiTimestamp of the last update (ISO 8601, UTC).}CLABE-Backed SPEI Credit
The payer sends MXN via SPEI to the balance's own CLABE (646180303700100016). Cobre credits acc_ClabeBackedMx01 with spei_credit — reconcile using metadata.account_reference, which equals this balance's own CLABE. No Money Movement is created.
| Authorization | Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjbGlfZGVtb19teF9jbGFiZWJhY2tlZDAxIn0.MxCb8pT2nQ7xL9mYd4vBw6aF3cR1eH5tJ0gZ |
{ "total_items": 1,Total ItemsiTotal items matching the query across all pages. "total_pages": 1,Total PagesiNumber of pages in this result set. "is_last_page": true,Is Last PageiTrue when this is the final page of results. "page_items": 1,Page ItemsiNumber of items returned on this page. "contents": [ContentsiArray of result objects for this page. { "id": "trx_ClabeBacked001",Transaction IDiUnique Cobre identifier for this resource. "type": "spei_credit",Transaction typeiResource or movement type as defined by the Cobre API for this rail/product (e.g. breb_credit for Cobre Key payins). "account_id": "acc_ClabeBackedMx01",Account IdiCobre Balance account id affected by the event. "amount": 1200000,Amount creditediAmount in cents — the last two digits are decimals. "previous_balance": 0,Previous BalanceiCobre field at "contents.0.previous_balance" in this payload. "current_balance": 1200000,Current BalanceiCobre field at "contents.0.current_balance" in this payload. "currency": "mxn",CurrencyiISO currency code (e.g. cop, mxn). "credit_debit_type": "credit",Credit Debit Typeicredit = funds in; debit = funds out. "transaction_date": "2026-08-19T14:00:00Z",Transaction DateiTimestamp when the transaction was posted (ISO 8601, UTC). "created_at": "2026-08-19T14:00:01Z",Created AtiTimestamp when the resource was created (ISO 8601, UTC). "metadata": {MetadataiCustom key-value metadata attached to the resource. "reference": "77031",ReferenceiPayment reference echoed in metadata for reconciliation. "sender_name": "MARIA,LOPEZ/HERNANDEZ",Sender NameiMetadata field "sender_name" attached to the resource. "sender_clabe": "032180009876543210",Sender ClabeiMetadata field "sender_clabe" attached to the resource. "tracking_key": "20260819140000001",Tracking KeyiNetwork tracking key for the payment (PSE ticket or Bre-B key). "description": "SPEI payin via CLABE-Backed balance",DescriptioniHuman-readable label or note. "account_reference": "646180303700100016"Account referenceiThis balance's own CLABE — primary join key, since there is no separate per-payer reference on this rail. } } ]}Webhook delivered
accounts.balance.creditFires when the SPEI credit posts on acc_ClabeBackedMx01. Map metadata.account_reference (646180303700100016) — the balance's own CLABE — to the collection point this balance represents.
| Content-Type | application/json |
{ "id": "ev_ClabeBacked001",IdiUnique Cobre identifier for this resource. "event_key": "accounts.balance.credit",Event KeyiWebhook subscription key (e.g. money_movements.status.completed). "created_at": "2026-08-19T14:00:01Z",Created AtiTimestamp when the resource was created (ISO 8601, UTC). "content": {ContentiEvent-specific payload — same layout as the GET response for that resource. "id": "trx_ClabeBacked001",IdiUnique Cobre identifier for this resource. "type": "spei_credit",TypeiResource or movement type as defined by the Cobre API for this rail/product (e.g. breb_credit for Cobre Key payins). "amount": 1200000,AmountiAmount in cents — the last two digits are decimals. "currency": "mxn",CurrencyiISO currency code (e.g. cop, mxn). "date": "2026-08-19T14:00:00Z",DateiTimestamp when the balance transaction was posted (ISO 8601, UTC) — used in accounts.balance.* webhook notifications. "metadata": {MetadataiCustom key-value metadata attached to the resource. "reference": "77031",ReferenceiPayment reference echoed in metadata for reconciliation. "sender_name": "MARIA,LOPEZ/HERNANDEZ",Sender NameiMetadata field "sender_name" attached to the resource. "sender_clabe": "032180009876543210",Sender ClabeiMetadata field "sender_clabe" attached to the resource. "tracking_key": "20260819140000001",Tracking KeyiNetwork tracking key for the payment (PSE ticket or Bre-B key). "description": "SPEI payin via CLABE-Backed balance",DescriptioniHuman-readable label or note. "account_reference": "646180303700100016"Account ReferenceiTransfer-In reference number used to reconcile incoming deposits. }, "account_id": "acc_ClabeBackedMx01",Account IdiCobre Balance account id affected by the event. "previous_balance": 0,Previous BalanceiCobre field at "content.previous_balance" in this payload. "current_balance": 1200000,Current BalanceiCobre field at "content.current_balance" in this payload. "credit_debit_type": "credit"Credit Debit Typeicredit = funds in; debit = funds out. }}Reconcile the CLABE-Backed Payin
Match the accounts.balance.credit webhook to your platform ledger using metadata.account_reference — this balance's own CLABE — to attribute the credit to the collection point. No Money Movement exists — reconciliation is transaction-level on acc_ClabeBackedMx01. Because one CLABE serves one balance, this rail identifies WHO/WHAT the credit belongs to at the balance level, not a per-transaction invoice.
Mapping the webhook payload from an earlier step onto Platform ledger. No API call is made — this step closes the loop in your own system.
| Cobre field & value | Platform ledger field | |
content.metadata.account_reference 646180303700100016 |
→ | clabe_backed_reference Primary join key — maps acc_ClabeBackedMx01's own CLABE to the collection point on your ledger. |
content.id trx_ClabeBacked001 |
→ | cobre_transaction_id |
content.amount 1200000 |
→ | received_amount_cents |