Step 3: Registering Card Accounts
Once you have registered your Card Programs, you'll need to register customer card accounts. A card account is a unique (tokenized) string that uniquely identifies a card account holder or card without sharing PII's. The returned (Triple) ID will be used to reference the specific card (account holder) in all subsequent calls to the Triple platform. To complete this process, you will need to use specific endpoints, which are provided below along with examples. For more comprehensive information, you can refer to the Triple API documentation for each endpoint.
Prerequisites
Before proceeding with this step, ensure that:
- You possess an active authentication token.
- You have decided on an (external) ID for each card account.
- You have registered one or serveral card programs.
Create Card Accounts
Use this endpoint to add card accounts to Triple: POST partner/card-accounts
.
Card accounts should not contain sensitive information such as customer social security numbers or the actual PAN for the card.
curl --location 'https://api.tripleup.dev/partner/card-accounts' \
--header 'Authorization: Bearer MY_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"card_program_external_id": "YOUR_CARD_PROGRAM_EXTERNAL_ID",
"default_country_code": "US",
"default_postal_code": "16046",
"external_id": "YOUR_CARD_ACCOUNT_EXTERNAL_ID",
"status": "ENROLLED"
}'
You can find more details in the REST API documentation.
Verify Card Accounts
Use this endpoint to verify that card account information was properly added: GET partner/card-accounts
.
curl --location 'https://api.tripleup.dev/partner/card-accounts' \
--header 'Authorization: Bearer MY_TOKEN'
You can find more details in the REST API documentation.
Capture User Events
Add code to capture events that occur as the user interacts with the offer, such as whether the user likes or dislikes an offer. Capturing these events help Triple to better target offers in the future.
The endpoint used in this example is POST partner/user-events
.
curl --location 'https://api.tripleup.dev/partner/user-events' \
--header 'Authorization: Bearer MY_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"event_timestamp": d.isoformat(),
"event_type": EVENT_TYPE,
"user_postal_code_location": {
"country_code": COUNTRY_CODE,
"postal_code": POSTAL_CODE
},
"user_coordinates": {
"latitude": LATITUDE,
"longitude": LONGITUDE
},
"card_account_id": CARD_HOLDER_ID,
"user_interface": USER_INTERFACE,
"offer_id": OFFER_ID
}'