Documentations

Membuat Akses Token Baru

Endpoint ini digunakan untuk membuat akses token baru. Token ini digunakan sebagai password dan username adalah nomor hp yang didaftarkan.
Request:
Method: GET
Authentication: No
Endpoint: https://wallet.digiro.in/api/newToken/:phone
                
============================================================
Responses:
Code: 201
Description: Success / OK
Response body:
{
    "message": ok
    "status": 201,
}
                
============================================================
Code: 400
Description: Bad Request
Response body:
{
    "status": 400,
    "timestamp": 157616251,
    "result": "<error message>"
}
                
============================================================
Code: 500
Description: Internal Server Error
Response body:
{
    "status": 500,
    "timestamp": 157616251,
    "result": "Can't generate API access token"
}
                

Pembuatan VA

Endpoint ini digunakan untuk pembuatan VA baru.
Request:
Method: POST
Authentication: HTTP Auth
Endpoint: https://wallet.digiro.in/api/giro
Req body:
{
    "phone": "62xxxxxxxxxx"
}
                
============================================================
Responses:
Code: 201
Description: Success / OK
Response body:
{
    "devid": "33XXXX",
    "message": "0x3F351dA40F10F689EF3fE46f414aA2C633XXXXXX:220030XXXX",
    "status": 201,
}
                
============================================================
Code: 400
Description: Bad Request
Response body:
{
    "status": 400,
    "timestamp": 157616251,
    "result": "<error message>"
}
                
============================================================
Code: 401
Description: Unauthorized
Response body:
{
    "status": 401,
    "timestamp": 157616251
}
                
============================================================
Code: 409
Description: Conflict
Response body:
{
    "status": 409,
    "timestamp": "Phone number already registered"
}
                
============================================================
Code: 500
Description: Internal Server Error
Response body:
{
    "status": 500,
    "timestamp": "<error message>"
}
                

Get Balance

Endpoint ini digunakan untuk pengecekan saldo.
Request:
Method: GET
Authentication: HTTP Auth
Endpoint: https://wallet.digiro.in/balance/:akun
                
============================================================
Responses:
Code: 200
Description: Success / OK
Response body:
{
    "result": "1000000"
    "status": 200,
    "timestamp": 1545881553
}
                
============================================================
Code: 401
Description: Unauthorized
Response body:
{
    "status": 401
}
                
============================================================
Code: 403
Description: Forbidden
Response body:
{
    "status": 403
}
                
============================================================
Code: 404
Description: Not Found
Response body:
{
    "status": 404
}
                
============================================================

Transfer

Endpoint ini digunakan untuk melakukan transfer dana.
Request:
Method: POST
Authentication: HTTP Auth
Endpoint: https://wallet.digiro.in/api/transfer
Reqbody:
{
    "from":"220030XXXX",
    "to":"220030XXXX",
    "amount": 100000,
    "external_id":""
}
                
============================================================
Responses:
Code: 200
Description: Success / OK
Response body:
{
    "devid": "33XXXX",
    "status": 200,
    "trx_id": "0x7c154b2b056a4b6bf117451171873ac6b04f14939eeeff5a78bb7dXXXXXXXXXX",
    "status": "PENDING",
}
                
============================================================
Code: 400
Description: Bad Request
Response body:
{
    "status": 400,
    "timestamp": 157616251,
    "message": "<error message>",
}
                
============================================================
Code: 401
Description: Forbidden
Response body:
{
    "status": 401,
    "timestamp": 157616251,
    "message": "<error message>",
}
                
============================================================
Code: 404
Description: Not Found
Response body:
{
    "status": 404,
    "timestamp": 157616251,
    "message": "<error message>",
}
                
============================================================

Get Transactions From Account

Endpoint ini digunakan untuk pengecekan history transaksi dari sebuah akun.
Request:
Method: GET
Authentication: HTTP Auth
Endpoint: https://wallet.digiro.in/api/trx/:akun
                
============================================================
Responses:
Code: 200
Description: Success / OK
Response body:
{
    "result": [
        {
            "request": {
                "amount": 1000000,
                "from_address": "0x4F0678471EA4b5ac8F2996aD780aDa07CaXXXXX",
                "from_giro": "220030XXXX",
                "to_address": "0x9C841AbB0F08f8cbCc1Df07296F3826C5bXXXXXX",
                "to_giro": "220030XXXX",
                "type": "transfer"
            },
            "status": 200,
            "timestamp": 1547623040,
            "tx": "0xf35c32af58bee5fd2302adb5501e21538d2e724dbe578c8519bd012a29XXXXXX"
        }    
    ],
    "status": 200
}

                
============================================================
Code: 401
Description: Unauthorized
Response body:
{
    "status": 401
}
                
============================================================
Code: 403
Description: Forbidden
Response body:
{
    "status": 403
}
                
============================================================
Code: 404
Description: Not Found
Response body:
{
    "status": 404
}
                
============================================================

Stat

Endpoint ini digunakan untuk melihat jumlah akun yang telah terdaftar.
Request:
Method: GET
Authentication: HTTP Auth
Endpoint: https://wallet.digiro.in/stat
                
============================================================
Responses:
Code: 200
Description: Success / OK
Response body:
{
    "app": "dev_token",
    "code": 200,
    "timestamp": 1545881226,
    "uptime": "4:2:58",
    "version": "1.0.0"
}
                
============================================================
Code: 401
Description: Bad Request
Response body:
{
    "status": 401,
    "timestamp": 157616251,
    "message": "<error message>",
}