Card testing

APICurrent


You can simulate successful transactions, card errors, and 3DS scenarios to test your advanced credit and debit card integrations that use Orders API v2.

Know before you code

  • Before you trigger a simulation, you'll need to get an access token.
  • Test values are case sensitive.

Simulate successful card capture

To simulate a successful credit card capture, you can test using a test card number. Use any date in the future for the card expiry date. Use any four digit CVV number for American Express cards and any three digit CVV number for all other cards.

To simulate a successful credit card capture with integrations like Standard Payments or advanced credit and debit cards, first ensure the integration is in sandbox mode, using a sandbox client ID and communicating with api*.sandbox.paypal.com endpoints. Then use a test number from the table below and any date in the future for the expiration. The CVV can be any four-digit number for American Express and any three-digit number for all other brands.

Test cards

Use these test card numbers for positive testing of advanced credit and debit card payments in sandbox.

Test numberCard type
371449635398431American Express
376680816376961American Express
36259600000004Diners Club
6304000000000000Maestro
5063516945005047Maestro
2223000048400011Mastercard
4005519200000004Visa
4012000033330026Visa
4012000077777777Visa
4012888888881881Visa
4217651111111119Visa
4500600000000061Visa
4772129056533503Visa
4915805038587737Visa

See the 3DS Test Scenarios for additional test card numbers.

Simulate card errors

To simulate credit card failures, pass a rejection trigger in the First Name or Name on Card field in your existing advanced credit and debit card payment integration. You must use a Visa test card number, for example 4012 8888 8888 1881. Use any date in the future for the card expiry date and any three-digit number for the CVV field.

Example Response

The response shows success as the order gets created, but because a refusal was passed, the card payment status is DECLINED, and the processor_response codes show that the card is globally unavailable (AVS G), not processed (CVV P), and expired (response code 5400).

1{
2 "id": "3M049991JF5624929",
3 "status": "COMPLETED",
4 "payment_source": {
5 "card": {
6 "last_digits": "6889",
7 "brand": "VISA",
8 "type": "CREDIT"
9 }
10 },
11 "purchase_units": [
12 {
13 "reference_id": "default",
14 "payments": {
15 "captures": [
16 {
17 "id": "2FB04508RA686960W",
18 "status": "DECLINED",
19 "amount": {
20 "currency_code": "USD",
21 "value": "500.00"
22 },
23 "final_capture": true,
24 "disbursement_mode": "INSTANT",
25 "seller_protection": {
26 "status": "NOT_ELIGIBLE"
27 },
28 "seller_receivable_breakdown": {
29 "gross_amount": {
30 "currency_code": "USD",
31 "value": "500.00"
32 },
33 "paypal_fee": {
34 "currency_code": "USD",
35 "value": "13.44"
36 },
37 "net_amount": {
38 "currency_code": "USD",
39 "value": "486.56"
40 }
41 },
42 "links": [
43 {
44 "href": "https://api-m.sandbox.paypal.com/v2/payments/captures/2FB04508RA686960W",
45 "rel": "self",
46 "method": "GET"
47 },
48 {
49 "href": "https://api-m.sandbox.paypal.com/v2/payments/captures/2FB04508RA686960W/refund",
50 "rel": "refund",
51 "method": "POST"
52 },
53 {
54 "href": "https://api-m.sandbox.paypal.com/v2/checkout/orders/3M049991JF5624929",
55 "rel": "up",
56 "method": "GET"
57 }
58 ],
59 "create_time": "2022-08-09T22:20:05Z",
60 "update_time": "2022-08-09T22:20:05Z",
61 "processor_response": {
62 "avs_code": "G",
63 "cvv_code": "P",
64 "response_code": "0500"
65 }
66 }
67 ]
68 }
69 }
70 ],
71 "links": [
72 {
73 "href": "https://api-m.sandbox.paypal.com/v2/checkout/orders/3M049991JF5624929",
74 "rel": "self",
75 "method": "GET"
76 }
77 ]
78}

