How payments work
The flow of an online payment with Vayapay, the key concepts of the API, and test and live mode.
Every online payment follows the same flow, whichever integration you choose. The integration decides who shows the payment form and how much of the flow you build yourself: see Choose your integration.
The payment flow
Your customer checks out
Your customer chooses what to buy in your webshop or app, or opens a payment link you sent them.
An order is created
The order holds what your customer pays for: the amount, the currency and a description. Depending on your integration, you create it, or Vayapay creates it for you, for example from a payment link.
Your customer pays
Your customer chooses a payment method and confirms the payment, for example with their card and 3-D Secure, or with Face ID in Apple Pay. This happens on the Vayapay payment page or in your own checkout.
The payment is approved or declined
Vayapay sends the payment to your customer's card issuer or bank, which approves or declines it.
You're notified
Vayapay lets you know when the status of the order changes. You don't depend on your customer returning to your website.
You deliver
When the order is paid, you deliver the goods or service. See Confirm the payment for how to check that you've been paid.
Key concepts
| Concept | What it is |
|---|---|
| Merchant | Your company, as registered with Vayapay. A merchant has one or more projects. |
| Project | One website, app or sales channel. Each project has its own API key, webhook URL and settings, and is either in test mode or live mode. |
| Order | What your customer pays for: an amount, a currency and a description. The order status tells you whether you've been paid. |
| Transaction | A payment attempt for an order with a specific payment method. An order can have several transactions, for example when the first attempt fails. |
| Webhook | A POST request from Vayapay to your server whenever the status of an order changes. |
All amounts are in the smallest unit of the currency (cents for EUR): send 1295 for € 12.95. Currencies use ISO 4217 codes, such as EUR, SEK or NOK.
Base your business logic on the order status, not on the transaction status. An order is paid when its status is completed. See Order and transaction statuses for every status.
Test mode and live mode
Every project is either in test mode or live mode, and uses the same API URL in both. In test mode, payments run against a sandbox: no money moves and you can't be charged. You can keep a project in test mode permanently, for example for your acceptance environment.
Use a separate project for each environment, so test payments never mix with real ones.
Payment methods
| Type | Payment methods |
|---|---|
| Cards | Visa, Mastercard, Maestro, American Express |
| Wallets | Apple Pay, Google Pay, PayPal |
| Bank and account-to-account | SEPA Direct Debit, Swish, Vipps MobilePay |
| Buy now, pay later | Billink |
See Payment methods for the operations each method supports. Which payment methods are active for your account depends on your agreement with Vayapay.
Platforms and software vendors
If you build software that many merchants use, such as a marketplace, booking system or e-commerce platform, you can onboard merchants and manage their projects through the API. This needs a platform account.