Customer profiles
Customer profiles are a powerful feature that allows you to store and manage customer data and payment details. This guide will walk you through the process of setting up, creating, and using customer profiles.
For more details on customer profiles, check out the in-depth article on customer profiles in the reference.
Customer profiles are an optional feature which is not automatically available for all IXOPAY platform clients!
If you want to get access to all IXOPAY platform features you need to upgrade your plan. Please contact your Customer Success Manager or our sales team at sales@ixopay.com for more information.
Setting up customer profiles
Before you can start creating and using customer profiles, you need to set up customer profile containers. These containers serve as storage for the customer profiles and can be shared across sub-tenants, enabling multiple merchants within the same ecosystem to access shared customer profiles.
Here’s how you can set up customer profile containers:
- Navigate to the tokenization configuration : Go to the Tokenization > Customer Profiles section.
- Select the tenant (_optional_1): Choose the tenant for which you want to create or edit a customer profile container.
- Create a new container : Click on ’➕ New Container’ to create a new customer profile container.
- Enter a container name : Provide a name for your new container.
- Create the container : Click on ’➕ Create’ to create the container.
Once the container is created, it will appear in the Customer Profile Container Overview and can be edited at any time. You can also access the customer profiles stored in the container by clicking ‘show’.
To store customer profiles in a container, you need to assign the customer profile container to a connector. Any successful register transaction or debit/preauthorize transaction with the withRegister flag set to true processed by this Connector will automatically add the customer data and used payment instrument for subsequent charges as a Customer Profile in this container. You can assign a Customer Profile Container either in the Connector Base Data or using Global Settings.
Creating a customer profile
Step 1: Initiate a debit transaction with register
During the customer’s first purchase, initiate a debit or preauthorize transaction with the withRegister flag enabled, or a register transaction. In this example, we use a debit transaction as described in the Getting-started guide on payment.js. This transaction will transfer funds and create a new customer profile. Ensure that you set the customerProfileData field during this transaction. Additionally, if you set the customerProfileData.customerIdentification field to a value of your choosing, you can later look-up the customer profile via this value.
- curl
- Python
- PHP
- Java
Step 2: Store the customer profile ID
Once the transaction is successful, the system will automatically assign a profileGuid to the customer profile. You should store either the customerProfileData.customerIdentification or customerProfileData.profileGuid in your database under the user’s entry. This ID will be used to retrieve the customer profile in the future.
- HTTP Response
- Python: Flask
- PHP: Laravel
- Java: Spring Boot
Using a customer profile
Step 1: Authenticate the user
Before you can use a customer profile, you need to ensure that the user is authenticated. This is crucial because it prevents unauthorized access to the customer’s profile.
- curl
- Python: Flask
- PHP: Laravel
- Java
Step 2: Fetch the stored customer profile
After the user is authenticated, you can fetch the stored customer profile from the IXOPAY platform. This ID used could be either the customerProfileData.customerIdentification or customerProfileData.profileGuid that you stored during the creation of the customer profile.
- curl
- Python: Flask
- PHP: Laravel
- Java
Step 3: Extract the payment instrument and payment token
Next, you need to extract the payment instrument and paymentToken from the customer profile. The payment instrument refers to the method of payment that the customer has chosen, such as credit card, debit card, or bank transfer. The paymentToken is a unique identifier for the payment instrument.
Optional: if there are multiple payment instruments stored for a customer, you could present them to the customer and let the customer choose which one to use.
- HTTP Response
- Python: Flask
- PHP: Laravel
- Java: Spring Boot
Step 4: Initiate debit a transaction
Finally, you can initiate a debit transaction using the paymentToken. It’s worth noting that while this example demonstrates a debit transaction, the same process applies to various transaction types. Regardless of the transaction type, you need to include the paymentToken in the transactionToken field of the transaction request. This will allow the system to process the transaction using the stored payment instrument.
For more details on executing transactions, refer to the Executing transactions section in the reference article.
- curl
- Python
- PHP
- Java
By following these steps, you can leverage customer profiles to provide a seamless and efficient checkout experience for your customers.
Footnotes
- This step applies only if you have multiple tenants set up. ↩