Teleaudio subscription¶
General info¶
Teleaudio subscription payment method allows merchants to utilize functionality provided by Teleadio payment agent, of recurring payments working in direct billing fashion, without the need to control when a user should renew his subscription. The whole flow is executed through one method exposed by PaySystem service, with one additional method to cancel subscription if it will be necessary due to specific merchant business flow. All consecutive payments, being the result of started subscription, all automatically performed by Teleaudio, and automatically stored and accounted by TMS. The amount of money involved in a subscription and the period between payments need to be configured by Teleaudio, prior to using the service for the first time. Merchant is notified about following events: subscription started, subscription cancelled, successful subscription charge, failed subscription charge.
There is no method to charge existing subscription, it is handled by Teleaudio automatically when a specified period ends.
Start subscription
Subscription charge
Subscription cancellation (optional)
Interface: paysystem.tms.onetapi.pl
Method: set_subscription
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | { "trans_ext_id": "test_sym_tele_subs_11", "merchant_id": "19", "invoice_required": false, "payment":{ "channel_id": "9041", "amount": "0", "currency": "PLN" }, "articles":[{ "prod_id": "511", "sap_index": "45000437", "vat_rate": "23", "name": "test product", "quantity": "1", "price": "100", "config": [{ "name": "teleaudio_service_id", "value": "511" }] }], "customer":{ "ext_id": "1234qwera", "name": "test", "firstname": "tester", "lastname": "testowski", "email": "test@test.pl", "street": "blotna", "city": "krakow", "phone": "48519532621", "postcode": "31-620" }, "test": "True", "next_url": "https://sympatia.onet.pl", "secret": "<secret-key>" } |
Parameters explanation:
Payment Object
channel_id |
int |
required |
payment channel identification for teleaudio subscriptions payments |
amount |
int |
required |
How much the product items is already payed. 0 if payment is to be started |
currency |
string |
required |
currency ISO code |
validity_time |
int |
Optional |
validity time (in seconds) of payments before it’s invalidated |
config |
Object |
Optional |
parameters specific for to a given payment method (no dedicated config parameter is required for teleaudio subscription) |
Articles Object
prod_id |
string |
required |
external product id |
sap_index |
int |
required |
SAP material index give to the product by Accounting Departamentn |
vat_rate |
float |
required |
VAT rate in percents |
name |
string |
required |
name of the product presented to the user |
quantity |
int |
required |
number of units |
price |
int |
required |
unit price gross, amount in decimal parts. e.g. 16 PLN - price: 1600 |
config |
Object |
optional |
additional article configuration for farther use if required by the seller [
{"name": "teleaudio_service_id"", "value": "<service-id>"}
],
|
Cancelling subscription (optional)¶
Interface: paysystem.tms.onetapi.pl
Method: unsubscribe
Parameters example:
Parameters explanation (optional parameters in italic, especially important in bold):
order_ext_id (str) - Merchant order identifier, so that TMS can get all the data needed to cancel the subscription
Notifications¶
Merchant can be informed about events happening during subscription lifetime through notifications. They have no specified shape nor form, and can be adjusted to merchant needs. The events for which a notification can be sent are:
Subscription start
Successful subcription charge
Failed subscription charge
Subscription cancellation