Test Your Stripe Payment Gateway
  • 12 Mar 2024
  • 2 Minutes to read
  • Dark
    Light

Test Your Stripe Payment Gateway

  • Dark
    Light

Article Summary

The next step is to test your Payment Gateway using either the test Stripe card or the test Stripe ACH bank account.

Test a Stripe Card

Warning
Actual card and bank account information cannot be used in Test Mode.
  1. Confirm that the Payment Gateway has Test Mode set to "TRUE".PGTest_Stripe_Test
  2. Go to the Payment Method tab and click New.
  3. Select "Card" and click Next.PGTest_Stripe_CardNext
  4. Using the information provided below, complete the following fields.
    • Holder's Name = use any name
    • Number = “4242424242424242”
    • Expiration Month = use any month
    • Expiration Year = use any year
    • CVV = use any 3-digit number
    • Postal Code = use any 5-digit number
    • Payment Gateway = the Payment Gateway you just set up
  5. Click Save.

This Payment Method is now valid and can be used to capture and refund Transactions.

NOTE: Additional card numbers can be found in Stripe's testing documentation.

Test a Stripe ACH Bank Account

Warning
Real card and bank account information cannot be used in Test Mode.
  1. Confirm that the Payment Gateway has Test Mode set to “TRUE”.PGTest_Stripe_Test
  2. Go to the Payment Method tab and click New.
  3. Select "ACH" and click Next.PGTest_Stripe_ACHNext(1)
  4. Use the data below to test either a successful or failed payment. 
    • Successful Payment Method 
      • Holder’s Name = Use any name 
      • Account Number = “000123456789” 
      • Routing Number = “110000000” 
      • Account Holder Type = Choose either option 
      • Currency ISO = “USD” 
      • Country ISO = “US”
    • Failed Payment Method
      • Holder’s Name = Use any name 
      • Account Number = 000111111116
      • Routing Number = 110000000
      • Account Holder Type = Choose either option
      • Currency ISO = “USD” 
      • Country ISO = “US”
  5. Click Save.

This Payment Method is now valid and can be used to capture and refund Transactions.

PGTest_Stripe_ValidPM

Test for Specific Responses and Errors

Use the test cards below to create a Payment Method that produces a specific response.

Incorrect CVC Code Error

Use this number to create an error about an incorrect CVV. The error message will be in the Stripe data fields.

    Number = 4000000000000127

Fail to Capture

This number will create a valid Payment Method, but when you capture a Transaction with the Payment Method, the Transaction will fail. The error message will be in the Stripe data fields.

   Number = 4000000000000341

Additional testing for specific responses and errors can be found here.

Disputes

Use the card below in test mode to simulate a disputed Transaction. This number will create a valid Payment Method, but when you capture a Transaction with the Payment Method, a Dispute record will be created.

  • Number = "4000000000000259"

Test Winning a Dispute

Enter the words "winning_evidence" in the Additional Information field on the  Dispute Evidence record to simulate the dispute being won and the funds being returned to your account as an adjustment Transaction.

Test Losing a Dispute

Enter the words "losing_evidence" in the Additional Information field on the Dispute Evidence record to simulate the dispute being closed and marked as lost. (Your account will not be credited.)

Click here for more information about Disputes.

Delete Test Data

  1. Navigate to your Stripe Dashboard.
  2. Toggle "ON" the View test data switch. (left-hand column).
  3. Click Business settings. (left-hand column)
  4. Select "Data".
  5. Next to Test data, click Delete all test data.
  6. Click Delete Now.

G_06 delete test data

Salesforce

Whether you are in a Production or Sandbox Org, you will need to temporarily deactivate all triggers so that you can delete Transaction, Payment Method, and Payment Gateway Customer records.

  1. Navigate to Custom Settings.
  2. Click Manage next to Blackthorn - Pay Trigger Settings.
  3. Click Edit.
  4. Check the Disable All Triggers checkbox.
  5. Click Save.
  6. Delete all of your test data.
  7. Navigate back to Custom Settings and UNCHECK Disable All Triggers.