POST api/me/userproperties/{userPropertyId}/cases/{caseId}/payments/{paymentId}
Use this method to refund existing payment to user on the user case. This will create another payment record of type 'Refund' and will set Refundable flag to false on the original transaction.
Requires Authorization!
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
userPropertyId |
Id of the user property record |
integer |
Required |
caseId |
Id of the user case record |
integer |
Required |
paymentId |
Id of the payment record being refunded |
integer |
Required |
Body Parameters
Refund instructions data
RefundPaymentDataBindingModelName | Description | Type | Additional information |
---|---|---|---|
RefundAmount | decimal number |
Required |
|
RefundReason | string |
Required |
|
PaymentMethodId | integer |
Required |
|
CheckNumber | string |
None. |
Request Formats
application/json, text/json
Sample:
{ "refundAmount": 1.0, "refundReason": "sample string 2", "paymentMethodId": 3, "checkNumber": "sample string 4" }
text/html
Sample:
{"refundAmount":1.0,"refundReason":"sample string 2","paymentMethodId":3,"checkNumber":"sample string 4"}
application/xml, text/xml
Sample:
<RefundPaymentDataBindingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ptd.Model.WebModels.Payments"> <CheckNumber>sample string 4</CheckNumber> <PaymentMethodId>3</PaymentMethodId> <RefundAmount>1</RefundAmount> <RefundReason>sample string 2</RefundReason> </RefundPaymentDataBindingModel>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
Transaction response data that may contain stripe error information in case transaction fails
TransactionCompletedCaseResponseModelName | Description | Type | Additional information |
---|---|---|---|
IsSuccess | boolean |
None. |
|
ErrorMessage | string |
None. |
|
Cases | Collection of PaidCaseDetailModel |
None. |
|
IsCaseOrder | boolean |
None. |
|
OrderId | integer |
None. |
Response Formats
application/json, text/json
Sample:
{ "isSuccess": true, "errorMessage": "sample string 2", "cases": [ { "caseId": 1, "userPropertyId": 1, "caseTypeId": 2, "companyId": 3 }, { "caseId": 1, "userPropertyId": 1, "caseTypeId": 2, "companyId": 3 } ], "isCaseOrder": true, "orderId": 4 }
text/html
Sample:
{"isSuccess":true,"errorMessage":"sample string 2","cases":[{"caseId":1,"userPropertyId":1,"caseTypeId":2,"companyId":3},{"caseId":1,"userPropertyId":1,"caseTypeId":2,"companyId":3}],"isCaseOrder":true,"orderId":4}
application/xml, text/xml
Sample:
<TransactionCompletedCaseResponseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ptd.Model.WebModels.CaseBinding"> <Cases> <PaidCaseDetailModel> <CaseId>1</CaseId> <CaseTypeId>2</CaseTypeId> <CompanyId>3</CompanyId> <UserPropertyId>1</UserPropertyId> </PaidCaseDetailModel> <PaidCaseDetailModel> <CaseId>1</CaseId> <CaseTypeId>2</CaseTypeId> <CompanyId>3</CompanyId> <UserPropertyId>1</UserPropertyId> </PaidCaseDetailModel> </Cases> <ErrorMessage>sample string 2</ErrorMessage> <IsCaseOrder>true</IsCaseOrder> <IsSuccess>true</IsSuccess> <OrderId>4</OrderId> </TransactionCompletedCaseResponseModel>