Rejection triggers

All test simulations show that the card is globally unavailable (AVS) and not processed (CVV), but the response-code value changes based on the test trigger you use.

Test nameTriggerProcessor response code
Fraudulent cardCCREJECT-SF9500
Card is declinedCCREJECT-BANK_ERROR5100
CVC check failsCCREJECT-CVV_F00N7
Card expiredCCREJECT-EC5400
Luhn Check failsCCREJECT-IRC5180
Insufficient fundsCCREJECT-IF5120
Card lost, stolenCCREJECT-LS9520
Card refusedCCREJECT-REFUSED0500
Card invalidCCREJECT-IA1330

Processor response codes for non-PayPal payment processor errors.

ValueDescription
0000APPROVED
00N7CVV2_FAILURE_POSSIBLE_RETRY_WITH_CVV
0100REFERRAL
0390ACCOUNT_NOT_FOUND
0500DO_NOT_HONOR
0580UNAUTHORIZED_TRANSACTION
0800BAD_RESPONSE_REVERSAL_REQUIRED
0880CRYPTOGRAPHIC_FAILURE
0R00CANCELLED_PAYMENT
1000PARTIAL_AUTHORIZATION
10BRISSUER_REJECTED
1300INVALID_DATA_FORMAT
1310INVALID_AMOUNT
1312INVALID_TRANSACTION_CARD_ISSUER_ACQUIRER
1317INVALID_CAPTURE_DATE
1320INVALID_CURRENCY_CODE
1330INVALID_ACCOUNT
1335INVALID_ACCOUNT_RECURRING
1340INVALID_TERMINAL
1350INVALID_MERCHANT
1360BAD_PROCESSING_CODE
1370INVALID_MCC
1380INVALID_EXPIRATION
1382INVALID_CARD_VERIFICATION_VALUE
1384INVALID_LIFE_CYCLE_OF_TRANSACTION
1390INVALID_ORDER
1393TRANSACTION_CANNOT_BE_COMPLETED
5100GENERIC_DECLINE
5110CVV2_FAILURE
5120INSUFFICIENT_FUNDS
5130INVALID_PIN
5135DECLINED_PIN_TRY_EXCEEDED
5140CARD_CLOSED
5150PICKUP_CARD_SPECIAL_CONDITIONS. Try using another card. Do not retry the same card
5160UNAUTHORIZED_USER
5170AVS_FAILURE
5180INVALID_OR_RESTRICTED_CARD. Try using another card. Do not retry the same card
5190SOFT_AVS
5200DUPLICATE_TRANSACTION
5210INVALID_TRANSACTION
5400EXPIRED_CARD
5500INCORRECT_PIN_REENTER
5650DECLINED_SCA_REQUIRED
5700TRANSACTION_NOT_PERMITTED. Outside of scope of accepted business
5710TX_ATTEMPTS_EXCEED_LIMIT
5800REVERSAL_REJECTED
5900INVALID_ISSUE
5910ISSUER_NOT_AVAILABLE_NOT_RETRIABLE
5920ISSUER_NOT_AVAILABLE_RETRIABLE
5930CARD_NOT_ACTIVATED
6300ACCOUNT_NOT_ON_FILE
7600APPROVED_NON_CAPTURE
7700ERROR_3DS
7710AUTHENTICATION_FAILED
7800BIN_ERROR
7900PIN_ERROR
8000PROCESSOR_SYSTEM_ERROR
8010HOST_KEY_ERROR
8020CONFIGURATION_ERROR
8030UNSUPPORTED_OPERATION
8100FATAL_COMMUNICATION_ERROR
8110RETRIABLE_COMMUNICATION_ERROR
8220SYSTEM_UNAVAILABLE
9100DECLINED_PLEASE_RETRY. Retry
9500SUSPECTED_FRAUD. Try using another card. Do not retry the same card
9510SECURITY_VIOLATION
9520LOST_OR_STOLEN. Try using another card. Do not retry the same card
9530HOLD_CALL_CENTER. The merchant must call the number on the back of the card. POS scenario
9540REFUSED_CARD
9600UNRECOGNIZED_RESPONSE_CODE
PCNRCONTINGENCIES_NOT_RESOLVED
PCVVCVV_FAILURE
PPADBILLING_ADDRESS
PPAEAMEX_DISABLED
PPAGADULT_GAMING_UNSUPPORTED
PPAIAMOUNT_INCOMPATIBLE
PPARAUTH_RESULT
PPAUMCC_CODE
PPAVARC_AVS
PPAXAMOUNT_EXCEEDED
PPBGBAD_GAMING
PPC2ARC_CVV
PPCECE_REGISTRATION_INCOMPLETE
PPCOCOUNTRY
PPCRCREDIT_ERROR
PPCTCARD_TYPE_UNSUPPORTED
PPCUCURRENCY_USED_INVALID
PPD3SECURE_ERROR_3DS
PPDCDCC_UNSUPPORTED
PPDIDINERS_REJECT
PPDVAUTH_MESSAGE
PPEFEXPIRED_FUNDING_INSTRUMENT
PPELEXCEEDS_FREQUENCY_LIMIT
PPERINTERNAL_SYSTEM_ERROR
PPEXEXPIRY_DATE
PPFEFUNDING_SOURCE_ALREADY_EXISTS
PPFIINVALID_FUNDING_INSTRUMENT
PPFRRESTRICTED_FUNDING_INSTRUMENT
PPFVFIELD_VALIDATION_FAILED
PPGRGAMING_REFUND_ERROR
PPH1H1_ERROR
PPIFIDEMPOTENCY_FAILURE
PPIIINVALID_INPUT_FAILURE
PPIMID_MISMATCH
PPITINVALID_TRACE_ID
PPLRLATE_REVERSAL
PPLSLARGE_STATUS_CODE
PPMBMISSING_BUSINESS_RULE_OR_DATA
PPMCBLOCKED_Mastercard
PPMDPPMD
PPNCNOT_SUPPORTED_NRC
PPNLEXCEEDS_NETWORK_FREQUENCY_LIMIT
PPNTNETWORK_ERROR
PPPHNO_PHONE_FOR_DCC_TRANSACTION
PPPIINVALID_PRODUCT
PPPMINVALID_PAYMENT_METHOD
PPQCQUASI_CASH_UNSUPPORTED
PPREUNSUPPORT_REFUND_ON_PENDING_BC
PPRFINVALID_PARENT_TRANSACTION_STATUS
PPRRMERCHANT_NOT_REGISTERED
PPS0BANKAUTH_ROW_MISMATCH
PPS1BANKAUTH_ROW_SETTLED
PPS2BANKAUTH_ROW_VOIDED
PPS3BANKAUTH_EXPIRED
PPS4CURRENCY_MISMATCH
PPS5CREDITCARD_MISMATCH
PPS6AMOUNT_MISMATCH
PPSCARC_SCORE
PPSDSTATUS_DESCRIPTION
PPSEAMEX_DENIED
PPTEVERIFICATION_TOKEN_EXPIRED
PPTFINVALID_TRACE_REFERENCE
PPTIINVALID_TRANSACTION_ID
PPTRVERIFICATION_TOKEN_REVOKED
PPTTTRANSACTION_TYPE_UNSUPPORTED
PPTVINVALID_VERIFICATION_TOKEN
PPUAUSER_NOT_AUTHORIZED
PPUCCURRENCY_CODE_UNSUPPORTED
PPUEUNSUPPORT_ENTITY
PPUIUNSUPPORT_INSTALLMENT
PPUPUNSUPPORT_POS_FLAG
PPURUNSUPPORTED_REVERSAL
PPVCVALIDATE_CURRENCY
PPVEVALIDATION_ERROR
PPVTVIRTUAL_TERMINAL_UNSUPPORTED

Testable Orders API v2 methods