Refund
Refund
payment_transactions.refund
Description
Refunds transaction. This is just a proxy method to payment API - transaction.refund with same input params and results.
IMPORTANT: Refund 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 |
---|---|---|---|---|
tran_id | int | Yes | Transaction ID | Transaction that will be refunded |
amount | float | No | Amount to be refunded | If omitted, full amount will be refunded |
Return
Name | Type | Description | Note |
---|---|---|---|
success | bool | Was transaction refunded successfully? |
Usage Example
example query:
/api.json?cmd=payment_transactions.refund&tran_id=117330
example of successfully refunded response
{ "meta": { "status": "OK" }, "result": { "success": true, } }
example of failure response(already refunded):
{ "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." } ], "status": "ERROR" }, "result": { "success": false } }
Referenced Files
None
Subscribers
None
- Last Author
- boris
- Last Edited
- Jan 6 2017, 08:36