InstaCash BNPL API (v0.1.0)

Download OpenAPI specification:Download

InstaCash vs 3rd party Webshop API for BNPL

(This is a feature that enables using multiple BNPL offers depending on different criteria, such as cart value, product category, etc.)

It is now possible to enter a webhook to which OLM returns the status changes, so it is not necessary to check it separately.

Application Flow

List views

Authentication

Authentication Token:

  • basicHeader: X-API-KEY

Initialization

Initiating and Cancelling a BNPL application from a Webshop

Queries the available offers for the merchant

Gets basic data on the offers available to use. Merchant is identified from the API Key

header Parameters
X-API-KEY
required
string

Responses

Request samples

curl --request GET \
--url 'https://bnpl.instacash.hu/api/bnpl/external/available-offers/' \
--header 'content-type: application/json; charset=UTF-8' \
--header 'X-API-KEY: {apiKey}' \

Response samples

Content type
application/json
[
  • {
    }
]

Runs a calculation on a cart amount

  • This is a GET because nothing is created in the backend as a result of this call
  • Returns the installment details
path Parameters
offerId
required
integer <int64>

The target offer's ID

query Parameters
value
required
number

Cart amount

header Parameters
X-API-KEY
required
string

Responses

Request samples

curl --request GET \
--url 'https://bnpl.instacash.hu/api/bnpl/external/calculation/{offerId}' \
--header 'content-type: application/json; charset=UTF-8' \
--header 'X-API-KEY: {apiKey}' \
--data value={total}

Response samples

Content type
application/json
{
  • "payments": [
    ],
  • "total": 0,
  • "fee": 0,
  • "rate": 0,
  • "downPayment": 0,
  • "downPaymentTotal": 0,
  • "thm": 0,
  • "currencyIso": "string"
}

Create a BNPL application

This call will:

  • Create a BnplApplication (in a temporary state)
  • Create a BnplDeal and generate the Transactions
  • Create a BnplPurchase, save the kosártartalom
  • Return a public identifier, required for the first login
header Parameters
X-API-KEY
required
string
Request Body schema: application/json
offerId
required
integer <int64>

The target offer's id

checkoutId
string [ 0 .. 255 ] characters

ID of the order in the calling system

totalAmount
required
number > 0

The full to-be-billed amount

customerId
string [ 0 .. 127 ] characters

The customer's ID in the calling system (optional)

customerFirstName
string [ 0 .. 255 ] characters

The customer's first name in the calling system (optional)

customerLastName
string [ 0 .. 255 ] characters

The customer's last name in the calling system (optional)

customerEmail
string [ 0 .. 255 ] characters

The customer's name in the calling system (optional)

customerPhone
string [ 0 .. 127 ] characters

The customer's phone number in the calling system in the international phone number format, e.g. 36301234567 (optional)

financier
string [ 0 .. 67 ] characters

ID of the financier of the offer

object (BillingAddress)
object (ShippingAddress)
orderId
required
string [ 0 .. 255 ] characters

ID of the order in the calling system.

prepaymentInvoiceId
string [ 0 .. 255 ] characters

ID of the prepayment invoice in the calling system.

finalInvoiceId
string [ 0 .. 255 ] characters

ID of the final invoice in the calling system.

invoiceId
string [ 0 .. 255 ] characters

ID of the invoice in the calling system.

redirectUrl
string [ 0 .. 255 ] characters

The url to redirect the user to when the application process terminates

shoppingMode
string
Enum: "IN_STORE" "WEB_SHOP"

This is the structure represents of a shopping mode

required
Array of objects (OrderItemRequest)

Responses

Request samples

Content type
application/json
{
  • "offerId": 0,
  • "checkoutId": "string",
  • "totalAmount": 0,
  • "customerId": "string",
  • "customerFirstName": "string",
  • "customerLastName": "string",
  • "customerEmail": "string",
  • "customerPhone": "string",
  • "financier": "string",
  • "billingAddress": {
    },
  • "shippingAddress": {
    },
  • "orderId": "string",
  • "prepaymentInvoiceId": "string",
  • "finalInvoiceId": "string",
  • "invoiceId": "string",
  • "redirectUrl": "string",
  • "shoppingMode": "IN_STORE",
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "publicId": "string",
  • "customerId": "string",
  • "applicationId": 0,
  • "dealId": 0,
  • "purchaseId": 0,
  • "created": "2019-08-24T14:15:22Z",
  • "isPreScore": true,
  • "shoppingMode": "IN_STORE",
  • "status": "string",
  • "flowPosition": "string"
}

