API Documentation

Introduction

Ezibucks system can integrate to another system via REST API.

The current main focus is to support basic SCI (Shopping Cart Integration) functionalities.

 

The Flow

The shopping cart integration flow is shown below:

 

 

The API Authorization

We are using Bearer Token to authorize the api call. You can generate your token from the member area.

When the token generated it will be automatically downloaded and you should save it to the safe place.

 

 

Calling the API

The current Ezibucks API base endpoint is https://ezibucks.com/api/v1

Every request to Ezibucks API need the following HTTP headers:

 

Authorization

Bearer{your token}

Accept

application/json

 

POST/invoice

Create new invoice.

Do a post request with the following required data:

 

currency

{usd / idr}

desc

{description of the invoice}

amount

{amount of the invoice, should be numeric}

 

When success it will return the invoice data, for example:

{

   "type": "invoice",

   "currency": "usd",

   "user_id": 1,

   "desc": "Wooden Chair X38",

   "status": "unpaid",

   "total_amount": 52.5,

   "updated_at": "2018-08-27 13:55:37",

   "created_at": "2018-08-27 13:55:37",

   "id": 94

}

You can save that data to your system and redirect your user to the Ezibucks invoice payment page. The URL scheme is:

https://ezibucks.com/pay/{invoice id}

Example of payment page:

If the user is not logged in to Ezibucks they need to log in first.

When the payment successful user will be redirected back to your system.

 

GET/invoice/{invoice id}

When user get back to your system you can check the status of the invoice by calling this endpoint.