Refund & Stop
Refund & Stop
payment_subscriptions.refund-stop
Description
Stops user's subscription and refunds transaction. User will be demoted to free access.
IMPORTANT: Refund-stop must be performed against appropriate system's url(system_id, retrieved by payment_subscriptions.search)
if system_id == m21 staging: https://cs-m21.dvipdev.com/ production: https://cs-m21.dvipapp.com/
Input Parameters
Name | Type | Required | Description | Note |
---|---|---|---|---|
sub_id | int | Yes | Subscription ID | Subscription that will be stopped |
tran_id | int | Yes | Transaction ID | Transaction that will be refunded |
pp_type | string | No | Payment Processor Type | If not passed will be retrieved from subscription/transaction payment data |
Return
Name | Type | Description | Note |
---|---|---|---|
success | bool | Was subscription stopped successfully and was transaction refunded successfullyl? |
Usage Example
example query:
/api.json?cmd=payment_subscriptions.refund-stop&tran_id=117303&sub_id=14624&pp_type=RG
example of successful response:
{ "meta": { "messages": [ { "code": "refund_success", "params": null, "sticky": false, "text": "refund_success" } ], "status": "OK" }, "result": { "success": true, "id": 0, "data": [ ], "item": [ ] } }
example of failure response(already refunded&stopped):
{ "meta": { "errors": [ { "code": "614: [102] Cannot Credit - A credit operation cannot be performed because the original transaction has already been voided, credited, or has not been settled.", "params": null, "sticky": false, "text": "614: [102] Cannot Credit - A credit operation cannot be performed because the original transaction has already been voided, credited, or has not been settled." }, { "code": "refund_failed", "params": null, "sticky": false, "text": "refund_failed" } ], "messages": [ { "code": "err_sub_stopped_canceled", "params": null, "sticky": false, "text": "err_sub_stopped_canceled" } ], "status": "ERROR" }, "result": { "success": false, "id": 0, "data": [ ], "item": [ ] } }
Referenced Files
None
Subscribers
None
- Last Author
- boris
- Last Edited
- Jan 6 2017, 08:36