Paywerk Integration Portal

Download OpenAPI specification:Download

Introduction

About Paywerk

Paywerk in cooperation with Swedbank is offering Buy Now Pay Later (BNPL) and Pay Now payments. Payments are based only on debit or credit cards. Purchase full amount will be paid to merchant after order fulfilment. Overview of the transactions can be found in our merchant portal.

In order to start accepting Paywerk payments, please contact Swedbank.

At the current phase service is offered only to Estonian merchants.

Payment Options

Shopper country Pay now (coming soon) Pay in x days Pay in x parts
Estonia ✓ (coming soon) ✓ (30 days - coming soon) ✓ (3 parts)
Other EEA countries ✓ (coming soon) - -

Pay in x days and Pay in x parts are limited to the shopping cart amount range from 100 to 2000 EUR.

Please note that the ability to purchase with BNPL products depends on the shopper profile and the financier's risk assessment, and cannot be offered to everyone.

Supported Countries

At this moment Paywerk operates only in Estonia. Through Swedbank Estonia an Estonian merchant can onboard to provide BNPL payments to Estonian shoppers.

Merchant country Shopper country
Estonia
Other EEA countries -
(Pay Now only)

Supported Currencies

Only EUR is supported as currency.

Service Status

You can check the current and historical service status on our status page at status.paywerk.co.

Authentication and Security

API Key

API key is the single secret for communication between your server and Paywerk. There is no limit for the number of API keys. Since each merchant user can have multiple companies (legal entities) and multiple shops, please bare in mind that each API corresponds to the combination of one company and one shop. That also means that a single purchase can be related only to one company and one shop since it has to use one API key.

You can generate API keys in Merchant Portal:

Step 1. Find API keys menu. Open menu API keys and click Add API key button.

Merchant Portal's API keys menu
Merchant Portal's API keys menu

Step 2. Define scope of API key. Add a user-friendly and memorable name for the API key, especially if you plan to use multiple API keys. Choose the company and shop to which the API key corresponds.

Adding API key modal
Adding API key modal

Step 3. Find you API key and store it securely. API key is created! Now all you have to do is store it in a secure place. Your API key can perform any activity that is available in Paywerk's Merchant API, therefore it's sensitive information. Please note that API key is shown only once and cannot be retrieved after the modal is closed.

Copy your new API key and store it securely
Copy your new API key and store it securely

Step 4. Insert API key to your shop. If you use a plugin, refer to the plugin's section of this documentation. In any other case, store the API key in your shop's configuration, secret manager of other place where the shop can retrieve it for making queries.

In any request you send towards Paywerk, you need to pass the Authorization header. The only exception is the Health Check API request which does not require authentication.

Authorization: Bearer YOUR_API_KEY_HERE

Content Security Policy (CSP)

For Paywerk scripts to function, the merchant's site must allow Paywerk domains in its CSP rules.

  • If CSP is already implemented:
    It is mandatory to add Paywerk’s domain to the script-src directive. Otherwise, Paywerk JavaScript will not load.

  • If CSP is not yet implemented:
    We strongly recommend implementing CSP via server headers. As a fallback, you may also add an HTML <meta> tag.

Example: extending an existing CSP: script-src 'self' https://*.paywerk.co;

In practice, add https://*.paywerk.co to your existing script-src directive, keeping all current sources (e.g. 'self', CDNs, nonced scripts).
Note: always use the https:// scheme; http:// will usually fail on HTTPS sites (mixed content). Allowing data: for scripts is generally unnecessary and insecure.

Recommended server header (preferred):
Content-Security-Policy: script-src 'self' https://*.paywerk.co;

HTML <meta> fallback (only if headers cannot be configured):
<meta http-equiv="Content-Security-Policy" content="script-src 'self' https://*.paywerk.co">


Plugins and Modules

Paywerk offers integration with certain e-commerce platforms.

Currently we support with dedicated plugins the following platforms: WooCommerce.

Plugins and Modules Supported

