Rezva

Quickstart

Build the smallest working wallet integration: scan a QR, resolve its identifier, show a verified destination, and hand payment execution to the wallet.

1. Choose credentials

npm install @universal-payment/sdk

2. Resolve a test identifier

import { ResolverClient } from "@universal-payment/sdk";

const resolver = new ResolverClient({
  baseUrl: process.env.REZVA_API_BASE_URL!,
  apiKey: process.env.REZVA_FREE_API_KEY!,
});

const result = await resolver.resolve({
  type: "custom",
  value: "rezva-test-merchant",
});

if (result.status !== "active" || !result.payment_ready) {
  throw new Error(`Identifier is not payable: ${result.status}`);
}

3. Select and display a destination

const option = result.payment_options.find(
  (item) =>
    item.chain === "base" &&
    item.asset === "USDC" &&
    item.network_identifier === "eip155:84532" &&
    item.payment_ready,
);

if (!option) throw new Error("No Base Sepolia USDC option");
renderConfirmation({
  chain: option.chain,
  asset: option.asset,
  tokenContract: option.token_contract,
  recipient: option.address,
});

4. Execute in the wallet

  1. Ask the user to confirm chain, asset, amount, and recipient.
  2. Call the wallet’s existing ERC-20 transfer flow.
  3. Wait for the receipt and show the transaction hash.
  4. Never mark a payment successful from an unconfirmed client event.

Continue with Integration for QR parsing and production behavior, or run the shared Test Merchant flow with real Base Sepolia testnet funds.