HTTP headers
Please use the following Vipps HTTP headers for all requests to the Vipps APIs. These headers provide useful metadata about the merchant's system, which help Vipps improve our services, and also helps in investigating problems.
These headers are required for plugins and partners and sent by the the official Vipps plugins. We strongly recommend that all customers with direct integration with the API to also do so.
Partners must always send the Merchant-Serial-Number
header, and we recommend
that everyone sends it, also when using the merchant's own API keys.
The Merchant-Serial-Number
header can be used with all API keys, and can
speed up any trouble-shooting of API problems quite a bit.
Example headers
For example, if the merchant's name is "Acme AS" and they offers three different systems: point of sale (POS) integration, webshop, and vending machines, the headers could be:
Header | Description | Example value for POS | Example for webshop | Example for vending machine | Example for WooCommerce plugin |
---|---|---|---|---|---|
Vipps-System-Name | The name of the solution | acme | acme | acme | woocommerce |
Vipps-System-Version | The version number of the solution | 1.7 | 2.6 | 2.6 | 5.4 |
Vipps-System-Plugin-Name | The name of the plugin | acme-pos | acme-webshop | acme-vending | vipps-woocommerce |
Vipps-System-Plugin-Version | The version number of the plugin | 3.2 | 4.3 | 4.3 | 1.4.1 |
Merchant-Serial-Number | The MSN for the sales unit | 123456 | 123456 | 123456 | 123456 |
Important: Please use self-explanatory, human readable and reasonably short values that uniquely identify the system (and plugin).
If the Vipps-System-Plugin-*
headers do not make sense to you,
you can simply sent the same as for Vipps-System-*
.
The important thing is that you send as much useful information as possible,
so it is as easy as possible to solve problems with your API requests if there are any.
Idempotency
Many API requests to Vipps APIs can be retried without any side effects
by providing Idempotency-Key
(in older APIs, this may be called, Request-Id
) in the header of the
request.
For example, in case the request fails because of network error, it can
safely be retried with the same Idempotency-Key
key without causing a duplicate.
The Idempotency-Key
key must be generated by the merchant according to the API
specification.
Example HTTP request with all HTTP headers
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni <truncated>
Ocp-Apim-Subscription-Key: 0f14ebcab0ec4b29ae0cb90d91b4a84a
Merchant-Serial-Number: 123456
Vipps-System-Name: Acme Enterprises Ecommerce DeLuxe
Vipps-System-Version: 3.1.2
Vipps-System-Plugin-Name: acme-webshop
Vipps-System-Plugin-Version: 4.5.6
Idempotency-Key: 49ca711a-acee-4d01-993b-9487112e1def