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

  • Version of the API that client app expects

  • 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.

    • 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.

      Properties: 5
      Empty object

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": "",
    "stored_payment_method_id": "",
    "amount": 1094,
    "is_deposit": true,
    "split_payment_parent_hash": ""
  }
}'
{
  "status": "string",
  "code": 1,
  "data": {
    "payment_init_hash": "string",
    "payment_method_id": "123e4567-e89b-12d3-a456-426614174000",
    "payment_processor_type_id": 1,
    "amount": 1,
    "is_deposit": true,
    "allows_webhooks": true,
    "expires_in": 1,
    "status_polling_interval": 1,
    "additional_info": null,
    "actions": [
      {
        "type": "redirect",
        "url": "string",
        "method": "POST",
        "params": "string"
      }
    ],
    "config": [
      {}
    ]
  }
}