Integrating WP Full Pay with other systems

Learn how you can use Wordpress action hooks to integrate the plugin with other systems.

Introduction

WP Full Pay fires Wordpress actions and Wordpress filters when certain events occur.

You can integrate WP Full Pay with other system by hooking into these actions and filters, and running your own code.

Possible integrations include, but not limited to:

  • Inserting a row into the database with some customer data after payment
  • Adding the customer’s email address to an email list in Mailchimp
  • Sending an SMS notification when a new subscription is made

Plugin action catalog

You can find all supported actions in the tables below. Click on an action to jump into the detailed description and usage example.

Action Description
fullstripe_before_payment_charge Triggered before a one-time payment (inline form)
fullstripe_after_payment_charge Triggered after a one-time payment (inline form)
fullstripe_before_checkout_payment_charge Triggered before a one-time payment (checkout form)
fullstripe_after_checkout_payment_charge Triggered after a one-time payment (checkout form)
fullstripe_before_subscription_charge Triggered before a subscription payment (inline form)
fullstripe_after_subscription_charge Triggered after a subscription payment (inline form)
fullstripe_before_checkout_subscription_charge Triggered before a subscription payment (checkout form)
fullstripe_after_checkout_subscription_charge Triggered after a subscription payment (checkout form)
fullstripe_before_donation_charge Triggered before a donation payment (inline form)
fullstripe_after_donation_charge Triggered after a donation payment (inline form)
fullstripe_before_checkout_donation_charge Triggered before a donation payment (checkout form)
fullstripe_after_checkout_donation_charge Triggered after a donation payment (checkout form)
fullstripe_before_card_capture Triggered before saving a card (inline form)
fullstripe_after_card_capture Triggered after saving a card (inline form)
fullstripe_before_checkout_card_capture Triggered before saving a card (checkout form)
fullstripe_after_checkout_card_capture Triggered after saving a card (checkout form)
Action Description
fullstripe_before_subscription_cancellation Triggered before a subscription is canceled
fullstripe_after_subscription_cancellation Triggered after a subscription is canceled
fullstripe_before_subscription_update Triggered before a subscription is updated
fullstripe_after_subscription_update Triggered after a subscription is updated
fullstripe_before_subscription_activation Triggered before a subscription is activated
fullstripe_after_subscription_activation Triggered after a subscription is activated

Plugin filter catalog

You can find all supported filters in the table below. Click on a filter to jump into the detailed description and usage example.

Action Description
fullstripe_select_subscription_plan Set the subscription plan selected by default via URL parameter.

Triggered when a plan selector parameter is found in the page URL.
fullstripe_set_custom_amount Set the custom payment amount entered by default via URL parameter.

Triggered when a custom amount parameter is found in the page URL.
fullstripe_add_transaction_metadata Add metadata to transactions.

Triggered before the page is loaded so that metadata can be added to the transaction from URL parameters.
fullstripe_get_upgrade_downgrade_plans Tell the customer portal which subscription plans should be offered for upgrading/downgrading the current plan.

Triggered before the list of subscription plans is displayed to the customer on the “Customer portal” page.
fullstripe_customer_portal_header Display extra content at the top of the customer portal pane.

Triggered before the “Customer portal” page is displayed.
fullstripe_customer_portal_footer Display extra content at the bottom of the customer portal pane.

Triggered before the “Customer portal” page is displayed.
fullstripe_modify_email_subject Modify the subject of plugin email notications.

Triggered before sending a plugin email notification.
fullstripe_modify_email_message Modify the body of plugin email notications.

Triggered before sending a plugin email notification.
fullstripe_thank_you_output Modify the thank you page.

Triggered before displaying a thank you page.
fullstripe_thank_you_url_parameters Modify the URL parameters added to the thank you page URL.

Triggered before opening the thank you page.
fullstripe_thank_you_post_types Modify the post types whose pages are offered as thank ypu pages in WP admin.

Triggered before displaying the thank you page selector in WP admin.
fullstripe_billing_countries Filter the billing countries.

Triggered before displaying a form where the billing country is collected.
fullstripe_shipping_countries Filter the shipping countries.

Triggered before displaying a form where the shipping country is collected.
fullstripe_payment_intent_parameters Modify the PaymentIntent parameters.

Triggered before creating a PaymentIntent via the Stripe API.
fullstripe_checkout_session_parameters Modify the CheckoutSession parameters.

