Payment Initialization

​

The Payment Init endpoint initializes the payment flow for the cart content according to the payment method provided in the request.

Path Parameters

Headers

  • The key attribute of the application instance that sent the request

  • The release version your integration was built against — see Versioning in API Basics.

  • The identifier of device and/or client app that sent the request

Body

application/json
  • The object must contain a valid payment method ID or stored payment method ID, but never both. Optionally, the object may contain attributes specific to the payment processor used.

    The object must contain a valid payment method ID or stored payment method ID, but never both. Optionally, the object may contain attributes specific to the payment processor used.

Responses

  • application/json
    • Bad Request
    • Cart not verified for checkout
    • Cart contains unavailable products
    • Venue ID=:venue_id, :venue_name is closed
  • Cart with provided ID could not be found.

Request Example for post/cart/{cart_id}/payments/init
curl 'https://api-public-demo.menu.app/api/cart/{cart_id}/payments/init' \
  --request POST \
  --header 'Application: ' \
  --header 'Api-Version: ' \
  --header 'Device-UUID: ' \
  --header 'Content-Type: application/json' \
  --data '{
  "payment_info": {
    "payment_method_id": "123e4567-e89b-12d3-a456-426614174000",
    "stored_payment_method_id": "123e4567-e89b-12d3-a456-426614174000",
    "amount": 1094,
    "is_deposit": true,
    "split_payment_parent_hash": ""
  }
}'
PAR Pay (38), card the customer has not saved
{
  "status": "OK",
  "code": 200,
  "data": {
    "payment_init_hash": "032878b199f90e13e1bdce036e00f157",
    "payment_method_id": "0d6b5a4e-3f23-11ed-936c-1a67b454859d",
    "payment_processor_type_id": 38,
    "amount": 1094,
    "is_deposit": false,
    "allows_webhooks": false,
    "expires_in": 1799,
    "status_polling_interval": 5,
    "additional_info": {
      "iframeUrl": "https://parpay.example.com/iframe?session=a0f3c1e9-5b7d-4e2a-9c61-3f8d2b7a6e10"
    }
  }
}