Refund Object
Refund are applied to either a Payment or Customer Return. Generally a payment is taken on a sales order. There are 2 scenarios
- You never shipped the order, then you should apply the refund to the payment then change the status on the sales order to Void.
- You shipped the order (ship doc created) or you applied the payment directly to the ship doc a) create a customer return and b) apply the refund to the customer return (not the payment).
End Point
/refund
GET, POST, DELETE
GET and DELETE require parameter id, being the refund's ID.
Properties - Refund
| Property | Caption | Data Type | Required |
| CustomerRef | Customer | EntityRef | True |
| PaymentMethodRef | Payment Method | EntityRef | True |
| Date | Date | DateTime | True |
| Amount | Amount | Decimal | True |
| AccountRef | Account | EntityRef | False |
| RefNumber | Ref Number | String (50) | False |
| CurrencyRef | Currency | EntityRef | False |
| ExchangeRate | Exchange Rate | Decimal | False |
| ApprovalCode | Approval Code | String (50) | False |
| Memo | Memo | String (4000) | False |
| AppliedTo | Applied To | Array of CustomerLedgerApplied | True |
Properties - CustomerLedgerApplied
| Property | Caption | Data Type | Required |
| AppliedAmount | Applied | Decimal | True |
| ToDocNo | Doc No | Int32 | True |
| ToTranType | Tran Type | RecordTypeEnum | True |
Json Sample
{
{
"Date": "2019-08-22",
"PaymentMethodRef": {
"Id": 2,
"Name": "Cash"
},
"Amount": 44.00,
"AccountRef": null,
"RefNumber": "REF 02",
"CustomerRef": {
"Id": 2
},
"ExchangeRate": 1.0,
"CurrencyRef": null,
"Memo": "",
"AppliedTo": [
{
"AppliedAmount": 44.0000,
"ToDocNo": 108,
"ToTranType": 660
}
]
}