Create Payment Request
Last updated: 2026-03-25
POST
/in-store/api/v1/purchaseSubmit a purchase request to a terminal
Request Body
amountnumberrequiredPayment amount as a decimal number (e.g. 100.00 for 100 SEK).
currencyCodeintegerrequiredISO 4217 numeric currency code (e.g. 752 for SEK, 978 for EUR).
terminalIdstringrequiredThe ID of the terminal to send the payment request to.
paymentMethodstringrequiredPayment method could be either Swish,Klarna,Vipps or null (null , If its a card payment)
HTTP Status Code Summary
| Code | Description |
|---|---|
| 201 | Purchase request created and sent to terminal. |
| 400 | Bad request. Check that all required fields are present and valid. |
| 401 | Unauthorized. Ensure your bearer token and subscription key are valid. |
| 409 | Conflict. A transaction with the provided reference already exists. |
| 422 | Unprocessable 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}