POST Create Mobile Pay Token
Creates a scan-to-pay token for a store. Show the returned hash to the customer as a QR code for the terminal to scan.
The token records the card the customer picked and, optionally, a tip and one loyalty reward, offer or promo code. It lives for five minutes and can be redeemed once.
Creating a token immediately expires any earlier pending token for this customer, so there is never more than one live at a time.
The brand must have scan to pay enabled, and the chosen card's payment method must be enabled at the venue.
Path Parameters
- Type: stringvenue
_id requiredVenue ID
Headers
- Type: stringAcceptrequired
Type of content accepted by the API (application/json in most cases)
- Type: stringApplicationrequired
Application key for specific client app
- Type: stringContent
- Type requiredContent-Type header
- Type: stringA
P I - V E R S I O N requiredVersion of the API to be used
- Type: stringAuthorization
Authorization header
- Type: stringX
- Request - I D requiredUnique request identifier
Body
- Type: integerstored
_payment _method _id requiredThe stored payment method to charge. Must belong to the signed-in customer.
- Type: object | nulldiscount
_snapshot Required for offers (
3) and promo codes (5). Must includename. - Type: 2 or 3 or 5enumdiscount
_type _id 2reward,3offer,5promo code - Type: string | nullpunchh
_reward _code Required whenever
punchh_reward_idis sent. - Type: string | nullpunchh
_reward _id Required whenever
discount_type_idis sent. - Type: integer | nulltip
_amount min:0Minor currency units when
tip_typeis1, percent when2. - Type: 1 or 2enumtip
_type 1fixed amount,2percentage
Responses
- application/json
- 400
Scan to pay is not enabled for the brand, or the card's payment method is not enabled at this venue.
- 401
Missing or invalid customer token.
- 403
The brand is not on the NMG product structure.
- 404
Unknown venue.
- 422
Validation failed, or the card does not belong to this customer.
curl 'https://api-public-demo.menu.app/api/venues/{venue_id}/mobile-pay-tokens' \
--request POST \
--header 'Accept: application/json' \
--header 'Application: application-key' \
--header 'Content-Type: application/json' \
--header 'API-VERSION: ' \
--header 'X-Request-ID: c10b4a70-6274-490d-80a0-03e7bb826937' \
--data '{
"stored_payment_method_id": 1234,
"tip_amount": 250,
"tip_type": 1
}'
{
"status": "OK",
"code": 200,
"data": {
"mobile_pay_token": {
"id": 501,
"hash": "7c9e6679f1e4d0b3a2c5e8f1a0b9d4c3",
"venue_id": 12,
"status": "pending",
"expires_at": "2026-09-19T12:05:00.000000Z",
"tip_amount": 250,
"tip_type": 1,
"discount_type_id": null,
"discount_snapshot": null
}
}
}