Webhooks

As a Jiko Partner API user, you may want to be made aware of events surrounding your account, as they happen in real time. For this, we recommend setting up subscriptions to Jiko Partner API webhooks.

Available Webhook Subscriptions

To view available event types, make an authenticated request to List Event Types:

send_jiko_request "GET" "/api/v1/events/types/"

It should return a 200 OK response with an object that looks something like this:

{
  "offset":0,
  "count": 16,
  "items": [
    {
      "event":"application.approved",
      "object_type":"EventType"
    },
    {
      "event":"application.documents_needed",
      "object_type":"EventType"
    },
    ...
  ],
  "object_type":"List"
}

The list of available event types are found in your response object, by looping through items["event"].

To see example payloads for each event type, see the Trigger Webhook documentation.

The following event types are currently available:

  1. application.approved
  2. application.documents_needed
  3. application.manual_review
  4. application.rejected
  5. card.status.closed
  6. card.status.frozen
  7. card.status.locked
  8. card.status.open
  9. card.transaction.approved
  10. card.transaction.rejected
  11. transfers.ach.out.success
  12. transfers.ach.out.rejected
  13. transfers.ach.in.success
  14. transfers.ach.in.rejected
  15. transfers.wire.out.processing
  16. transfers.wire.out.success
  17. transfers.wire.out.rejected
  18. transfers.on-us.processing
  19. transfers.on-us.success
  20. transfers.on-us.rejected

Creating a Subscription

Call Create Subscription with the following data in the request body:

  1. list of event types to subscribe to
  2. URL to invoke when an event is created
  3. shared_secret of your choice (16 character minimum)
  4. optional description of the subscription

Your request should look something like this:

body='{
 "description": "Webhook subscription for application statuses",
 "events": [
   "application.approved",
   "application.documents_needed",
   "application.manual_review",
   "application.rejected"
 ],
 "url": "https://example.com/webhooks/application-status",
 "shared_secret": "0123456789123456"
}';
send_jiko_request "POST" "/api/v1/subscriptions/" $body

If you get a 201 status code response then you’re up and running and your response should look something like this:

{
  "description": "Webhook subscription for application statuses",
  "events": [
    "application.approved",
    "application.manual_review",
    "application.documents_needed",
    "application.rejected"
  ],
  "url": "https://example.com/webhooks/application-status",
  "id": "55b53873-3abf-4abd-971f-65331ce6dcc4",
  "time_created": "2022-08-09T17:30:52.646971+00:00",
  "updated_at": "2022-08-09T17:30:52.647004+00:00",
  "status": "enabled",
  "object_type": "Subscription"
}

Last updated: December 18, 2023