POST Customer Stored Payment Method
Saves a card or gift card to the customer's wallet, once the payment processor's tokenization flow has given you something to store.
What goes in payment_processors[].properties depends on the processor — see Store Payment Method for the flow and the PAR Pay guide for what that processor expects.
Only registered customers can save a payment method; a guest session is rejected. The response is the customer's whole wallet, refreshed.
Path Parameters
- Type: stringcustomer
_account _id requiredCustomer Account UUID
Headers
- Type: stringAcceptrequired
Accept header
- Type: stringAuthorization
Authorization header
- Type: stringContent
- Type requiredContent-Type header
- Type: stringA
P I - V E R S I O N requiredAPI version
- Type: stringApplicationrequired
Application key
- Type: numberX
- Request - I D requiredRequest ID
Body
application/json
- Type: stringFormat: uuidpayment
_method _id Payment method id
- Properties: 2Type: { id, properties }payment
_processors
Responses
- application/json
Request Example for post/customers/{customer_account_id}/stored-payment-methods
curl https://api-public-demo.menu.app/api/customers/4e42c2a6-3f23-11ed-936c-1a67b454859d/stored-payment-methods \
--request POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'API-VERSION: ' \
--header 'Application: ' \
--header 'X-Request-ID: 123' \
--data '{
"payment_method_id": "027b59de-97cb-48a0-9404-37f426659bad",
"payment_processors": {
"id": "8e5b0340-42bd-4eb8-b06a-836f28fb1f73",
"properties": {
"token": "kisn533lt91cya21vjquxjdf7",
"one_time_token": "d4f0dfcb-aed7-4d3d-ba7b-c0f4eff2e15c"
}
}
}'
{
"status": "OK",
"code": 200,
"data": {
"stored_payment_methods": [
{
"id": "85688223-b4ee-4c0f-8593-513c182ef7b1",
"payment_method_id": "027b59de-97cb-48a0-9404-37f426659bad",
"preselected": true,
"properties": {
"card_type": "visa",
"masked_number": "901010******0004",
"expiration_date": "12/2024",
"last_four_digits": "0004"
}
}
]
}
}Example response
