POST api/Merchant/v1/ReversePurchase
Method reverse the purchase payment.
Request Information
URI Parameters
None.
Body Parameters
ReversePurchaseRequestName | Description | Type | Additional information |
---|---|---|---|
purchaseId |
Id of purchase (M) |
globally unique identifier |
None. |
amountToReverse |
If partial reverse, give reversed amount. If full reverse, give null. |
decimal number |
None. |
description |
Desccription for reason. |
string |
None. |
OrganizationCode | string |
None. |
|
UserName | string |
None. |
|
Password | string |
None. |
Request Formats
application/json, text/json
Sample:
{ "purchaseId": "6dbb33f8-7975-43e7-be93-83f3af68b06d", "amountToReverse": 1.0, "description": "sample string 2", "OrganizationCode": "sample string 3", "UserName": "sample string 4", "Password": "sample string 5" }
application/xml, text/xml
Sample:
<ReversePurchaseRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers.Merchant"> <OrganizationCode xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">sample string 3</OrganizationCode> <Password xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">sample string 5</Password> <UserName xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">sample string 4</UserName> <amountToReverse>1</amountToReverse> <description>sample string 2</description> <purchaseId>6dbb33f8-7975-43e7-be93-83f3af68b06d</purchaseId> </ReversePurchaseRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
ReversePurchaseReplyName | Description | Type | Additional information |
---|---|---|---|
Reply | PurchaseReply |
None. |
|
Ok | boolean |
None. |
|
ErrorMessage | string |
None. |
|
ErrorCode | string |
None. |
|
Message | string |
None. |
Response Formats
application/json, text/json
Sample:
{ "Reply": { "Id": "3dce0dfb-413a-42cc-94c7-1bff1c6601fe", "PurchaseProcessUrl": "sample string 2", "Status": 0 }, "Ok": true, "ErrorMessage": "sample string 2", "ErrorCode": "sample string 3", "Message": "sample string 4" }
application/xml, text/xml
Sample:
<ReversePurchaseReply xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers.Merchant"> <ErrorCode xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">sample string 3</ErrorCode> <ErrorMessage xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">sample string 2</ErrorMessage> <Message xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">sample string 4</Message> <Ok xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">true</Ok> <Reply> <Id>3dce0dfb-413a-42cc-94c7-1bff1c6601fe</Id> <PurchaseProcessUrl>sample string 2</PurchaseProcessUrl> <Status>Ok</Status> </Reply> </ReversePurchaseReply>