post https://sandcaas.undostres.com.mx/debit/v1/activateCardForCustomer
After receiving their card, the cardholder is to call this endpoint to register an account in UnDosTres and activate the card.
This endpoint supports two modes of operation:
- If
customer_id
is provided in the request body, it will associate the new card with the existing customer. - If
customer
object is provided instead, a new customer will be created using that information and the card will be linked to it.
Accounts with a Composite Balance can also use this endpoint to register and activate their accounts. You can learn more about these accounts here: Composite Balance
Example 1: Only customer_id
provided
customer_id
provided{
"customer_id": "12345678",
"card_identifier": "CARD-001",
"reference_batch": "7e4b85e27c4610824900af48f340394d"
}
Example 2: Only customer
object provided
customer
object provided{
"customer": {
"first_name": "Laura",
"last_name": "Pérez",
"email": "[email protected]",
"phone_number": "+5215512345678"
},
"card_identifier": "CARD-001",
"reference_batch": "7e4b85e27c4610824900af48f340394d"
}
Example 3: Both customer_id
and customer
(customer_id takes precedence)
customer_id
and customer
(customer_id takes precedence){
"customer_id": "12345678",
"customer": {
"first_name": "Ignorado",
"last_name": "También",
"email": "[email protected]",
"phone_number": "+5215511111111"
},
"card_identifier": "CARD-001",
"reference_batch": "7e4b85e27c4610824900af48f340394d"
}
Example 4: The example below is for Natural customer.
Just in case of a Composite Balance, a param balance is required. It will be an object with the id of the balance:
{
"pin": "1234",
"card_identifier": "CARD001",
"reference_batch": "7e4b85e27c4610824900af48f340394d",
"device_id": "2fc54683d5fad405360419f720457ccbcf9bacac414f6296f846e2e4fad99d47",
"customer_id": "85",
"balance": {
"id": 10249
}
}
Successful response (applies to all cases)
{
"text": "Success",
"timestamp": "2024-11-15T14:32:18.123Z",
"endpoint": "debit/v1/activateCardForCustomer",
"error": {},
"payload": {
"card_id": "card_987654321",
"customer_id": "12345678",
"status": "activated"
}
}