Casava API Docs
  • 👋Welcome!
  • Definitions
  • Environments
  • Start Integration
  • Reference
    • API Reference
      • Policy
        • Policy Application
        • Get all policy holders
        • Get Policy Application Details
        • Get Policyholder by Policyholder Number
        • Get Policy Product
      • Quote
        • Create Policyholder with Quote
        • Get Quote By ID
      • Payment Notifications
  • Widget
    • Javascript Popup Widget
Powered by GitBook
On this page
  1. Reference
  2. API Reference

Payment Notifications

PreviousGet Quote By IDNextJavascript Popup Widget

Last updated 3 years ago

This endpoint is used to notify Casava when the policyholder has completed their payment.

Sample Request

{
  "paymentReference": "ref123",
  "policyHolderNumber": "080292929215",
  "amount": 50,
  "currency": "NGN",
  "paymentDate": "2021-10-23",
  "paymentEffectiveDate": "2021-10-23",
  "paymentChannel": "MOBILE",
  "policyNumber": "12222070620220118800055"
}

Sample Response

{
  "statusCode": 200,
  "message": "successful operation",
  "data": {
    "paymentReference": "ref123",
    "policyHolderNumber": "080209934213519",
    "amount": 50,
    "status": "pending",
    "processingReference": "ref123"
  }
}

Used to notify casava of completed payment from a policy holder via the channel

post
Authorizations
Header parameters
api_keyanyRequired
Body
paymentReferencestringRequired

unique payment reference from the channel used to identify policy holder payment

Example: ref123
policyHolderNumberstringOptional

policy holder system generated unique identifier

Example: 12345678
amountnumberRequired

payment amount

Example: 50
currencystringOptional

payment amount currency

Example: NGN
paymentDatestringOptional

transaction payment date

Example: 2021-10-23
paymentEffectiveDatestringOptional

settlement payment date for reconcillation purpose

Example: 2021-10-23
paymentChannelstringOptional

channel used to complete payment

Example: MOBILE
policyNumberstringOptional

unique reference used to identify a policy with a policy holder

Example: 12345623
Responses
200
successful operation
application/json
400
Validation error processing payment notification
application/json
post
POST /api/channel-service/v1/paymentNotifications HTTP/1.1
Host: channel.sandbox.casava.co
api_key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 205

{
  "paymentReference": "ref123",
  "policyHolderNumber": "12345678",
  "amount": 50,
  "currency": "NGN",
  "paymentDate": "2021-10-23",
  "paymentEffectiveDate": "2021-10-23",
  "paymentChannel": "MOBILE",
  "policyNumber": "12345623"
}
{
  "paymentReference": "ref123",
  "processingReference": "ref123",
  "policyHolderNumber": "12345678",
  "amount": 50,
  "status": "success"
}