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:985db20a96aa9d16d64d90dc613deea06bb4b6c211b0026c864e727c0a2a8eb2Check: 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¤cyCode=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:c44373e266177891c2f4bd98251c45eb109a63c85037c8a45b95077f29bbde3ebillAction:
- 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:
- Customer has a weekly subscription with 10 USD (Bill amount), and the first trial failed.
- Then tried to collect 5 USD (Amount charged) successfully.
- 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:
| Parameter | Value |
|---|---|
| action | SubscriptionInitialChargingNotification |
| subscriptionContractId | 83794 |
| customerAccountNumber | b1760b6f-e000-4bb8-b442-de107d07659d |
| paymentTransactionStatusCode | PaymentCompletedSuccessfully |
| transactionId | 4601121028 |
| amountCharged | 0.50 |
| currencyCode | EGP |
| paymentDate | 2019-07-11 10:11:36Z |
| nextPaymentDate | 2019-07-11 10:11:35Z |
| productCatalogName | HETest |
| productId | T1 |
| billAmount | 0.50 |
| collectedAmount | 0.50 |
| digest | 0oa70WuefiddqLjqlTlp: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:91c7083f5ec2df47ebcd5f06887e3376413f3d57a3d36a7dad5b0389babc20b65. 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¤cyCode=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¤cyCode=EGP&paymentDate=2022-02-02 11:51:36Z&productCatalogName=paytest&productId=pupg_five_uc&digest=YOg1vcmpa0VhE7G6GjUr:ee84eaa8011f69773abd94fe85d265194afa1c5450d3efaa25e61914bafd3dd3Failed payment sample:
?action=TransactionStatusUpdate&paymentTransactionStatusCode=NotEnoughCredit&transactionId=20630883253&msisdn=201558802080&amount=1000.00¤cyCode=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¤cyCode=EGP&productCatalogName=paytest&productId=pupg_five_uc&digest=YOg1vcmpa0VhE7G6GjUr:ee84eaa8011f69773abd94fe85d265194afa1c5450d3efaa25e61914bafd3dd35.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¤cyCode=EGP&digest=YOg1vcmpa0VhE7G6GjUr:e10e719387b6185516c19dad9fbe116c6d7d61b01d8ea3c4c8369b1350f10c33Second push notification (final status):
?action=TransactionStatusUpdate&paymentTransactionStatusCode=PaymentCompletedSuccessfully&transactionId=20631150260&msisdn=201100000000&amount=1.00¤cyCode=EGP&digest=YOg1vcmpa0VhE7G6GjUr:b0dbfd1d448d083e85f9e19ddfd020e2f160759b33e6b46f04c0255d60947554IP Whitelisting
| Source | IP |
|---|---|
| Production Notification Engine | 13.80.241.170 |
| Production APIs and Recurring | 40.68.96.177 |
| Staging TPAY Notification | 13.93.110.50 |