S2S (server-to-server) Payment process
Data is sent as a server-to-server request, authenticated with standard HTTP Basic Authentication Header. All server-to-server requests use UTF-8 charset.
A new payment request (https://sveapayments.atlassian.net/wiki/spaces/DOCS2022/pages/1657012476/Create+Payment#Request-(S2S-HTTP-POST) ) is sent by the web store software (with no payer browser intervention).
The success response (https://sveapayments.atlassian.net/wiki/spaces/DOCS2022/pages/1657012476/Create+Payment#Response-(XML) ) is in XML document with root element
These values are usually the same as in the request:
pmt_action, pmt_version, pmt_id, pmt_reference, pmt_amount, pmt_currency
This is the address where the payer can be redirected instantly to continue the payment process
or this address could be used as "payment link" that is sent to the payer for example by email
or this link can be shown somewhere in the web store.
Payer is redirected to the
When the payer returns to the web store after payment, web store must validate the payment confirmation and make sure it was not fabricated by a malicious user. Use https://sveapayments.atlassian.net/wiki/spaces/DOCS/pages/1657012569 instantly to validate the payment.
OPTIONAL (yet recommended): Later a callback request (https://sveapayments.atlassian.net/wiki/spaces/DOCS/pages/1657012634) from Svea’s server is made to web store. If payment has not yet been confirmed earlier, web store must use https://sveapayments.atlassian.net/wiki/spaces/DOCS/pages/1657012569 to validate the payment.
pmt_paymenturl expiration time can be updated https://sveapayments.atlassian.net/wiki/spaces/DOCS/pages/1719926812
Choosing the payment method
Web store can display the available payment methods for the buyer in their web store checkout process. This is achieved by retrieving the available payment methods per order using https://sveapayments.atlassian.net/wiki/spaces/DOCS/pages/1657012326. After that, the Create Payment API should contain the code (
pmt_paymentmethod, https://sveapayments.atlassian.net/wiki/spaces/DOCS/pages/1657012748) of the payment method the buyer chose in the web store. Otherwise, the buyer will choose the payment method on a page rendered by Svea Payments.
When the buyer chooses payment method in the web store that is using the Buyer’s Assistant, the web store must display the terms and conditions of the Buyer’s Assistant service in the web store and ensure the buyer agrees to them. These are found from the https://sveapayments.atlassian.net/wiki/spaces/DOCS/pages/1657012326 API response.