Recommendation code testing
Last updated: July 18, 2024
Card schemes provide you with additional information on how and when you should retry a transaction through recommendation codes.
You can simulate recommendation code responses to test your integration is working as expected.
To test the various outcomes, set up a new payment request and:
- Set the
source.number
field to any of the following numbers, depending on which card scheme you are testing:- use
4659105569051157
for Visa - use
5105105105105100
for Mastercard - alternatively, you can use any other of our test cards.
- use
- Set the
source.cvv
field to100
. - Set the
amount
field to one of the values from the following table, depending on the outcome you want to test for.
Recommendation code outcome | Recommendation reason | amount value |
---|---|---|
|
|
|
|
|
|
|
|
|
1{2"source": {3"type": "card",4"number": "4659105569051157",5"cvv": "100",6"expiry_month": 1,7"expiry_year": 20258},9"currency": "EUR",10"amount": 8105,11"processing_channel_id": "pc_dkgoofpvuwuerekvd4ssr6jwom"12}
Regardless of the amount
value used, the response will contain a response_code
indicating a soft decline (20xxx
). See soft decline codes.
1{2"id": "pay_ifj764it4t3epgsnbgnmjqhkne",3"action_id": "act_gy64ocao67ferkltfbrgq2qr24",4"amount": 8105,5"currency": "EUR",6"approved": false,7"status": "Declined",8"auth_code": "961080",9"response_code": "20020",10"response_summary": "Invalid Response",11"risk": {12"flagged": false,13"score": 0.014},15"source": {16"id": "src_qoqpjcdwmuqezpopxrhnoncgoa",17"type": "card",18"expiry_month": 1,19"expiry_year": 2025,20"scheme": "Visa",21"last4": "1157",22"fingerprint": "B0392514A7C52F5CEE996BEB05431245ADAF4B31917E5C7577E213E264EF60A9",23"bin": "424242",24"card_type": "CREDIT",25"card_category": "CONSUMER",26"issuer_country": "GB",27"product_id": "F",28"product_type": "Visa Classic",29"avs_check": "G",30"cvv_check": "Y",31"payment_account_reference": "V001161191215476252"32},33"processed_on": "2023-08-09T09:51:24.5437329Z",34"scheme_id": "885866251672298",35"processing": {36"acquirer_transaction_id": "806400184135498107867",37"retrieval_reference_number": "191666272529",38"recommendation_code": "01",39"merchant_category_code": "0742",40"scheme_merchant_id": "50777",41"aft": false42},43"_links": {44"self": {45"href": "https://api.sandbox.checkout.com/payments/pay_ifj764it4t3epgsnbgnmjqhkne"46},47"actions": {48"href": "https://api.sandbox.checkout.com/payments/pay_ifj764it4t3epgsnbgnmjqhkne/actions"49}50}51}