Transaction
View purchases and renewal made by your client. Transaction involves the purchase, payment and renewal of policy.
Create Transactions
When clients pay a premium on an insurance policy, a transaction is created. To create a client's transaction, use the endpoint below.
POST /api/v1/client/transactions
Path param
authorization : *bearer
REQUEST BODY SCHEMA: application/json
Name | Description | Required | Type |
---|---|---|---|
invoiceId | Id of the invoice to be paid | Required | String |
amount | Amount paid in the currency of the invoice. If not provided, remaining invoice amount is used. number >= 0 | Not Required | number |
chequeNo | Required if payment method is cheque. >=3 characters | Not Required | string |
chequeType | Required if payment method is cheque | Not Required | String |
chequeDate | Required if payment method is cheque. <date-time> | Not Required | string |
dateReceived | Date at which payment was received. If not provided, current date is be used. | Not Required | string |
exchangeRate | Currency exchange rate. If not provided, invoice exchange rate will be used. Default: 1 | Not Required | string |
paymentMethod | Enum: "ONLINE" "MOBILE_MONEY" "CASH" "CHEQUE" "BANK_TRANSFER" "UNSPECIFIED" | Required | String |
transactionNo | Transaction Number is automatically generated if not provided | Not Required | String |
transactionType | If not provided, policy business type is used. Enum: "RENEWAL" "EXTENSION" "NEW_BUSINESS" | Not Required | string |
Response
Code | Description |
---|---|
200 | Success |
409 | Unauthorized. |
Example Success Response
Content type
application/json
[
{
"dateReceived": "string",
"payee": "string",
"invoiceId": "62a8de63eeba455ddc20dccc",
"transactionType": "RENEWAL",
"transactionNo": "string",
"paymentInstitution": "string",
"description": "",
"amount": 0,
"exchangeRate": 1,
"currency": "GHC",
"chequeDate": "2019-08-24T14:15:22Z",
"nameOnCheque": "string",
"chequeNo": "string",
"chequeType": "string",
"files": [
{ }
],
"paymentMethod": "ONLINE"
}
]
...
]