Payment Method
Ecart Pay offers robust tools for managing customer authentication and payment methods. This guide explains how to generate unique customer tokens and assign versatile payment methods, enhancing the transactional flexibility and security of the platform.
In the evolving landscape of digital payments, secure authentication and flexible payment options are paramount. Ecart Pay enables businesses to generate unique tokens for customer authentication and create personalized payment methods. These functionalities ensure secure access to services and seamless financial management. This entry details the process of creating customer tokens and payment methods, illustrating their importance in maintaining secure and efficient transactions.
Importance of Authorization Methods
Authorization tokens play a vital role in securing interactions with the Ecart Pay platform. These tokens are essential for authenticating user actions and ensuring secure access to API endpoints.
DISCLAIMERFor more details on the role of authorization, refer to the Authorization entry.
Create Customer Token
This endpoint generates a unique authentication token for a specific customer, enabling secure API interactions.
Endpoint
POST https://sandbox.ecartpay.com/api/customers/:customer_id/token
Headers
Authorization
Path Variables
customer_id
: Unique identifier of the customer.
Example Request
curl --location --request POST 'https://sandbox.ecartpay.com/api/customers/65b9520fe35ed4b1662014d1/token' \
--header 'Authorization: Bearer YOUR_TOKEN'
Example Response
{
"token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxODA0ODNiZWFiOWQ5NDVhODZkYTNjMSIsImN1c3RvbWVyX2lkIjoiNjViOTUyMGZlMzVlZDRiMTY2MjAxNGQxIiwiaWF0IjoxNzA2NjQ1MjA2LCJleHAiOjE3MDY2NDU4MDZ9.vusdtR4K6HYc3hnTSbpye7KsIbpp5ZN79mHY2r8Ro6_kyzFt1M59e7i-cMRjntpkMpGlHO14Om_8LFIi0VaPDQ"
}
Assigning Payment Methods
Assigning payment methods correctly ensures streamlined transactions and supports diverse financial needs. Whether using interbank CLABE numbers or credit/debit cards, businesses can cater to various customer preferences effectively. These methods seamlessly integrate into the broader payment ecosystem facilitated by Ecart Pay. By leveraging the platform, businesses can manage and optimize payment options with ease, ensuring compatibility with diverse financial systems and enhancing the overall transactional experience.
- CLABE (Clave Bancaria Estandarizada): This is an 18-digit standardized bank account number used in Mexico for interbank transfers. It ensures that funds are routed accurately to the intended recipient’s bank account. CLABE numbers are ideal for direct deposits, recurring payments, and large transactions.
- Credit/Debit Cards: These are card-based payment methods linked to a customer’s bank account or credit line. They are widely used for instant payments and offer convenience for both online and in-person transactions. Card details typically include the card number, expiration date, and security code (CVC).
The flexibility to use either option allows businesses to meet the specific financial preferences of their customers, enhancing the user experience and operational efficiency.
Create Customer Payment Method
This endpoint allows businesses to add payment methods for specific customers, including details such as the name, bank, and method type.
Endpoint
POST https://sandbox.ecartpay.com/api/customers/:customer_id/payment-methods
Headers
Authorization
Path Variables
customer_id
: Unique identifier of the customer.
Request Body
{
"name": "Main",
"business_name": "John Doe",
"bank": "40002",
"number": "1234567891234567",
"method": "clabe",
"country": "MX"
}
Example Request
curl --location --request POST 'https://sandbox.ecartpay.com/api/customers/65b9520fe35ed4b1662014d1/payment-methods' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "Main",
"business_name": "John Doe",
"bank": "40002",
"number": "1234567891234567",
"method": "clabe",
"country": "MX"
}'
Example Response
{
"account_id": "5fab3b20b40b0a613e1b6f15",
"customer_id": "65b9520fe35ed4b1662014d1",
"name": "Main",
"bank": "40002",
"business_name": "John Doe",
"number": "1234567891234567",
"method": "clabe",
"country": "MX",
"default": true,
"deleted": false,
"id": "65b956f1e35ed4b166201512"
}
Managing Multiple Payment Methods per Customer
Ecart Pay supports assigning multiple payment methods to a single customer. This feature is invaluable for businesses and customers alike, offering flexibility and catering to diverse payment preferences. Customers can maintain different payment options for various transactions, such as separate CLABE numbers for business and personal use or multiple credit/debit cards for different purposes. Businesses benefit by ensuring uninterrupted services, even if one payment method becomes unavailable.
Conclusion
The ability to generate unique tokens and manage versatile payment methods is critical in modern financial platforms. Ecart Pay’s robust API ensures secure, efficient, and flexible management of customer authentication and payment preferences, empowering businesses to deliver exceptional service and enhance customer satisfaction.
Updated about 2 months ago