| CARVIEW |
Select Language
HTTP/2 301
date: Sun, 28 Dec 2025 07:14:09 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_post_payment_transaction/
server: cloudflare
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
x-redirect-by: WordPress
fastcgi-cache: HIT
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=qmT%2FyAPDuJ9Ak0pSczA%2Fe%2BYRA9CB6zBIGmh32rPy3qXbAiD5FzOr6vtE2GZ7VcY%2BVdC4Fi66VC3Lx4Z2Xh2nvI%2B9QUV%2BXgQk8c8pGasI24ae8z%2FK"}]}
cf-ray: 9b4f42522df5741b-BLR
HTTP/2 200
date: Sun, 28 Dec 2025 07:14:10 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
fastcgi-cache: EXPIRED
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=P0SD7DHNEKfq3TRjMy4favxOxFpYDNhR66oZAmbIjI3usR7ZjZ5SGgBtXokhVx4cxUPioir9smrsohE20%2F4sOtNsDmzvR8fEZXvAq4GhJOaNbcqz"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b4f4256fd48741b-BLR
gform_post_payment_transaction - Gravity Forms Documentation
gform_post_payment_transaction
Description
Triggered after a payment transaction is created within Gravity Forms.
Usage
add_action( 'gform_post_payment_transaction', 'my_function', 10, 6 );
Parameters
| Parameter | Type | Description |
|---|---|---|
| $txn_id | integer | The transaction ID associated with the payment. |
| $entry_id | integer | The ID of the entry that was created. |
| $transaction_type | string | The type of transaction that was made. |
| $transaction_id | integer | The transaction ID of the newly created transaction. |
| $amount | string | The total amount of the payment. |
| $is_recurring | bool | Returns true if recurring. Otherwise, false. |
Examples
function my_function() {
// Do something here
// If data from the Stripe webhook event is needed (and this hook was initiated via a Stripe webhook request), you can access event data with the following line:
$event = gf_stripe()->get_webhook_event();
if ( $event ) {
// Access webhook event data. For event object documentation, see: https://stripe.com/docs/api/events/object
}
}
add_action( 'gform_post_payment_transaction', 'my_function', 10, 6 );
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
do_action( 'gform_post_payment_transaction', $txn_id, $entry_id, $transaction_type, $transaction_id, $amount, $is_recurring );
This action hook is located in GFPaymentAddOn::insert_transaction() in includes/addon/class-gf-payment-addon.php.