Skip to content

DemianParkhomenko/mono-openapi

Repository files navigation

Mono OpenAPI

Overview

This repository contains fully typed clients for Monobank APIs.

Currently supported APIs:

Installation

npm i mono-openapi

Examples

You can run examples with:

npm run build
npm run examples:personal
npm run examples:acquiring

const {
data,
response: { url, status },
} = await client.GET('/bank/currency');

const result = await client.POST('/api/merchant/invoice/create', {
body: {
amount: 100,
ccy: 840,
webHookUrl,
saveCardData: {
saveCard: true,
walletId: '6dd576d5-4798-4984-9bac-aae3d866a151',
merchantPaymInfo: {
// Can be custom id stored in your database
reference: 'example_of_custom_id',
},
},
},
});