IPN

Example Response

$_POST => [
    'event'                             => 'sales',
    'mode'                              => 'live',
    'payment_processor'                 => 'stripe',
    'amount'                            => 9.99,
    'buyer_ip'                          => '196.215.215.215',
    'buyer_first_name'                  => 'Ruggero',
    'buyer_last_name'                   => 'Sandri-Boriani',
    'buyer_email'                       => 'ruggero@sandri.com',
    'vendor_first_name'                 => 'Digital',
    'vendor_last_name'                  => 'Kickstart',
    'vendor_email'                      => 'support@digitalkickstart.com',
    'transaction_id'                    => 'PK-TN0LNO7XWR',
    'invoice_id'                        => 'PK-PZ1WK636WR',
    'tracking_id'                       => 216,
    'transaction_time'                  => 1469014598,
    'product_id'                        => 2354,
    'product_name'                      => 'SEO Snapshot - Main',
    'campaign_id'                       => 215,
    'campaign_name'                     => 'SEO Snapshot',
    'affiliate_first_name'              => 'Bob',
    'affiliate_last_name'               => 'Jones',
    'affiliate_email'                   => 'bob@jones.com',
    'affiliate_commission_amount'       => 4.99,
    'affiliate_commission_percent'      => 50,
    'ref_affiliate_first_name'          => null,
    'ref_affiliate_last_name'           => null,
    'ref_affiliate_email'               => null,
    'ref_affiliate_commission_amount'   => null,
    'ref_affiliate_commission_percent'  => null,
    'custom_var1'                       => 123,
    'custom_var2'                       => 'email@user.com',
    'licenses'                          => ['HPLD-XSQW-KDW3-8HTD', 'AWDF-XADWR-HYTF-4T7B']
    'verification_code'                 => 'e2288202ad23b877c3498a6db6214b5a417b75a4'
];

IPN Validation Function

PayKickstart’s Instant Payment Notification (IPN) is a message service that automatically notifies vendors of events related to PayKickstart transactions. Vendors can use it to automate back-office and administrative functions, including automatically creating users on apps, providing customers with their login credentials via email etc.

ARGUMENTS

event

Stipulates the type of transaction event which has occurred. The event types are:

  • sales
  • refund
  • subscription-payment
  • subscription-created
  • subscription-cancelled

mode

Indicates whether the transaction was executed in “live” mode or “test” mode. The parameter’s possible value are:

  • live
  • test

payment_processor

Indicates the payment gateway used to create the transaction. Supported payment gateways include:

  • stripe
  • paypaladaptive
  • braintree*
  • authnet*

* Braintree and Authorize.net are coming soon.


amount

The transaction amount


buyer_ip
buyer_first_name
buyer_last_name
buyer_email

The transaction’s buyer’s details

vendor_first_name
vendor_last_name
vendor_email

The transaction’s Paykickstart vendor’s details

transaction_id

The unique Paykickstart transaction ID


invoice_id

The unique Paykickstart purchase ID


tracking_id

The transaction’s Paykickstart affiliate’s tracking link id


transaction_time

The time when the transaction was generated, in UNIX timestamp format.


product_id
product_name

The transaction’s product details

campaign_id
campaign_name

The transaction’s campaign details

affiliate_first_name
affiliate_last_name
affiliate_email
affiliate_commission_amount
affiliate_commission_percent

The transaction’s Paykickstart affiliate’s details and the amount paid to the affiliate for this transaction. Both the commission value and percentage amounts are indicated.

 


ref_affiliate_first_name
ref_affiliate_last_name
ref_affiliate_email
ref_affiliate_commission_amount
ref_affiliate_commission_percent

The transaction’s Paykickstart 2nd tier affiliate’s details and the amount paid to that affiliate for this transaction. Both the commission value and percentage amounts are indicated.

 


custom_{field}

Field names prefixed with “custom_” in the IPN POST are custom fields which you may set in the checkout page URL. For example, if your Paykickstart checkout page URL is https://app.paykickstart.com/checkout/123, you can add additional information to the URL in the form of GET variables like this:

https://app.paykickstart.com/checkout/123?var1=123&var2=email@user.com

Continuing with the example above, we’d pass these custom variables back to you in the IPN POST, like this:

custom_var1 = 123
custom_var2 = ’email@user.com’



licenses

Returns any licenses linked to the transaction, either as an array if more than 1 license, or a string if only 1 license.

 


verification_code

This is a hashed security key that can be used to validate that the IPN POST received is in fact valid / verified. You should generate a hash using the function provided (see IPN Validation Function on the left) and compare it against the hash within the POST. If they match, the IPN is verified. The secret key variable required by the IPN validation function is located in your campaign settings (see screenshot below).

pk_ipn_secret_key

 

 

Leave A Comment?