Demo Storefront vs. Sandbox API

  • Demo Storefront — A reference customer journey for demonstration only. It does not process a real payment and is not the vendor's production integration.
  • Sandbox API — A non-production version of the Vendora POS API for vendor development and testing. Use only sandbox credentials and test data here.
  • Vendor integrations must call/api/v1/pos/* endpoints directly from a secure vendor backend or POS service.
  • Vendor API credentials must never be exposed in browser JavaScript, URLs, screenshots, logs or source control.
  • The Demo Storefront uses internal Nuxt/Nitro proxy routes such as /api/storefront/* and /api/vendor-dashboard/*. These are sandbox portal internal proxies — not vendor integration endpoints.
Integration flow
Validate→Products→Customer→Hold→Vendor Payment→Sale→Transaction→E-Ticket→Delivery
Vendor API base${API_BASE_URL}/api/v1/posConfigured via NUXT_VENDORA_API_BASE_URL. Do not hardcode a domain.
1

Obtain your sandbox credentials securely

Contact your Vendora integration manager to receive your sandbox credentials. Do not attempt to derive credentials from this portal or from any example in this documentation.

ℹ️ Your integration manager will supply: API key, Store code, POS code (where required), approved API scopes/abilities, and the sandbox API base URL.
⚠️ Never place API keys in frontend code, browser storage, query strings, URLs, screenshots, logs, public repositories or support tickets.
⚠️ If a key is exposed, stop using it immediately and contact the Vendora integration manager for rotation.
2

Validate credentials

Before building further, confirm your API key is active and inspect the resolved vendor, store, POS terminal and granted scopes. This is a connectivity and configuration check — call it from your vendor backend, not from a browser.

POST/api/v1/pos/auth/validatescope: none
POST {API_BASE_URL{'}'}/api/v1/pos/auth/validate

X-Vendora-Api-Key:    <your-api-key>
X-Vendora-Store-Code: <your-store-code>
Accept:               application/json

Response 200 — envelope.response:
{
  "api_key": {
    "name": "Sandbox Key",
    "scope_mode": "vendor_wide",
    "abilities": ["products:read", "customers:write", "tickets:hold", "sales:write", "sales:read", "etickets:download", "tickets:read", "sms:read", "sms:retry"]
  },
  "vendor": { "code": "VENDOR01", "name": "Demo Vendor" },
  "store":  { "code": "STORE01",  "name": "Demo Store"   },
  "pos":    null
}
ℹ️ A POS code is not required for validation — the endpoint returns whichever context your key and store code resolve to.
3

Retrieve active products

Fetch the list of active draw products allocated to your store. Products include pricing, quantity limits, draw dates and any active promotional coupon. An empty array is a valid response meaning no draws are currently active.

GET/api/v1/pos/productsscope: products:read
GET {API_BASE_URL{'}'}/api/v1/pos/products

X-Vendora-Api-Key:    <your-api-key>
X-Vendora-Store-Code: <your-store-code>
Accept:               application/json

Response 200 — envelope.response.products (array):
{
  "product_id": 251,
  "product_name": "Grand Lucky Draw",
  "series_no": "GLD-2025-A",
  "price": 35.00,
  "minimal_quantity": 1,
  "maximal_quantity": 10,
  "available_quantity": 1250,
  "draw_date": 1736967600,
  "coupon": [{ "id": 900, "name": "Buy 2 Get 1", "buy_x": 2, "get_y": 1 }]
}
ℹ️ Cache product data conservatively on your backend. Availability figures are best-effort snapshots — always check the hold response for authoritative counts.
4

Upsert the customer

Create or update a customer record in the Vendora system. The returned vendor_customer_id must be stored by your backend and used in all subsequent hold and sale requests for this customer. A customer upsert is required before any promotional hold. Do not submit identity document numbers here — KYC attestation is provided at sale time.

POST/api/v1/pos/customers/upsertscope: customers:write
POST {API_BASE_URL{'}'}/api/v1/pos/customers/upsert

X-Vendora-Api-Key:    <your-api-key>
X-Vendora-Store-Code: <your-store-code>
Content-Type:         application/json
Accept:               application/json

Request body:
{
  "vendor_customer_id": "VENDOR-CUSTOMER-1001",
  "first_name": "Ahmed",
  "last_name": "Al-Rashid",
  "email": "customer_email_here",
  "mobile": "501234567",
  "mobile_country_id": 217,
  "full_mobile": "+971501234567",
  "nationality": "AE",
  "date_of_birth": "1990-01-15",
  "address": {
    "country_id": 217,
    "state_id": 1,
    "city_id": 0,
    "address_line_1": "123 Test Street",
    "address_line_2": null
  }
}

Response 200 (CUSTOMER_MAPPED) — envelope.response:
{
  "vendor_customer_id": "VENDOR-CUSTOMER-1001",
  "mapping_status": "linked",
  "match_method": "created",
  "review_required": false
}
ℹ️ The response code may be 200 CUSTOMER_MAPPED (normal) or 202 CUSTOMER_PENDING_REVIEW. If review_required is true, the customer cannot use promotional holds until review is resolved.
⚠️ Do not submit identity document numbers (passport, national ID, etc.) in this request. KYC attestation is provided in the Create Sale request body at checkout time.
5

Retrieve available tickets (optional — ticket-selection mode)

If your integration allows customers to choose specific ticket numbers, fetch the available ticket inventory for the product first. This step is optional for quantity-mode holds.

GET/api/v1/pos/products/{productId}/available-ticketsscope: tickets:read
GET {API_BASE_URL{'}'}/api/v1/pos/products/251/available-tickets?cursor=<next_cursor>

X-Vendora-Api-Key:    <your-api-key>
X-Vendora-Store-Code: <your-store-code>
Accept:               application/json

Response 200 — envelope.response:
{
  "product": { "product_id": 251, "price": 35.00, "minimal_quantity": 1, "maximal_quantity": 10 },
  "tickets": [
    { "ticket_id": 101, "ticket_number": "386216", "lucky_number": null },
    { "ticket_id": 102, "ticket_number": "386217", "lucky_number": null }
  ],
  "available_quantity": 1250,
  "pagination": { "next_cursor": 102, "has_more": true },
  "availability_checked_at": "2026-10-16T11:30:00.000000Z"
}
⚠️ Availability is a snapshot only. A ticket shown as available may be taken by a concurrent request before your hold is created. Never promise a specific ticket to the customer until the hold succeeds. Always handle a 409 TICKET_SELECTION_UNAVAILABLE response gracefully.
6

Create a ticket hold

Reserve tickets temporarily. A hold does not issue tickets or make them valid draw entries — it only reserves inventory while the customer completes payment. The hold expires automatically if not converted to a sale before the backend-configured expiry time. A valid POS code and an Idempotency-Key are required.

POST/api/v1/pos/ticket-holdsscope: tickets:hold
POST {API_BASE_URL{'}'}/api/v1/pos/ticket-holds

X-Vendora-Api-Key:    <your-api-key>
X-Vendora-Store-Code: <your-store-code>
X-Vendora-POS-Code:   <your-pos-code>
Idempotency-Key:      hold-<stable-uuid-per-logical-hold>
Content-Type:         application/json
Accept:               application/json

Quantity mode:
{ "product_id": 251, "quantity": 2 }

Ticket-selection mode:
{ "product_id": 251, "ticket_ids": [101, 102] }

Promotional hold:
{ "product_id": 251, "quantity": 3, "coupon_id": 900, "vendor_customer_id": "VENDOR-CUSTOMER-1001" }

Response 201 (TICKETS_HELD) — envelope.response:
{
  "hold_reference": "hld_opaque-reference-string",
  "product_id": 251,
  "quantity": 2,
  "expires_at": "2026-10-16T12:10:00+04:00",
  "tickets": [
    { "ticket_id": 101, "ticket_number": "386216" },
    { "ticket_id": 102, "ticket_number": "386217" }
  ],
  "promotion": null
}
⚠️ 409 TICKET_SELECTION_UNAVAILABLE means the selected ticket(s) are no longer available. Refresh availability and allow the customer to reselect before retrying.
⚠️ Store the hold_reference and the amount implied by promotion (or unit price × quantity) securely on your backend. You will need both at sale time.
⚠️ Use a new, stable Idempotency-Key per logical hold. Reusing the same key with the same body safely replays the original result. Reusing it with a different body causes a 409 HOLD_IDEMPOTENCY_CONFLICT.
7

Process payment through the vendor's own payment gateway

Vendora does not process card or cash payments. Your vendor backend or POS system collects payment from the customer and receives a payment result from your payment gateway. Record the payment transaction ID, result status, result code and receipt reference — you must submit these to Vendora in the next step.

⚠️ Card numbers, CVV values and other sensitive card data must never be sent to Vendora.
⚠️ Do not call the Create Sale endpoint until payment is confirmed. Revenue settlement and gateway processing are outside the Vendora POS API scope.
⚠️ If the payment fails, release the hold using DELETE /api/v1/pos/ticket-holds/{reference} to free inventory immediately.
8

Submit the sale

Submit the hold reference(s), confirmed payment result and KYC attestation to create the sale and issue the tickets. Vendora validates the submitted payment amount against the amount protected by the hold. Use a separate, stable Idempotency-Key for the sale — distinct from the hold key. A valid POS code is required.

POST/api/v1/pos/salesscope: sales:write
POST {API_BASE_URL{'}'}/api/v1/pos/sales

X-Vendora-Api-Key:    <your-api-key>
X-Vendora-Store-Code: <your-store-code>
X-Vendora-POS-Code:   <your-pos-code>
Idempotency-Key:      sale-<stable-uuid-per-logical-sale>
Content-Type:         application/json
Accept:               application/json

Request body:
{
  "hold_references": ["hld_opaque-reference-string"],
  "vendor_order_id": "VENDOR-ORDER-1001",
  "vendor_order_reference": "VENDOR-RECEIPT-1001",
  "vendor_customer_id": "VENDOR-CUSTOMER-1001",
  "kyc": {
    "attestation_method": "VENDOR_MANUAL",
    "attested_at": "2026-10-16T10:15:00+04:00",
    "document_type": "PASSPORT",
    "document_number": "P12345678",
    "document_expiry_date": "2028-06-30",
    "document_country_id": 217
  },
  "payment": {
    "provider": "Vendor POS",
    "transaction_id": "PAYMENT-1001",
    "payment_method": "CARD",
    "result_status": "PAID",
    "result_code": "00",
    "result_message": "Approved",
    "amount": 70.00,
    "currency": "AED",
    "paid_at": "2026-10-16T10:14:30+04:00",
    "receipt_reference": "RECEIPT-1001"
  }
}

Response 201 (SALE_ISSUED) — envelope.response.sale:
{
  "order_reference": "ORD-xyz789",
  "payment_status": "PAID",
  "ticket_status": "ISSUED",
  "ticket_count": 2,
  "total_amount": "70.00",
  "currency": "AED",
  "email_delivery_status": "QUEUED"
}
ℹ️ Resubmitting with the same Idempotency-Key and identical body safely replays the original result (idempotent_replay: true in the response). Use this to safely retry on network failure without creating a duplicate order.
⚠️ The payment.amount must exactly match the hold-protected amount. A mismatch returns 422 PRICE_VALIDATION_FAILED.
⚠️ email_delivery_status in the sale response (e.g. QUEUED) is an asynchronous delivery indicator — it does not affect whether the sale was issued or whether the PDF can be downloaded.
9

Retrieve the transaction

After the sale, retrieve the full transaction detail to confirm issuance, inspect the ticket breakdown and check delivery status fields.

GET/api/v1/pos/transactions/{order}scope: sales:read
GET {API_BASE_URL{'}'}/api/v1/pos/transactions/ORD-xyz789

X-Vendora-Api-Key:    <your-api-key>
X-Vendora-Store-Code: <your-store-code>
Accept:               application/json

Response 200 — envelope.response.transaction (key fields):
{
  "order_reference": "ORD-xyz789",
  "payment_status": "PAID",
  "status": "ISSUED",
  "ticket_count": 2,
  "total_amount": "70.00",
  "currency": "AED",
  "email_status": "QUEUED",
  "created_at": "2026-10-16T10:15:00.000000Z",
  "issued_at": "2026-10-16T10:15:02.000000Z"
}
ℹ️ You can also retrieve the full ticket list via GET /api/v1/pos/tickets or a single ticket via GET /api/v1/pos/tickets/{ticket_id}.
10

Download the e-ticket PDF

Download the issued e-ticket as a PDF binary. The transaction must be successfully issued. Download is independent of email delivery status — you do not need to wait for email_status to be SENT. The API key must be sent in a request header and must never appear in the download URL.

GET/api/v1/pos/transactions/{order}/e-ticketscope: etickets:download
GET {API_BASE_URL{'}'}/api/v1/pos/transactions/ORD-xyz789/e-ticket

X-Vendora-Api-Key:    <your-api-key>
X-Vendora-Store-Code: <your-store-code>
Accept:               application/pdf

Response 200:
Content-Type: application/pdf
Content-Disposition: attachment; filename="Vendora-e-ticket-ORD-xyz789.pdf"
Cache-Control: no-store, private

<binary PDF data>
⚠️ The API key must be sent in the X-Vendora-Api-Key header. Never place it in the URL query string, browser-accessible storage or JavaScript. Any browser-triggered download must be proxied through an authorised server-side route.
11

Check asynchronous delivery status

E-ticket email and SMS delivery are asynchronous background processes. They do not affect whether the sale was successfully issued or whether the PDF can be downloaded. Query the delivery status endpoints separately if you need to surface delivery state to staff or customers.

Check SMS status:
GET {API_BASE_URL{'}'}/api/v1/pos/transactions/ORD-xyz789/sms
Scope: sms:read

Retry SMS if needed:
POST {API_BASE_URL{'}'}/api/v1/pos/transactions/ORD-xyz789/sms/retry
Scope: sms:retry

Response 202 (SMS_RETRY_QUEUED) means the retry was queued — not that the SMS was delivered.
Query the SMS status endpoint after retrying to check the updated delivery state.
ℹ️ SMS availability depends on the configured provider and environment. An ACCEPTED or DELIVERED status from the SMS endpoint means the provider accepted/confirmed delivery — not that the customer has read the message. Do not reverse or void a sale based on delivery failure.

Release Hold

If a customer cancels checkout, payment fails, or a cart is abandoned, immediately release the hold to return reserved tickets to inventory rather than waiting for automatic timeout expiration.

DELETE/api/v1/pos/ticket-holds/{reference}scope: tickets:hold
DELETE {API_BASE_URL{'}'}/api/v1/pos/ticket-holds/hld_opaque-reference-string

X-Vendora-Api-Key:    <your-api-key>
X-Vendora-Store-Code: <your-store-code>
X-Vendora-POS-Code:   <your-pos-code>
Accept:               application/json

Response 200 (TICKET_HOLD_RELEASED) — envelope.response:
{
  "hold_reference": "hld_opaque-reference-string",
  "released_quantity": 2
}
ℹ️ A valid POS context header (X-Vendora-POS-Code) is required. Releasing an already-released, expired or completed hold may return 404 HOLD_NOT_FOUND or 409 HOLD_EXPIRED — treat these as idempotent successes since the hold is no longer active.

Vendora Response Envelope

Every Vendora API response wraps business data in a consistent envelope. Business data is always in response, never in data. Preserve the tracing_id for support requests.

{
  "status":        200,
  "code":          "OPERATION_CODE",
  "message":       "Human-readable description.",
  "tracing_id":    "req-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "version":       "1.0",
  "errors":        null,
  "encrypted_data": null,
  "response":      { }
}

Notes:
- Business data is always in "response", never in "data".
- "errors" is an array of { code, field, message } objects when status is not 2xx.
- Preserve "tracing_id" in your logs for every request — required for support.
- "code" is an operation-specific string (e.g. TICKETS_HELD, SALE_ISSUED, CUSTOMER_MAPPED).

Request Headers Reference

These headers must be set by your vendor backend on every call to the Vendora POS API. They must never be set or read by browser client-side code.

HeaderWhen RequiredRequired
X-Vendora-Api-KeyAll authenticated endpoints. Identifies and authenticates the vendor integration.Required
X-Vendora-Store-CodeAll authenticated endpoints. Selects the authorised store for the operation.Required
X-Vendora-POS-CodeRequired for Create Hold, Release Hold and Create Sale. Selects the authorised POS terminal.Conditional
X-Request-IDRecommended for all requests. A vendor-generated UUID for end-to-end tracing.Optional
Idempotency-KeyRequired for Create Hold and Create Sale. A stable vendor-generated key per logical operation. Use a new key for a new action; reuse for retries of the same action.Conditional
Content-TypeRequired for requests with a JSON body (POST/PATCH). Must be application/json.Conditional
Acceptapplication/json for all JSON endpoints. application/pdf for the e-ticket download endpoint.Required

Error Handling

All error responses use the standard Vendora envelope with a non-2xx HTTP status and an errors array.

{
  "status":    422,
  "code":      "VALIDATION_ERROR",
  "message":   "The given data was invalid.",
  "tracing_id": "req-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "version":   "1.0",
  "errors": [
    { "code": "VALIDATION_ERROR", "field": "payment.amount", "message": "The amount must match the hold total." }
  ],
  "encrypted_data": null,
  "response":  null
}
ℹ️ Always log the tracing_id from error responses — include it in any support request to the Vendora integration team.