Refund Actions Reference

surecart/purchase_created

Occurs whenever a purchase is created. This typically happens when a customer successfully pays for an order at checkout.

do_action(
	'surecart/purchase_created',
	(\SureCart\Models\Purchase::class) $purchase,
	(array) $webhook_data
)

surecart/purchase_revoked

Occurs whenever a purchase is revoked. This can happen if an order's line-item is refunded or if a subscription is canceled or expired.

do_action(
	'surecart/purchase_revoked',
	(\SureCart\Models\Purchase::class) $purchase,
	(array) $webhook_data
)

surecart/purchase_invoked

Occurs whenever a purchase is invoked. This event represents the opposite of when a purchase is revoked. It can only occur if the purchase has been previously revoked.

do_action(
	'surecart/purchase_invoked',
	(\SureCart\Models\Purchase::class) $purchase,
	(array) $webhook_data
)

surecart/purchase_updated

Occurs whenever a purchase is updated. This event only occurs when a subscription's product or quantity changes.

do_action(
	'surecart/purchase_updated',
	(\SureCart\Models\Purchase::class) $purchase,
	(array) $webhook_data
)