Triggered before creating a CheckoutSession via the Stripe API.
fullstripe_determine_tax_id_type Detect the tax id type.

Triggered before Stripe customer is created via the Stripe API to determine the Stripe tax ID type of the customer.
fullstripe_determine_tax_rates Filter the tax rates.

Triggered before payment is made to determine the Stripe tax rates used for the payment.
fullstripe_members_supported_post_types Filter the custom post types used for protected content.

Triggered before the Wordpress page editor is displayed to the user.

Plugin actions

fullstripe_before_payment_charge

The fullstripe_before_payment_charge action is fired before a one-time payment transaction is about to be started on an inline form.

You can block the transaction by throwing an exception.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_after_payment_charge

The fullstripe_after_payment_charge action is fired after a successful one-time payment on an inline form.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

The example implementation with the documentation of the ‘params’ parameter:

fullstripe_before_checkout_payment_charge

The fullstripe_before_checkout_payment_charge action is fired before a one-time payment transaction is about to be started on a checkout form.

You can block the transaction by throwing an exception.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_after_checkout_payment_charge

The fullstripe_after_checkout_payment_charge action is fired after a successful one-time payment on a checkout form.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_before_subscription_charge

The fullstripe_before_subscription_charge action is fired before a subscription is about to be started on an inline form.

You can block the transaction by throwing an exception.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_after_subscription_charge

The fullstripe_after_subscription_charge action is fired after the customer successfully subscribed on an inline form.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_before_checkout_subscription_charge

The fullstripe_before_subscription_charge action is fired before a subscription is about to be started on a checkout form.

You can block the transaction by throwing an exception.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_after_checkout_subscription_charge

The fullstripe_after_checkout_subscription_charge action is fired after the customer successfully subscribed on a checkout form.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_before_donation_charge

The fullstripe_before_donation_charge action is fired before a donation transaction is about to be started on an inline form.

You can block the transaction by throwing an exception.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_after_donation_charge

The fullstripe_after_donation_charge action is fired after a successful donation on an inline form.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_before_checkout_donation_charge

The fullstripe_before_checkout_donation_charge action is fired before a donation transaction is about to be started on a checkout form.

You can block the transaction by throwing an exception.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_after_checkout_donation_charge

The fullstripe_after_checkout_donation_charge action is fired after a successful donation on a checkout form.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_before_card_capture

The fullstripe_before_card_capture action is fired before a Stripe customer is about to be saved on a inline form.

You can block the transaction by throwing an exception.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_after_card_capture

The fullstripe_after_card_capture action is fired after the Stripe customer has been successfully created on a save card inline form.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_before_checkout_card_capture

The fullstripe_before_checkout_card_capture action is fired before a Stripe customer is about to be saved on a checkout form.

You can block the transaction by throwing an exception.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_after_checkout_card_capture

The fullstripe_after_checkout_card_capture action is fired after the Stripe customer has been successfully created on a save card checkout form.

Action parameters:

Name Description
$params An array containing data about the customer and the transaction.
See the example below for details.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_before_subscription_cancellation

The fullstripe_before_subscription_cancellation action is fired before a subscription is canceled in Stripe.

Action parameters:

Name Description
$subscriptionId The identifier of the Stripe subscription.

An example implementation with the documentation of the ‘subscriptionId’ parameter:

fullstripe_after_subscription_cancellation

The fullstripe_after_subscription_cancellation action is fired after a subscription has been canceled in Stripe.

Action parameters:

Name Description
$subscriptionId The identifier of the Stripe subscription.

An example implementation with the documentation of the ‘subscriptionId’ parameter:

fullstripe_before_subscription_update

The fullstripe_before_subscription_update action is fired before a subscription is updated on the “Customer Portal” page or via the plugin’s API.

Action parameters:

Name Description
$params An array containing data about the changes made to the subscription.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_after_subscription_update

The fullstripe_after_subscription_update action is fired after a subscription has been updated updated on the “Customer Portal” page or via the plugin’s API.

Action parameters:

Name Description
$params An array containing data about the changes made to the subscription.

An example implementation with the documentation of the ‘params’ parameter:

fullstripe_before_subscription_activation

The fullstripe_before_subscription_activation action is fired before a canceled subscription is reactivated by the customer on the “Customer portal” page.

Action parameters:

Name Description
$subscriptionId The identifier of the Stripe subscription.

An example implementation with the documentation of the ‘subscriptionId’ parameter:

fullstripe_after_subscription_activation

