This is an API reference for the Session service.
Session service API (1.0.0)
https://api-services.pxp.io/api/v1/
https://api-services.test.pxp.io/api/v1/
Request
The Session service API enables the creation of transaction sessions, supporting various transaction methods such as card payments and alternative payment methods (APMs). It facilitates seamless integration for payment processing by generating a session that securely collects payment details and initiates transactions. This service ensures secure and efficient payment flows, improving the user experience across multiple payment channels.
Your unique merchant identifier, as assigned by PXP.
Your unique site identifier, as assigned by PXP.
A unique identifier for this transaction.
The currency code associated with the transaction, in ISO 4217 format.
The transaction amount. The numbers after the decimal will be zero padded if they are less than the expected currencyCode
exponent. For example, GBP 1.1 = GBP 1.10, EUR 1 = EUR 1.00, or BHD 1.3 = 1.300. The transaction will be rejected if numbers after the decimal are greater than the expected currencyCode
exponent (e.g., GBP 1.234), or if a decimal is supplied when the currencyCode
of the exponent does not require it (e.g., JPY 1.0).
- Production environment
https://api-services.pxp.io/api/v1/sessions
- Sandbox environment
https://api-services.test.pxp.io/api/v1/sessions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-services.pxp.io/api/v1/sessions \
-H 'Content-Type: application/json' \
-d '{
"merchant": "MERCHANT-1",
"site": "SITE-1",
"merchantTransactionId": "TRANSACTION-1",
"sessionTimeout": 120,
"amounts": {
"currencyCode": "EUR",
"transactionValue": 30.32
}
}'
Session created successfully
The unique identifier for the created session.
The HMAC key generated for securing session communications.
A key used for encrypting sensitive session data during communication.
The timestamp indicating when the session will expire, in ISO 8601 format.
{ "sessionId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "hmacKey": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6", "encryptionKey": "k8l9m0n1o2p3q4r5s6t7u8v9w0x1y2z", "sessionExpiry": "2025-05-19T13:39:20.3843454Z", "allowedFundingTypes": { "cards": [ … ], "wallets": [ … ] } }