curl --request POST \
--url https://api.panoqore.example/v1/loan-events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"currency": "NGN"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({currency: 'NGN'})
};
fetch('https://api.panoqore.example/v1/loan-events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.panoqore.example/v1/loan-events"
payload = { "currency": "NGN" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.panoqore.example/v1/loan-events"
payload := strings.NewReader("{\n \"currency\": \"NGN\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"entry": {
"id": "<string>",
"status": "PENDING",
"kind": "<string>",
"description": "<string>",
"effectiveAt": "2023-11-07T05:31:56Z",
"businessDate": "<string>",
"externalRef": "<string>",
"reversesId": "<string>",
"reversedById": "<string>",
"fxRateId": "<string>",
"holdId": "<string>",
"postings": [
{
"id": "<string>",
"entryId": "<string>",
"accountId": "<string>",
"side": "DEBIT",
"amount": "<string>",
"currency": "<string>",
"seq": 123,
"accountName": "<string>",
"accountCode": "<string>",
"balanceAfter": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"metadata": {},
"createdBy": {
"kind": "PERSON",
"id": "<string>",
"displayName": "<string>"
},
"approvedBy": {
"kind": "PERSON",
"id": "<string>",
"displayName": "<string>"
},
"latePosting": true,
"postedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"statusNote": "<string>"
},
"approval": {
"approvalId": "<string>",
"applied": true
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}Record a loan event
Records one loan event. A key with entries:write posts at once; a person’s request goes to approval. A write-off always goes to approval, and only a person can approve it.
The answer has entry when it posted, or approval when it went to a second person. reason of at least 10 characters is required for a WRITE_OFF.
Scope: entries:write.
curl --request POST \
--url https://api.panoqore.example/v1/loan-events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"currency": "NGN"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({currency: 'NGN'})
};
fetch('https://api.panoqore.example/v1/loan-events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.panoqore.example/v1/loan-events"
payload = { "currency": "NGN" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.panoqore.example/v1/loan-events"
payload := strings.NewReader("{\n \"currency\": \"NGN\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"entry": {
"id": "<string>",
"status": "PENDING",
"kind": "<string>",
"description": "<string>",
"effectiveAt": "2023-11-07T05:31:56Z",
"businessDate": "<string>",
"externalRef": "<string>",
"reversesId": "<string>",
"reversedById": "<string>",
"fxRateId": "<string>",
"holdId": "<string>",
"postings": [
{
"id": "<string>",
"entryId": "<string>",
"accountId": "<string>",
"side": "DEBIT",
"amount": "<string>",
"currency": "<string>",
"seq": 123,
"accountName": "<string>",
"accountCode": "<string>",
"balanceAfter": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"metadata": {},
"createdBy": {
"kind": "PERSON",
"id": "<string>",
"displayName": "<string>"
},
"approvedBy": {
"kind": "PERSON",
"id": "<string>",
"displayName": "<string>"
},
"latePosting": true,
"postedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"statusNote": "<string>"
},
"approval": {
"approvalId": "<string>",
"applied": true
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}Authorizations
An API key, pk_live_… or pk_test_….
Headers
Your unique key for this write, at most 255 characters. A retry with the same key and body gets the first answer back.
255Body
DISBURSE: loan up, customer's account or disbursement clearing up
ACCRUE_INTEREST: interest receivable up, interest income up
CHARGE_PENALTY: interest receivable up, penalty income up
REPAY: from an account: amount off principal, interest_amount off receivable
RECOVER: money in on a loan already written off
PROVISION: impairment charge, allowance up at stage
RELEASE_PROVISION: allowance down at stage, charge back
MOVE_STAGE: allowance moves from stage to to_stage
WRITE_OFF: everything owed comes off; amount is what the allowance at stage absorbs
DISBURSE, ACCRUE_INTEREST, CHARGE_PENALTY, REPAY, RECOVER, PROVISION, RELEASE_PROVISION, MOVE_STAGE, WRITE_OFF "NGN"
every kind but PROVISION, RELEASE_PROVISION and MOVE_STAGE
"LN-1042"
minor units
^[0-9]+$"500000"
REPAY only Minor units, as a string.
^[0-9]+$DISBURSE: where the money goes, disbursement clearing if empty. REPAY and RECOVER: where it comes from.
1 to 3
MOVE_STAGE only
"order-1042"
why; required when the event goes to approval
"Customer unreachable for 180 days"
when posted at once; an approved event posts when approved