Paytrim

Overview

Accept online payments with Paytrim through one API, from a hosted checkout to a fully custom integration.

Paytrim lets you accept online payments in your webshop, app or platform. You connect once to the Paytrim API and offer a variety of payment methods to your customers.

How a payment works

Every online payment follows the same flow, whichever integration you choose.

Create an order

Your server sends the amount, currency and a return_url to the API. The API responds with an order and a URL to the payment page.

Your customer pays

You redirect your customer to the payment page. They select a payment method and complete the payment, including any authentication such as 3-D Secure.

Your customer returns

After the payment, your customer is redirected to your return_url.

You receive a webhook

Paytrim notifies your server every time the order status changes. The notification contains the order ID, not the status.

You check the status and deliver

Your server retrieves the order from the API. When the status is completed, you deliver the goods or service.

Key concepts

ConceptWhat it is
MerchantYour company, as registered with Paytrim. A merchant has one or more projects.
ProjectOne 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.
OrderWhat your customer pays for: an amount, a currency and a description. The order status tells you whether you've been paid.
TransactionA payment attempt for an order with a specific payment method. An order can have several transactions, for example when the first attempt fails.
WebhookA POST request from Paytrim 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.

Order statuses

Base your business logic on the order status, not on the transaction status. See Order and transaction status for every status and how to keep it up to date.

StatusMeaningFinal
newThe order has been created.No
processingA payment is in progress.No
completedThe payment succeeded. You can deliver.Yes
cancelledThe payment was cancelled.Yes
expiredThe customer didn't pay in time.Yes
errorThe payment failed for technical reasons or was declined.Yes

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.

Choose your integration

IntegrationBest forYour effortCheckout controlPCI DSS impact
Hosted payment pageGetting started fast with every payment methodLowPaytrim-hosted page, your customer is redirectedLowest: card data never reaches your systems
Payment linksInvoices, email, chat and phone sales without a webshopNonePaytrim-hosted pageLowest
PluginsWebshops on platforms such as WooCommerceLowPlugin settingsUsually lowest: most plugins use the hosted payment page

Payment methods

TypePayment methods
CardsVisa, Mastercard, Maestro, American Express
WalletsApple Pay, Google Pay, PayPal
Bank and account-to-accountSEPA Direct Debit, Bancontact, Swish, Vipps MobilePay
Buy now, pay laterBillink

See Payment methods for the operations each method supports. Which payment methods are active for your account depends on your agreement with Paytrim.

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.

Security

  • The API is only available over HTTPS with TLS 1.2 or newer.
  • Every request authenticates with your project's API key using HTTP Basic authentication. See API basics.
  • Keep your API key on your server. Never put it in a browser, mobile app or public repository.

On this page