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.
  3. The prepay_hold method (payload method.slug = prepay_hold, method.hold_id = <state.deposit_holds[].id>) confirms and applies an active prepaid hold associated with the visit. Use the corresponding entry returned in payment_methods; it has is_applicable=true, is_partial_allowed=false, and supplies the full applicable_amount. When every Service item of the Visit is covered by the hold, paying with a Membership instead returns HTTP 400 with the localized message "Membership cannot be used to pay a visit with a prepaid hold" in meta.message.
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": [ … ], "deposit_holds": [ … ], "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": [] }