Skip to main content

Stripe Payment Events

To extend Freeform's Stripe Payments, use the events listed below:

When updating Payment metadata5.1.9+

This event lets you add your own data that gets sent to Stripe for Payment Intents and Subscriptions:

use Solspace\Freeform\Integrations\PaymentGateways\Stripe;
use Solspace\Freeform\Integrations\PaymentGateways\Events\UpdateMetadataEvent;

Event::on(
Stripe::class,
Stripe::EVENT_UPDATE_PAYMENT_METADATA,
function (UpdateMetadataEvent $event) {
$event->addData('description', 'My custom payment intent description');
$event->addData('custom metadata entry', 'Some more data to be persisted in metadata');
}
)

Additional Payment metadata when Submission created5.6.3+

This event allows additional metadata to be attached to a payment intent when a submission is created.

use Solspace\Freeform\Integrations\PaymentGateways\Stripe;
use Solspace\Freeform\Integrations\PaymentGateways\Events\UpdateMetadataEvent;

Event::on(
Stripe::class,
Stripe::EVENT_AFTER_UPDATE_PAYMENT_METADATA,
function {
//
}
)