Retrieve user's cards

A user should be able to retrieve the list of the cards linked to his account.

Note

The user should be logged in.

GET https://api.tradingpartners.ai/api/v1/users/cards

Get users/cards response object

The response object contains the list of user's cards.
The attributes of a card are:

Attributes


id - string fmt:uuid
Partner's payment service card ID.


isDefault - boolean
true if the current card is the default one.


isValid - boolean
true if the current card is still valid (expiration, blocked status, etc).


dsCardNumber - string
Card number. Length might vary depending on the card brand.

Note

The card number is obfuscated.
Half of the card number is replaced by *


dsExpiryDate - string
The expiry date of the card. The format used is YY/MM.


dsCardBrand - string
The card brand or card scheme (ie. VISA, MasterCard, etc.).


issueAt - string fmt:date-time
Date when the card was linked to the account.

Authorization header

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXN0IjoidG9rZW4iLCJmb3IiOiJ1c2VyIiwid2l0aCI6ImdyYWRlIiwiZnVsbCI6dHJ1ZX0.sWNz-Z0oGGWoSwaVlOGyzCQdYCWJQmKSSFvZIJzchZw

Get users/cards response object

[
	{
		"id": "a456130e-688f-4e86-a374-1a90393e6259",
		"isDefault": true,
		"isValid": true,
		"dsCardNumber": "491801******4602",
		"dsExpiryDate": "3412",
		"dsCardBrand": "VISA",
		"issuedAt": "2024-04-04T21:57:39.889Z"
	}
]