New API Doc


OVERVIEW

Introduction
Welcome to Digiroin! Here you’ll find comprehensive information for integrating with our API endpoints. We’ve tried to make this documentation developer-friendly, but if you have any questions, please head to our Help Center. 
PRODUCTS                     ENDPOINT  
Giro Account POST /api/giro
Balance GET /api/balance/:giroAccount
Transfer Giro to Giro POST /api/transfer
Transaction GET /api/tx/:tx
Transactions GET /api/trx/:giroAccount
                              . . .
Access Token
To gain access to the Digiroin API endpoints, please create a new token. Once you’ve created new token, you can easily access all provided API endpoints.
GET /api/newToken/:phoneNumber
PATH                         REQUIRED?             DESCRIPTION
Phone number Yes
Response codes
CODE                         DESCRIPTION
201 Created/Success
409 Conflict/Phone already registered
                              . . .
API Protocols
The Digiroin API uses GET, POST requests to communicate and HTTP response codes to indicate status and errors. All responses come in standard JSON. The Digiroin API is served over HTTPS TLS v1.1+ to ensure data privacy. All requests must include a Content-Type of application/json and Authorization of Basic Base64(phoneNumber:token) on its header. For POST requests the body must be valid JSON.
                              . . .
API Host
https://wallet.digiro.in (Production)
                             . . .
Error Overview
We use standard HTTP response codes for success and failure notifications, and our errors are further classified by message. In general, 200 HTTP codes correspond to success, 40X codes are for developer- or user-related failures, and 50X codes are for Digiroin-related issues. We’re always working hard to minimize API errors related to Digiroin integrations.

PRODUCTS

Giro Account
The POST /api/giro endpoint allows developers to create new giro account as many customers as they serve (Enterprise). For early startups / one man show developer can create up to 50 giro accounts and able to hold fund maximum 5 Million IDR in total, or 100k per giro account.
Create new giro account
POST /api/giro
FIELD                        REQUIRED?             DESCRIPTION
phone Yes
Response codes
CODE                         DESCRIPTION
201 Created/Success
409 Conflict/Phone already registered
401 Forbidden
After successfully creating new account you can fund to that giro account using all available banking transactions ATMs/Mobile banking etc. The giro account is also dedicated VA number for your customers/users. For now Digiroin only support CIMB Niaga & Permata VA. Other banks will be integrated soon.
BANK                       CODE                  
CIMB Niaga 9989
Permata Bank 8751
Your VA is CODE + Giro account (ex: 99892200300003 is CIMB Niaga VA number for giro account 2200300003)
                             . . .
Balance
The GET /api/balance endpoint returns the real-time balance for an giro account.
Retrieve Balance request
GET /api/balance/220030003
PATH                         REQUIRED?            DESCRIPTION
Giro account Yes
Response codes
CODE                         DESCRIPTION
200 Success
401 Forbidden
                            . . .
Transfer Giro to Giro
The POST /api/transfer endpoint allows developers to move fund from an giro account to another. 
Make Transfer request
POST /api/transfer
FIELD                        REQUIRED?           DESCRIPTION
from Yes Giro account
to Yes Giro account
amount Yes Number
external_id No External ref id
Response codes
CODE                         DESCRIPTION
201 Success
400 Bad request
401 Forbidden
                            . . .
Transaction
The GET /api/tx/:tx endpoint allows developers to receive details of giro account transaction data by using transaction id.
Retrieve Transactions request
GET /api/tx/:tx
PATH                         REQUIRED?            DESCRIPTION
tx / transaction id Yes
Response codes
CODE                         DESCRIPTION
200 Success
401 Forbidden
                           . . .
Transactions
The GET /api/trx/:giroAccount endpoint allows developers to receive details of giro account transactions data.
Retrieve Transactions request
GET /api/trx/:giroAccount
PATH                         REQUIRED?           DESCRIPTION
giro account Yes
Response codes
CODE                         DESCRIPTION
200 Success
401 Forbidden