Set a card as default
Make a stored card the authenticated user's default payment card, or remove its default status.
Headers#
2Path parameters#
2Request body#
1trueResponse#
4Default-card behavior#
Send {"is_default": true} to make the selected stored card the user's default. DEUNA removes the default status from any other card belonging to the same user, so the user has at most one default card.
The request body is optional. Omitting it has the same effect as sending {"is_default": true}. Send {"is_default": false} to remove the selected card's default status without changing any other card.
Before you call the endpoint#
- Authenticate the customer and send their user access token in the
Authorizationheader. - Set
user_idto the authenticated user's UUID. - Use a
card_idreturned by List stored cards. The card must belong to the authenticated user.
Verify the result#
A successful request returns 200 OK with the updated card. Confirm that its is_default field matches the value you requested. You can also list the user's stored cards and verify that no other card is marked as the default.
The endpoint returns 404 Not Found when the selected card does not exist for the authenticated user. Correct invalid UUIDs or malformed JSON before retrying; repeated requests with the same is_default value leave the card in the same state.
Was this page helpful?