Platform Latest version Latest version release date Supported platform versions Minimum PHP version Download
Wordpress (wooCommerce) 2.0.3 25 August 2025 >= 5.6.1 >= 7.0, 8.0 Download latest

WooCommerce/Wordpress

The best way to get Paywerk plugin for WooCommerce is to add it via Wordpress plugin directory. That way you'll be able to get plugin updates automatically or with a single click.

Installation

Step 1. Go to Wordpress's Plugins menu. Click Add New.

Wordpress's plugins page
Wordpress's plugins page

Step 2. Enter keyword "Paywerk" and search for the plugin. When finding Paywerk Payments plugin, click Install. Alternatively you can also download the plugin and upload it from the same screen.

Search for Paywerk's plugin
Search for Paywerk's plugin

Step 3. Start plugin activation. Click Activate.

Start plugin activation
Start plugin activation

Step 4. Continue setup. Click Settings link on Paywerk Payments plugin.

Click Settings on Paywerk Payments plugin
Click Settings on Paywerk Payments plugin

Step 5. Continue setup. You'll be directed to WooCommerce's payments section where you have to choose Settings on Paywerk Payments payment method.

WooCommerce payment methods list
WooCommerce payment methods list

Step 5. Configure Paywerk plugin. Here you have the following configuration options:

Main configuration:

  • Paywerk API key - enter the key generated in Merchant Portal. Please refer to API key section of the documentation for more details.
  • Sandbox - mark the checkbox if you want to try out the service using your Sandbox account. No real transactions will happen if the checkbox is marked. Do not use in production environment! Please note that in order to retrieve access to Sandbox environment you have to fill a separate merchant application in Sandbox.

Shopping cart total amount based visibility:

  • Minimum order amount - if you wish to define a minimum cart value under which Paywerk's payment method is not shown, enter the amount; otherwise leave blank.
  • Maximum order amount - if you wish to define a maximum cart value over which Paywerk's payment method is not shown, enter the amount; otherwise leave blank.

Statuses configuration - choose statuses relevant to your shop's processes:

  • Payment completed status - choose the status to which the order is pushed after successful Paywerk payment. Default value: Processing.
  • Fulfilled status - in case the order gets this status, a fulfil all request is sent to Paywerk, fulfilling the order fully. Default value: Completed.
  • Refunded status - in case the order gets this status, a refund all request is sent to Paywerk, refunding the order fully. Default value: Refunded.

Title of checkout panel:

  • Checkout panel label - choose a title from the predefined titles. If you want to define your own title, choose Custom title from the list and click Save changes. After saving changes you can define payment method title for each language your site uses. Then click Save changes again.

Promotions - show a promotional widget on product pages that advertises free pay later options for shoppers:

  • Promotion visibility - in which pre-defined area the promotion is displayed; make sure to test it before since it might not work perfectly with all design templates.
  • Promotion message - define which payment method you want to promote and which text you want to use. There are a few variants for each payment type.
  • Theme - choose either your website uses a light or dark theme and we'll display the promotion widget in different colour palette.

Note that promotions will be displayed only for products which are in certain price range. Currently it's limited to:

  • 100 to 2 000 EUR
Paywerk promotion widget example
Paywerk promotion widget example
Paywerk plugin configuration
Paywerk plugin configuration

Step 7. Activate payment method. You're ready to go! Just switch the payment method slider on.

Activate payment method
Activate payment method

Merchant API

Workflow

Sales Flow

Paywerk Merchant API main workflow diagram
Paywerk Merchant API main workflow diagram

Step 1. Order request. On checkout page where payment options are shown, start by sending the order request POST /orders. The body of the request contains communication language, shopper's name and contact details, purchase amount and currency, and 3 URLs (success, failure, callback). The more data you provide by the shopper, the less the shopper has to fill in afterwards, and the higher the probability of successful payment (in case of Pay Later payment options).

You'll receive back a unique paywerkId which you should store and use in any subsequent queries related to the purchase.

