Test payments for AI-driven development

Ask your coding agent to use Veracity Pay. Through MCP it asks which payment partners to emulate, registers the account and e-mails you the keys – without ever seeing a secret.

8 payment partners: Stripe, Nets Easy, Adyen, Kustom, Swish, Svea, Walley and Qliro. Free for now.

The MCP server in three steps. The agent does the rest.

1

Add the MCP server

claude mcp add --transport http veracity-pay https://pay.veracity.se/mcp
granbacken-app
~/app$claude mcp list
veracity-payHTTPok
register_merchanttool1/8
integration_guidetool2/8
complete_checkouttool3/8
2

Ask the coding agent

“I want us to use Veracity Pay to emulate payments in this project.”

Coding agent
Which payment providers do you want to emulate?
Stripe and Nets Easy
And which e-mail should own the account?
3

Get the API keys by e-mail

Merchant ID, keys and ready commands arrive in your inbox. The agent sees no secrets.

Your Veracity Pay keys
3 of 4
  • .env.local, 7 lines
  • vercel env add, 7 commands
  • Webhook URL connected
  • First test payment

Hosted checkout with a test mode

The customer enters an e-mail, picks card, Swish, invoice or bank transfer and approves with the code. In the test panel you choose whether the payment is approved, declined, pending or needs 3-D Secure.

Read about test mode

Eight payment partners, the same flows. Go live by changing the host and the keys.

Checkout Sessions, PaymentIntents, subscriptions, refunds and webhooks with the same objects and id prefixes as Stripe. Stripe’s own SDK works against the base URL.

Read about the Stripe flavour
TSbilling/checkout.ts200 OK
const session = await vp.checkout
  .sessions.create({
  mode: "subscription",
  line_items: [{ price: planId }],
  customer_email: user.email,
  client_reference_id: org.id,
  success_url: `${APP}/klar`,
  cancel_url: `${APP}/planer`,
});
Monthly plan in SEK; send the customer to url.

Signed webhooks to your app

Every event carries Veracity-Signature, an HMAC-SHA256 you verify with your secret. If your app does not answer 2xx, we retry for a day.

8 attempts with backoff, from 10 s to 24 h

Every attempt with its status code in the dashboard

Resend with one button

Read about webhooks
TSapp/api/webhooks/route.ts200 OK
export async function POST(req) {
  const raw = await req.text();
  const sig = req.headers
    .get("veracity-signature");
  const ev = await constructEvent(
    raw, sig, SECRET);
  await handle(ev);
  return Response.json({ ok: true });
}
The signature is checked first.
  • invoice.paid200 from your app · 84 ms
  • checkout.session.completedSignature valid

Test every outcome before your customers do. Without a single real krona.

Declines payments with a chosen reason

Insufficient funds, a blocked card, 3-D Secure or a timeout – per payment or for the next renewal.

Next charge · Association plan
1 of 4 on
  • Decline: insufficient fundsinvoice.payment_failed
  • Decline: card blockedrestricted_card
  • Timeout after 30 sNobody confirms the charge
  • Always appliesOtherwise only next time

Renews subscriptions with a test clock

Move the clock a month: the invoice is created, charged without a code and invoice.paid is sent.

Test clock: +1 month
4 of 5
  • Invoice GRANB-0002 created
  • SEK 99.00 charged, Visa •••• 4242
  • invoice.paid delivered
  • Receipt in the test inbox
  • Next charge 7 January

Runs the payment flow in your tests

Complete a checkout through the API with the outcome you pick, without a browser, and check webhooks in CI.

granbacken/appzsh
~/app$pnpm test:payments
checkout.test.ts12 tests1.4s
renewals.test.ts9 tests2.1s
webhooks.test.ts7 tests0.9s
Tests28 passed(28)

Collects e-mail in the test inbox

Codes, receipts and invoices land in a searchable inbox. With a Resend key they are also sent for real.

  • Your code: 482 913Approve SEK 99.00 to Granbacken
  • Receipt for invoice GRANB-0001Anna Lind
  • Refund SEK 250.00Road fee 2027

Common questions

Everything else is in the docs.

Read the docs

Does it cost anything?

Not right now – Veracity Pay is free for developers to use. It is a test environment and no money moves.

Does the agent see my keys?

No. The keys are e-mailed to you, and the test tools read the key from the MCP configuration.

Does Stripe’s own SDK work?

Yes, for the common calls. Point it at the base URL with your vp_sk_test key.

How do I test a renewal?

Move the test clock a month. The renewal is charged without a code and sends invoice.paid.

Why do the keys expire?

They last one month at a time. Extend with one click in the dashboard or with extend_key.

Which payment methods are there?

Card, Swish, invoice and instalments, bank transfer and wallets.