User-Agent
The term user agent is used for both the web browser used by the payer as well as the system making HTTP requests towards Swedbank Pay’s APIs. The difference between these two and how they relate to each other is illustrated in the below sequence diagram:
- First, the payer makes an HTTP request with their web browser towards the
merchant’s website. This HTTP request contains a
User-Agent
header, here given the valueP
(for “Payer”). - The merchant performs an HTTP request towards Swedbank Pay.
- The merchant extracts the
P
value of theUser-Agent
header from the payer’s browser and sends it to Swedbank Pay in theuserAgent
field in the JSON request body. - The merchant also composes its own user agent string and sends it to
Swedbank Pay in the
User-Agent
HTTP request header, here represented as the valueM
(for “Merchant”).
- The merchant extracts the
- Swedbank Pay receives
"userAgent": "P"
andUser-Agent: M
, stores the values and returns theM
value in theinitiatingSystemUserAgent
response JSON field.
The user agent strings are used for statistical purposes by Swedbank Pay.