PAR-Pay
payment_processor_type_id: 32
Store Payment Method
Credit/Debit Card tokenization flow
Generate Tokens
Tokenization starts when user chooses to add payment method. First request to be called is
GET /api/payment-processors/generate-tokens
{
"method": "get",
"url": "https://api-public-playground.menu.app/api/payment-processors/generate-tokens",
"headers": {
"X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
"Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
"Api-Version": 4.38.0,
"Content-Type": "application/json",
"X-QB-Enabled*": "",
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FwaS1wdWJsaWMtcGxheWdyb3VuZC5tZW51LmFwcC9hcGkvY3VzdG9tZXJzL3JlZnJlc2giLCJpYXQiOjE2OTEzMzA4NjUsImV4cCI6MTY5MTM4Nzg4OCwibmJmIjoxNjkxMzg0Mjg4LCJqdGkiOiJvNjF6Z2pqaVF4NHpUdTRaIiwic2V0UmVmcmVzaFRUTCI6MjYyODAwMCwic3ViIjoiNTA5MDYzNyIsInBydiI6ImNjMzI5MjFhMTU0ODBhMTE3ZDliYmM3MmMwZTEyNTZhNjg1MjQ1OGIiLCJhcHBsaWNhdGlvbl9pZCI6MjAxNSwic2Vzc2lvbl9pZCI6MjY2MjF9.9kk79vbjxOfcJprxGYoEeb8GYL3N3-k4KI-JaTgEdoQ"
}
}
Response
{
"payment_processor_id": "3c07ddd3-925e-4549-b6a3-ec5cec38a0dd",
"payment_processor_type_id": 32,
"token": "d45c5a56-54c8-4843-b25a-b8336f1d6789",
"actions": {
"type": "redirect",
"url": "https://api-public-playground.menu.app/api/payment-processors/form?mt_application_id=262&mt_payment_processor_id=1&iframeUrl=https://uat48.auruspay.com/storeservices/ecom/getiframe?a=0369923Ff1e9b6fe33a826efb184f6ecb618ef26582c0e1230febc98c8b2c6e3313e5e58ea96b27ca545ba2eada315a4ca74e7f2fb96ce8a38dd868c1dce8499e3557a1c5fbcbe9ad0234d7b94cadad407f8b77bd08c34fd7caa147f483e5a80ffa4de2e7adb7e3b2396ceb4bcab269eeacdec2f8837cf5d60eb1eab3fcbede4519a7f8989baf937b78cad120644c0a3d584b306e786b4821841b0a93dcc69c42290f9662d86ab452e2e09e0c7d66c51ab5333ca915df03d8a991e90cb0be695fc40859d99db4a7d03d656a0d1307847fdfda4aa2ccde314b0caca7a29f7ab0695dd5e8321e58309b85840708ec2e1d90f7515c801b9e609c6395decb1044765e2937cb2dd4fefc978f537833f263eb90120d14de5763b1279b2f20407ccd11c369095428675e3fd8364c82798f99446036e21c4b48b62f04eabdbd2ae7e9668348edf4ef0102af87ab8d15e67060cfbd8bc0147fb68a535fee9c70f65bf2001e30735d0e0dc700cea4ca00c8a552714c949b4ad558033c6b22dfff9e4b64f4894a133a5"
}
}
Validate Payment details
A validation has to be performed to confirm the payment details customer has input and obtain the one-time-token required for storing the PAR Pay payment method.
Steps:
- Extract the URL from
actions.urland load it in Webview. - Let the customer put PAN data inside the hosted form
- Depending if the customer enters valid data we will receive redirect url which will contain “success” or “fail”
There is a possibility of using the PAR Ordering endpoint or creating your own endpoint. Endpoint should be provided and set up by PAR Pay.
| Status | URL |
|---|---|
| success | https://api-public-playground.menu.app/api/payment-processors/success?mt_application_id=262&one-time-token=20000000000000000000000026517579 |
| fail | https://api-public-playground.menu.app/api/payment-processors/fail?mt_application_id=262&error=123456-ErrorMessage |
- If the redirect URL contains
successas it can be seen in the above example, theone-time-tokencan be obtained as a substring of the URL.
For web implementation the
one-time-tokencan also be obtained from the iFrame Blade form that will send the token via thewindow.top.postMessage.
- Afterwards we are sending value of
one-time-tokenandtoken(value that we got fromGET /api/payment-processors/generate-tokensresponse previously) in thePOST /api/customers/{customer_account_id}/stored-payment-methodsrequest shown below
Store Payment Method
Once the tokens are obtained, next step is saving the payment method for the customer, by calling
POST /api/customers/{customer_account_id}/stored-payment-methods
| Attribute | Type | Example Value | Description |
|---|---|---|---|
Authorization HTTP header |
string | "Bearer {customer_account_token}" |
JWT Token of Customer Account |
customer_account_id |
string | "67a6b10e-caa9-42b7-b28a-d6c547590f88" |
Customer account UUID |
payment_method_id |
string | "d28c02e5-9883-422e-85cd-409d1e8fabbf" |
Payment method UUID can be obtained from the response of the init-application call |
payment_processors.id |
string | "8e5b0340-42bd-4eb8-b06a-836f28fb1f73" |
Payment processor UUID, can be obtained from generate-tokens call |
payment_processors.properties.one_time_token |
string | "cd018a06-3f7f-407e-a2d3-452e81ea08b4" |
PAR Pay specific token from iFrame response |
payment_processors.properties.token |
string | "d45c5a56-54c8-4843-b25a-b8336f1d6789" |
token value from generate-tokens response |
{
"method": "post",
"url": "https://api-public-playground.menu.app/api/customers/{customer_account_id}/stored-payment-methods",
"headers": {
"X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
"Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
"Api-Version": 4.38.0,
"Content-Type": "application/json",
"X-QB-Enabled*": "",
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FwaS1wdWJsaWMtcGxheWdyb3VuZC5tZW51LmFwcC9hcGkvY3VzdG9tZXJzL3JlZnJlc2giLCJpYXQiOjE2OTEzMzA4NjUsImV4cCI6MTY5MTM4Nzg4OCwibmJmIjoxNjkxMzg0Mjg4LCJqdGkiOiJvNjF6Z2pqaVF4NHpUdTRaIiwic2V0UmVmcmVzaFRUTCI6MjYyODAwMCwic3ViIjoiNTA5MDYzNyIsInBydiI6ImNjMzI5MjFhMTU0ODBhMTE3ZDliYmM3MmMwZTEyNTZhNjg1MjQ1OGIiLCJhcHBsaWNhdGlvbl9pZCI6MjAxNSwic2Vzc2lvbl9pZCI6MjY2MjF9.9kk79vbjxOfcJprxGYoEeb8GYL3N3-k4KI-JaTgEdoQ"
},
"body":{
"payment_method_id" : "d28c02e5-9883-422e-85cd-409d1e8fabbf",
"usage": "personal",
"payment_processors": [
{
"id": "8e5b0340-42bd-4eb8-b06a-836f28fb1f73",
"properties": {
"one_time_token": "eeb0fd75-f09e-4275-81b8-67f114f83cea"
"token": "3cec738e-6c6a-4ee7-9e7d-42c393d3230b"
}
}
]
}
}
In the response, we receive an updated collection of the stored payment methods, which can be displayed to the customer
Response
{
"code": 200,
"data": {
"stored_payment_methods": [
{
"id": "85688223-b4ee-4c0f-8593-513c182ef7b1",
"properties": {
"card_type": "visa",
"masked_number": "901010******0004",
"expiration_date": "12/2024",
"last_four_digits": "0004"
},
"preselected": true,
"payment_method_id": "027b59de-97cb-48a0-9404-37f426659bad"
}
]
},
"status": "OK"
}
| Attribute | Type | Example Value | Description |
|---|---|---|---|
stored_payment_methods[i].id |
string | "2fc09ca7-7de0-4ae3-995b-216fbcdce029" |
Stored Payment method UUID |
stored_payment_methods[i].payment_method_id |
string | "b135ce56-d97f-469c-bc70-aec13fa3ce6b" |
Payment method UUID |
stored_payment_methods[i].preselected |
bool | "true" |
Boolean flag indicating whether the payment method should be pre-selected |
stored_payment_methods[i].properties.card_type |
string | "visa" |
Stored card type |
stored_payment_methods[i].properties.masked_number |
string | "XXXXXXXXXXXX4321" |
Stored card masked number |
stored_payment_methods[i].properties.expiration_date |
string | "12/2024" |
Stored card expiration date |
Gift Card tokenization flow
Tokenization starts when user chooses to add payment method. First request to be called is
GET /api/payment-processors/generate-tokens
{
"method": "get",
"url": "https://api-public-playground.menu.app/api/payment-processors/generate-tokens",
"headers": {
"X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
"Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
"Api-Version": 4.38.0,
"Content-Type": "application/json",
"X-QB-Enabled*": "",
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FwaS1wdWJsaWMtcGxheWdyb3VuZC5tZW51LmFwcC9hcGkvY3VzdG9tZXJzL3JlZnJlc2giLCJpYXQiOjE2OTEzMzA4NjUsImV4cCI6MTY5MTM4Nzg4OCwibmJmIjoxNjkxMzg0Mjg4LCJqdGkiOiJvNjF6Z2pqaVF4NHpUdTRaIiwic2V0UmVmcmVzaFRUTCI6MjYyODAwMCwic3ViIjoiNTA5MDYzNyIsInBydiI6ImNjMzI5MjFhMTU0ODBhMTE3ZDliYmM3MmMwZTEyNTZhNjg1MjQ1OGIiLCJhcHBsaWNhdGlvbl9pZCI6MjAxNSwic2Vzc2lvbl9pZCI6MjY2MjF9.9kk79vbjxOfcJprxGYoEeb8GYL3N3-k4KI-JaTgEdoQ"
}
}
Response
{
"status": "OK",
"code": 200,
"data": {
"tokens": [
{
"payment_processor_id": "aabe0e6a-8e09-435c-b443-e1790fd755f5",
"payment_processor_type_id": 32,
"token": "dd76dee4-41e9-4ece-a944-4cee554f5e15",
"actions": [
{
"type": "redirect",
"url": "https://api-playground.menu.app/api/payment-processors/init_token?mt_application_id=683&mt_payment_processor_id=392&tokenType=1&template=card&isPayment=&successUrl=https://api-playground.menu.app/api/payment-processors/success?mt_application_id=683&failUrl=https://api-playground.menu.app/api/payment-processors/fail?mt_application_id=683&sessionId=309200223173329411640000363990&iframeUrl=https://uatps48.aurusepay.com/storeservices/ecom/getiframe?a=03699E34f1e9b6fe33a826efb184f6ecb618ef26582c0e1230febc98c8b2c6e3313e5e58ea96b27ca545ba2eada315a4ca74e7f232cee99e935019603aac5e0f84ae845a79399aba912eea96ff33400ae462de8ebae5b49e1d6485569e296c14a440710370091df61af6798a2c8ab83d83ee5e04ccc24768af3d996cb0661d1fe46aab4789baf937b78cad120644c0a3d584b306e786b4821841b0a93dcc69c42290f9662d86ab452e2e09e0c7d66c51ab5333ca915df03d8a991e90cb0be695fc40859d99db4a7d03d656a0d1307847fdfda4aa2ccde314b0caca7a29f7ab0695dd5e8321e58309b85840708ec2e1d90f7515c801b9e609c6395decb1044765e2937cb2dd4fefc978f537833f263eb90120d14de5763b1279b2f20407ccd11c369095428675e3fd8364c82798f99446036e21c4b48b62f04eabdbd2ae7e9668348edf4ef0102af87ab8d15e67060cfbd8bc0147fb68a535fee9c70f65bf2001e30735d0e0dc700cea4ca00c8a552714c949b4ad558033c6b22dfff9e4b64f4894a133a5"
}
]
},
{
"payment_processor_id": 2648,
"payment_processor_type_id": 35,
"bin_ranges": [
{
"range": {
"to": "9999",
"from": "7000"
},
"refundable": true,
"pin_required": false,
"rechargeable": true
},
{
"range": {
"to": "9000",
"from": "8307"
},
"refundable": true,
"pin_required": true,
"rechargeable": true
},
{
"range": {
"to": "10001",
"from": "200"
},
"refundable": false,
"pin_required": false,
"rechargeable": false
}
]
}
]
}
}
| Attribute | Type | Example Value | Description |
|---|---|---|---|
tokens[i].actions.url |
string | "https://api-playground.menu.app/api/payment-processors/init_token?mt_application_id=683&mt_payment_processor_id=392&tokenType=1&template=card&isPayment=&successUrl=https://api-playground.menu.app/api/payment-processors/success?mt_application_id=683&failUrl=https://api-playground.menu.app/api/payment-processors/fail?mt_application_id=683&sessionId=309200223173329411640000363990&iframeUrl=https://uatps48.aurusepay.com/storeservices/ecom/getiframe?a=03699E34f1e9b6fe33a826ef", |
The URL that leads to the form that is hosted on the PAR Ordering backend but contains the PAR Pay iFrame. |
tokens[i].token |
string | "dd76dee4-41e9-4ece-a944-4cee554f5e15", |
Token generated to store the gift card payment method |
tokens[i].bin_ranges |
object | Collection of bin range objects defining the gift card usage rules. Each range object in the collection represents a rule that has to be applied to the gift cards, that fall under the range, i.e. first 3 or 4 digits fall in the range. One card can match several ranges, this means that all of the rules listed should be applied to that card. | |
tokens[i].bin_ranges[j].range.from |
string | "4500", |
Bin range from value |
tokens[i].bin_ranges[j].range.to |
string | "6999", |
Bin range to value |
tokens[i].bin_ranges[j].refundable |
bool | true |
Boolean flag identifying whether the gift card is refundable |
tokens[i].bin_ranges[j].pin_required |
bool | "acc711f3-e3a2-43e3-8194-7277a3341971", |
Boolean flag identifying whether the gift card requires PIN |
tokens[i].bin_ranges[j].rechargeable |
bool | "acc711f3-e3a2-43e3-8194-7277a3341971", |
Boolean flag identifying whether the gift card is rechargeable |
Validate Payment details
Steps:
- A custom form should be created to collect the gift card number and the PIN in case if it's required based on
bin_ranges - Once the gift card information has been collected, it is ready to be saved as Stored Payment method.
Store Payment Method
Once the tokens are obtained, next step is saving the payment method for the customer, by calling
POST /api/customers/{customer_account_id}/stored-payment-methods
| Attribute | Type | Example Value | Description |
|---|---|---|---|
Authorization HTTP header |
string | "Bearer {customer_account_token}" |
JWT Token of Customer Account |
customer_account_id |
string | "67a6b10e-caa9-42b7-b28a-d6c547590f88" |
Customer account UUID |
payment_method_id |
string | "d28c02e5-9883-422e-85cd-409d1e8fabbf" |
Payment method UUID can be obtained from the response of the init-application call |
payment_processors.id |
string | "8e5b0340-42bd-4eb8-b06a-836f28fb1f73" |
Payment processor UUID, can be obtained from generate-tokens call |
payment_processors.properties.gift_card_code |
string | "111" |
Gift Card PIN - required only if defined by bin_ranges rule for the card |
payment_processors.properties.gift_card_number |
string | "7888888811114321" |
Gift Card number |
{
"method": "post",
"url": "https://api-public-playground.menu.app/api/customers/{customer_account_id}/stored-payment-methods",
"headers": {
"X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
"Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
"Api-Version": 4.38.0,
"Content-Type": "application/json",
"X-QB-Enabled*": "",
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FwaS1wdWJsaWMtcGxheWdyb3VuZC5tZW51LmFwcC9hcGkvY3VzdG9tZXJzL3JlZnJlc2giLCJpYXQiOjE2OTEzMzA4NjUsImV4cCI6MTY5MTM4Nzg4OCwibmJmIjoxNjkxMzg0Mjg4LCJqdGkiOiJvNjF6Z2pqaVF4NHpUdTRaIiwic2V0UmVmcmVzaFRUTCI6MjYyODAwMCwic3ViIjoiNTA5MDYzNyIsInBydiI6ImNjMzI5MjFhMTU0ODBhMTE3ZDliYmM3MmMwZTEyNTZhNjg1MjQ1OGIiLCJhcHBsaWNhdGlvbl9pZCI6MjAxNSwic2Vzc2lvbl9pZCI6MjY2MjF9.9kk79vbjxOfcJprxGYoEeb8GYL3N3-k4KI-JaTgEdoQ"
},
"body":
{
"payment_method_id": "d4b42c54-7360-4515-b090-70c9da79c3d5",
"payment_processors": [
{
"id": "cfc61d26-e6c0-443b-aa2c-d1762c03d2b2",
"properties": {
"gift_card_code": "111",
"gift_card_number": "7888888811114321"
}
}
]
}
}
In the response, we receive an updated collection of the stored payment methods, which can be displayed to the customer
Response
{
"code": 200,
"data": {
"stored_payment_methods": [
{
"id": "17699eab-59ca-4d5a-8115-8c8ea528d570",
"parent_type": "CustomerAccount",
"payment_method_id": 32,
"preselected": true,
"usage": "personal",
"properties": {
"alias": "GC-e3c7d372cb3b8e29a43da310377a70e4d6f537b32c20cd5936e936cca09fd10f",
"card_type": "GiftCard",
"masked_number": "XXXXXXXXXXXX4321",
"expiration_date": null,
"last_four_digits": "4321"
},
"proxy_info": null,
"billing_country_code": "",
"billing_zip_code": ""
}
]
},
"status": "OK"
}
| Attribute | Type | Example Value | Description |
|---|---|---|---|
stored_payment_methods[i].id |
string | "2fc09ca7-7de0-4ae3-995b-216fbcdce029" |
Stored Payment method UUID |
stored_payment_methods[i].payment_method_id |
string | "b135ce56-d97f-469c-bc70-aec13fa3ce6b" |
Payment method UUID |
stored_payment_methods[i].preselected |
bool | "true" |
Boolean flag indicating whether the payment method should be pre-selected |
stored_payment_methods[i].properties.card_type |
string | "GiftCard" |
Stored card tyoe |
stored_payment_methods[i].properties.masked_number |
string | "XXXXXXXXXXXX4321" |
Stored card masked number |
Make a Payment
Fetch Stored Payment Methods
Fetching the stored payment methods for the authenticated user is performed to display the available payment methods to the customer (See Retrieve Stored Payment Methods for more details)
Payment
To initiate payment init-payment endpoint should be called:
POST /api/payment-processors/init-payment:
The requests and responses are different depending on the payment type
Payment Credit/Debit Card and Gift Cars
| Attribute | Type | Example Value | Description |
|---|---|---|---|
venue_id |
string | "a9d6d0c8-1689-4114-b1ec-6da9c33f0384" |
UUID of Venue at which you are placing your order / making your payment |
payment_info.payment_method_id" |
string | "85688223-b4ee-4c0f-8593-513c182ef7b1" |
Payment method UUID |
payment_info.amount |
int | 255 |
Payment amount (lowest unit) |
order_info |
Order object | Order object as you would send it to POST /orders - see Place order for Dine-in (QS) or Takeout for more information |
Request payload for Payment and Gift Cards:
{
"method": "post",
"url": "https://api-public-playground.menu.app/api/customers/{customer_account_id}/stored-payment-methods",
"headers": {
"X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
"Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
"Api-Version": 4.38.0,
"Content-Type": "application/json",
"X-QB-Enabled*": "",
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FwaS1wdWJsaWMtcGxheWdyb3VuZC5tZW51LmFwcC9hcGkvY3VzdG9tZXJzL3JlZnJlc2giLCJpYXQiOjE2OTEzMzA4NjUsImV4cCI6MTY5MTM4Nzg4OCwibmJmIjoxNjkxMzg0Mjg4LCJqdGkiOiJvNjF6Z2pqaVF4NHpUdTRaIiwic2V0UmVmcmVzaFRUTCI6MjYyODAwMCwic3ViIjoiNTA5MDYzNyIsInBydiI6ImNjMzI5MjFhMTU0ODBhMTE3ZDliYmM3MmMwZTEyNTZhNjg1MjQ1OGIiLCJhcHBsaWNhdGlvbl9pZCI6MjAxNSwic2Vzc2lvbl9pZCI6MjY2MjF9.9kk79vbjxOfcJprxGYoEeb8GYL3N3-k4KI-JaTgEdoQ"
},
"body":
{
"amount": 1836,
"order_info": {
"combo_meals": [],
"customer_info": {
"demographics": [],
"email": "john.doe@partech.com",
"first_name": "John",
"last_name": "Doe",
"phone_number": "+381323132313"
},
"discount_cards": [],
"discounts": [],
"menu_items": [
{
"comment": "",
"id": "8c7bac9b-7fc9-4617-b457-9e2ad09ea195",
"modifiers": [],
"price_level_id": "fa806cdd-05dd-415a-bad6-80eda886b4dd",
"quantity": 3
}
],
"order_type": {
"id": 6,
"pickup_asap": true,
"pickup_at": "2023-06-23 14:26:56",
"properties": {}
},
"singular_point_id": "443dd5af-da9f-4ed8-997d-91620533e432",
"tip": {
"percentage": 2
}
},
"payment_info": {
"amount": 1836,
"stored_payment_method_id": "d52f406c-aef0-4b02-8f12-84f1404964e7"
},
"venue_id": "70f28cf7-7ccf-428a-bf04-34e29181964b"
}
}
For the authenticated user the stored_payment_method_id property is sent to identify the payment method.
For GUEST FLOW payment_method_id is sent instead:
"payment_info": {
"amount": 1836,
"payment_method_id": "d52f406c-aef0-4b02-8f12-84f1404964e7"
}
Response for Payment and Gift Cards:
{
"status": "OK",
"code": 200,
"data": {
"payment_processor_type_id": 35, // 35 - gift cards processor, 32 - PAR pay processor
"payment_init_hash": "9d8416985b57de4b93d87f7f88ef11da",
"allows_webhooks": false,
"expires_in": 899,
"status_polling_interval": 5,
"additional_info": null
}
}
The PAR Pay response will contain the following properties - Payment and Gift Cards:
| Attribute | Type | Example Value | Description |
|---|---|---|---|
payment_processor_type_id |
id | 35 |
Payment processor type id 35 - gift cards processor, 32 - PAR pay processor (Payment Processors) |
payment_init_hash |
string | "021224037b0e8916a8ff54f085297f82" |
Payment hash uniquely identifying the initiated transaction |
allows_webhooks |
bool | false |
Boolean flag identifying whether the payment processor supports webhook updates for payment status |
expires_in |
int | 899 |
Transaction validity time in seconds |
status_polling_interval |
bool | 5 |
Recommended status poll interval in seconds |
Apple Pay / Google Pay
Request payload for ApplePay / GooglePay payment methods (processed by PAR Pay)
| Attribute | Type | Example Value | Description |
|---|---|---|---|
venue_id |
string | "a9d6d0c8-1689-4114-b1ec-6da9c33f0384" |
UUID of Venue at which you are placing your order / making your payment |
payment_info.payment_method_id |
string | "85688223-b4ee-4c0f-8593-513c182ef7b1" |
Payment method UUID |
payment_info.amount |
int | 255 |
Payment amount (lowest unit) |
order_info |
Order object | Order object as you would send it to POST /orders - see Place order for Dine-in (QS) or Takeout for more information |
{
"amount": 2754,
"order_info": {
"combo_meals": [],
"customer_info": {
"demographics": [],
"email": "john.doe@partech.com",
"first_name": "John",
"last_name": "Doe",
"phone_number": "+381323132313"
},
"discount_cards": [],
"discounts": [],
"menu_items": [
{
"comment": "",
"id": "7296c4df-9c39-444e-ad06-18251855e9e6",
"modifiers": [],
"price_level_id": "c14e31c7-cbc1-446b-a901-85304e2243b1",
"quantity": 3
}
],
"order_type": {
"id": 6,
"pickup_asap": true,
"pickup_at": "2023-06-23 15:20:54",
"properties": {}
},
"singular_point_id": "84b64955-b91e-47de-a8ae-4148102776a7",
"tip": {
"percentage": 2
}
},
"payment_info": {
"amount": 2754,
"payment_method_id": "c14e31c7-cbc1-446b-a901-85304e2243b1"
},
"venue_id": "58b6a7f4-0dcb-4543-af38-f5529d2f7300"
}
As ApplePay and GooglePay are alternative payment methods and cannot be stored, we always send payment_method_id (for both auth and guest users).
Response for ApplePay and GooglePay:
{
"status": "OK",
"code": 200,
"data": {
"payment_processor_type_id": 32,
"payment_init_hash": "c4393f1cc452143db35dc3f3af97b673",
"allows_webhooks": false,
"expires_in": 899,
"status_polling_interval": 5,
"additional_info": {
"tokenType": 4,
"template": "wallet",
"isPayment": true,
"successUrl": "https://api-playground.menu.app/api/payment-processors/success?mt_application_id=683&mt_payment_init_hash=c4393f1cc452143db35dc3f3af97b673",
"failUrl": "https://api-playground.menu.app/api/payment-processors/fail?mt_application_id=683&mt_payment_init_hash=c4393f1cc452143db35dc3f3af97b673",
"aurusClientId": "7082505554600062",
"env": "sandbox",
"walletType": 29, // payment_method_id
"amount": "27.54",
"currency": "USD",
"country": "US",
"applePayId": 27, // payment_method_id
"googlePayId": 29, // payment_method_id
"appMatrix": "00000010001000000000000000000000",
"zeroAmount": "0.00",
"sessionId": "309100223174408561380000384143"
}
}
}
| Attribute | Type | Example Value | Description |
|---|---|---|---|
additional_info |
Object | For PARPay GooglePay and ApplePay "additional_info" object represents a set of properties specific for these Payment processors | |
additional_info.successUrl |
string | "<https://api-playground.menu.app/api/payment-processors/success?mt_application_id=683&mt_payment_init_hash=c4393f1cc452143db35dc3f3af97b673>" |
Redirect URL for success result |
additional_info.failUrl |
string | "<https://api-playground.menu.app/api/payment-processors/fail?mt_application_id=683&mt_payment_init_hash=c4393f1cc452143db35dc3f3af97b673>" |
Redirect URL for fail result |
aurusClientId |
string | "7082505554600062" |
Client ID from Aurus/PAR Pay |
env |
string | "production" |
Environment type - production or sandbox |
walletType |
id | "29" |
Indicates for which payment method id the payment is initialized ( 29 - GooglePay , 27 - ApplePay ) |
applePayId |
id | "27" |
Apple Pay ID from the PAR Ordering system and always is 27 |
googlePayId |
id | "29" |
Google Pay ID ID from the PAR Ordering system and always is 29 |
additional_info object is crucial for wallet initialization on the FE side, as everything is done by PAR Pay and the native approach is not applied for neither Google or Apple pay.