# Test Server Triggers Shift4’ test server simulates connectivity to a credit card processing network and provides processor-like responses to credit card transactions. The test host can be triggered for specific responses, allowing you to properly code for errors, declines, referrals, and other scenarios. ## transaction.responseCode | Desired Response | Trigger(s) | | --- | --- | | ‘A’ (Authorized) | `amount.total` ≤ 999,997.99 | | ‘R’ (Referral) | 999,998 < `amount.total` ≤ 999,998.99 | | ‘D’ (Declined) | 999,999 < `amount.total` < 2,000,000,000 | | ‘D’ on a refund (Declined purchase return) | `amount.total` = 19.19 | | 'P' (Partial Approval) | `amount.total` = 219 in the initial [Authorization](/apis/payments-platform-rest/openapi/transactions/transactionsauthorization), [Capture](/apis/payments-platform-rest/openapi/transactions/transactionscapture), or [Sale/Purchase](/apis/payments-platform-rest/openapi/transactions/transactionssale), OR increase the `amount.total` by 219 on an incremental [Authorization](/apis/payments-platform-rest/openapi/transactions/transactionsauthorization) or [Capture](/apis/payments-platform-rest/openapi/transactions/transactionscapture) | ## transaction.avs.result | Desired Response | Trigger(s) | | --- | --- | | ‘A’ (Street address matched, but ZIP/postal code did not match.) | `customer.addressLine1` or `customer.postalCode` contains 65* | | ‘E’ (Error - AVS data is invalid or not allowed.) | `customer.addressLine1` or `customer.postalCode` contains 69* | | ‘N’ (No street address and no ZIP/postal code match.) | `customer.addressLine1` or `customer.postalCode` contains 78* | | ‘R’ (Card issuer system is unavailable.) | `customer.addressLine1` or `customer.postalCode` contains 82* | | ‘S’ (AVS service not supported.) | `customer.addressLine1` or `customer.postalCode` contains 83* | | ‘U’ (Street address information unavailable). | `customer.addressLine1` or `customer.postalCode` contains 85* | | ‘X’ (Street address and 9-digit ZIP/postal code matched.) | `customer.addressLine1` or `customer.postalCode` contains 88* | | ‘Y’ (Street address and 5-digit ZIP code matched.) | `customer.addressLine1` or `customer.postalCode` contains 89* | | ‘Z’ (Only the ZIP/postal code matched. | `customer.addressLine1` or `customer.postalCode` contains 90* | If more than one trigger sequence is present, values are read from left to right with the values in the `customer.addressLine1` field taking precedence over the values in the `customer.postalCode` field. For example, if customer.addressLine1=6545 Elm and `customer.postalCode`=49081, the `transaction.avs.result` would return ‘A’ because ‘65’ occurred before ‘90’. If a value is sent in the `customer.addressLine1` or `customer.postalCode` field and it does not match one of the triggers it will return `transaction.avs.result = 'N'` ## card.securityCode.result | Desired Response | Trigger(s) | | --- | --- | | ‘M’ (Match) | `card.securityCode.value`="333" or "3333" | | ‘N’ (No match) | `card.securityCode.value`="444" or "4444" | | ‘P’ (Not processed) | `card.securityCode.value`="555" or "5555" | | ‘S’ (Should have been present) | `card.securityCode.value`="666" or "6666" | | ‘U’ (Issuer unavailable to process) | `card.securityCode.value`="777" or "7777" | ## card.levelResult | Desired Response | Trigger(s) | | --- | --- | | ‘1A’ | `amount.total`=6.66 and `card.type`="AX" | | ‘1B’ | `amount.total`=6.66 and `card.type`="NS" | | ‘2C’ | `amount.total`=6.66 and `card.type`="MC" | | ‘2V’ | `amount.total`=6.66 and `card.type`="VS" | ## Delayed Response | Desired Response | Trigger(s) | | --- | --- | | `transaction.responseCode`=‘A’ | `amount.total` = 111.XX, where XX is the number of seconds that the transaction response will be delayed | | `transaction.responseCode`=‘e’ | `amount.total` = 112.XX | | `transaction.responseCode`=‘R’ | `amount.total` = 511.XX | | `transaction.responseCode`=‘D’ | `amount.total` = 1,111.XX | ## Prepaid Cards | Desired Response | Trigger(s) | | --- | --- | | `transaction.responseCode`=‘A’ and `card.balance.amount` of 43.34 (pre-paid Visa/Mastercard/AMEX) | `amount.total` = 6.66 | | `transaction.responseCode`=‘R’ and `card.balance.amount` of 83.34 (pre-paid Visa/Mastercard/AMEX) | `amount.total` = 516.66 | | `transaction.responseCode`=‘D’ and `card.balance.amount` of 134.34 (pre-paid Visa/Mastercard/AMEX) | `amount.total` = 1116.66 | ## AVS One Pass vs Two Pass | Desired Response | Trigger(s) | | --- | --- | | One Pass Validation | `amount.total` ≤ 100 and send appropriate AVS/CSC triggers (see above) | | Two Pass Validation | `amount.total` > 100 and send appropriate AVS/CSC triggers (seeabove) | ## Errors | Desired Response | Trigger(s) | | --- | --- | | Demo Host Error | `amount.total` = 32,202.00 | ## Timeout Errors | Desired Response | Trigger(s) | | --- | --- | | `error.primaryCode` = ‘9951’ | `card.number` = '4321000000011001' | | `error.primaryCode` = ‘2999’ | `card.number` = '4321000000032999' | | `error.primaryCode` = ‘9847’ | `card.number` = '4321000000029847' | | `error.primaryCode` = ‘9844’ | `card.number` = '4321000000059844' | | `error.primaryCode` = ‘9401’ | `card.number` = '4321000000009401' | | `error.primaryCode` = ‘9870’ | `card.number` = '4321000000029870' | | `error.primaryCode` = ‘9858’ | `card.number` = '4321000000089858' | | `error.primaryCode` = ‘9839’ | `card.number` = '4321000000029839' | | `error.primaryCode` = ‘9971’ | `card.number` = '4321000000009971' | | `error.primaryCode` = ‘9972’ | `card.number` = '4321000000099972' | ## OCT | Desired Response | Trigger(s) | Notes | | --- | --- | --- | | `error.code`=‘40001’ | $9.01 | Transaction timed out | | `transaction.responseCode`=‘D’ | $9.02 | Decline | | `error.code`=‘40400’ | $9.03 | Transaction type error | | `error.code`=‘40107’ | $9.04 | Invalid amount for transaction | | `error.code`=‘50101’ | $9.05 | Transation cancelled | | `transaction.responseCode`=‘A’ | $9.06 | | | `transaction.responseCode`=‘A’ | $9.07 | | ## Account Update Status If the /updater/status request is made within 1 hour of the initial /updater/request request, the /updater/status request will return `updaterStatus = P`. If the /updater/status request is made more than 1 hour after the initial /updater/request request, the /updater/status request will return `updaterStatus = C`. Utilize the table below to trigger specific response values in the `cards.status` field. These values will only be returned when the `updaterStatus = C`. | Value | Description | PAN MC | PAN Visa | Exp. Date | New PAN MC | New PAN Visa | New Exp. Date | | --- | --- | --- | --- | --- | --- | --- | --- | | A | New account number and/or new expiration date. | 5800635423709777 | 4379272439470014 | 01/22 | 5721906766717446 | 4492763247374424 | 01/26 | | B | New expiration date, same account number. | 5081503366885154 | 4737085632563683 | 02/22 | | | 02/26 | | C | Account is marked as closed. | 5454755154580582 | 4338934484732610 | 03/22 | | | | | D | Contact cardholder for updated information. | 5272269738523985 | 4885488907028012 | 04/22 | | | | | E | No updates were found but the account is valid. | 5778058140338937 | 4481596845658480 | 05/22 | | | | | F | No match for the data provided. Participating BIN/ issuer. | 5196017221940841 | 4102452485907606 | 06/22 | | | | | H | No match for the data provided. Non-participating BIN/issuer. | 5173742979877294 | 4118318640687726 | 07/22 | | | | | O | Cardholder opted out from service. | 5569671618316921 | 4513042628557021 | 08/22 | | | | | T | Token not found / Invalid | - | - | 09/22 | | | | | U | Unknown error | 5619196441834353 | 4172056931307090 | 10/22 | | | |