Skip to content

Card Present

Process an In-Person Transaction

This article describes the different scenarios that can be simulated in the Sandbox environment. The payment.amount field is used to control the desired behaviour.

NOTE: You must use vnAUS9x8h02stgcRCBv3Uw as the value for the payment.terminalId

NOTE: These scenarios use the POST operation against the /transactions/terminals resource and simulate a card being presented to the terminal device.

Simulate an Approved In-Person Transaction

Any amount value not listed in the declined scenarios will result in an approved payment. The result.status will return as approved. The result.codes array will contain a code and message indicative of the approval message returned by the card issuing bank. There are however a couple of specific approved scenarios you may wish to test.

CodeMessageAmount
A02000approved10000
A02008honor_with_identification10008
A02010approved_for_partial_amount10010
A02011approved_vip10011
A02016approved_update_track_310016

Simulate a Declined In-Person Transaction

This scenario simulates a card being processed via the terminal device, but then declined by the customer’s bank. The result.status will return as declined. The result.codes array will contain a code and message indicating the reason for the decline.

CodeMessageAmount
D04401refer_to_issuer10001
D04402refer_to_issuer_special10002
D04403no_merchant10003
D04404pick_up_card10004
D04405do_not_honor10005
D04406error10006
D04407pick_up_card_special10007
D04409request_in_progress10009
D04412invalid_transaction10012
D04413invalid_amount10013
D04414invalid_card_number10014
D04415no_issuer10015
D044173d_secure_error10017
D04419reenter_last_transaction10019
D04421no_action_taken10021
D04422suspected_malfunction10022
D04423unacceptable_transaction_fee10023
D04425unable_to_locate_record_on_file10025
D04430format_error10030
D04431bank_not_supported_by_switch10031
D04433expired_card_capture10033
D04434suspected_fraud_retain_card10034
D04435card_acceptor_contact_aquirer_retain_card10035
D04436restricted_card_retain_card10036
D04437contact_aquirer_security_department_retain_card10037
D04439no_credit_account10039
D04441lost_card10041
D04442no_universal_account10042
D04443stolen_card10043
D04451insufficient_funds10051
D04454expired_card10054
D04456no_card_record10056
D04457function_not_permitted_to_cardholder10057
D04459suspected_fraud10059
D04460acceptor_contact_aquirer10060
D04462restricted_card10062
D04463security_violation10063
D04464original_amount_incorrect10064
D04466acceptor_contact_aquirer_security10066
D04467capture_card10067
D04482cvv_validation_error10082
D04490cut_off_in_progress10090
D04491card_issuer_unavailable10091
D04492unable_to_route_transaction10092
D04493cannot_complete_violation_of_the_law10093
D04494duplicate_transaction10094
D04496generate_system_error10096

Modify an In-Flight Transaction

This scenario allows you to simulate the PATCH operations against the virtual terminal. To test this you will need to send a payment.amount value of 11010. This will introduce a 10 second delay between your submission of the transaction to the virtual terminal and the subsequent update of the transaction status to approved. During this time, you can do a PATCH operation to the /transactions/terminals endpoint to either cancel the transaction or simulate prompting for manual entry of the card.

Simulate a Declined Refund for an In-Person Transaction

This scenario simulates a refund being submitted and getting declined by the customer’s bank. To simulate a failed refund, use the payment.amount values from the table above. The result.status will return as declined. The result.codes array will contain a code and message indicating the reason for the decline.

Process a Omnichannel refund for an In-Person Transaction

An omnichannel In-Person refund can be done via the card target, which is processed online; instead of using a physical terminal device. This is suitable for cases when the cardholder is not present; and the merchant is initiating the refund on their behalf.

Steps

  1. Process a successful transaction using either a virtual terminal or a physical terminal.
  2. Submit a refund request using either the virtual terminal or a physical terminal.
    • Include "target": "card" in the request payload.
    • When this parameter is present, the terminalId field is not required and will be ignored (if provided).

Here is a refund sample request:

{
"target": "card",
"reference": "Invoice-123456",
"amount": 100,
"description": "Full client refund"
}

Notes

  • Omnichannel refund availability can take up to 30 minutes after the transaction been processed.
  • When using a virtual terminal to simulate a standalone refund in the sandbox environment, any amount value not listed in the Declined Scenarios table will result in an approved refund.
  • In the sandbox environment, the card number used for the standalone refund may differ from the card used in the original in-person transaction.