The last step in the pay page interaction, is to query the Pyxis API to retrieve either, the token and other information that was produced as a result in the case of a tokenization session, or the sale transaction session information in the case of a sale.
URL for test:
https://[Pyxis Pay Page host URL]/payPage-results?SessionId=…&TerminalId=…"
HTTP Method: GET
HTTP Headers:
Accept: application/json
HTTP Authorization: Pyxis security token (see API documentation for details)
Parameter | Definition |
---|---|
SessionId | the session ID GUID obtained when the session was initialized |
TerminalId | the GUID obtained from JFS which identifies the terminal from which the call is originating |
Response:
{
"sessionId": " d40f2362-8301-4f05-821e-911b746797d6",
"errorMsg": "",
"results": "{ see details below }"
}
Key | Definition |
---|---|
sessionId | the session ID GUID obtained when the pay page session was initialized |
errorMsg | Human readable message for an error that occurred if any |
results | a map of key value pairs that are the output values of the specific operation (see below) |
The “results” element is a serialized map object which produces the following format. Usually, a map object un-marshaller/serializer will turn this back into a map object (in C#, C++ and Java).
Below is an example of what the format looks like:
{
DetailAcctType=Checking,
Last4=5180,
AcctType=eft,
GatewayResultMsg=Success,
Token=cf5647e0-0f07-4c18-82ea-6a155f895dc2,
GatewayResultCode=0
}
Tokenization Data Results
For the tokenization session type, there are four keyed values you will want to retrieve from the result data map:
Key | Definition |
---|---|
Token | the token produced by the operation |
Last4 | the last 4 numbers of the tokenized account number |
AcctType | the type of account: one of the following values: “card”, “eft” |
CardExpiration | If a card is tokenized, this is the expiration date that was input |
DetailAcctType | Account sub type. Card type or bank account type. Possible values: “Visa”, “MasterCard”, “Discover”, “AMEX”, “DinersClub”,“Checking”, “Savings”,”DebitCard” |
GatewayResultCode | An error code from the backend gateway or processor if provided to Pyxis |
GatewayResultMsg | A human readable error message from the backend gateway or processor if provided to Pyxis |
CardType | The type of card used. Possible values: “visa”, “visadebit”, “mastercard”, “mastercarddebit”, “discover”, “discoverdebit”, “amex” |
Results Example (tokenization)
{
"sessionId": " d40f2362-8301-4f05-821e-911b746797d6",
"errorMsg": "",
"results": "{DetailAcctType=checking, Last4=5180, AcctType=eft, GatewayResultMsg=Success,
Token=cf5647e0-0f07-4c18-82ea-6a155f895dc2, GatewayResultCode=0}"
}
Sale Mode Data Results
For the sale session type, there are just a few keyed values you will want to retrieve from the result data map:
Key | Definition |
---|---|
TransactionId | The Pyxis transaction Id assigned by the Pyxis system |
ExternalTransactionId | The pass-through, optional call assigned transaction Id |
TotalAmount | The total amount of the sale in cents |
CurrencyType | Standardized 4 letter currency abbreviation |
ReferenceId | Transaction ID from processing gateway (if available) |
GatewayResultCode | An error code from the backend gateway or processor if provided to Pyxis |
GatewayResultMsg | A human readable error message from the backend gateway or processor if provided to Pyxis |
CardType | The type of card used. Possible values: “visa”, “visadebit”, “mastercard”, “mastercarddebit”, “discover”, “discoverdebit”, “amex” |
Results Example (sale)
{
"sessionId": " d40f2362-8301-4f05-821e-911b746797d6",
"errorMsg": "",
"results": "{ExternalTransactionId=null, GatewayResultMsg=Success, TotalAmount=2750,
GatewayResultCode=0, TransactionId=79c18e3f-84b9-4573-9939-4395073aa0c7, CardType=Visa}"
}