Note: This is part of the developer docs and is considered custom code.
Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code.

If you need assistance with this, please reach out to our list of consultants for further assistance:

Filters the arguments when creating a Stripe Payment Intent. See the Stripe documentation for accepted arguments.


  • $intent_args (array) - Array of Payment Intent arguments for the API request.
  • $gateway (RCP_Payment_Gateway_Stripe) - Gateway object.


Prevents card details from being saved in Stripe for future use.

 * Don't save card details in Stripe for future use.
 * @param array                      $intent_args
 * @param RCP_Payment_Gateway_Stripe $stripe_gateway
 * @return array
function ag_rcp_prevent_saving_cards( array $intent_args, RCP_Payment_Gateway_Stripe $stripe_gateway ) {
	unset( $intent_args['setup_future_usage'] );

	return $intent_args;
add_filter( 'rcp_stripe_create_payment_intent_args', 'ag_rcp_prevent_saving_cards', 10, 2 );
Have more questions? Submit a request