API

Payment

A bank payment: initiate one, list yours, load one by id, or cancel one in the hosted flow.

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/ob/payments/cancel create The payment has been cancelled successfully
POST /api/v1/ob/payments create The payment object has been stored successfully
GET /api/v1/archive/payments list Returns a page of payments
GET /api/v1/archive/payments/{id} load

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

payments, err := client.Payment(nil).List(nil, nil)
if err != nil {
    panic(err)
}
fmt.Println(payments)
payment, err := client.Payment(nil).Load(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(payment)
created, err := client.Payment(nil).Create(map[string]any{"amount": 1, "currency": "example", "metadata": map[string]any{}, "paymentScheme": "example", "recipient": map[string]any{}, "remittanceInformation": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local payments, err = client:Payment():list()
local payment, err = client:Payment():load({ id = "example_id" })
local created, err = client:Payment():create({ amount = 1, currency = "example", metadata = {}, paymentScheme = "example", recipient = {}, remittanceInformation = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$payments = $client->Payment()->list();
$payment = $client->Payment()->load(["id" => "example_id"]);
$created = $client->Payment()->create(["amount" => 1, "currency" => "example", "metadata" => [], "paymentScheme" => "example", "recipient" => [], "remittanceInformation" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

payments = client.Payment().list()
payment = client.Payment().load({"id": "example_id"})
created = client.Payment().create({ "amount": 1, "currency": "example", "metadata": {}, "paymentScheme": "example", "recipient": {}, "remittanceInformation": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

payments = client.Payment.list()
payment = client.Payment.load({ "id" => "example_id" })
created = client.Payment.create({ "amount" => 1, "currency" => "example", "metadata" => {}, "paymentScheme" => "example", "recipient" => {}, "remittanceInformation" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const payments = await client.Payment().list()
const payment = await client.Payment().load({ id: "example_id" })
const created = await client.Payment().create({ amount: 1, currency: "example", metadata: {}, paymentScheme: "example", recipient: {}, remittanceInformation: "example" })

Fields

Field Type Required Description
amount number Yes Payment amount
createdAt string Yes Created At
currency string Yes Currency code
id string Yes Unique payment identifier
metadata object Yes Metadata
paymentScheme any Yes Payment scheme used
provider any Yes Payment provider details.
recipient object Yes Data about the party receiving the payment.
remittanceInformation any Yes Unstructured or structured remittance information.
sender object Yes Data about the party sending the payment.
updatedAt string Yes Updated At

create

POST /api/v1/ob/payments/cancel

Operation ID: PaymentsController_cancel_v1.

Parameters

Parameter In Type Required Description
state query string Yes
providerId query string Yes

Responses

200: The payment has been cancelled successfully
400
404: Payment associated with the provided state ID and provider ID was not found or cannot be cancelled in its current state

POST /api/v1/ob/payments

Operation ID: PaymentsController_create_v1.

Authentication: credential (bearer).

Parameters

Parameter In Type Required Description
Accept-Language header string No Preferred initial UI language for payment initiation. The user will be able to change it later. Must be a two-letter ISO 639-1 language code (for example, 'en' for English, 'fr' for French). Invalid values will be ignored.

Request body

application/json

Property Type Required Description
amount number Yes The amount to be transferred.
currency string Yes The currency of the payment.
metadata object Yes
metadata.endToEndId string Yes The ID of the payment in your system. Maximum 35 characters. If you are using UUIDs, remove hyphens to fit into the character limit. Only alphanumeric characters and these special characters are allowed: / + - : [space].
metadata.note string No A free-text note for your own reference. This value is not passed to the bank and is purely for the client's usage.
metadata.psuIpAddress string Yes The IPv4 or IPv6 address of the PSU. Required by providers. IPv4 must be a full four-octet IP address, for example 84.240.80.120. IPv6 must be expanded to eight segments without the :: shorthand.
metadata.psuUserAgent string Yes The user agent of the PSU. Required by providers.
metadata.redirectUri string Yes The URI to which the PSU will be redirected once the payment flow is completed.
metadata.webhookUrl string No The URL where you want to receive a webhook when the payment status changes. Must be a valid HTTPS URL.
paymentScheme object Yes Payment scheme.
provider object No Data about the payment provider.
recipient object Yes Data about the party receiving the payment.
remittanceInformation object Yes Unstructured or structured remittance information.
sender object No Data about the party sending the payment.

Responses

201: The payment object has been stored successfully

application/json

Property Type Required Description
createdAt string (date-time) Yes
paymentId string Yes The Kashimi ID of the initiated payment
providerPaymentId string No The provider ID of the initiated payment
redirectUrl string Yes The URL to redirect the user to complete the payment
status enum: PENDING, COMPLETED, FAILED, UNKNOWN Yes The status of the initiated payment
updatedAt string (date-time) Yes

Example response:

{
  "createdAt": "2023-04-05T17:02:11.954Z",
  "paymentId": "56caec01-85cc-4fc6-8080-cc0f7ed03a7e",
  "providerPaymentId": "123456789",
  "redirectUrl": "https://example.com/provider/specific/redirect/url",
  "status": "PENDING",
  "updatedAt": "2023-04-05T17:02:11.954Z"
}
400: The request is not formatted correctly

application/json

Example response:

{
  "message": "providerId should not be empty, providerId must be a UUID, paymentScheme should not be empty, paymentScheme must be one of the following values: SEPA, recipient must be a non-empty object, amount must not be less than 0.01, amount must be a number conforming to the specified constraints",
  "statusCode": 400,
  "title": "Bad Request"
}
401: Your access token was either not passed with the request, or it is invalid (for example expired or malformed). Make sure to pass the token in the Authorization header, and obtain a new one if it has expired

application/json

Property Type Required Description
message string Yes Error message
statusCode number Yes HTTP status code
title string Yes Name of the error

Example response:

{
  "message": "Unauthorized",
  "statusCode": 401,
  "title": "Unauthorized"
}
403: You do not have the necessary permissions to perform this action

application/json

Property Type Required Description
message string Yes Error message
statusCode number Yes HTTP status code
title string Yes Name of the error

Example response:

{
  "message": "Access denied",
  "statusCode": 403,
  "title": "Forbidden"
}
404: Provider with the specified ID was not found

application/json

Example response:

{
  "message": "Provider with this ID was not found.",
  "statusCode": 404,
  "title": "Not Found"
}
409: A payment with the specified endToEndId already exists

application/json

Example response:

{
  "message": "Payment with this end-to-end ID already exists.",
  "statusCode": 409,
  "title": "Conflict"
}

list

GET /api/v1/archive/payments

Operation ID: PaymentsController_get_v1.

Authentication: credential (bearer).

Parameters

Parameter In Type Required Description
cursor[value] query string No Opaque cursor returned as meta.cursor.next.value by a previous response. Returns items after this position. Omit to fetch the first page.
filters[createdAt][to] query string No Exclusive upper bound (ISO-8601). Matches payments created strictly before this instant.
filters[createdAt][from] query string No Inclusive lower bound (ISO-8601). Matches payments created at or after this instant.
filters[metadata][endToEndId] query string No Filter payments by end-to-end ID

Responses

200: Returns a page of payments

application/json

Property Type Required Description
items array of object Yes The page of payments matching the given filters.
items[].amount number Yes Payment amount
items[].createdAt string Yes
items[].currency enum: AED, AFN, ALL, AMD, ANG, AOA, ... Yes Currency code
items[].id string Yes Unique payment identifier
items[].metadata object Yes
items[].metadata.endToEndId string Yes Payment end-to-end identifier
items[].metadata.note string No A free-text note for your own reference. This value is not passed to the bank and is purely for the client's usage.
items[].metadata.psuIpAddress string Yes PSU IP address
items[].metadata.psuUserAgent string Yes PSU user agent
items[].metadata.redirectUri string Yes URI to redirect PSU
items[].metadata.webhookUrl string No Webhook URL
items[].paymentScheme object Yes Payment scheme used
items[].provider object Yes Payment provider details.
items[].recipient object Yes
items[].recipient.account object Yes Recipient account details
items[].recipient.address object Yes Recipient address
items[].recipient.name string Yes Recipient name
items[].remittanceInformation object Yes Unstructured or structured remittance information.
items[].sender object Yes
items[].sender.account object No Sender account details
items[].sender.address object No Sender address
items[].sender.credentials object No Sender online banking credentials
items[].updatedAt string Yes
meta object Yes Metadata needed to fetch subsequent pages.
400: The request is not formatted correctly

application/json

Property Type Required Description
message string Yes Error message
statusCode number Yes HTTP status code
title string Yes Name of the error

Example response:

{
  "message": "filters.metadata must be an object",
  "statusCode": 400,
  "title": "Bad Request"
}
401: Your access token was either not passed with the request, or it is invalid (for example expired or malformed). Make sure to pass the token in the Authorization header, and obtain a new one if it has expired

application/json

Property Type Required Description
message string Yes Error message
statusCode number Yes HTTP status code
title string Yes Name of the error

Example response:

{
  "message": "Unauthorized",
  "statusCode": 401,
  "title": "Unauthorized"
}
403: You do not have the necessary permissions to perform this action

application/json

Property Type Required Description
message string Yes Error message
statusCode number Yes HTTP status code
title string Yes Name of the error

Example response:

{
  "message": "Access denied",
  "statusCode": 403,
  "title": "Forbidden"
}

load

GET /api/v1/archive/payments/{id}

Operation ID: PaymentsController_getById_v1.

Authentication: credential (bearer).

Parameters

Parameter In Type Required Description
id path string Yes

Responses

200

application/json

Property Type Required Description
amount number Yes Payment amount
createdAt string Yes
currency enum: AED, AFN, ALL, AMD, ANG, AOA, ... Yes Currency code
id string Yes Unique payment identifier
metadata object Yes
metadata.endToEndId string Yes Payment end-to-end identifier
metadata.note string No A free-text note for your own reference. This value is not passed to the bank and is purely for the client's usage.
metadata.psuIpAddress string Yes PSU IP address
metadata.psuUserAgent string Yes PSU user agent
metadata.redirectUri string Yes URI to redirect PSU
metadata.webhookUrl string No Webhook URL
paymentScheme object Yes Payment scheme used
provider object Yes Payment provider details.
recipient object Yes
recipient.account object Yes Recipient account details
recipient.address object Yes Recipient address
recipient.name string Yes Recipient name
remittanceInformation object Yes Unstructured or structured remittance information.
sender object Yes
sender.account object No Sender account details
sender.address object No Sender address
sender.credentials object No Sender online banking credentials
updatedAt string Yes
400: The request is not formatted correctly

application/json

Example response:

{
  "message": "Invalid ID value",
  "statusCode": 400,
  "title": "Bad Request"
}
401: Your access token was either not passed with the request, or it is invalid (for example expired or malformed). Make sure to pass the token in the Authorization header, and obtain a new one if it has expired

application/json

Property Type Required Description
message string Yes Error message
statusCode number Yes HTTP status code
title string Yes Name of the error

Example response:

{
  "message": "Unauthorized",
  "statusCode": 401,
  "title": "Unauthorized"
}
403: You do not have the necessary permissions to perform this action

application/json

Property Type Required Description
message string Yes Error message
statusCode number Yes HTTP status code
title string Yes Name of the error

Example response:

{
  "message": "Access denied",
  "statusCode": 403,
  "title": "Forbidden"
}
404: The payment with the specified ID was not found

application/json

Example response:

{
  "message": "Not Found",
  "statusCode": 404,
  "title": "Not Found"
}