Barion Shop Authentication

From Barion Documentation
Revision as of 09:49, 24 April 2024 by [email protected] (talk | contribs) (removed mention of POST API endpoints)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

What is shop authentication?

The API endpoints related to handling a shop's payment flow are accessible using the shop's own unique API key, known as POS key.

For a full list of such endpoints see List of Barion API endpoints.

Using POS keys

To use an endpoint which requires shop-level authentication, pass your Barion shop's POS key as the x-pos-key header parameter.

NOTE
GET API endpoints below v4 also accept the PosKey property as a query parameter.

Errors

An invalid key generates an AuthenticationFailed error.

Managing POS keys

A POS key is automatically generated for your shop when you create it, and cannot be changed later. To obtain it, either

  • get the key from the confirmation e-mail that was sent to you when you opened the shop, or
  • go to the shop's detail page on the Barion secure site and use the Secret key value (Shops -> Actions -> Details)
NOTE
The test and live environment are completely separate environments, you need to create different shops. Make sure that you use the POSkey and not the public key: