PosKey
property in the POST request body, or as a query parameter in case of GET requests.Barion Shop Authentication: Difference between revisions
Jump to navigation
Jump to search
(made header-based shop authentication the default, mentioning the legacy auth as a note) |
|||
Line 1: | Line 1: | ||
= What is shop authentication? = | = What is shop authentication? = | ||
The API endpoints related to handling | The API endpoints related to handling a shop's payment flow are accessible using the shop's own unique API key, known as <i>POS key</i>. | ||
For a full list of such endpoints see [[List_of_API_endpoints|List of Barion API endpoints]]. | |||
= Using POS keys = | = Using POS keys = | ||
To use an endpoint which requires shop-level authentication, | To use an endpoint which requires shop-level authentication, pass your Barion shop's POS key as the '''x-pos-key''' header parameter. | ||
{{NotificationBox|title=NOTE|text=API endpoints below v4 may also accept the <code>PosKey</code> property in the <tt>POST</tt> request body, or as a query parameter in case of <tt>GET</tt> requests.|color=#038Ed3}} | |||
== Errors == | == Errors == | ||
An invalid key generates an <code>AuthenticationFailed</code> error. | |||
= Managing POS keys = | = Managing POS keys = | ||
Line 23: | Line 20: | ||
A POS key is automatically generated for your shop when you create it, and cannot be changed later. To obtain it, either | 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 | * 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 [https://secure.barion.com Barion secure site] and use the <i>Secret key</i> value ( | * go to the shop's detail page on the [https://secure.barion.com Barion secure site] and use the <i>Secret key</i> value (Shops -> Actions -> Details) | ||
= | {{NotificationBox|title=NOTE|text=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: | ||
[[File:Poskey.jpg]] |color=#038Ed3}} |
Revision as of 18:20, 23 April 2024
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
API endpoints below v4 may also accept the
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)