- Use Case Number: 2-2-12
- **Completed By:**Software Developer
- Estimated Completion Time: <1 day
Basic Scenario
Subscribe provides a built-in defense against the fraudulent use of credit cards using Address Verification Service (AVS) and validation of the Card Verification Number/Value (CVN/CVV), the 3 to 4 digit security code that accompanies the credit card number on any credit card. AVS and CVN/CVV checks are part of a service that is provided by your payment processor. Note: All payment processors provide CVN/CVV validation service, but not all payment processors provide AVS. In addition, AVS is only applicable to the USA, Canada and the UK.Address Verification Service (AVS)
Strict address verification rules often fail due to mismatches arising out of typographical errors and multiple address variations. By default, payment processors conduct the AVS check using the account holder’s address number (for example, the “123” in 123 Main St), and zip code. If both items match, Subscribe receives a Full Match return from the processor. If one of the two match, Subscribe considers this a Partial Match. Subscribe considers either a Full Match or a Partial Match a success. A No Match return causes the transaction to be canceled if the AVS policy is being enforced. For more information about AVS, see the AVS Return Codes topic.Card Verification Number/Value (CVN/CVV)
When the Subscribe CVN/CVV policy is being enforced, Subscribe accepts only success response codes, rejecting all others.Design Approach
Both AVS and CVN checks are conducted by your payment processor with the results passed back to Subscribe. For Subscribe to respond to either the AVS code or CVN code returned by your payment processor, you must include the request in each API call. This is done at the API level rather than as a system wide setting to allow you the flexibility of not checking the CVN or the AVS response code in a given situation. For example, as AVS is not generally available outside of the USA, Canada and the UK, you can include logic when calling the Subscribe API so that Subscribe responds if the subscriber making the purchase is based in the USA, Canada or the UK, or ignores the results if the subscriber is outside of the USA, Canada or the UK.Alternative Flows And Applications
- Subscribe is pre-integrared with Cybersource Decision Manager, offering a robust fraud prevention solution. In this case, the use of AVS and CVN in Subscribe may be either redundant, or can be performed in addition to the fraud checking performed earlier in the buy flow.
- For AVS checking, Subscribe policy only fails the transaction if the processor returns a No Match value. For finer control, you can turn off AVS checking in Subscribe (
ignore_avs_policyset to1 [true]) and implement your own AVS check by interrogating the data return from the payment processor. For example, you can require aFullMatchon the AVS code where the subscriber’s account has a complete address and a partial match where there is not a complete address available.
Configure AVS and CVN Settings Using Subscribe APIs
Use the following Subscribe API settings to perform AVS and CVN testing when calling the transaction or subscription APIs to create a new one-time transaction or subscription.-
For Subscriptions (or Transactions for one-time transactions) endpoints, set the
ignore_avs_policyflag to0(false) when creating a Subscription/Transaction. A value of false directs Subscribe to evaluate the AVS code returned by the payment processor. See the Subscription Object in REST API Guide for more details. -
For Subscriptions (or Transactions for one-time transactions) endpoints, set the
ignore_cvn_policyflag to0(false). A value of false directs Subscribe to evaluate the CVN code returned by the payment processor. See the Subscription Object in REST API Guide for more details. Sample Code:

