Phriction DatingVIP Public Payment Application Project Partner Notifications History Version 16 vs 17
Version 16 vs 17
Version 16 vs 17
Content Changes
Content Changes
= Content
[[ public/payment/partners/notifications/#transaction-success | transaction.success ]]
[[ public/payment/partners/notifications/#transaction-failed | transaction.failed ]]
[[ public/payment/partners/notifications/#subscription-created | subscription.created ]]
[[ public/payment/partners/notifications/#subscription-trial | subscription.trial ]]
[[ public/payment/partners/notifications/#subscription-stopped | subscription.stopped ]]
[[ public/payment/partners/notifications/#subscription-suspended | subscription.suspended ]]
[[ public/payment/partners/notifications/#subscription-rebill | subscription.rebill ]]
[[ public/payment/partners/notifications/#subscription-completed | subscription.completed ]]
[[ public/payment/partners/notifications/#subscription-change | subscription.change ]]
------
PV2 is sending notifications to our partners regarding various actions on PV2. Notifications are always sent to the same URL defined for each partner along with hash and other related data. If partner doesn't respond to notification, PV2 will try to resend it.
Generally notifications will be sent in this format:
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr>
<td>command</td><td>string</td><td>The command that needs to be executed</td>
</tr>
<tr>
<td>hash</td><td>string</td><td>Hash</td>
</tr>
<tr>
<td>data</td><td>string</td><td>json encoded string with data array</td>
</tr>
</table>
When partner receives a notification the next step should be confirmation. There are two ways to do that.
- [[public/payment/partners/apidocs/notifications.hash.validate|notifications.hash.validate]] api call (async) by sending received hash back
- return a given string '*NOTIFIED*' as a result of notification request (http code must be 200)
For non confirmed notifications the resend mechanism will retry notification according to below schedule:
# After 1 minute
# After 5 minutes
# After 15 minutes
# After 30 minutes
# After 30 minutes
notifications.hash.validate call also has another important purpose, so partners can validate if the notification actually came from us.
This is list of notifications which will be send out.
= transaction.success
Sent in case of successful transaction.
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>tran_id</td><td>int</td><td>**Transaction** ID</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>**Partner** ID</td></tr>
<tr><td>ppac_id</td><td>int</td><td>**Payment Processor Account** ID</td></tr>
<tr><td>order_id</td><td>int</td><td>**Order** ID</td></tr>
<tr><td>ccdt_id</td><td>int</td><td>Credit Card Details ID</td></tr>
<tr><td>transaction_type</td><td>string</td><td>Transaction Type. Values: `s` (sale), `a` (auth), `r` (refund), `c` (chargeback), `f` (fake)</td></tr>
<tr><td>amount</td><td>string</td><td>Amount</td></tr>
<tr><td>currency</td><td>string</td><td>Currency (3 Letter ISO Code)</td></tr>
<tr><td>description</td><td>string</td><td>Description</td></tr>
<tr><td>status</td><td>string</td><td>Transaction status. Values: `failed`, `successful`</td></tr>
<tr><td>refunded_tran_id</td><td>int</td><td>Refunded **Transaction** ID</td></tr>
<tr><td>origin</td><td>string</td><td>Origin. Values: `direct`, `system`</td></tr>
<tr><td>ts</td><td>int</td><td>Timestamp</td></tr>
<tr><td>status_code</td><td>int</td><td>Status code</td></tr>
<tr><td>payment_code</td><td>int</td><td>[[ public/payment/partners/codes/ | Payment Code ]] (700 on success)</td></tr>
<tr><td>order_type</td><td>string</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>pp_id</td><td>int</td><td>**Payment Processor** ID</td></tr>
<tr><td>processor</td><td>string</td><td>**Payment Processor** abbreviation</td></tr>
<tr><td>user_id</td><td>int</td><td>User ID in **Payment Application**</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User Identifier from **Partner**</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tag ID from **Partner**</td></tr>
<tr><td>items</td><td>array</td><td>Array of items</td></tr>
<tr><td>merchant*</td><td>array</td><td>Array of fields that identify merchant account**</td></tr>
</table>
*//Processor dependant, may not be sent for all processors - currently only RocketGate and Payon use this field//
**//For RocketGate transaction, merchant is [merchant_id, merchant_account], for Payon it is [channel]//
= transaction.failed
Sent in case of failed transaction.
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>tran_id</td><td>int</td><td>**Transaction** ID</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>**Partner** ID</td></tr>
<tr><td>ppac_id</td><td>int</td><td>**Payment Processor Account** ID</td></tr>
<tr><td>order_id</td><td>int</td><td>**Order** ID</td></tr>
<tr><td>ccdt_id</td><td>int</td><td>Credit Card Details ID</td></tr>
<tr><td>transaction_type</td><td>string</td><td>Transaction Type. Values: `s` (sale), `a` (auth), `r` (refund), `c` (chargeback), `f` (fake)</td></tr>
<tr><td>amount</td><td>string</td><td>Amount</td></tr>
<tr><td>currency</td><td>string</td><td>Currency (3 Letter ISO Code)</td></tr>
<tr><td>description</td><td>string</td><td>Description</td></tr>
<tr><td>status</td><td>string</td><td>Transaction status. Values: `failed`, `successful`</td></tr>
<tr><td>refunded_tran_id</td><td>int</td><td>Refunded **Transaction** ID</td></tr>
<tr><td>origin</td><td>string</td><td>Origin. Values: `direct`, `system`</td></tr>
<tr><td>ts</td><td>int</td><td>Timestamp</td></tr>
<tr><td>status_code</td><td>int</td><td>Status code</td></tr>
<tr><td>payment_code</td><td>int</td><td>[[ public/payment/partners/codes/ | Payment Code ]] (700 on success)</td></tr>
<tr><td>order_type</td><td>string</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>pp_id</td><td>int</td><td>**Payment Processor** ID</td></tr>
<tr><td>processor</td><td>string</td><td>**Payment Processor** abbreviation</td></tr>
<tr><td>user_id</td><td>int</td><td>User ID in **Payment Application**</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User Identifier from **Partner**</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tag ID from **Partner**</td></tr>
<tr><td>items</td><td>array</td><td>Array of items</td></tr>
<tr><td>merchant*</td><td>array</td><td>Array of fields that identify merchant account**</td></tr>
</table>
*//Processor dependant, may not be sent for all processors - currently only RocketGate and Payon use this field//
**//For RocketGate transaction, merchant is [merchant_id, merchant_account], for Payon it is [channel]//
= subscription.created
Sent when subscription is successfully created __and__ subscription does not have trial.
Subscription does not have trial, if appropriate item passed in [[ public/payment/partners/apidocs/transaction.init/ | transaction.init ]] call, have empty value for parameter `trial_period`.
//(Minor use case: Also sent for manually rebilled subscriptions, in this case value of `rebill_period` for appropriate item in `transaction.init` call should be `-1`)//
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
<tr><td>tran_id*</td><td>int</td><td>Last Transaction's ID</td></tr>
</table>
//* Not present for all payment processors//
= subscription.trial
Sent when subscription is successfully created __and__ subscription does have trial.
Subscription does have trial, if appropriate item passed in [[ public/payment/partners/apidocs/transaction.init/ | transaction.init ]] call, have non-empty value for parameter `trial_period`.
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
<tr><td>tran_id*</td><td>int</td><td>Last Transaction's ID</td></tr>
</table>
//* Not present for all payment processors//
= subscription.stopped
Sent in case of stopped subscription (action initiated via api call)
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
<tr><td>is_cancel</td><td>boolean</td><td>s/b true</td></tr>
<tr><td>cancel_reason</td><td>string</td><td>Optional, not always sent. If it has value 'cancel_reason_rebill_bin_filter' it means that subscription was stopped because BIN used for purchase is not allowed to rebill.</td></tr>
</table>
= subscription.suspended
Sent in case of suspended subscription (usually happens when we can't rebill user after defined number of attempts)
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
</table>
= subscription.rebill
Sent after successfully made rebill. It will be sent right after transaction.success
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
<tr><td>tran_id*</td><td>int</td><td>Last Transaction's ID</td></tr>
</table>
//* Not present for all payment processors//
= subscription.completed
Sent after completed subscription (happens only on subs with limited number of rebills).
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
</table>
= subscription.change
Sent in when subscription is changed (action initiated via `subscription.change` api call)
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
</table>
= Content
[[ public/payment/partners/notifications/#transaction-success | transaction.success ]]
[[ public/payment/partners/notifications/#transaction-failed | transaction.failed ]]
[[ public/payment/partners/notifications/#subscription-created | subscription.created ]]
[[ public/payment/partners/notifications/#subscription-trial | subscription.trial ]]
[[ public/payment/partners/notifications/#subscription-stopped | subscription.stopped ]]
[[ public/payment/partners/notifications/#subscription-suspended | subscription.suspended ]]
[[ public/payment/partners/notifications/#subscription-rebill | subscription.rebill ]]
[[ public/payment/partners/notifications/#subscription-completed | subscription.completed ]]
[[ public/payment/partners/notifications/#subscription-change | subscription.change ]]
------
PV2 is sending notifications to our partners regarding various actions on PV2. Notifications are always sent to the same URL defined for each partner along with hash and other related data. If partner doesn't respond to notification, PV2 will try to resend it.
Generally notifications will be sent in this format:
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr>
<td>command</td><td>string</td><td>The command that needs to be executed</td>
</tr>
<tr>
<td>hash</td><td>string</td><td>Hash</td>
</tr>
<tr>
<td>data</td><td>string</td><td>json encoded string with data array</td>
</tr>
</table>
When partner receives a notification the next step should be confirmation. There are two ways to do that.
- [[public/payment/partners/apidocs/notifications.hash.validate|notifications.hash.validate]] api call (async) by sending received hash back
- return a given string '*NOTIFIED*' as a result of notification request (http code must be 200)
For non confirmed notifications the resend mechanism will retry notification according to below schedule:
# After 1 minute
# After 5 minutes
# After 15 minutes
# After 30 minutes
# After 30 minutes
notifications.hash.validate call also has another important purpose, so partners can validate if the notification actually came from us.
This is list of notifications which will be send out.
= transaction.success
Sent in case of successful transaction.
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>tran_id</td><td>int</td><td>**Transaction** ID</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>**Partner** ID</td></tr>
<tr><td>ppac_id</td><td>int</td><td>**Payment Processor Account** ID</td></tr>
<tr><td>order_id</td><td>int</td><td>**Order** ID</td></tr>
<tr><td>ccdt_id</td><td>int</td><td>Credit Card Details ID</td></tr>
<tr><td>transaction_type</td><td>string</td><td>Transaction Type. Values: `s` (sale), `a` (auth), `r` (refund), `c` (chargeback), `f` (fake)</td></tr>
<tr><td>amount</td><td>string</td><td>Amount</td></tr>
<tr><td>currency</td><td>string</td><td>Currency (3 Letter ISO Code)</td></tr>
<tr><td>description</td><td>string</td><td>Description</td></tr>
<tr><td>status</td><td>string</td><td>Transaction status. Values: `failed`, `successful`</td></tr>
<tr><td>refunded_tran_id</td><td>int</td><td>Refunded **Transaction** ID</td></tr>
<tr><td>origin</td><td>string</td><td>Origin. Values: `direct`, `system`</td></tr>
<tr><td>ts</td><td>int</td><td>Timestamp</td></tr>
<tr><td>status_code</td><td>int</td><td>Status code</td></tr>
<tr><td>payment_code</td><td>int</td><td>[[ public/payment/partners/codes/ | Payment Code ]] (700 on success)</td></tr>
<tr><td>order_type</td><td>string</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>pp_id</td><td>int</td><td>**Payment Processor** ID</td></tr>
<tr><td>processor</td><td>string</td><td>**Payment Processor** abbreviation</td></tr>
<tr><td>user_id</td><td>int</td><td>User ID in **Payment Application**</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User Identifier from **Partner**</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tag ID from **Partner**</td></tr>
<tr><td>items</td><td>array</td><td>Array of items</td></tr>
<tr><td>merchant*</td><td>array</td><td>Array of fields that identify merchant account**</td></tr>
<tr><td>selected_cc_data*</td><td>array</td><td>Array of card data fields (ccdt_id, bin, ccnum_last4, exp_date, cc_type, cc_status) (with optional flag: marked_as_fraud)***</td></tr>
</table>
*//Processor dependant, may not be sent for all processors - currently only RocketGate and Payon use this field//
**//For RocketGate transaction, merchant is [merchant_id, merchant_account], for Payon it is [channel]//
**//For RocketGate transaction, only when using already existing card (rebills/rejoins)//
= transaction.failed
Sent in case of failed transaction.
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>tran_id</td><td>int</td><td>**Transaction** ID</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>**Partner** ID</td></tr>
<tr><td>ppac_id</td><td>int</td><td>**Payment Processor Account** ID</td></tr>
<tr><td>order_id</td><td>int</td><td>**Order** ID</td></tr>
<tr><td>ccdt_id</td><td>int</td><td>Credit Card Details ID</td></tr>
<tr><td>transaction_type</td><td>string</td><td>Transaction Type. Values: `s` (sale), `a` (auth), `r` (refund), `c` (chargeback), `f` (fake)</td></tr>
<tr><td>amount</td><td>string</td><td>Amount</td></tr>
<tr><td>currency</td><td>string</td><td>Currency (3 Letter ISO Code)</td></tr>
<tr><td>description</td><td>string</td><td>Description</td></tr>
<tr><td>status</td><td>string</td><td>Transaction status. Values: `failed`, `successful`</td></tr>
<tr><td>refunded_tran_id</td><td>int</td><td>Refunded **Transaction** ID</td></tr>
<tr><td>origin</td><td>string</td><td>Origin. Values: `direct`, `system`</td></tr>
<tr><td>ts</td><td>int</td><td>Timestamp</td></tr>
<tr><td>status_code</td><td>int</td><td>Status code</td></tr>
<tr><td>payment_code</td><td>int</td><td>[[ public/payment/partners/codes/ | Payment Code ]] (700 on success)</td></tr>
<tr><td>order_type</td><td>string</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>pp_id</td><td>int</td><td>**Payment Processor** ID</td></tr>
<tr><td>processor</td><td>string</td><td>**Payment Processor** abbreviation</td></tr>
<tr><td>user_id</td><td>int</td><td>User ID in **Payment Application**</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User Identifier from **Partner**</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tag ID from **Partner**</td></tr>
<tr><td>items</td><td>array</td><td>Array of items</td></tr>
<tr><td>merchant*</td><td>array</td><td>Array of fields that identify merchant account**</td></tr>
<tr><td>selected_cc_data*</td><td>array</td><td>Array of card data fields (ccdt_id, bin, ccnum_last4, exp_date, cc_type, cc_status) (with optional flag: marked_as_fraud)***</td></tr>
</table>
*//Processor dependant, may not be sent for all processors - currently only RocketGate and Payon use this field//
**//For RocketGate transaction, merchant is [merchant_id, merchant_account], for Payon it is [channel]//
**//For RocketGate transaction, only when using already existing card (rebills/rejoins)//
= subscription.created
Sent when subscription is successfully created __and__ subscription does not have trial.
Subscription does not have trial, if appropriate item passed in [[ public/payment/partners/apidocs/transaction.init/ | transaction.init ]] call, have empty value for parameter `trial_period`.
//(Minor use case: Also sent for manually rebilled subscriptions, in this case value of `rebill_period` for appropriate item in `transaction.init` call should be `-1`)//
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
<tr><td>tran_id*</td><td>int</td><td>Last Transaction's ID</td></tr>
</table>
//* Not present for all payment processors//
= subscription.trial
Sent when subscription is successfully created __and__ subscription does have trial.
Subscription does have trial, if appropriate item passed in [[ public/payment/partners/apidocs/transaction.init/ | transaction.init ]] call, have non-empty value for parameter `trial_period`.
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
<tr><td>tran_id*</td><td>int</td><td>Last Transaction's ID</td></tr>
</table>
//* Not present for all payment processors//
= subscription.stopped
Sent in case of stopped subscription (action initiated via api call)
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
<tr><td>is_cancel</td><td>boolean</td><td>s/b true</td></tr>
<tr><td>cancel_reason</td><td>string</td><td>Optional, not always sent. If it has value 'cancel_reason_rebill_bin_filter' it means that subscription was stopped because BIN used for purchase is not allowed to rebill.</td></tr>
</table>
= subscription.suspended
Sent in case of suspended subscription (usually happens when we can't rebill user after defined number of attempts)
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
</table>
= subscription.rebill
Sent after successfully made rebill. It will be sent right after transaction.success
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
<tr><td>tran_id*</td><td>int</td><td>Last Transaction's ID</td></tr>
</table>
//* Not present for all payment processors//
= subscription.completed
Sent after completed subscription (happens only on subs with limited number of rebills).
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
</table>
= subscription.change
Sent in when subscription is changed (action initiated via `subscription.change` api call)
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
</table>
= Content
[[ public/payment/partners/notifications/#transaction-success | transaction.success ]]
[[ public/payment/partners/notifications/#transaction-failed | transaction.failed ]]
[[ public/payment/partners/notifications/#subscription-created | subscription.created ]]
[[ public/payment/partners/notifications/#subscription-trial | subscription.trial ]]
[[ public/payment/partners/notifications/#subscription-stopped | subscription.stopped ]]
[[ public/payment/partners/notifications/#subscription-suspended | subscription.suspended ]]
[[ public/payment/partners/notifications/#subscription-rebill | subscription.rebill ]]
[[ public/payment/partners/notifications/#subscription-completed | subscription.completed ]]
[[ public/payment/partners/notifications/#subscription-change | subscription.change ]]
------
PV2 is sending notifications to our partners regarding various actions on PV2. Notifications are always sent to the same URL defined for each partner along with hash and other related data. If partner doesn't respond to notification, PV2 will try to resend it.
Generally notifications will be sent in this format:
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr>
<td>command</td><td>string</td><td>The command that needs to be executed</td>
</tr>
<tr>
<td>hash</td><td>string</td><td>Hash</td>
</tr>
<tr>
<td>data</td><td>string</td><td>json encoded string with data array</td>
</tr>
</table>
When partner receives a notification the next step should be confirmation. There are two ways to do that.
- [[public/payment/partners/apidocs/notifications.hash.validate|notifications.hash.validate]] api call (async) by sending received hash back
- return a given string '*NOTIFIED*' as a result of notification request (http code must be 200)
For non confirmed notifications the resend mechanism will retry notification according to below schedule:
# After 1 minute
# After 5 minutes
# After 15 minutes
# After 30 minutes
# After 30 minutes
notifications.hash.validate call also has another important purpose, so partners can validate if the notification actually came from us.
This is list of notifications which will be send out.
= transaction.success
Sent in case of successful transaction.
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>tran_id</td><td>int</td><td>**Transaction** ID</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>**Partner** ID</td></tr>
<tr><td>ppac_id</td><td>int</td><td>**Payment Processor Account** ID</td></tr>
<tr><td>order_id</td><td>int</td><td>**Order** ID</td></tr>
<tr><td>ccdt_id</td><td>int</td><td>Credit Card Details ID</td></tr>
<tr><td>transaction_type</td><td>string</td><td>Transaction Type. Values: `s` (sale), `a` (auth), `r` (refund), `c` (chargeback), `f` (fake)</td></tr>
<tr><td>amount</td><td>string</td><td>Amount</td></tr>
<tr><td>currency</td><td>string</td><td>Currency (3 Letter ISO Code)</td></tr>
<tr><td>description</td><td>string</td><td>Description</td></tr>
<tr><td>status</td><td>string</td><td>Transaction status. Values: `failed`, `successful`</td></tr>
<tr><td>refunded_tran_id</td><td>int</td><td>Refunded **Transaction** ID</td></tr>
<tr><td>origin</td><td>string</td><td>Origin. Values: `direct`, `system`</td></tr>
<tr><td>ts</td><td>int</td><td>Timestamp</td></tr>
<tr><td>status_code</td><td>int</td><td>Status code</td></tr>
<tr><td>payment_code</td><td>int</td><td>[[ public/payment/partners/codes/ | Payment Code ]] (700 on success)</td></tr>
<tr><td>order_type</td><td>string</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>pp_id</td><td>int</td><td>**Payment Processor** ID</td></tr>
<tr><td>processor</td><td>string</td><td>**Payment Processor** abbreviation</td></tr>
<tr><td>user_id</td><td>int</td><td>User ID in **Payment Application**</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User Identifier from **Partner**</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tag ID from **Partner**</td></tr>
<tr><td>items</td><td>array</td><td>Array of items</td></tr>
<tr><td>merchant*</td><td>array</td><td>Array of fields that identify merchant account**</td></tr>
<tr><td>selected_cc_data*</td><td>array</td><td>Array of card data fields (ccdt_id, bin, ccnum_last4, exp_date, cc_type, cc_status) (with optional flag: marked_as_fraud)***</td></tr>
</table>
*//Processor dependant, may not be sent for all processors - currently only RocketGate and Payon use this field//
**//For RocketGate transaction, merchant is [merchant_id, merchant_account], for Payon it is [channel]//
**//For RocketGate transaction, only when using already existing card (rebills/rejoins)//
= transaction.failed
Sent in case of failed transaction.
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>tran_id</td><td>int</td><td>**Transaction** ID</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>**Partner** ID</td></tr>
<tr><td>ppac_id</td><td>int</td><td>**Payment Processor Account** ID</td></tr>
<tr><td>order_id</td><td>int</td><td>**Order** ID</td></tr>
<tr><td>ccdt_id</td><td>int</td><td>Credit Card Details ID</td></tr>
<tr><td>transaction_type</td><td>string</td><td>Transaction Type. Values: `s` (sale), `a` (auth), `r` (refund), `c` (chargeback), `f` (fake)</td></tr>
<tr><td>amount</td><td>string</td><td>Amount</td></tr>
<tr><td>currency</td><td>string</td><td>Currency (3 Letter ISO Code)</td></tr>
<tr><td>description</td><td>string</td><td>Description</td></tr>
<tr><td>status</td><td>string</td><td>Transaction status. Values: `failed`, `successful`</td></tr>
<tr><td>refunded_tran_id</td><td>int</td><td>Refunded **Transaction** ID</td></tr>
<tr><td>origin</td><td>string</td><td>Origin. Values: `direct`, `system`</td></tr>
<tr><td>ts</td><td>int</td><td>Timestamp</td></tr>
<tr><td>status_code</td><td>int</td><td>Status code</td></tr>
<tr><td>payment_code</td><td>int</td><td>[[ public/payment/partners/codes/ | Payment Code ]] (700 on success)</td></tr>
<tr><td>order_type</td><td>string</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>pp_id</td><td>int</td><td>**Payment Processor** ID</td></tr>
<tr><td>processor</td><td>string</td><td>**Payment Processor** abbreviation</td></tr>
<tr><td>user_id</td><td>int</td><td>User ID in **Payment Application**</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User Identifier from **Partner**</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tag ID from **Partner**</td></tr>
<tr><td>items</td><td>array</td><td>Array of items</td></tr>
<tr><td>merchant*</td><td>array</td><td>Array of fields that identify merchant account**</td></tr>
<tr><td>selected_cc_data*</td><td>array</td><td>Array of card data fields (ccdt_id, bin, ccnum_last4, exp_date, cc_type, cc_status) (with optional flag: marked_as_fraud)***</td></tr>
</table>
*//Processor dependant, may not be sent for all processors - currently only RocketGate and Payon use this field//
**//For RocketGate transaction, merchant is [merchant_id, merchant_account], for Payon it is [channel]//
**//For RocketGate transaction, only when using already existing card (rebills/rejoins)//
= subscription.created
Sent when subscription is successfully created __and__ subscription does not have trial.
Subscription does not have trial, if appropriate item passed in [[ public/payment/partners/apidocs/transaction.init/ | transaction.init ]] call, have empty value for parameter `trial_period`.
//(Minor use case: Also sent for manually rebilled subscriptions, in this case value of `rebill_period` for appropriate item in `transaction.init` call should be `-1`)//
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
<tr><td>tran_id*</td><td>int</td><td>Last Transaction's ID</td></tr>
</table>
//* Not present for all payment processors//
= subscription.trial
Sent when subscription is successfully created __and__ subscription does have trial.
Subscription does have trial, if appropriate item passed in [[ public/payment/partners/apidocs/transaction.init/ | transaction.init ]] call, have non-empty value for parameter `trial_period`.
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
<tr><td>tran_id*</td><td>int</td><td>Last Transaction's ID</td></tr>
</table>
//* Not present for all payment processors//
= subscription.stopped
Sent in case of stopped subscription (action initiated via api call)
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
<tr><td>is_cancel</td><td>boolean</td><td>s/b true</td></tr>
<tr><td>cancel_reason</td><td>string</td><td>Optional, not always sent. If it has value 'cancel_reason_rebill_bin_filter' it means that subscription was stopped because BIN used for purchase is not allowed to rebill.</td></tr>
</table>
= subscription.suspended
Sent in case of suspended subscription (usually happens when we can't rebill user after defined number of attempts)
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
</table>
= subscription.rebill
Sent after successfully made rebill. It will be sent right after transaction.success
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
<tr><td>tran_id*</td><td>int</td><td>Last Transaction's ID</td></tr>
</table>
//* Not present for all payment processors//
= subscription.completed
Sent after completed subscription (happens only on subs with limited number of rebills).
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
</table>
= subscription.change
Sent in when subscription is changed (action initiated via `subscription.change` api call)
Data array (json encoded)
<table>
<tr>
<th>Param Name</th><th>Type</th><th>Description</th>
</tr>
<tr><td>sub_id</td><td>int</td><td>Subscription ID</td></tr>
<tr><td>item_id</td><td>int</td><td>Item ID</td></tr>
<tr><td>status</td><td>string</td><td>Subscription status (s/b initial on create, rebill after 1st rebill)</td></tr>
<tr><td>start_ts</td><td>int</td><td>Start timestamp</td></tr>
<tr><td>change_ts</td><td>int</td><td>Change(edit) timestamp</td></tr>
<tr><td>end_ts</td><td>int</td><td>End timestamp</td></tr>
<tr><td>rebill_count</td><td>int</td><td>Number of recurring payments</td></tr>
<tr><td>last_rebill_ts</td><td>int</td><td>Last rebill ts</td></tr>
<tr><td>next_rebill_ts</td><td>int</td><td>Next rebill ts</td></tr>
<tr><td>next_rebill_amount</td><td>int</td><td>Next rebill amount</td></tr>
<tr><td>step_down</td><td>int</td><td>Step Down (charge amount reductions)</td></tr>
<tr><td>order_id</td><td>int</td><td>Order ID</td></tr>
<tr><td>description</td><td>int</td><td>Order Description</td></tr>
<tr><td>rebill_amount</td><td>int</td><td>Rebill amount (not including next one)</td></tr>
<tr><td>trial_unit</td><td>string</td><td>Trial Unit (day|week|month|year)</td></tr>
<tr><td>rebill_unit</td><td>string</td><td>Rebill Unit (day|week|month|year)</td></tr>
<tr><td>rebill_period</td><td>int</td><td>Rebill period</td></tr>
<tr><td>max_rebill_count</td><td>int</td><td>Max Rebill Count</td></tr>
<tr><td>trial_period</td><td>int</td><td>Trial period</td></tr>
<tr><td>tracking_item</td><td>int</td><td>Tracking item ID</td></tr>
<tr><td>pp_id</td><td>int</td><td>Payment Processor ID</td></tr>
<tr><td>user_id</td><td>int</td><td>PV2 user ID</td></tr>
<tr><td>hash</td><td>string</td><td>Hash</td></tr>
<tr><td>first_name</td><td>int</td><td>Customer's First Name</td></tr>
<tr><td>last_name</td><td>int</td><td>Customer's Last Name</td></tr>
<tr><td>ppac_id</td><td>int</td><td>Payment Processor Account ID</td></tr>
<tr><td>email</td><td>int</td><td>Customer's Email Address</td></tr>
<tr><td>ptnr_id</td><td>int</td><td>Partner ID</td></tr>
<tr><td>currency</td><td>string</td><td>Currency</td></tr>
<tr><td>tracking_tag</td><td>int</td><td>Tracking Tag param</td></tr>
<tr><td>ip</td><td>int</td><td>Customer's IP Address</td></tr>
<tr><td>order_type</td><td>int</td><td>Order type. Values: `basic`, `xsale`</td></tr>
<tr><td>tracking_user</td><td>int</td><td>User ID on partners' site</td></tr>
<tr><td>processor</td><td>int</td><td>Payment Processor's abreviation</td></tr>
</table>