# Handling Referral Responses A `transaction.responseCode` of ‘R’ indicates the card issuer is unable to approve a transaction without processing a voice referral. Voice referrals are commonly caused when an issuer has concerns over fraudulent activity. Voice referrals can also happen when a merchant is processing in offline mode. The way your interface responds to a voice referral is based on the merchant’s business practices and industry. The interface will either need to treat a referral response as a decline or process the transaction using an authorization code (provided by the card-issuing bank over the phone). An e-commerce interface would treat referral responses as declines because there is no clerk to call the card issuer. Interfaces for other industries may need to add the ability to follow Shift4’ voice referral flow (detailed below). A best practice in interface design is to make referral handling configurable by dollar amount and merchant preference. ## Authorization Codes A successful voice referral will result in a card issuer providing a voice authorization code that the clerk will enter into the interface. Your interface will then pass the authorization code to Shift4's Gateway using the [Manual Authorization](/apis/payments-platform-rest/openapi/transactions/manualauthorization) request or [Manual Sale](/apis/payments-platform-rest/openapi/transactions/manualsale) request. ## Invalid Authorization Codes Historically, merchants have experienced issues with clerks entering invalid authorization codes. This can occur when a clerk mistypes the code given by the staff at the voice authorization phone number or makes up a code to avoid having to call the card issuer. Invalid authorization codes can cause merchants to lose revenue when a purchase cannot be authorized by the card issuer or a chargeback occurs. In addition to lost revenue, merchants can be fined by the processor when an invalid authorization code is entered. Valid authorization codes are six alphanumeric characters (no special characters); your interface should verify that the code entered meets this criteria. Shift4 strongly recommends a warning message be displayed on the screen where the clerk enters the authorization code. This message should warn the clerk that the authorization code entered must match the one provided by the issuer. ## Use Case: Handling Voice Referrals ##### Actors: Clerk, Consumer, Interface, Shift4, Voice Authorization Center ##### Preconditions: A transaction request has received a referral response. The merchant is not e-commerce, where referral requests are automatically voided. ##### Main Flow: This flow illustrates successfully obtaining a voice authorization. 1. The clerk and consumer choose to continue the transaction after receiving an ‘R’ response. This response includes the data provided in the `merchant.cardTypes` array. 2. The interface displays the information from the response for the clerk’s use. 3. The clerk calls the phone number provided and follows the instructions. 4. The Voice Authorization Center approves the transaction and a voice authorization code is provided. 5. The interface displays a field in which the clerk will enter the voice authorization code. 6. The clerk enters and submits the voice authorization code. 7. The interface will send a [Manual Authorization](/apis/payments-platform-rest/openapi/transactions/manualauthorization) request or [Manual Sale](/apis/payments-platform-rest/openapi/transactions/manualsale) request. ##### Alternate Flow 1: This flow illustrates the merchant or consumer canceling the transaction prior to attempting to get a voice authorization code. (Main Flow; Step 1.) No further action is required. Shift4 automatically voids transactions that receive an 'R' response. ##### Alternate Flow 2: This flow illustrates the card issuer declining the transaction. (Main Flow; Step 6.) No further action is required. Shift4 automatically voids transactions that receive an 'R' response. ##### Exception Flow 1: This flow illustrates a failure attempting to get the voice referral data. 1. Starting at step 1 of Main Flow: The clerk and consumer choose to continue the transaction after receiving an ‘R’ response. However, the voice authorization center information is not provided in the referral response. 2. The clerk refers to the merchant’s backup voice referral procedures. 3. Return to Main Flow; Step 3. ##### Post Conditions: The voice authorization code is recorded for approved transaction.