Page MenuHomeDatingVIP

Partner Notifications
Updated 2,613 Days AgoPublic

Version 8 of 18: You are viewing an older version of this document, as it appeared on Mar 20 2017, 13:00.

Content

transaction.success
transaction.failed
subscription.created
subscription.trial
subscription.stopped
subscription.suspended
subscription.rebill
subscription.completed
subscription.change
subscriptions.prerebill


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:

Param NameTypeDescription
commandstringThe command that needs to be executed
hashstringHash
datastringjson encoded string with data array

After receiving notification partner should respond with notifications.hash.validate api call by sending received hash back, otherwise notification will be resent with this schedulle:

  1. After 1 minute
  2. After 5 minutes
  3. After 15 minutes
  4. After 30 minutes
  5. 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)

Param NameTypeDescription
tran_idintTransaction ID
statusstringTransaction status
ccdt_idintccdt ID
transaction_typestringTransaction Type (S for Sale, A for Auth, R for refund)
payment_codeintPayment Code (700 on success)
user_idintPV2 user ID
tracking_userintUser ID on partners' site
ptnr_idintPartner ID
itemsarrayarray of items

transaction.failed

Sent in case of failed transaction.

Data array (json encoded)

Param NameTypeDescription
tran_idintTransaction ID
statusstringTransaction status
ccdt_idintccdt ID
transaction_typestringTransaction Type (S for Sale, A for Auth, R for refund)
payment_codeintPayment Code
user_idintPV2 user ID
tracking_userintUser ID on partners' site
ptnr_idintPartner ID
itemsarrayarray of items

subscription.created

Sent in case of successfully created subscription

Data array (json encoded)

Param NameTypeDescription
sub_idintSubscription ID
item_idintItem ID
statusstringSubscription status (s/b initial on create, rebill after 1st rebill)
start_tsintStart timestamp
user_idintPV2 user ID
tracking_userintUser ID on partners' site
ptnr_idintPartner ID
tracking_tagintTracking Tag param
currencystringCurrency
hashstringHash
pp_namestringPP Name
trial_unitstringTrial Unit (day|week|month|year)
trial_periodintTrial period
rebill_unitstringRebill Unit (day|week|month|year)
rebill_periodintRebill period
max_rebill_countintMax Rebill Count
tracking_itemintTracking item ID
next_rebill_tsintNext rebill ts
last_rebill_tsintLast rebill ts

subscription.trial

Sent in case of successfully created subscription

Data array (json encoded)

Param NameTypeDescription
sub_idintSubscription ID
item_idintItem ID
statusstringSubscription status (s/b initial on create, rebill after 1st rebill)
start_tsintStart timestamp
user_idintPV2 user ID
tracking_userintUser ID on partners' site
ptnr_idintPartner ID
tracking_tagintTracking Tag param
currencystringCurrency
hashstringHash
pp_namestringPP Name
trial_unitstringTrial Unit (day|week|month|year)
trial_periodintTrial period
rebill_unitstringRebill Unit (day|week|month|year)
rebill_periodintRebill period
max_rebill_countintMax Rebill Count
tracking_itemintTracking item ID
next_rebill_tsintNext rebill ts
last_rebill_tsintLast rebill ts

subscription.stopped

Sent in case of stopped subscription (action initiated via api call)

Data array (json encoded)

Param NameTypeDescription
sub_idintSubscription ID
item_idintItem ID
statusstringSubscription status (s/b initial on create, rebill after 1st rebill)
start_tsintStart timestamp
user_idintPV2 user ID
tracking_userintUser ID on partners' site
ptnr_idintPartner ID
tracking_tagintTracking Tag param
currencystringCurrency
hashstringHash
pp_namestringPP Name
trial_unitstringTrial Unit (day|week|month|year)
trial_periodintTrial period
rebill_unitstringRebill Unit (day|week|month|year)
rebill_periodintRebill period
max_rebill_countintMax Rebill Count
tracking_itemintTracking item ID
next_rebill_tsintNext rebill ts
last_rebill_tsintLast rebill ts
is_cancelbooleans/b true
cancel_reasonstringOptional, 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.

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)

