With the next request, you can get all info about the TVOD:
method: GET
URL: /[videos|audios]/ID.json?payment=true
RETURN: { "page": "video|audio", "media": { ... "tvod_enabled": true/false, "tvod_user": true/false, # user access "tvod_subscription": "TVOD INFORMATION" "tvod_purchase_price":{ "id":"ID", "name":"NAME", "tvod_type":["purchase"|"rental"], "price": PRICE # in cents "duration": DURATION, # in days if tvod_type = "rental" "coupon": true/false, }, "tvod_rental_price":{ "id":"ID", "name":"NAME", "tvod_type":["purchase"|"rental"], "price": PRICE # in cents "duration": DURATION, # in days if tvod_type = "rental" "coupon": true/false, }, "tvod_payment_methods": ["card", "boleto","coupon"], } }
After get all info about the TVOD, you can pay with a specific TOKEN:
method: POST
URL: /[videos|audios]/ID/payment.json # ID Format NUMBER-TEXT
PARAMETERS: { “payment_method”: [“card”|”boleto”|”coupon”] “card_token”: [“TOKEN”|"default"] # If “payment_method” = “card” "payer": { # If “payment_method” = “boleto” "name": "NAME", "cpf_cnpj": "CPF/CNPJ", "address": { "street": "STREET", "number": "NUMBER", "complement": "COMPLEMENT" "zip_code": "ZIP CODE" "city": "CITY" "state": "STATE" "country": "COUNTRY" } }, “coupon”: "CODE", “reload”: true, # To reload price using coupon “duration”: ["purchase"|"rental"] } RETURN: { "status": true/false, # status_code 200/400 "video|audio": { "VIDEO|AUDIO INFO" }, # If "reload" = true "coupon": { "id": "ID", "code": "CODE", "description": "DESCRIPTION", }, # If "reload" = true "errors": { # If "status" = false "video|audio": { "FIELD": [ "ERROR MESSAGE" ] } } }
<< Previous topic |
---|