The first step to performing tokenization or generating a sale via the Pyxis Pay Page is to initialize a session and obtain an identifier for that session. This identifier is to be used whenever you interact with the Pyxis API regarding the tokenization process. To initialize the tokenization session, you will make a call to the Pyxis API Service as follows:
URL for test:
https://_[Pyxis Pay Page host URL]_/payPage-initialize?SessionType={sessionType}&TerminalId={terminalId}
HTTP Method: GET
HTTP Headers:
Accept: application/json
HTTP Authorization: Pyxis security token (see Pyxis API documentation)
URL Query Parameters
Parameter | Definition |
---|---|
TerminalId | the GUID obtained from JFS which identifies the terminal from which the call is originating |
SessionType | name of the operation being performed: tokenize - Collect and tokenize billing information; the result will be the token and supporting data sale - Create a sale transaction for a specified amount |
Response:
JSON Response Payload:
{
"sessionId": "d40f2362-8301-4f05-821e-911b746797d6",
"errorMsg": ""
}
sessionId The pay page session Id generated by Pyxis to be used for all subsequent pay page calls
errorMsg Any error that may have occurred initializing the pay page session. If this is empty or null, no error occurred
Once you have created a pay page session, it is time to call the pay page itself
IMPORTANT: For security purposes, the session ID returned upon initialization must be used by a pay page within 10 minutes of initialization.