Developers / Public API API v1

Public API for secure payment integration.

VPOS.am connects a merchant backend to a payment interface hosted by its bank or licensed payment provider. That bank or provider handles funds under a separate merchant agreement; VPOS.am never handles customer funds.

  • The merchant bearer token must remain on a trusted backend.
  • A browser return from checkout is not proof of payment.
  • Signed webhook events must be processed idempotently.
Sections

Public API scope

Documented

Payment-session creation, payment status lookup, non-sensitive health/readiness checks, signed webhooks, and idempotent retries.

Not documented here

Console/admin endpoints, operator tokens, provider credentials, bank secrets, payout details and internal reconciliation controls.

Production access

Production access is approved for a specific installation and provider route after merchant and domain verification, confirmation of the provider contract and credentials, callback checks, and the required sandbox evidence. Refund, cancellation, and reconciliation evidence is required when the route supports those operations.

Do not call merchant API endpoints directly from browser code, and do not embed merchant secrets in mobile apps. Keep bearer tokens and webhook secrets only on trusted backend services.

Authentication and request format

Merchant API calls use an installation-scoped bearer token. Its server-side binding selects the merchant, channel, mode, provider route and credential; request bodies cannot override that binding.

Base URL
https://api.vpos.am
Authorization
Authorization: Bearer <merchant_api_token>
Request body
application/json
API version
v1

Send credentials only over HTTPS from a trusted backend. Never place a merchant token in a browser bundle, mobile application or public site-builder setting.

Quick start

A minimal integration has three server-side steps: create a payment session, redirect the buyer to the returned checkoutUrl, and confirm the final status through a signed webhook or status lookup.

  1. Create a payment session with a stable merchant order reference and Idempotency-Key.
  2. Redirect the buyer to the checkoutUrl returned by VPOS.am.
  3. Fulfill the order only after a signed webhook or server-side status lookup confirms paid.

The browser return URL is not proof of payment. Treat it as a user-interface event only. Fulfillment must wait for server-side verification or a signed webhook event.

Core endpoints

These cards cover the primary merchant payment flow. The complete list of public operations and schemas is available in the OpenAPI 3.1 specification.

GET/api/health
Public #

Returns non-secret runtime status for monitoring and integration checks. The response can include readiness blockers, but clients should not treat blocker text as a stable contract.

StatusMeaning
200Service is reachable. Readiness is reported in the JSON body.
405Unsupported HTTP method.
GET/v1/capabilities
Bearer token #

Returns the conservative provider capability matrix. Use it to gate PayLink, QR, refund, fiscalization and tokenization UI before enabling merchant-facing actions.

FieldRules
providers[].capabilitiesBoolean support/enabled flags per provider route.
connectors.statusSyncNormalized VPOS statuses and platform-specific status mappings. Browser return is never payment proof.
payment_links, qr_presentationEnabled only when the selected route can create payment sessions.
refund, capture, void, tokenization, subscriptionsPublic contracts are guarded. Execution is available only when the provider capability is enabled; otherwise requests return explicit disabled/not-configured errors.
POST/api/widget/checkout
Public #

Creates a hosted checkout from a public widget key for Webflow, Squarespace, Wix, Ucraft and simple landing pages. The browser never receives merchant API tokens or bank credentials; VPOS resolves the key, allowed origin, merchant and provider route server-side.

FieldRules
publicKeyPublic widget installation key bound to exact allowed origins server-side.
productIdConfigured product key. Amount should come from VPOS registry by default.
clientReferenceBrowser-generated idempotency reference for the click/order attempt.
returnUrlMust resolve to an allowed origin for the widget installation.
POST/v1/payment-sessions
Bearer token #

Creates a normalized payment session and returns a hosted checkout URL when the selected provider can initiate checkout.

FieldRules
merchantOrderIdRequired merchant-side order reference. Use a stable value for reconciliation.
amountMinorRequired integer amount in minor currency units.
currencyAPI enum: AMD, USD, EUR. The installation-scoped provider route and credentials determine which currencies are actually available.
returnUrlAbsolute HTTPS URL where the buyer returns after checkout.
customerOptional email, phone and name. Store only what your business process requires.
POST/v1/payments/{paymentId}/refunds
POST/v1/payments/{paymentId}/capture
POST/v1/payments/{paymentId}/void
Bearer token #

Guarded endpoints for refund, capture, void, fiscal retry, tokenization, and subscriptions require Idempotency-Key. Enabled provider routes execute server-side, and the local payment state changes only after the final provider status is verified.

