Update Saved Credit Card
Updates the IsPreferred flag of a saved credit card for a specific user, allowing them to set or change their preferred payment method.
- Type: stringx
-application Source requiredA custom HTTP header that accepts a free-form string value. It is used to identify the application making the API request. For example, if Punchh invokes the API, the value could be "punchh".
- Type: stringX
- Location Id requiredThe unique location identifier for the store or business location processing the transaction.
- Type: stringContent
- Type requiredThe media type of the request body. Must be set to
application/json. - Type: stringAuthorizationrequired
Bearer token for API authorization. Send in the format:
Bearer ACCESS_TOKEN_GOES_HERE.
Request body containing the Id, UserId and new IsPreferred value.
- Type: string | nullid
The unique identifier of the saved card to update.
- Type: booleanis
Preferred Indicates whether the card should be set as the preferred payment method.
- Type: string | nulluser
Id The unique identifier of the user in your system who owns the saved card.
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.partech.com/creditcard/v1/creditcards \
--request PATCH \
--header 'x-applicationSource: ' \
--header 'X-LocationId: ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--data '{
"id": "cc-1a2b3c4d",
"userId": "user-9876",
"isPreferred": true
}'
{
"recordCount": 1,
"data": {
"id": "cc-1a2b3c4d"
},
"errors": null,
"traceId": "00-abcdef1234567890-abcdef12-01",
"statusCode": 200
}