Skip to content

Create Subscription

Request

Creates a webhook subscription for the specified event types and the given URL.

Security
HTTPBearer
Headers
x-jiko-idempotencystring, (uuid)(X-Jiko-Idempotency)required

A new UUID that you generate for each request, reads included. It is part of the request signature and prevents replay of a request. A value that was already sent in the last hour is rejected with 409 jiko.errors.DuplicateRequestError, even if the first request failed. When you retry a request, generate a new value and sign the request again.

x-jiko-signaturestring(X-Jiko-Signature)required

Base64-encoded HMAC-SHA256 hash of x-jiko-idempotency + request pathname + body, keyed with your shared secret. See Authentication for the full algorithm and a code sample.

Bodyapplication/jsonrequired
descriptionstring(Description)

A description of the webhook's intended use.

Default:""
eventsArray of strings, non-empty(Events)required

Which types of events this webhook should be invoked for.

urlstring, (uri), [ 1 .. 2083 ] characters(Url)required

The webhook URL to invoke.

retry_policyRetryPolicy (object) or null
Any of:

The retry policy to use if Jiko encounters HTTP errors when calling subscription URLs.

shared_secretstring, >= 16 characters(Shared Secret)required

The shared secret used by the Partner API to sign requests made to the webhook. The shared secret needs to be minimum 16 characters long.

curl -i -X POST \
  https://your-partner-name.sandbox-api.jikoservices.com/api/v1/subscriptions/ \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-jiko-idempotency: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'x-jiko-signature: string' \
  -d '{
    "description": "",
    "events": [
      "string"
    ],
    "url": "http://example.com",
    "retry_policy": {
      "retry_on_status_codes": [
        0
      ],
      "backoff_coefficient": 1,
      "maximum_attempts": 1,
      "initial_interval_seconds": 0,
      "maximum_interval_seconds": 0
    },
    "shared_secret": "stringstringstri"
  }'

Responses

Successful Response

Bodyapplication/json
descriptionstring(Description)

A description of the webhook's intended use.

Default:""
eventsArray of strings, non-empty(Events)required

Which types of events this webhook should be invoked for.

urlstring, (uri), [ 1 .. 2083 ] characters(Url)required

The webhook URL to invoke.

retry_policyRetryPolicy (object) or null
Any of:

The retry policy to use if Jiko encounters HTTP errors when calling subscription URLs.

idstring, (uuid)(Id)required
time_createdstring, (date-time)(Time Created)required
updated_atstring, (date-time)(Updated At)required
statusstring(Status)required
Enum:"enabled""disabled"
object_typestring(Object Type)read-onlyrequired
Response
{ "description": "Incoming ACH Success Webhook", "events": [ "transfers.ach.in.success" ], "url": "https://example.com/webhooks/ach-incoming-success", "retry_policy": { "retry_on_status_codes": [ … ], "backoff_coefficient": 2.1, "maximum_attempts": 3, "initial_interval_seconds": 3, "maximum_interval_seconds": 20 }, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "time_created": "2023-01-01T14:00:00Z", "updated_at": "2023-01-01T14:00:00Z", "status": "enabled", "object_type": "Subscription" }