The fullstripe_after_subscription_activation action is fired after a canceled subscription has been reactivated by the customer on the “Customer portal” page.

Action parameters:

Name Description
$subscriptionId The identifier of the Stripe subscription.

An example implementation with the documentation of the ‘subscriptionId’ parameter:

Plugin filters

fullstripe_select_subscription_plan

The fullstripe_select_subscription_plan filter is used to control which subscription plan is selected by default when the page is loaded.

The filter is called when the URL parameter dedicated to selecting the default subscription plan is found in the page URL when loading a form.

Filter parameters and return value:

Name Description
$selectedPlanId The identifier of the subscription plan set by a previous filter of this filter chain.
$formName Name of the form that triggered the filter.
$formPlanIds An associative array of plan ids assigned to the current form.
$planIdParamValue Value of the ‘wpfsPlan’ URL parameter
   
Return value Identifier of the subscription plan that will be selected by default

An example implementation of the filter:

fullstripe_set_custom_amount

The fullstripe_set_custom_amount filter is used to set the custom payment amount of a one-time payment form via an URL parameter.

The filter is called when the URL parameter dedicated to setting the custom payment amount is found in the page URL when loading a form.

Filter parameters and return value:

Name Description
$customAmount Custom payment amount set by a previous filter of this filter chain.
$formName Name of the form that triggered the filter.
$customAmountParamValue The value of the ‘wpfsAmount’ URL parameter
   
Return value Custom payment amount that will be entered by default

An example implementation of the filter:

fullstripe_add_transaction_metadata

The fullstripe_add_transaction_metadata filter is used to set transaction metadata via URL parameters.

The filter is called when the page containing the form is loaded.

Filter parameters and return value:

Name Description
$metadata Associative array of metadata set by a previous filter instance.
$formName Name of the form that triggered the filter.
$pageParams Associative array of page URL parameters.
   
Return value Associative array of metadata to be added to the transaction

An example implementation of the filter:

Where can you find metadata on the Stripe dashboard?
Go to the Where are custom fields on the Stripe dashboard? knowledge base article for instructions.

fullstripe_get_upgrade_downgrade_plans

The fullstripe_get_upgrade_downgrade_plans filter is used to set the list of subscription plans the customer is offered on the “Customer portal” page when upgrading/downgrading a subscription.

The filter is called before the “Customer portal” page is loaded.

The filter is useful when the Customer portal must offer more plans for upgrade/downgrade than the plans originally offered by the subscription form. This can happen when subscription forms with a single plan are integrated into pricing tables.

Filter parameters and return value:

Name Description
$formPlanIds Array of recurring price ids set by a previous filter instance.
$formName Name of the form using which the current subscription was purchased.
   
Return value Array of recurring price ids that is offered to the customer for upgrading/downgrading.

An example implementation of the filter:

fullstripe_customer_portal_header

The fullstripe_customer_portal_header filter is used to display extra content at the top of the “Customer portal” page.

The filter is called before the “Customer portal” page is loaded.

Filter parameters and return value:

Name Description
$content Header content set by a previous filter instance.
$params An array containing data about the customer and the Stripe client.
See the example below for details.
   
Return value Header content modified by the filter

An example implementation of the filter:

The fullstripe_customer_portal_footer filter is used to display extra content at the bottom of the “Customer portal” page.

The filter is called before the “Customer portal” page is loaded.

Filter parameters and return value:

Name Description
$content Header content set by a previous filter instance.
$params An array containing data about the customer and the Stripe client.
See the example below for details.
   
Return value Header content modified by the filter

An example implementation of the filter:

fullstripe_modify_email_subject

The fullstripe_modify_email_subject filter is used to change the subject of an email notification which is to be sent by the plugin.

The filter is called before placeholder tokens are resolved in the email subject and before the email is sent out.

Filter parameters and return value:

Name Description
$subject Email subject set by a previous filter instance.
$params An array containing data about email to be sent.
See the example below for details.
   
Return value Filtered email subject

An example implementation of the filter:

fullstripe_modify_email_message

The fullstripe_modify_email_message filter is used to change the body of an email notification which is to be sent by the plugin.

The filter is called before placeholder tokens are resolved in the email body and before the email is sent out.

Filter parameters and return value:

Name Description
$body Email body set by a previous filter instance.
$params An array containing data about email to be sent.
See the example below for details.
   
Return value Filtered email body

An example implementation of the filter:

fullstripe_thank_you_output