FieldRules
Idempotency-KeyRequired for every operation that affects the payment amount or lifecycle.
refundRequires verified paid/partially_refunded payment, amountMinor, matching currency and reason.
capture, voidCapture requires authorized payment. Void/cancel requires a provider-eligible authorized or paid payment. Browser return is never used as proof.
tokenizationRaw card data is rejected; provider-hosted token lifecycle and consent are required.
subscriptionsRequire a provider token and failed-renewal behavior before execution can be enabled.
GET/v1/payments?paymentId={paymentId}
Bearer token #

Returns the current normalized payment state for a previously created session.

StatusRecommended handling
created, pending_*, authorizedDo not fulfill. Continue polling or wait for a webhook.
paidFulfillment may proceed after amount, currency and order reference are matched.
failed, cancelled, expiredShow failure state or create a new payment attempt.
refunded, partially_refunded, reversed, disputedSync accounting, CRM and customer support workflows.

Webhooks

Webhook delivery is configured per merchant installation during onboarding. Your endpoint should verify the HMAC signature, persist the event id, return quickly and process business side effects in a queue.

JSON
{
  "id": "evt_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
  "type": "payment.status_changed",
  "livemode": false,
  "createdAt": "2026-05-25T08:00:00.000Z",
  "trigger": "provider_callback",
  "data": {
    "payment": {
      "id": "pay_abcdef012345678901",
      "merchantOrderId": "order-1001",
      "provider": "ameriabank_vpos",
      "amountMinor": 15000,
      "currency": "AMD",
      "status": "paid",
      "fiscalStatus": "not_required"
    }
  }
}

Signature header format: X-VPOS-Signature: t=<unix_timestamp>,v1=<hex_hmac_sha256>. Compute HMAC-SHA256 over <timestamp>.<raw_request_body> with the merchant webhook secret and apply the default five-minute timestamp tolerance. During secret rotation the header may contain multiple v1 values; accept the event when any candidate securely matches a current or still-valid grace-period secret. Delivery also includes X-VPOS-Event-Id, X-VPOS-Event-Type and X-VPOS-Webhook-Timestamp.

Idempotency

Use Idempotency-Key for retryable operations such as payment-session creation. Store the key with the order and payment attempt in your system. A network retry must not create a second payable order or invoice.

  • Use a deterministic key per order payment attempt, not a random key for every retry.
  • Keep separate keys for separate user-initiated attempts.
  • Log paymentId, merchantOrderId, amountMinor, and currency together.

Errors

HTTP statusMeaningIntegrator action
401Missing or invalid merchant bearer token.Do not retry blindly. Rotate or reissue credentials.
403Request origin is not trusted.Use server-to-server requests or register the backend origin.
422Validation failed.Fix request data before retrying.
429Rate limited.Back off and retry with jitter.
503Provider, storage or authentication dependency is not ready.Retry later or contact support if this blocks production.

Security rules

  • Never expose merchant bearer tokens, webhook secrets or provider credentials in frontend code.
  • Use HTTPS only and verify server certificates in backend clients.
  • Accept a payment as final only after server-side status confirmation.
  • Validate amount, currency and merchant order id before changing order, CRM or ERP state.
  • Store webhook event ids and reject duplicate side effects.
  • Log failed signature checks and unexpected status transitions without storing unnecessary personal data.

This public page intentionally does not include production tokens, internal console routes, private provider callbacks, database details or bank credentials.

CMS and site builders

With Tilda, WooCommerce, OpenCart, and CS-Cart, VPOS.am remains the server-side technical integration layer. The site receives only channel settings and public redirect URLs; bank or licensed-provider credentials remain inside the protected VPOS.am runtime.

  • Tilda uses a merchant login, HMAC secret and Universal payment gateway checkout URL generated by VPOS.am; bank ClientID, login and password are not entered into Tilda.
  • Before live mode, the operator verifies website readiness, signed checkout payloads, provider route mapping, callback handling and a sandbox test payment.
  • The production switch remains a controlled operator action after the merchant contract, provider route and test evidence are confirmed.

Request access

To request pilot or production access, email info@vpos.am with your company name, website, integration type, expected bank or licensed payment provider, currencies, callback URL, and technical contact.

Before production access is approved, VPOS.am verifies merchant identity, domain ownership, callback security, test-payment results, refund and reconciliation procedures, and support responsibilities.