API Reference

Activate card for customer

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:
  1. If customer_id is provided in the request body, it will associate the new card with the existing customer.
  2. 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": "cust_abc123",
"card_product_id": "prod_xyz987"
}

Example 2: Only customer object provided

{
    "customer": {
        "first_name": "Laura",
        "last_name": "Pérez",
        "email": "[email protected]",
        "phone_number": "+5215512345678"
    },
    "card_product_id": "prod_xyz987"
}

Example 3: Both customer_id and customer (customer_id takes precedence)

{
    "customer_id": "cust_abc123",
    "customer": {
        "first_name": "Ignorado",
        "last_name": "También",
        "email": "[email protected]",
        "phone_number": "+5215511111111"
    },
    "card_product_id": "prod_xyz987"
}

ADVISE: IT IS IMPORTANT THAT THE CUSTOMER SAVES HIS customerId!

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": "cust_abc123",
        "status": "activated"
    }
}
Language
Click Try It! to start a request and see the response here!