Cancel an ongoing Application

Used to cancel an application

path Parameters
id
required
string

Application ID (can be either the OLM assigned ID or the "externalId" in the original request)

header Parameters
X-API-KEY
required
string

Responses

Request samples

curl --request DELETE \
--url 'https://bnpl.instacash.hu/api/bnpl/external/application/{id}' \
--header 'content-type: application/json; charset=UTF-8' \
--header 'X-API-KEY: {apiKey}' \

Response samples

Content type
application/json
{
  • "headers": {
    },
  • "statusCode": {
    },
  • "body": {},
  • "titleMessageCode": "string",
  • "detailMessageArguments": [
    ],
  • "detailMessageCode": "string"
}

Querying

Query data of BNPL applications and deals from InstaCash OLM

Returns offer data for a given offer ID

Get basic data on a single offer, only some limited information because this endpoint is working without authentication

path Parameters
offerId
required
integer <int64>

The target offer's ID

Responses

Request samples

curl --request GET \
--url 'https://bnpl.instacash.hu/api/bnpl/external/offer/{offerId}' \
--header 'content-type: application/json; charset=UTF-8' \
--header 'X-API-KEY: {apiKey}' \

Response samples

Content type
application/json
{
  • "offerId": 0,
  • "financierIdentifier": "string",
  • "downPayment": 0,
  • "rate": 0,
  • "installments": 1,
  • "minAmount": 0,
  • "maxAmount": 0
}

Get a listing of all BNPL Applications

Get listing data on all applications of the merchant

query Parameters
financier
string

The financier ID string, functions as an optional filter

required
object (Pageable)
header Parameters
X-API-KEY
required
string

Responses

Request samples

curl --request GET \
--url 'https://bnpl.instacash.hu/api/bnpl/external/application/' \
--header 'content-type: application/json; charset=UTF-8' \
--header 'X-API-KEY: {apiKey}' \

Response samples

Content type
application/json
[
  • {
    }
]

Get the current status of a BNPL Application

Used to request up-to-date information about an ongoing purchase

path Parameters
id
required
string

Application ID (can be either the OLM assigned ID or the "externalId" in the original request)

header Parameters
X-API-KEY
required
string

Responses

Request samples

curl --request GET \
--url 'https://bnpl.instacash.hu/api/bnpl/external/application/{id}' \
--header 'content-type: application/json; charset=UTF-8' \
--header 'X-API-KEY: {apiKey}' \

Response samples

Content type
application/json
{
  • "publicId": "string",
  • "customerId": "string",
  • "applicationId": 0,
  • "dealId": 0,
  • "purchaseId": 0,
  • "created": "2019-08-24T14:15:22Z",
  • "isPreScore": true,
  • "shoppingMode": "IN_STORE",
  • "status": "string",
  • "flowPosition": "string"
}

Get a listing of all BNPL Purchases

Get listing data on all purchases of the merchant

query Parameters
financier
string

The financier ID string, functions as an optional filter

header Parameters
X-API-KEY
required
string

Responses

Request samples

curl --request GET \
--url 'https://bnpl.instacash.hu/api/bnpl/external/purchase' \
--header 'content-type: application/json; charset=UTF-8' \
--header 'X-API-KEY: {apiKey}' \
--data financier={financierId}

Response samples

Content type
application/json
[
  • {
    }
]

Get data of specific Purchase

Get all data of the specific purchase

path Parameters
id
required
integer <int64>

Purchase ID

header Parameters
X-API-KEY
required
string

Responses

Request samples

curl --request GET \
--url 'https://bnpl.instacash.hu/api/bnpl/external/purchase/{id}' \
--header 'content-type: application/json; charset=UTF-8' \
--header 'X-API-KEY: {apiKey}' \

Response samples

