Skip to Content
VantraAPI Docs

Getting started

Create and complete your first sandbox payment.

1. Prepare the merchant account

Sign in to the portal, create/select your merchant platform, and select TEST in the environment switcher. Open Settings → API keys, generate TEST keys if needed, and copy the API key and secret into your server environment. Keep the secret off the checkout browser.

2. Configure your callback

Open Settings → Webhooks and register an enabled TEST endpoint with type PAYMENT or ALL. Copy its signing secret. Follow callback configuration before simulating an outcome so an endpoint exists when the event is created.

3. Send the first signed request

Preview, copy, or download vantra-client.mjs beside your script. Set VANTRA_API_ORIGIN to the gateway origin provided for your deployment, without /api/v1. The example domain is a placeholder. Supply your order ID for duplicate-order checks. Idempotency-Key is optional and omitted below. After a timeout, reconcile the original order before creating another payment.

Preview, copy, or download Python helper. Express and Next.js require your own authentication/order adapters as explained in the method guide.

create-payment.mjs
import { gatewayRequest } from './vantra-client.mjs';
// Supply your order ID so the gateway can detect duplicate orders.
const payment = await gatewayRequest({
  origin: process.env.VANTRA_API_ORIGIN,
  apiKey: process.env.VANTRA_API_KEY,
  secret: process.env.VANTRA_API_SECRET,
  path: '/api/v1/payments/generate-ldb-qr',
  data: {
  "amount": 10000,
  "currency": "LAK",
  "orderId": "order-20261110-0001"
},
});
console.log(payment);

The helper returns the response envelope's data. Persist transactionId, orderId, referenceId, environment, and simulationId when present. Creation returns a pending instruction; it does not mean the customer paid.

4. Complete the sandbox flow

Open Sandbox or the returned deepLink. Select the payment and simulate SUCCESS, FAILED, EXPIRED, or CANCELLED. TEST QR values start with GATEWAY_TEST: and cannot be paid through a bank app. No funds move.

5. Confirm your integration

Verify the callback signature, store its event ID durably, and compare the order, amount, currency, and environment before marking the order paid. Confirm the transaction in Transactions. Exercise duplicate notifications and a failed outcome as well as success.

On this page