The fullstripe_thank_you_output filter is used to change the contents of content area marked by the thank you shortcode before it’s displayed.

The filter is called before placeholder tokens are resolved.

Filter parameters and return value:

Name Description
$params An array containing data about the thank you page.
See the example below for details.
   
Return value Filtered contents marked by the thank you shortcode

An example implementation of the filter:

fullstripe_thank_you_url_parameters

The fullstripe_thank_you_url_parameters filter is used to add URL parameters to the thank you page URL.

The filter is called before the thank you page URL is opened.

Filter parameters and return value:

Name Description
$urlParams An associative array of URL parameters returned by previous filters of the chain.
$filterParams An array containing data about form opening the thank you page.
See the example below for details.
   
Return value Filtered associative array of URL parameters to be added to the thank you page URL.

An example implementation of the filter:

fullstripe_thank_you_post_types

The fullstripe_thank_you_post_types filter is used to extend the list of pages/posts offered by forms as thank you page candidates in WP admin.

The filter is called before a form is opened for editing in WP admin.

Filter parameters and return value:

Name Description
$postTypes An array of post types returned by previous filters of the chain.
$filterParams An array containing data about the form to be opened for editing.
See the example below for details.
   
Return value Filtered array of post types.

An example implementation of the filter:

fullstripe_billing_countries

The fullstripe_billing_countries filter is used to collect the list of countries that should be offered as billing countries on forms.

The filter is called before a form is displayed.

Filter parameters and return value:

Name Description
$countryCodes An array of 2-letter ISO country codes returned by previous filters of the chain.
$filterParams An array containing data about the form that will display the billing country options.
See the example below for details.
   
Return value Filtered array of 2-letter ISO country codes.

An example implementation of the filter:

fullstripe_shipping_countries

The fullstripe_shipping_countries filter is used to collect the list of countries that should be offered as shipping countries on forms.

The filter is called before a form is displayed.

Filter parameters and return value:

Name Description
$countryCodes An array of 2-letter ISO country codes returned by previous filters of the chain.
$filterParams An array containing data about the form that will display the shipping country options.
See the example below for details.
   
Return value Filtered array of 2-letter ISO country codes.

An example implementation of the filter:

fullstripe_payment_intent_parameters

The fullstripe_payment_intent_parameters filter is used to change the Stripe PaymentIntent parameters.

The filter is called before the plugin creates the PaymentIntent.

Name Description
$params An array containing the PaymentIntent parameters
   
Return value Filtered PaymentIntent parameters

An example implementation of the filter:

fullstripe_checkout_session_parameters

The fullstripe_checkout_session_parameters filter is used to change the Stripe CheckoutSession parameters.

The filter is called before the plugin creates the CheckoutSession.

Name Description
$params An array containing the CheckoutSession parameters
   
Return value Filtered CheckoutSession parameters

An example implementation of the filter:

fullstripe_determine_tax_id_type

The fullstripe_determine_tax_id_type filter is used to identify the Stripe tax id type based on tax id and tax country.

The filter is called on form submits when tax data (tax id, tax country) is available before the plugin creates a Stripe customer.

Name Description
$taxIdType The Stripe tax id type recognized by the plugin or a previous filter of the filter chain.
$taxId The tax id entered by the customer on the form.
$taxCountry ISO code of the tax country entered by the customer on the form.
   
Return value Filtered Stripe tax id type

An example implementation of the filter:

fullstripe_determine_tax_rates

The fullstripe_determine_tax_rates filter is used to select the Stripe tax rates based on tax id, tax country, and tax state of the customer.

The filter is called when a vat id is entered or modified, or a new tax country or tax state is selected on a form.

Name Description
$taxRates The Stripe tax rates selected by the plugin or a previous filter of the filter chain.
$params An array containing tax-related data about the customer.
See the example below for details.
   
Return value Filtered Stripe tax rates

An example implementation of the filter:

fullstripe_members_supported_post_types

The fullstripe_members_supported_post_types filter is used to return the custom post types that can be protected by the plugin.

The filter is called when the Wordpress page editor is about to open a content for editing.

Name Description
$postTypes The post types array provided by the plugin or a previous filter of the filter chain.
$params An array containing additional parameters. Not used currently.
   
Return value Filtered custom post types array

An example implementation of the filter:

Still not finding the solution?

Our support team is happy to help you.

Contact support

Feature requests are always welcome!
We consider each feature request carefully, and examine how it fits the roadmap for the plugin.