Content type
application/json
{
  • "id": "string",
  • "dealId": 0,
  • "applicationId": 0,
  • "orderId": "string",
  • "checkoutId": "string",
  • "totalAmount": 0,
  • "prepaymentInvoiceId": "string",
  • "finalInvoiceId": "string",
  • "invoiceId": "string",
  • "items": [
    ]
}

Get a listing of all BNPL Deals

Get listing data on all deals of the merchant

query Parameters
financier
string

The financier ID string, functions as an optional filter

header Parameters
X-API-KEY
required
string

Responses

Request samples

curl --request GET \
--url 'https://bnpl.instacash.hu/api/bnpl/external/deal' \
--header 'content-type: application/json; charset=UTF-8' \
--header 'X-API-KEY: {apiKey}' \
--data financier={financierId}

Response samples

Content type
application/json
[
  • {
    }
]

Get data of Deal

Get all data of the specific deal

path Parameters
id
required
integer <int64>

Deal ID

header Parameters
X-API-KEY
required
string

Responses

Request samples

curl --request GET \
--url 'https://bnpl.instacash.hu/api/bnpl/external/deal/{id}' \
--header 'content-type: application/json; charset=UTF-8' \
--header 'X-API-KEY: {apiKey}' \

Response samples

Content type
application/json
{
  • "id": "string",
  • "applicationId": 0,
  • "financier": "string",
  • "purchaseId": 0,
  • "downPayment": 0,
  • "downPaymentValue": 0,
  • "serviceFee": 0,
  • "latenessThreshold": 0,
  • "commission": 0,
  • "status": "PREPARED",
  • "lastStatusChange": "2019-08-24T14:15:22Z",
  • "transactions": [
    ],
  • "billingAddress": {
    },
  • "shippingAddress": {
    }
}

Hook

Outward requests announcing state changes on BNPL applications and deals from InstaCash OLM

Called when a status update happens on a deal or application Webhook

THIS IS AN OUTGOING REQUEST NOT AN ENDPOINT The entire url of this call can (must) be configured for each merchant, no path or query is added, the "/configured-webhook-uri" will be replaced Ideally, the url should be absolute, ex.: "https://www.mici-shop.hu/instacash/bnpl-hook"

Request Body schema: application/json
object (ApplicationResponse)
object (DealResponse)
object (PurchaseResponse)

Responses

Request samples

Content type
application/json
{
  • "application": {
    },
  • "deal": {
    },
  • "purchase": {
    }
}

One Click API

The one-click payment option offers customers a seamless and secure way to complete their purchases in just one step. Once a payment method is saved, users can complete future transactions instantly with a single click. For added security, a unique SMS confirmation code is sent to the customer to verify their identity before processing the payment. This ensures a fast, user-friendly checkout experience while maintaining the highest level of security. Perfect for returning customers who value convenience and efficiency, this solution simplifies online shopping and reduces cart abandonment.

calculation

header Parameters
X-API-KEY
required
string
Request Body schema: application/json
offerId
required
integer <int64>

The target offer's id

totalAmount
required
number > 0

The full to-be-billed amount

customerPhone
required
string [ 0 .. 127 ] characters

The customer's phone number in the calling system

Responses

Request samples

Content type
application/json
{
  • "offerId": 0,
  • "totalAmount": 0,
  • "customerPhone": "string"
}

approve

header Parameters
X-API-KEY
required
string
Request Body schema: application/json
secondFactorId
required
string
code
required
string
publicId
required
string
nonce
required
string

Responses

Request samples

Content type
application/json
{
  • "secondFactorId": "string",
  • "code": "string",
  • "publicId": "string",
  • "nonce": "string"
}

createApplication

header Parameters
X-API-KEY
required
string
Request Body schema: application/json
offerId
required
integer <int64>

The target offer's id

totalAmount
required
number > 0

The full to-be-billed amount

customerPhone
required
string [ 0 .. 127 ] characters

The customer's phone number in the calling system

object (ShippingAddress)
orderId
required
string [ 0 .. 255 ] characters

ID of the order in the calling system.

required
Array of objects (OrderItemRequest)

Responses

Request samples

Content type
application/json
{
  • "offerId": 0,
  • "totalAmount": 0,
  • "customerPhone": "string",
  • "shippingAddress": {
    },
  • "orderId": "string",
  • "items": [
    ]
}