TPAY notifications:

1. On Subscription Contract Status change

Partner will receive notification in case any change happens to the subscription contract status like Activation, Suspension, cancellation…etc.

Sample URL:

?action=SubscriptionContractStatusChanged&subscriptionContractId=10663&customerAccountNumber=1&status=Suspended&reason=&digest=xaaA7NRFrBcY9GAy9ART:985db20a96aa9d16d64d90dc613deea06bb4b6c211b0026c864e727c0a2a8eb2

Check: What are the different statuses for subscription contracts? for more details.


2. On Subscription Recurring Charging

Partner will receive notification after any charging attempt (Success or Failed).

Sample URL:

?action=SubscriptionChargingNotification&subscriptionContractId=10663&customerAccountNumber=1&paymentTransactionStatusCode=PaymentCompletedSuccessfully&transactionId=1234&amountCharged=3&currencyCode=EGP&paymentDate=2017-01-16 09:28:45Z&errorMessage=&nextPaymentDate=2017-01-17 09:28:45Z&productCatalogName=Game&productId=game_sku_1&billNumber=2&billAction=RecurringPayment&msisdn=201200000000&billAmount=10.0&collectedAmount=10.0&digest=xaaA7NRFrBcY9GAy9ART:c44373e266177891c2f4bd98251c45eb109a63c85037c8a45b95077f29bbde3e

billAction:

  • RecurringPayment: The main trial that tries to charge their balance on a periodic basis according to subscription plan (daily, weekly, monthly, or yearly).
  • RetrailPayment: Retrial that will be triggered if the main recurring payment failed due to any reason.
  • RetrailFallbackPayment: Retrial if smart billing feature was enabled.
  • BackDatedBillPayment: Covers previous unpaid bills after successfully paid bills (based on operator approval).

Example:

  1. Customer has a weekly subscription with 10 USD (Bill amount), and the first trial failed.
  2. Then tried to collect 5 USD (Amount charged) successfully.
  3. Then tried to collect 2.5 USD successfully. Below are the values:
    • billAmount: 10 USD (Total bill)
    • collectedAmount: 7.5 USD
    • amountCharged: 2.5 USD (retried amount)

3. Subscription Initial Charging Notification

Notification will be sent in case of Initial Payment subscription model and if the charging was successful.

Parameters:

ParameterValue
actionSubscriptionInitialChargingNotification
subscriptionContractId83794
customerAccountNumberb1760b6f-e000-4bb8-b442-de107d07659d
paymentTransactionStatusCodePaymentCompletedSuccessfully
transactionId4601121028
amountCharged0.50
currencyCodeEGP
paymentDate2019-07-11 10:11:36Z
nextPaymentDate2019-07-11 10:11:35Z
productCatalogNameHETest
productIdT1
billAmount0.50
collectedAmount0.50
digest0oa70WuefiddqLjqlTlp:1303e3129438d8f41c2b7e17df1160ba4e26891617ff933037129f33891faabd

4. On MO Subscription

TPAY will notify the partner when they send the keyword related to the service to the shortcode.

Sample URL:

?msisdn=201289464963&shortCode=5030&messagebody=test&mcc=602&mnc=01&smsgwmtid=03060147&MO_ID=0&digest=rRpDbLBkNjdb8HHxYC25:91c7083f5ec2df47ebcd5f06887e3376413f3d57a3d36a7dad5b0389babc20b6

5. OneTimePayment

Partner will receive a push notification to the URL provided by the partner (configured by TPAY).

Sample: Successful payment push notification:


https://www.sample-url.com/?action=TransactionStatusUpdate&paymentTransactionStatusCode=PaymentCompletedSuccessfully&transactionId=22817479&msisdn=201220805413&amount=2.00&currencyCode=EGP&paymentDate=2019-10-24 08:03:51Z&productCatalogName=tencent&productId=Gameone&digest=ECoGxIN9jBvuj8aFLLGe:01cb34ef09fc1465f1de014326f3a3518598034832369c9496a38dd722ce1efd

5.2 OneTimePayment DCB


5.2.1 Static price points

Successful payment sample:

?action=TransactionStatusUpdate&paymentTransactionStatusCode=PaymentCompletedSuccessfully&transactionId=20630842282&msisdn=201558802080&amount=1.00&currencyCode=EGP&paymentDate=2022-02-02 11:51:36Z&productCatalogName=paytest&productId=pupg_five_uc&digest=YOg1vcmpa0VhE7G6GjUr:ee84eaa8011f69773abd94fe85d265194afa1c5450d3efaa25e61914bafd3dd3

Failed payment sample:

?action=TransactionStatusUpdate&paymentTransactionStatusCode=NotEnoughCredit&transactionId=20630883253&msisdn=201558802080&amount=1000.00&currencyCode=EGP&paymentProviderCode=60201&digest=YOg1vcmpa0VhE7G6GjUr:fadbe7701d8500b868dea7b5b729b998d704f6073c5764e90a8f4f00b9bf2de6

5.2.2 Dynamic price points

Successful payment sample:

?action=TransactionStatusUpdate&paymentTransactionStatusCode=PaymentCompletedSuccessfully&transactionId=20630842282&msisdn=201558802080&amount=1.00&currencyCode=EGP&productCatalogName=paytest&productId=pupg_five_uc&digest=YOg1vcmpa0VhE7G6GjUr:ee84eaa8011f69773abd94fe85d265194afa1c5450d3efaa25e61914bafd3dd3

5.3 OneTimePayment Wallet

5.3.1 Dynamic price points

First push notification (pending status):

?action=TransactionStatusUpdate&paymentTransactionStatusCode=PendingTransaction&transactionId=20631150260&msisdn=201100000000&amount=1.00&currencyCode=EGP&digest=YOg1vcmpa0VhE7G6GjUr:e10e719387b6185516c19dad9fbe116c6d7d61b01d8ea3c4c8369b1350f10c33

Second push notification (final status):

?action=TransactionStatusUpdate&paymentTransactionStatusCode=PaymentCompletedSuccessfully&transactionId=20631150260&msisdn=201100000000&amount=1.00&currencyCode=EGP&digest=YOg1vcmpa0VhE7G6GjUr:b0dbfd1d448d083e85f9e19ddfd020e2f160759b33e6b46f04c0255d60947554

IP Whitelisting

SourceIP
Production Notification Engine13.80.241.170
Production APIs and Recurring40.68.96.177
Staging TPAY Notification13.93.110.50

Read How to configure push notification URLs?