Skip to main content

Enbank - cURL example docs

Read on how the payment flow works first and the OpenAPI docs. Then look at the example code bellow.

Enbank Integration Documentation

rootPath="https://enbank-server-local.fly.dev"
curl -X 'POST' \
"$rootPath/transactions/new" \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"amount": 0,
"token": "###PRIVATE_TOKEN###",
"description": "My Enbank transaction",
"currency": "BGN"
"successCallback": "https://...",
"errorCallback": "https://...",
"flags": {
}
}'

This is the bare minimum to make a new transaction. As a response you will receive a JSON object with a trasactionId

You can use the transactionId in order to create checkout link.

$rootPath/checkout/$transactionId

Or put the transaction id in our web component:

<script src="http://pay.enbank.me/enbank-pay.min.js"></script>
<enbank-pay transactionId="$transactionId"></enbank-pay>