Create Payment Request

Last updated: 2026-03-25

POST
/in-store/api/v1/purchase

Submit a purchase request to a terminal

Request Body

amountnumberrequired

Payment amount as a decimal number (e.g. 100.00 for 100 SEK).

currencyCodeintegerrequired

ISO 4217 numeric currency code (e.g. 752 for SEK, 978 for EUR).

terminalIdstringrequired

The ID of the terminal to send the payment request to.

paymentMethodstringrequired

Payment method could be either Swish,Klarna,Vipps or null (null , If its a card payment)

HTTP Status Code Summary

CodeDescription
201Purchase request created and sent to terminal.
400Bad request. Check that all required fields are present and valid.
401Unauthorized. Ensure your bearer token and subscription key are valid.
409Conflict. A transaction with the provided reference already exists.
422Unprocessable entity. The terminal may be busy or in an invalid state.
Request
cURL
1curl -X 'POST' \
2  'https://demo-api.westpay.se/in-store/api/v1/purchase' \
3  -H 'accept: application/json' \
4  -H 'Ocp-Apim-Subscription-Key: <merchant-subscription-key>' \
5  -H 'Authorization: Bearer <access-token>' \
6  -H 'Content-Type: application/json' \
7  -d '{
8  "amount": 100.00,
9  "currencyCode": 752,
10  "terminalId": "<your-terminal-id>",
11  "paymentMethod": ""
12}'
Response
Response
1{
2  "onlineAPIRefId": "23179040000954"
3}