Param NameTypeDescription
sub_idintSubscription ID
item_idintItem ID
statusstringSubscription status (s/b initial on create, rebill after 1st rebill)
start_tsintStart timestamp
user_idintPV2 user ID
tracking_userintUser ID on partners' site
ptnr_idintPartner ID
tracking_tagintTracking Tag param
currencystringCurrency
hashstringHash
pp_namestringPP Name
trial_unitstringTrial Unit (day|week|month|year)
trial_periodintTrial period
rebill_unitstringRebill Unit (day|week|month|year)
rebill_periodintRebill period
max_rebill_countintMax Rebill Count
tracking_itemintTracking item ID
next_rebill_tsintNext rebill ts
last_rebill_tsintLast rebill ts

subscription.rebill

Sent after successfully made rebill. It will be sent right after transaction.success

Data array (json encoded)

Param NameTypeDescription
sub_idintSubscription ID
item_idintItem ID
statusstringSubscription status (s/b initial on create, rebill after 1st rebill)
start_tsintStart timestamp
user_idintPV2 user ID
tracking_userintUser ID on partners' site
ptnr_idintPartner ID
tracking_tagintTracking Tag param
currencystringCurrency
hashstringHash
pp_namestringPP Name
trial_unitstringTrial Unit (day|week|month|year)
trial_periodintTrial period
rebill_unitstringRebill Unit (day|week|month|year)
rebill_periodintRebill period
max_rebill_countintMax Rebill Count
tracking_itemintTracking item ID
next_rebill_tsintNext rebill ts
last_rebill_tsintLast rebill ts

subscription.completed

Sent after completed subscription (happens only on subs with limited number of rebills).

Data array (json encoded)

Param NameTypeDescription
sub_idintSubscription ID
item_idintItem ID
statusstringSubscription status (s/b initial on create, rebill after 1st rebill)
start_tsintStart timestamp
user_idintPV2 user ID
tracking_userintUser ID on partners' site
ptnr_idintPartner ID
tracking_tagintTracking Tag param
currencystringCurrency
hashstringHash
pp_namestringPP Name
trial_unitstringTrial Unit (day|week|month|year)
trial_periodintTrial period
rebill_unitstringRebill Unit (day|week|month|year)
rebill_periodintRebill period
max_rebill_countintMax Rebill Count
tracking_itemintTracking item ID
next_rebill_tsintNext rebill ts
last_rebill_tsintLast rebill ts

subscription.change

Sent in when subscription is changed (action initiated via subscription.change api call)

Data array (json encoded)

Param NameTypeDescription
sub_idintSubscription ID
item_idintItem ID
statusstringSubscription status (s/b initial on create, rebill after 1st rebill)
start_tsintStart timestamp
user_idintPV2 user ID
tracking_userintUser ID on partners' site
ptnr_idintPartner ID
tracking_tagintTracking Tag param
currencystringCurrency
hashstringHash
pp_namestringPP Name
trial_unitstringTrial Unit (day|week|month|year)
trial_periodintTrial period
rebill_unitstringRebill Unit (day|week|month|year)
rebill_periodintRebill period
max_rebill_countintMax Rebill Count
tracking_itemintTracking item ID
next_rebill_tsintNext rebill ts
last_rebill_tsintLast rebill ts

subscriptions.prerebill

(WIP) Sent from cron job that runs at 1h frequency.
Data consists of subscriptions that are due to rebill in next X days, where X is configurable from cron manager.
(one value of X per one cron job instance)

Data array (json encoded)

Param NameTypeDescription
intervalstringWhen from now should rebill happen ('2 day', '3 day', 'X day')
subscriptionsarrayArray of data related to subscriptions rebills (see below)

Subscriptions array (json encoded)

Param NameTypeDescription
sub_idintSubscription ID
next_rebill_tsintNext rebill timestamp
ptnr_idintPartner ID
tracking_userintUser ID on partners' site
tracking_tagintTracking Tag param
binstringBIN of card for this susbcription
ccnum_last4stringLast 4 digits of card for this susbcription
currencystringCurrency
order_typestringOrder type ('basic' | 'xsale')
item_idintItem ID
cc_typestringCard type ('visa' ...)
pp_namestringPP Name
bin_high_riskintIs BIN on High Risk List (1|0)
bin_blocked_for_rebillintIs BIN blocked for rebill (1|0)
Last Author
banovic
Last Edited
Mar 20 2017, 13:00

Event Timeline

boris moved this document from Unknown Object (Phriction Wiki Document).
boris changed the visibility from "Public (No Login Required)" to "All Users".
boris changed the visibility from "All Users" to "Public (No Login Required)".
banovic edited the content of this document. (Show Details)
banovic edited the content of this document. (Show Details)
boris shifted this object from the Restricted Space space to the S6 Everyone space.Aug 8 2018, 08:08