In case there are any changes in any of the initially provided fields (e.g. cart contents or amount changes, shopper data changes), you have to make the same request again. If you make a new request and send the same order reference (field reference) as before, the paywerkId will usually be the same in case (nevertheless, always check and use the latest). In case the order reference is changed, paywerkId will also change. You would receive error 409 in case the shopper has already continued with the payment but for some reason comes back and starts again. In this case you should update the reference since it has to be unique.

Step 2. Display offer. On checkout page where payment options are shown, include a HTML tag in the place you'd like to show Paywerk payment options:

<paywerk-products paywerkId="{paywerkId}"/>

{paywerkId} refers to the identifier you received in the response in Step 1.

Additionally, you have to include a JavaScript from Paywerk (refer to URL: https://checkout.sandbox.paywerk.co/ui/shop.js for Sandbox and https://checkout.paywerk.co/ui/shop.js for Production) in order to display the contents inside <paywerk-products />:

Sandbox:

<script type="module" async>
  import 'https://checkout.sandbox.paywerk.co/ui/shop.js'
  // any additional logic here
</script>

Production:

<script type="module" async>
  import 'https://checkout.paywerk.co/ui/shop.js'
  // any additional logic here
</script>

If possible, include the JavaScript directly from Paywerk's URL, so that all updates are automatically accomodated on your web site.

Step 3. Send shopper to the payment flow. Here you have two options:

  • Option A: using a modal
  • Option B: redirect

It's important that the shopper has selected a payment method inside Paywerk's environment. In order to listen to the changes in the Paywerk payment options selector, you may use the following combination of HTML and JavaScript, and allow to continue only then paywerkUrl has been provided:

Sandbox:

<input type="hidden" name="paywerkUrl">
<script type="module" async>
  import 'https://checkout.sandbox.paywerk.co/ui/shop.js'

  document.querySelector('paywerk-products').addEventListener('product-selected', function (e) {
    e.preventDefault()
    document.querySelector('[name=paywerkUrl]').value = e.detail.productUrl
  })
</script>

Production:

<input type="hidden" name="paywerkUrl">
<script type="module" async>
  import 'https://checkout.paywerk.co/ui/shop.js'

  document.querySelector('paywerk-products').addEventListener('product-selected', function (e) {
    e.preventDefault()
    document.querySelector('[name=paywerkUrl]').value = e.detail.productUrl
  })
</script>

Note that the additional JavaScript part should be included only when paywerkId is provided.

Step 4. Wait for change in order status. It is recommended to combine multiple options whereas options A and B are both mandatory to implement:

  • Option A: Wait for shopper redirect. Shopper is redirected to the URL you provided. Once the shopper has landed in redirect URL, ask from Paywerk the latest status to confirm it (as in option C).
  • Option B: Wait for callback to arrive. Paywerk will send callback message as soon as the order status changes in Paywerk's system. Callback doesn't tell you the new status, but it tells you that status has changed and you should make a query (as in option C) to get new status.
  • Option C: Query the order status with certain intervals. We recommend using incremental intervals, such as every 5 seconds for a minute, then every 10 seconds for 5 minutes, then every 30 seconds for the rest of the time. We also recommend to stop querying after certain amount of time has passed (what you consider maximum payment process time, e.g., 10 minutes).

Note that options A and B are run by Paywerk in parallel but callbacks are impacted by overall load on servers - sometimes redirect can happen before callback and sometimes, vice versa. The best approach is to allow both redirect and callback to do the same thing, but the one arriving after first one may be ignored.

Order can have 3 statuses:

  • PENDING - initial status, no changes yet
  • CONFIRMED - payment succeeded; you may now confirm the order
  • FAILED - payment failed, either because of negative risk decision, failure in registries or other reasons; you should offer alternative payment methods to the shopper so that he or she can finalise the order

Callbacks arrive to callbackUrl provided in the order request using HTTP POST method with the following body:

{
  "paywerkId": "{paywerkId}",
  "orderReference": "Merchant-Order-Reference-12345"
}

Paywerk has its own retry mechanism for failed callbacks. We may try a certain amount of times to send the update before stating it a failed effort. Since callbacks sometimes can fail, we insist on allowing option A and optionally using option C from step 4 as a fallback solution for knowing the latest status of the payment.

Step 5. Process the order. Based on status change received in step 4, you can either mark the order completed or, in case of failed payment, offer other payment options. The order status you should use in your own e-commerce platform depends on your own workflows. You can treat CONFIRMED status as payment done, and whatever steps may follow that (like order confirmation) is up to you.

Step 6. Fulfil the order (not applicable to Swedbank merchants at this point). Depending on whether the order was paid via Pay Now or Pay Later payment option, you may need to mark the order items as fulfilled.

  • For Pay Now payment method fulfilling the order is optional, but we recommend doing it so you can have a clear overview in Paywerk's Merchant Portal which orders are not fulfilled, which are partially and which fully fulfilled.
  • For Pay Later payment methods (Invoice and Slice) it is mandatory to mark order items as fulfilled in order to receive the funds for those items.

Step 7. Receive funds. Depending on parameters agreed in your contract, there can be one or two Payout Delay parameters agreed with you: one for Pay Now and one for Pay Later payment methods.

See more in Fulfilment and Settlements sections.

Fulfilment

All shops of Swedbank merchants are set to auto-fulfil all orders immediately. Therefore, this section is not applicable to Swedbank merchants at this point.

  • For Pay Now payment method you'll receive money after X days (defined in your contract as Pay Now Payout Delay), and it doesn't matter if order is fulfilled or not.
  • For Pay Later payment methods (Invoice and Slice) you'll receive money after Y days (defined in your contract as Pay Later Payout Delay) after fulfilling the order. In case an order is filled in different parts on different dates, each fulfilment part will be assigned a separate payout delay (partial fulfilment date + Y days), and you'll receive funds according to those dates.

Fulfilment can be done in various ways:

  • Option A: Using Merchant Portal's user interface. Go to Orders menu, find the relevant order, click Fulfil button and select order items to be fulfilled. Note that you can fulfil each order item also partially by defining a lower quantity than the initial quantity.
  • Option B: Using API, you can fulfil order items one by one using POST /orders/{paywerkId}/fulfil. You may use this API endpoint also to fulfil all order items by sending fulfilment information about all order items in a single query.
  • Option C: Using API, you can fulfil the whole order using POST /orders/{paywerkId}fulfil-all.

See also Settlements section.

Refunds

There can be various reasons for refunds, such as customer returns the goods, goods were not available afterall, customer compliants etc.

Paywerk allows refunds to be performed only directly by merchants. In case the shopper turns to Paywerk in any such questions, we direct the customer to the merchant. Merchant can initiate refunds in the following ways:

  • Option A: Using Merchant Portal's user interface. Go to Orders menu, find the relevant order, click Refund button and select order items to be refunded. Note that you can refund each order item also partially by defining a lower quantity than the initial quantity.
  • Option B: Using API, you can refund order items one by one using POST /orders/{paywerkId}/refund. You may use this API endpoint also to refund all order items by sending refund information about all order items in a single query.
  • Option C: Using API, you can refund the whole order using POST /orders/{paywerkId}/refund-all.

Refunds are deducted from the order amounts you would receive the following settlement. See more in Settlements section.

Settlements

Funds are sent as SEPA or local transactions in batches depending on your contract on a daily or weekly basis, or on certain weekdays. You'll receive not more than one settlement payment from us per day per merchant company. Please note that all Paywerk fees are deducted from the order amounts when payouts are made.

There may be also a situation where due to having more refunds and new orders on a specific day, you may need to send us funds instead of us sending you. In those cases you'll receive an automated e-mail instructing where to make the payment and in which amount.

You can get a better understanding of the transactions in Merchant Portal under Transactions menu. You can also see any relevant transactions per order when you go to Orders menu and find a specific order.

Send order request

In checkout, in order to display the detailed payment option, you need to send us an order request. As a response you will receive a Paywerk ID which allowes to display inline content.

Authorizations:
paywerkApiKeyAuthentication
Request Body schema: application/json
lang
required
string

Language code according to ISO 639-1 standard (2 lowercase letters). Allowed values: en, et. The offer is presented, and payment process started in this language.

firstName
string

First/given name(s) of the shopper.

lastName
string

Family/last name(s) of the shopper.

email
string

E-mail address of the shopper. Has to be in a valid x@y.z format.

phone
string

Phone number of the shopper formatted in the International E.164 standard, starting with plus (+) symbol. In case multiple phone numbers are known, prefer the main mobile number.

required
object (Address)

Shopper's billing address country is mandatory and is the minimal address data you must send. Please note that the payment process depends on billing address country. Adding delivery address (when applicable) is optional.

object (Address)

Shopper's billing address country is mandatory and is the minimal address data you must send. Please note that the payment process depends on billing address country. Adding delivery address (when applicable) is optional.

amount
required
number

Total purchase amount that needs to be paid by the shopper, including but not limited to any taxes, fees, delivery costs, discounts, coupons used, etc. May include up to 2 decimal places (decimal separator .). The amount must match the sum of amounts of all order items.

currency
required
string

Currency of the purchase in ISO 4217 format (3 uppercase letters). Allowed values: EUR.

successUrl
required
string <url>

URL where to redirect the shopper after successful payment process.

failedUrl
required
string <url>

URL where to redirect the shopper after unsuccessful payment process.

callbackUrl
string <url>

URL where to send server-to-server callback requests about status changes.

reference
required
string

Unique order number on merchant side. When sending updates of the same shopping cart or shopper info, you can use same reference value. When shopper has continued with the payment (order is already created from order request) with specific reference value, order request identified by the same reference value cannot be updated anymore and you would receive error 409. In this case please update the reference to a new, unique one, and make a new order request.

Array of objects (OrderRequestItem)

Shopping cart rows, i.e., items in the shopping cart. In case sending the full information on shopping cart rows is not possible or difficult, you may sum up all items as one item row. To provide the best shopper experience, we highly recommend providing full list of items in the cart. When no order items are sent, Paywerk adds a summarising item covering full amount of the order, on its own. Important: The items list of only for informative purposes and will not be changed throughout the lifecycle of the order. For example, when making refunds, you cannot refer to a specific item but just total amount to be refunded.

displayedProductTypes
Array of arrays
Items Enum: "PAY_NOW_CARD" "INVOICE" "SLICE"

If set, displays only selected Paywerk product types and only if they are added to your contract. If not set, does not limit product types displayed as payment methods. PAY_NOW_CARD means immediate card payment with full amount. INVOICE means Pay in X days (e.g., Pay in 30 days). SLICE means Pay in X parts (e.g., Pay in 3 parts).

object (ShopMetadata)

Merchant integration information, e.g., plugin/extension name and version. May help with locating errors and bugs on merchant side.

Responses

Request samples

Content type
application/json
{
  • "lang": "en",
  • "firstName": "Jane",
  • "lastName": "Doe",
  • "email": "jane.doe@domain.com",
  • "phone": "+37255555555",
  • "billingAddress": {
    },
  • "deliveryAddress": {
    },
  • "amount": 1238.16,
  • "currency": "EUR",
  • "reference": "W-1234567",
  • "items": [
    ],
  • "displayedProductTypes": [
    ],
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "paywerkId": "string",
  • "isComplete": true
}

Get payment schedule by product type

In case you would like to show shoppers promotion of Pay Later payment methods, use this endpoint to get the payment schedule and then display it accordingly. E.g. Pay 33.34 EUR today, 33.33 EUR on XX.XX.XXXX, 33.33 EUR on XX.XX.XXXX. No extra fees or interest.

Authorizations:
paywerkApiKeyAuthentication
path Parameters
productType
required
string
Enum: "INVOICE" "SLICE" "PAY_NOW_CARD"

Product type for which the payment schedule is queried. In case multiple products of the same type are available for the merchant, this endpoint uses the standard default product for that country.

query Parameters
amount
required
number

Total product or purchase amount that needs to be paid by the shopper, including but not limited to any taxes, fees, delivery costs, discounts, coupons used, etc. May include up to 2 decimal places (decimal separator .).

shopperCountryCode
string

Country code in ISO 3166-1 alpha-2 format (2 uppercase letters). Use shopper billing country here. If set, takes the default standard product for that country. If not set, the country is set to merchant country.

Responses

Response samples

Content type
application/json
{
  • "productId": "string",
  • "productType": "INVOICE",
  • "schedule": [
    ]
}

Get payment schedule by product ID

In case you would like to show shoppers promotion of Pay Later payment methods, use this endpoint to get the payment schedule and then display it accordingly. E.g. Pay 33.34 EUR today, 33.33 EUR on XX.XX.XXXX, 33.33 EUR on XX.XX.XXXX. No extra fees or interest.

Authorizations:
paywerkApiKeyAuthentication
query Parameters
productId
required
string

Product ID for which the payment schedule is queried (ask ID from Paywerk).

amount
required
number

Total product or purchase amount that needs to be paid by the shopper, including but not limited to any taxes, fees, delivery costs, discounts, coupons used, etc. May include up to 2 decimal places (decimal separator .).

shopperCountryCode
string

Country code in ISO 3166-1 alpha-2 format (2 uppercase letters). Use shopper billing country here. If set, takes the default standard product for that country. If not set, the country is set to merchant country.

Responses

Response samples

Content type
application/json
{
  • "productId": "string",
  • "productType": "INVOICE",
  • "schedule": [
    ]
}

Fetch order details

Authorizations:
paywerkApiKeyAuthentication
path Parameters
paywerkId
required
string

Responses

Response samples

Content type
application/json
{
  • "paywerkId": "string",
  • "status": "PENDING",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "initialAmount": 0,
  • "amount": 0,
  • "currency": "string",
  • "reference": "string",
  • "items": [
    ],
  • "shopper": {
    },
  • "billingAddress": {
    },
  • "deliveryAddress": {
    }
}

Fetch order status

Authorizations:
paywerkApiKeyAuthentication
path Parameters
paywerkId
required
string

Responses

Response samples

Content type
application/json
{
  • "status": "PENDING",
  • "amount": 0,
  • "initialAmount": 0,
  • "time": "2019-08-24T14:15:22Z"
}

Refund specific order item(s)

Authorizations:
paywerkApiKeyAuthentication
path Parameters
paywerkId
required
string
Request Body schema: application/json

Parameter sku identifies order item to be refunded.

Parameter quantity specifies number of refunded items. It's allowed to refund single item partially (for example quantity can be 0.5). Optional value. Omitted value means 'refund all'

Parameter refundType can be CANCEL, RETURN or AUTO.

  • CANCEL - is used to mark item as 'cannot be sent out'.
  • RETURN - is used to mark item as 'returned by customer'.
  • AUTO - is meant for clients which have no user interface to select refund type. For fully fulfilled items refund type RETURN is actually applied. For items not fulfilled at all refund type CANCEL is actually applied. Partially fulfilled items support only full refund. It can be requested either by specifying quantity equal to not refunded items or by omitting quantity value at all. Partially fulfilled items do not support partial refund and type AUTO.
Array
sku
required
string
refundType
required
string
Enum: "RETURN" "CANCEL" "AUTO"
quantity
number

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Refund whole order

Authorizations:
paywerkApiKeyAuthentication
path Parameters
paywerkId
required
string

Responses

Marketing

Here you’ll find promotional materials relating to Paywerk’s payment methods.

Promotion Widgets

Promote Pay Later right on your product page with the promotion widget. You can show customers that they can pay in parts with Paywerk, increasing your website’s conversion rate.

Promotion widget
Promotion widget

The promotion block includes a link to an explanation about Paywerk’s payment method, so that they can learn how to use it. To add the promotion widget to your website, make sure you have the latest plugin from Paywerk, and review its settings according to the instructions above.

Promotions are currently available on WooCommerce. To get the widgets, follow the instructions below.

Logos

Create your own promotional materials, using Paywerk’s logo.