Stripe Failed Payment Notices
Goal
Show users clear, customizable error messages when a Stripe payment fails (e.g. card declined, expired card, incorrect CVC). Use the %%membership_messages%% merge tag and configure messages in settings.
Where to configure error messages
Go to Divi Engine → Divi Membership → Payment Gateways (Stripe section / Stripe Options). There you can modify the default text for each error type. Use Stripe’s testing documentation to simulate declined cards and other errors in test mode.
Displaying messages on the page
Use the %%membership_messages%% merge tag on the page where users are redirected after a failed payment. That tag outputs the specific error message (e.g. “Sorry, your card is declined.”).
Register module
If Redirect Type for Failed Payment is set to Redirect to Page, include %%membership_messages%% on that target page so the error appears after redirect.
Signup module
Often the Signup module is placed on the Failed Payments Redirection Page so users can try another payment. You can either show errors automatically within the module or add a text module with %%membership_messages%% to display the message.
Default messages (examples)
| Error type | Default message |
|---|---|
Declined card (card_declined) | "Sorry, your card is declined." |
Expired card (expired_card) | "Sorry, your card is expired." |
Incorrect CVC (incorrect_cvc) | "Sorry, the CVC for your card is incorrect." |
Processing error (processing_error) | "There was an issue with processing your payment, please try again." |
Incorrect number (incorrect_number) | "Your card number is incorrect." |
| Invalid expiry month/year | Messages direct the user to check the expiration date or use a different card. |
Customize each in Divi Engine → Divi Membership → Payment Gateways (Stripe Options).
What's Next
- Configuring payment gateways — Set up Stripe and PayPal.
- Register module — Configure redirect and failed payment behaviour.
- Settings Overview — Where to find Payment Gateways and Stripe options.