Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Test Stripe Invoicing


Test Stripe Invoicing

Learn how to test your Invoicing integration.

Use these common scenarios to test your invoicing integration before taking it live.

Test webhook notifications

Stripe triggers event notifications when an invoice’s status changes. After you set up the Stripe CLI and link to your Stripe account, you can test webhooks by:

You can add an endpoint and see its received events by going to the Webhooks tab in Workbench.

Test events with fake data

By using the Stripe CLI to trigger events, you can see event notifications on your server as they come in. This means that you can check your webhook integration directly without complicating factors such as network tunnels or firewalls. When you use the Stripe CLI, the event your webhook receives contains fake data that doesn’t correlate to invoice information.

Test events with real data

The most reliable way to test webhook notifications is to create test invoices for existing customers and handle the corresponding events.

Test payment failures

To trigger payment failures for invoices, you can use the test credit card numbers in Declined payments. If you want to simulate a declined payment for a card that’s been successfully attached to a customer, use 4000 0000 0000 0341 as their default payment method.

Depending on your retry settings, you might have to wait a day or more to see the first retry attempt. To see what happens for a successful retry, you can use this waiting period to update the customer’s payment method to a working test card.

Test payments that require 3D Secure

Use the 4000 0027 6000 3184 card to simulate 3D Secure triggering for invoices. When Stripe triggers a 3D Secure authentication, you can test authenticating or failing the payment attempt in the 3DS dialog that opens. If the payment is authenticated successfully, the invoice is paid. When a payment attempt fails, the authentication attempt is unsuccessful and the invoice remains open.

Test bank transfer payments

To test manual payments on invoices through bank transfers:

  1. Create a testmode invoice with the collection method set to send_invoice and payment_settings[payment_method_types] array set to [customer_balance].
  2. Find the invoice in the Dashboard and click Send. This generates a unique virtual bank account number for your customer.
  3. Retrieve your customer’s unique virtual bank account number using the Customer Balance Funding Instructions API. You can also find your customer’s virtual banking details in the hosted invoice page and PDF.

Test customer tax ID verification

Use these magic tax IDs to trigger certain verification conditions in testing environments. The tax ID type must be the Australian Business Number (ABN), EU VAT Number, or UK Value-Added-Tax (GB VAT) number.

NumberType
000000000Successful verification
111111111Unsuccessful verification
222222222Verification remains pending indefinitely
Last verified 2026-09-24

Is this helpful?