QashX Pay Quick Start

Create a payment, retrieve it, and receive a webhook in about five minutes.

Use the Developer Portal to create a test API key, then call the public API or SDK with provider-agnostic payment fields.

1. Create an API key

  1. Sign in to the Developer Portal at /admin/developers.
  2. Click New key, choose the test environment, and grant payments:read and payments:write.
  3. Copy the plaintext secret shown once and keep it secure.

2. Install or import an SDK

JavaScript / TypeScript

import { QashxClient } from "@/lib/qashx-sdk";

Python

pip install qashx

3. Create your first payment

const client = new QashxClient({
  apiKey: process.env.QASHX_API_KEY!,
  baseUrl: "https://ecmxmvrimionqhpbjguc.supabase.co",
});

const payment = await client.payments.create({
  amount_minor: 4999,
  currency: "EUR",
  method_kind: "card",
  payer: { email: "buyer@example.com", name: "Ada Lovelace" },
  metadata: { order_id: "ORD-1042" },
}, { idempotencyKey: crypto.randomUUID() });

console.log(payment.reference, payment.status);

4. Subscribe to webhooks

const endpoint = await client.webhooks.create({
  url: "https://api.example.com/qashx/webhook",
  events: ["payment.completed", "payment.failed", "payment.refunded"],
  environment: "test",
});

console.log("Store this signing secret now:", endpoint.secret);

Verify every delivery using the HMAC signature. See the webhooks guide.

5. Drive the sandbox

Any qxk_test_... key can use the sandbox simulator.

const payment = await client.sandbox.createPayment({
  amount_minor: 1000,
  currency: "USD",
  outcome: "success",
});

await client.sandbox.advancePayment(payment.id, "refunded");