Skip to main content
Migo Docs

Third-Party Card Linking

Associate a card that another cardholder already owns to a user's Migo account. Within your ecosystem, this lets you relate other users' cards to the cardholder. A third-party card is linked by the owner's email and the last-4 suffix of the card — there is no SDK tokenization or temporary-token exchange.

POST /users/{userId}/linked-cards takes the following body:

curl -X POST https://api.ali.app/rest/users/{userId}/linked-cards \
-H "Authorization: Bearer <token>" \
-H "x-application-id: YOUR_APP_ID" \
-H "Content-Type: application/json" \
-d '{
"email": "owner@example.com",
"suffix": "1234",
"alias": "Family Card"
}'
FieldRequiredNotes
emailyesEmail of the cardholder owning the third-party card
suffixyesLast four digits of the card
aliasyesAlias used to identify the card in the account

List linked cards​

curl https://api.ali.app/rest/users/{userId}/linked-cards \
-H "Authorization: Bearer <token>"

Update association (alias)​

PATCH /users/{userId}/linked-cards/{associationId} updates only the alias:

curl -X PATCH https://api.ali.app/rest/users/{userId}/linked-cards/{associationId} \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ "alias": "BAC (primary)" }'

Delete an association​

curl -X DELETE https://api.ali.app/rest/users/{userId}/linked-cards/{associationId} \
-H "Authorization: Bearer <token>"

Errors​

CodeNameMeaning
7220THIRD_PARTY_CARD_NOT_FOUNDNo card matches the supplied owner email + suffix
7221ERROR_CREATING_THIRD_PARTY_CARDThe association could not be created
7222THIRD_PARTY_CARD_ALREADY_ASSIGNEDThe card is already linked
7223CARD_ASSOCIATED_BELONGS_TO_THE_USER_WHO_MADE_THE_REQUESTThe card belongs to the requesting user

See the full Error Catalog for the complete list.