Skip to main content

In-store payments

Testing integration

Last updated: 17-Jun-2022
Rate this article:

Overview

We provide an essential testing system to simulate transaction scenarios and functionalities. Use it to ensure your test integration is working as expected before switching to an integration that can make live transactions.

Payment scenarios

Use the scenarios below to test your integration with the simulator terminal. Thus, it allows you to validate your integration without using a physical device.
The test cases will only trigger if you add a header "x-terminal-simulator" and set the value to "true."

POS Cloud API Reference

API endpoint Scenario POS Cloud API Request value for simulation POS Cloud API Response

/payment PaymentData.PaymentType: NORMAL

/payment PaymentData.PaymentType: REFUND

Success Amount having no decimal value
Ex: 20 or 20.00
Response = SUCCESS
Device not found

Amount ending with the decimal value 01

Ex: 20.01

Response = FAILURE

Error Condition = NOTFOUND

Abort request sent during a transaction

Amount ending with the decimal value 02

Ex: 20.02

Response = FAILURE

Error Condition = ABORTED

Device not ready

Amount ending with the decimal value 03

Ex: 20.03

Response = FAILURE

Error Condition = UNAVAILABLEDEVICE

Connection lost after login or during the transaction

Amount ending with the decimal value 04

Ex: 20.04

Response = FAILURE

Error Condition = DEVICEOUT

Terminal does not allow a transaction

Ex: Reversal in Ocius

Amount ending with the decimal value 05

Ex: 20.05

Response = FAILURE

Error Condition = NOTALLOWED

Request sent during a transaction

Amount ending with the decimal value 06

Ex: 20.06

Response = FAILURE

Error Condition = INPROGRESS

User cancels the "in progress" transaction 

Amount ending with the decimal value 07

Ex: 20.07

Response = FAILURE

Error Condition = CANCEL

Device is unavailable

Amount ending with the decimal value 08

Ex: 20.08

Response = FAILURE

Error Condition = BUSY

Contact acquirer

Amount ending with the decimal value 09

Ex: 20.09

Response = FAILURE

Error Condition = UNAVAILABLESERVICE

/transactionstatus

/reversal

Success

Serial number ending from 0

Ex: 120-000-000

Response = SUCCESS
Device not found

Serial number ending from 1

Ex: 120-000-001

Response = FAILURE

Error Condition = NOTFOUND

Abort request sent during a transaction

Serial number ending from 2

Ex: 120-000-002

Response = FAILURE

Error Condition = ABORTED

Device is unavailable

Serial number ending from 3

Ex: 120-000-003

Response = FAILURE

Error Condition = UNAVAILABLEDEVICE

Connection lost after login or during a transaction

Serial number ending from 4

Ex: 120-000-004

Response = FAILURE

Error Condition = DEVICEOUT

Terminal does not allow a transaction

Ex: Reversal in Ocius

Serial number ending from 5

Ex: 120-000-005

Response = FAILURE

Error Condition = NOTALLOWED

Request sent during a transaction

Serial number ending from 6

Ex: 120-000-006

Response = FAILURE

Error Condition = INPROGRESS

User cancels the "in progress" transaction

Serial number ending from 7

Ex: 120-000-007

Response = FAILURE

Error Condition = CANCEL

Device busy

Serial number ending from 8

Ex: 120-000-008

Response = FAILURE

Error Condition = BUSY

Contact acquirer

Serial number ending from 9

Ex: 120-000-009

Response = FAILURE

Error Condition = UNAVAILABLESERVICE

 

API Endpoint Scenario  POS Cloud API Request value for simulation POS Cloud API Response
/login Success SerialNumber 
Ex: 123-123-123
UserId - 1234
Pin- 1234
Response = SUCCESS
AdditionalResponse = Login Successfully
Failure SerialNumber = null
UserID = null or wrong
Pin = null or wrong
Response = FAILURE
Error Condition = NOTALLOWED
AdditionalResponse = Login Failed
/logout Success SerialNumber 
Ex: 123-123-123
Response = SUCCESS
AdditionalResponse = Logout Successfully
Failure SerialNumber = Blank Response = FAILURE
Error Condition = NOTALLOWED
AdditionalResponse = Empty Cluster: MessageHeader.POIID

 

Error handling 

To resolve issues with requests, you need to know how Terminal API informs you of the processing status of your request. Check the Response samples object of the API response, which has:

reversalStatus: Provides the status for a response sample.

Note! Applicable for all types of errors.

code: Provides the specific code to represent each error. 
Available codes: "400", "401", "403", "404", "429", "500", "503", "504"

title: Provides error code title.

message: Provides information regarding the error condition.

type: Provides information regarding the error type.

Error condition comparison

The table below provides the required fields for error responses.

Note! In case of a failure, send the request again.

Required fields Error Codes
400 401 403 404 429 500 503 504
Title "Bad Request" "Unauthorized" "Forbidden" "Not Found" "Too Many Requests" "Internal Server Error" "Service Unavailable" "Gateway Timeout"
Message "The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications." "The request requires client authentication." "The request requires client authorization to access resource." "The server cannot find the requested resource." "The number of requests from this client is restricted to a specified quota." "The server encountered an unexpected condition which prevented it from fulfilling the request." "The server is not ready to handle the request. If specified please check the Retry-After for the time period specified for recovery/re-attempt of request." "The server, while acting as a gateway or proxy, did not get a response in time from the upstream server that it needed in order to complete the request."
Type “INVALID_REQUEST_ERROR" "AUTHENTICATION_ERROR" "AUTHENTICATION_ERROR" "INVALID_REQUEST_ERROR" "RATE_LIMIT_ERROR" "API_ERROR" "API_ERROR" "API_ERROR"

 

Rate this article:

Need help?

Do you have a question? On our Support page you will find a list with answers to frequently asked questions.
Did not find the answer you are looking for? Please contact us. We are happy to help.

Logo of Verifone