1. List Payments (api1/payments)
This method will answer with a collection of iinsight's payments that has been modified/created since a provided date. The collection wil be in JSON format.
The results would be paginated, having a maximum of 100 records per page. An empty collection and a status code 200 response, means that there is no records in the specified page.
| Server |
URL |
HTTP type |
| UAT |
https://api-ca-uat.iinsightonline.com/api1/payments |
GET |
| PRODUCTION |
https://api-ca.iinsightonline.com/api1/payments |
GET |
Authorization
| Parameter |
Value |
Mandatory |
| Type |
Bearer Token |
Yes |
| Token |
The token is generated using the /auth/login method |
Yes |
Query Params
| Parameter |
Value |
Mandatory |
| modified_since |
Date since last update or insert.
Format: YYYY-MM-DDThh:mm:ssZ (date and time in UTC ISO 8601)
Example: 2024-02-29T12:28:01Z
|
Yes |
| page |
The page number of the paginated results. (i.e.: 1) |
Yes |
| status |
The status of the invoice. (i.e.: active / voided) |
Yes |
Response
[
{
"payment_id": "1104",
"payment_number": "NSW2014425-P1",
"transaction_date": "17-01-2024",
"amount": "562.30",
"paid_by": "xxx",
"reference_number": "xxx",
"card_type": "",
"bank": "",
"branch": "",
"invoice_id": "1567",
"invoice_number": "NSW2014425",
"bill_to_id": "5",
"type": "Cash",
"notes": "",
"last_update": "17-01-2024 07:44:58",
"last_update_utc": "2024-01-16T20:44:58Z
},
{
"payment_id": "1105",
"payment_number": "NSW2014454-P1",
"transaction_date": "18-01-2024",
"amount": "-158.00",
"paid_by": "xxx",
"reference_number": "xxx",
"card_type": "",
"bank": "",
"branch": "",
"invoice_id": "1686",
"invoice_number": "NSW2014454",
"bill_to_id": "5",
"type": "Cash",
"notes": "",
"last_update": "17-01-2024 07:44:58",
"last_update_utc": "2024-01-16T20:44:58Z
}
]
2. Create a Payment (api1/payments)
This method will allow to create a new payment in iinsight.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-ca-uat.iinsightonline.com/api1/payments/create_payments |
POST |
| PRODUCTION |
https://api-ca.iinsightonline.com/api1/payments/create_payments |
POST |
Authorization
| Parameter |
Value |
Mandatory |
| Type |
Bearer Token |
Yes |
| Token |
The token generated using the /auth/login method |
Yes |
Query Params
| Parameter |
Value |
Mandatory |
| invoice_id |
Iinsight's internal ID number of the invoice. |
Yes |
| transaction_date |
The date of the transaction. |
Yes |
| amount |
The payment amount. Positive number. |
Yes |
| paid_by |
Person or company who made the payment |
No |
| reference_number |
A number to reference the payment. |
No |
| card_type |
Credit card type (i.e: American Expres / Bankcard / Diners / Mastercard / Visa / None) |
Yes |
| branch |
The branch of the Bank |
No |
| notes |
Note for the payment. |
No |
| type |
The type of payment (i.e.: Cheque /Cash / Credit Card / EFT / Drawdown / BACS) |
Yes |
Response
{
"response": "Payment created",
"payment": 1132,
"payment_number": "NSW137-P3"
}
3. Update a Payment (api1/payments)
This method will allow to update a payment in iinsight.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-ca-uat.iinsightonline.com/api1/payments/update_payments |
PUT |
| PRODUCTION |
https://api-ca.iinsightonline.com/api1/payments/update_payments |
PUT |
Authorization
| Parameter |
Value |
Mandatory |
| Type |
Bearer Token |
Yes |
| Token |
The token generated using the /auth/login method |
Yes |
Query Params (As it's PUT method this need to go on the x-www-form-urlencoded)
| Parameter |
Value |
Mandatory |
| payment_id |
Iinsight internal ID number of the payment |
Yes |
| amount |
The new payment amount. Positive number. |
Yes |
Response
{
"response": "Payment updated",
"payment": "1104"
}