Top

Refund

List refunds of a customer payment
GET /customerpayments/:customer_payment_id/refunds
List all the refunds pertaining to an existing customer payment.
Details of a refund
GET /customerpayments/:customer_payment_id/refunds/:refund_id
Obtain details of a particular refund of a customer payment.
Refund an excess customer payment
POST /customerpayments/:customer_payment_id/refunds
Refund the excess amount paid by the customer.
Update a refund
PUT /customerpayments/:customer_payment_id/refunds/:refund_id
Update the refunded transaction.
Delete a refund
DELETE /customerpayments/:customer_payment_id/refunds/:refund_id
Delete refund pertaining to an existing customer payment.

List refunds of a customer payment

GET  /customerpayments/:customer_payment_id/refunds

List all the refunds pertaining to an existing customer payment.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{

  "code": 0,
  "message": "success",
  "payment_refunds": [
    {
      "payment_refund_id": "3000000003017",
      "payment_id": "3000000003001",
      "date": "2016-03-30",
      "refund_mode": "cash",
      "reference_number": "",
      "payment_number": "2",
      "customer_name": "customer1”,
      "description": "",
      "amount_bcy": 10,
      "amount_fcy": 10,
    },
    {
      "payment_refund_id": "3000000003035",
      "payment_id": "3000000003001",
      "date": "2016-03-30",
      "refund_mode": "cash",
      "reference_number": "",
      "payment_number": "2",
      "customer_name": "customer1”,
      "description": "",
      "amount_bcy": 9,
      "amount_fcy": 9,
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "report_name": "Retainer Payment Refund",
    "sort_column": "date",
    "sort_order": "D"
  }
}   

Details of a refund

GET  /customerpayments/:customer_payment_id/refunds/:refund_id

Obtain details of a particular refund of a customer payment.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "payment_refund": {
    "payment_refund_id": "3000000003017",
    "payment_id": "3000000003001",
    "date": "2016-03-30",
    "refund_mode": "Cash",
    "reference_number": "",
    "amount": 10,
    "exchange_rate": 1,
    "from_account_id": "3000000000385",
    "from_account_name": "Petty Cash",
    "description": ""
  }
}

Refund an excess customer payment

POST  /customerpayments/:customer_payment_id/refunds

Refund the excess amount paid by the customer.

Request attributes

date* string
[yyyy-mm-dd]
The date refund is created.
refund_mode string
[50]
Mode in which refund is made.
reference_number string
[50]
Reference number for the refund recorded.
amount* double Amount refunded from the customer payment.
exchange_rate double Exchange rate of the currency.
from_account_id* string The account from which payment is refunded.
description string
[2000]
Description for the refund recorded.

Sample Request

{
      "date": "2016-03-30",
      "refund_mode": "Cash",
      "reference_number": "",
      "amount": 8.00,
      "exchange_rate": 1.00,
      "from_account_id": "3000000000385",
      "description": ""
    }

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The refund information for this payment has been saved.",
  "payment_refund": {
    "payment_refund_id": "3000000004055",
    "payment_id": "3000000003001",
    "date": "2016-03-30",
    "refund_mode": "Cash",
    "reference_number": "",
    "amount": 8,
    "exchange_rate": 1,
    "from_account_id": "3000000000385",
    "from_account_name": "Petty Cash",
    "description": ""
  }
}

Update a refund

PUT  /customerpayments/:customer_payment_id/refunds/:refund_id

Update the refunded transaction.

Request attributes

date* string
[yyyy-mm-dd]
The date refund is created.
refund_mode string
[50]
Mode in which refund is made.
reference_number string
[50]
Reference number for the refund recorded.
amount* double Amount refunded from the customer payment.
exchange_rate double Exchange rate of the currency.
from_account_id* string The account from which payment is refunded.
description string
[2000]
Description for the refund recorded.

Sample Request

{
      "date": "2016-03-30",
      "refund_mode": "Cash",
      "reference_number": "",
      "amount": 9.00,
      "exchange_rate": 1.00,
      "from_account_id": "3000000000385",
      "description": "",
    }

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The refund information has been saved.",
  "payment_refund": {
    "payment_refund_id": "3000000004055",
    "payment_id": "3000000003001",
    "date": "2016-03-30",
    "refund_mode": "Cash",
    "reference_number": "",
    "amount": 9,
    "exchange_rate": 1,
    "from_account_id": "3000000000385",
    "from_account_name": "Petty Cash",
    "description": ""
  }
}

Delete a refund

DELETE  /customerpayments/:customer_payment_id/refunds/:refund_id

Delete refund pertaining to an existing customer payment.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The refund has been deleted."
}