# API integration: accept payment by bank transfer

> Offer virement.tn as a payment method: direct bank transfer, validation code, signed webhook — with no card gateway and no redirect.

Source : https://virement.tn/en/api-integration — last updated : 2026-09-19

**What virement.tn is not**: a card payment gateway. There is no hosted payment page, no redirect, and no “paid” response at the end of the API call. When the call returns, the order is not paid — it is *committed*. You release it when the webhook is received, not before.

## The buyer journey

## Prerequisites

- An active virement.tn merchant account.
- A **verified RIB** attached to that account — without it, invoice creation is refused. Verification is done from your virement.tn space (Settings → RIB).

## Authentication principle

Every request carries an API key in an `X-Api-Key` header. The key is generated from your virement.tn space (Settings → API keys → Create a key, Manager role required) and is tied to your account: you can only invoice for yourself. The key and the webhook signing secret are displayed only once, at creation — a key can be revoked at any time.

## The validation code

The centerpiece of the journey: it proves the buyer's consent and replaces entering a card number. The buyer finds it in their own virement.tn space (“My validation code”) — so your payment form asks for just two fields: their phone number and this code. The code is single-use and expires after 24 hours.

## Confirmation webhook

As soon as the buyer's bank confirms that the transfer was executed, virement.tn notifies your webhook URL (configured when the key was created) with a signed payload — this signal, and only this signal, should trigger delivery of the ordered good or service.

For how the platform works in general, see [how it works](/en/how-it-works).

To get the technical reference and sandbox access, [contact us](/en/contact). Step-by-step guide: [accepting bank transfer payments on your e-commerce site](/en/blog/accept-bank-transfer-payments-on-your-website).

## Frequently asked questions

### Does the invoice-creation API call confirm the payment?

No. When the call returns, the order is committed, not paid. It should be released only when the confirmation webhook is received, which signals that the bank has confirmed the transfer.

### How is the call authenticated?

With an API key sent in the X-Api-Key header, generated from your virement.tn space (Settings, API keys). It is tied to your account: you can only invoice for yourself.

### Where can I find the full technical reference?

It is provided directly to partners during integration, with the endpoints, formats and sandbox environment. Write to us from the Contact page to get it.
