less than a minute read • Updated 2 days ago
Stripe
Connect Foxy to Stripe for secure card payments.
- Countries
Australia, Austria, Belgium, Brazil, Bulgaria, Canada, Cyprus, Czech Republic, Denmark...Show more
- Features
- 3-D Secure
- Refunds
- Delayed Payments
- Immediate Payments
Stripe connects to Foxy through an authentication flow rather than by entering credentials, so setup happens in the legacy Foxy admin.
Setting up Stripe
When using the Stripe option you won't be able to have a gateway enabled under Let customers pay with a Credit or Debit Card. The Stripe option already shows a credit card form within the checkout, and only one is allowed at a time. Customers will still be able to pay with credit and debit cards through the Stripe payment fields.
Configuring Apple Pay and Google Pay
Adding a custom statement descriptor suffix
As part of the Stripe configuration in the Foxy admin you can specify a statement descriptor suffix, which is appended to the statement descriptor set in your Stripe configuration and appears on your customers' card statements.
Set it using the optional statement descriptor suffix field within the Stripe settings. The statement descriptor can be a maximum of 22 characters, which includes the descriptor already set on your Stripe account plus 2 additional characters for * . So if your statement descriptor is MYSTORE, you have 13 characters for your suffix. If you set the suffix to CUSTOM-SUFFIX, the descriptor on the customer's card statement shows as MYSTORE* CUSTOM-SUFFIX. See Stripe's documentation on statement descriptors for more details.
Migrating from previous Stripe integrations or other gateways to Stripe
If your store currently uses one of our older Stripe integrations, or another debit/credit card based payment gateway, you'll need to update your store to switch over to the new Stripe integration.
If you have multiple payment sets to update, we recommend updating them one at a time.
At this point your store has been successfully updated to use our Stripe integration.
If you've set your checkout template to Custom Template and embedded the raw checkout.inc.twig template directly, or embedded the payment_method Twig block, you'll need to update your checkout template with some new code for Stripe. You can reference the current iteration of the checkout template on GitHub.
Supported countries
Stripe is continually expanding the countries they support, and Foxy's Stripe integration should support any new countries they add. For a list of the countries Stripe currently support, see their documentation.
Overriding the order ID
As of Foxy v2.0, the Order ID that Foxy passes to Stripe — normally the Foxy transaction ID — can be overridden. This is advanced functionality and is only relevant for very specific use cases, such as complex fulfillment processes where multiple authorizations and captures need to be grouped by Order ID.
To override the default Foxy transaction ID, add an attribute via the API named fx_transaction_id_gateway_override to the cart resource. The value of that attribute is passed to Stripe as the Order ID.
Testing
Obtaining a test account
To configure a test account with Stripe, complete the same process described above but leave your payment servers set to Test Servers. When you click to connect to Stripe, the following page has an option at the top to Skip this step, which brings you back to Foxy with a test Stripe account connected and ready to use.
Test card numbers
Use 4242 4242 4242 4242 to simulate successful card validations in test mode. This number fails in production.
Technically any card number that passes the Luhn check will validate successfully in test mode, including real credit card numbers. You may not want to use real card numbers while testing, to avoid accidentally checking them into your codebase.
The following are also true in test mode:
All 3 or 4 digit numbers pass as valid CVCs
All future expiration dates are considered valid
To simulate the card declined error, use 4000 0000 0000 0002.
Troubleshooting & interpreting response codes
Contact Stripe for info.

