| CARVIEW |
Select Language
HTTP/2 301
date: Sat, 27 Dec 2025 11:18:56 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_post_payment_completed/
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: MISS
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=YcbI90dWIYSV96rK%2FppJ4ISEJKhE%2FByEw78sd%2F7sXyRglAPFrXZtGNwBs0mpf2Ox6mfxH9IDbGSN9SjSFTL%2BLxwSJUF%2BMIWNKcXJD7e0YThsjEbD"}]}
cf-ray: 9b486b84b9ffc7d4-BLR
HTTP/2 200
date: Sat, 27 Dec 2025 11:18:57 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=VntHVhbg7fTV0%2F5jA6smsH2JWGiElanESgMt5LhwqdhH1AyOLlO096ava7N3QLX20cF37xqurHk5%2Bvqz6W%2FEEjziBqwl2S9GLHkSLugmJtzxA29G"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b486b8b3b96c7d4-BLR
gform_post_payment_completed - Gravity Forms Documentation
gform_post_payment_completed
Description
Triggers when a payment has been completed through the form.
Usage
add_action( 'gform_post_payment_completed', 'my_function', 10, 2 );
Parameters
- $entry Entry Object
The entry object that was created. - $action array
The action that occurred. Contains things such as the amount, what occurred, and the transaction ID.
$action = array(
'type' => '',
'amount' => '',
'transaction_type' => '',
'transaction_id' => '',
'subscription_id' => '',
'entry_id' => '',
'payment_status' => '',
'note' => '',
);
Examples
Log the payment and entry details in the Gravity Forms log.
add_action( 'gform_post_payment_completed', function ( $entry, $action ) {
// Log payment completion and entry details.
GFCommon::log_debug( 'Payment completed: ' . print_r( $action, true ) );
GFCommon::log_debug( 'Entry details: ' . print_r( $entry, true ) );
// Log each item in the action array.
foreach ($action as $key => $value) {
GFCommon::log_debug( sprintf( 'Action %s: %s', $key, print_r( $value, true ) ) );
}
}, 10, 2 );
Source Code
do_action( 'gform_post_payment_completed', $entry, $action );
This action hook is located in GFPaymentAddOn::complete_payment() in includes/addon/class-gf-payment-addon.php.