POST api/Payment
Records a payment for a renewal contract. Verifies that the given contract ID is for a renewal tied to any of the customer's boats (the account code can be for any boat the customer owns, master or sub account), and then records the payment against the master account code.
Request Information
URI Parameters
None.
Body Parameters
The payment details binding model.
RecordPaymentBindingModel| Name | Description | Type | Additional information |
|---|---|---|---|
| accountCode |
The Customer's account code |
string |
Required Max length: 10 |
| contractId |
The unique contract id this payment is for |
integer |
Required |
| paymentRef |
The payment Reference string |
string |
Max length: 50 |
| paymentValue |
The payment amount |
decimal number |
Required |
| paymentSuccessful |
The successful payment flag |
boolean |
Required |
| message |
An optional message member which can have details about the payment entry |
string |
Max length: 250 |
| paymentType |
Payment Type |
string |
None. |
| upfrontPayment |
Indicates if the payment is the upfront payment for the specified contract, defaults to false |
boolean |
None. |
| LoyaltyPointsToUse |
The number of loyalty points to use against the contract, if this is the first payment call for a renewal that is not a new DD. |
integer |
None. |
Request Formats
application/json, text/json
{
"accountCode": "HSMM1113",
"contractId": 0,
"paymentRef": "4BC3FDH1KL",
"paymentValue": 1050.49,
"paymentSuccessful": true,
"message": "Successful payment!",
"paymentType": null,
"upfrontPayment": false,
"LoyaltyPointsToUse": null
}
multipart/form-data
--MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="accountCode" sample string 1 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="contractId" 2 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="paymentRef" sample string 3 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="paymentValue" 4.1 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="paymentSuccessful" True --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="message" sample string 6 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="paymentType" sample string 7 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="upfrontPayment" True --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="LoyaltyPointsToUse" 1 --MultipartDataMediaFormatterBoundary1q2w3e--
Response Information
Resource Description
The Http result, for WebAPI.
IHttpActionResultNone.
Response Formats
application/json, text/json, multipart/form-data
Sample not available.