Skip to content

Payment at the Location Account and Loyalty (Various Methods)

Request

As a response, information about the Sale operation is returned

Security
BearerPartnerUser
Path
document_idnumberrequired

Document ID

location_idnumberrequired

Location ID

Headers
Acceptstringrequired

e.g. application/vnd.api.v2+json

Example:application/vnd.api.v2+json
Content-Typestringrequired

application/json

Authorizationstringrequired

Bearer partner_token, User user_token

Bodyapplication/jsonrequired
  1. In the case of payment by a gift card, if the user does not have the "Pay by gift card and membership without code" right, the "number" (string) parameter containing the gift card code must also be passed in the request body.
  2. In the case of payment by membership, if the user does not have the "Pay by gift card and membership without code" right, the "number" (string) parameter containing the membership code must also be passed in the request body.
Any of:

Payment at the checkout

paymentobject

Object containing the payment method

Example:
{ "method": { "slug": "account", "account_id": 90218 }, "amount": 123 }
curl -i -X POST \
  'https://developer.alteg.io/_mock/en/b2b-v1/openapi/locations/{location_id}/sale/{document_id}/payment' \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "payment": {
      "method": {
        "slug": "account",
        "account_id": 90218
      },
      "amount": 123
    }
  }'

Responses

OK

Bodyapplication/json
successboolean

Execution success status (true)

Example:true
dataobject

Object with data

Example:
{ "state": { "items": [ … ], "loyalty_transactions": [ … ], "payment_transactions": [ … ] }, "kkm_state": { "last_operation_type": 1, "transactions": [ … ] }, "payment_methods": [ { … }, { … }, { … }, { … }, { … }, { … }, { … } ] }
metaArray of objects

Metadata (empty array)

Example:
[]
Response
{ "success": true, "data": { "state": { … }, "kkm_state": { … }, "payment_methods": [ … ] }, "meta": [] }