checkoutSession
HTTP method: POST
The checkoutSession method creates a checkout session for the current customer's basket grouping all available payment methods. The session should be reused for different payment methods until the payment is not finalized.
Checkout session is used to improve fraud detection and help maximize conversion rate.
| Test URL | https://testgateway.altapaysecure.com/merchant/API/<method> |
| Production URL | https://<YourShopName>.altapaysecure.com/merchant/API/<method> |
The request extends request body of method createPaymentRequest
The table below presents only parameters that are not present in the createPaymentRequest
| Parameter | Description | Type | Notes |
|---|---|---|---|
| terminals | List of terminals that are available for the user based on the checkout parameters (available PaymentMethods for user) | Array | |
| session_id | Optional identifier for a session to be created. If not provided, the identifier will be generated automatically. | String{0,50} | The identifier must be unique. |
The table shows the most pertinent response values for the method. For a complete list of API response parameters, see API Response structure (XML).
| Parameter | Description |
|---|---|
| Session |
Contains a Session object. For more information, see Session. |
This example shows a call with only the required parameters, and the corresponding response.
POST call
curl --request POST \
--url https://<YourShopName>.altapaysecure.com/merchant/API/checkoutSession \
--header 'Authorization: Basic auth' \
--data terminals[0]='MyTerminal' \
--data shop_orderid=abc123 \
--data amount=50 \
--data currency=EUR \
--data config[callback_ok]=callback_ok_url \
--data config[callback_fail]=callback_fail_url \
XML response
<?xml version="1.0"?>
<APIResponse version="20251231">
<Header>
<Date>2026-01-05T09:25:19+00:00</Date>
<Path>API/checkoutSession</Path>
<ErrorCode>0</ErrorCode>
<ErrorMessage/>
</Header>
<Body>
<Session>
<Id>a2179efb-5cfa-4e9f-a952-381eb9480568</Id>
<Status>CREATED</Status>
</Session>
</Body>
</APIResponse>
After you have created checkout session, you can proceed to creating payment request with the session ID using method createPaymentRequest