This request allows you to link a payment profile to a customer.
General
This request allows you to link a payment profile created in Secure Payments to a customer in LMS. Here's what you need to know about linking payment profiles to customers:
- The
PaymentAccounts
object holds payment profile information, and it's nested within theCustomers
entity. To link a payment profile to a customer, you send a payload to theCustomers
endpoint. - Payment profiles are always created via Secure Payments. Even when creating a payment profile in the LMS UI, you are actually creating it in Secure Payments via an iframe.
- Payment profiles are tokenized when they're created for enhanced security. The token that is generated is used in LMS to reference the profile created in Secure Payments. Tokens are never saved, so it's important to hold on to them yourself until linking the payment profile to a customer in LMS.
- Payment profiles can either be bank accounts or credit/debit cards.
- You'll notice that your 200 response from this request will display all of the customer's linked payment profiles—not solely the one you created. If you're looking for the newly created payment profile ID, it will be the one with the highest ID. For example, if your customer has payment profile IDs of
1
,2
, and3
, the newest payment profile is the one with the ID of3
.
For an example of how payment profiles are updated within the UI, take a look at our Add a Customer Payment Profile article.
Database
For information on payment profile database tables, see the following articles:
- Database – Customer Payment Profile Information (payment_account_entity)
- Database – Customer Main Table (customer_entity)
{
"PaymentAccounts": {
"results": [
{
"active": 1,
"isPrimary": 0,
"isSecondary": 1,
"title": "API Example Account",
"type": "paymentAccount.type.checking",
"CheckingAccount": {
"accountType": "bankacct.type.checking",
"token": "QVFJREFIalVqRlk3bHJIVFJFWERTSFljS3R6..."
}
}
]
}
}
{
"PaymentAccounts": {
"results": [
{
"active": 1,
"isPrimary": 0,
"isSecondary": 1,
"title": "API Example Account",
"type": "paymentAccount.type.checking",
"CreditCard": {
"token": "QVFJREFIalVqRlk3bHJIVFJFWERTSFljS3R6..."
}
}
]
}
}
Try It Instructions
In this example, we are linking a checking account to a customer within LMS.
Our requests often provide sample payload information so that you can receive a 200 response from simply hitting the Try It button. This request is a bit different.
We can’t provide sample values that will work for multiple users, since a valid payment profile token is needed. But, if you’d like to see a sample of a 200 response, click the response examples located under the Try It button.
To receive a 200 response from the Try It button, you will have to try this request with your own tenant credentials. If you plan on doing so, make sure to change the headers to match your own authentication information.