---
# System prepended metadata

title: 金流中心
tags: [API document]

---


# 金流中心
###### tags:`API document`

Base URL： https://bboa14171205.nctu.me


三個陣營錢包帳戶
| id | camp | account | password | key | 
|----|---------|------|--|----------|---------|
|  1 | Sparta  | sparta@camp.com  | 123456 |116805404
|  2 | Athens  | athens@camp.com  | 123456 |1789113124| 
|  3 | Arcadia | arcadia@camp.com | 123456 |956275912 |
|  4 | Bank | admin@camp.com | 123456 |1109323643 |


# URL


## 店家：

| 功能 | URL | Method |
| -------- | -------- | -------- |
|  店家匯款    | /api/shop/transfer|post
|  店家查看紀錄    | /api/shop/watch|post
|  店家登出    | /api/shop/logout|post

## 一般使用者：

| 功能 | URL | Method |
| -------- | -------- | -------- 
 一般使用者註冊    | /api/user/register|post
|   一般使用者匯款    | /api/user/transfer|post
|   一般使用者存款    | /api/user/deposit|post
|   一般使用者查看紀錄    | /api/user/watch|post
|  一般使用者登出    | /api/user/login|post
|  一般使用者登出    | /api/user/logout|post

## 一般使用者註冊
####  Request
body欄位：
|欄位名稱  | 資料型態 |
| -------- | -------- |
| name    |  string   |
| account    | email   |
| password    |  string (長度6~12)   |
範例格式
```{
{"name":"user1","account":"user1@gmail.com","password:abc1234"}

```
#### Response


範例格式
```{
{
    "name": "user1",
    "account": "user1@gmail.com",
    "balance": 10000,
    "level": 1,
    "key": "W0jf648zJm9rki2",
    "updated_at": "2019-11-27 15:44:54",
    "created_at": "2019-11-27 15:44:54",
    "id": 2
}
```



## 匯款
####  Request

body欄位：
|欄位名稱  | 資料型態 |
| -------- | -------- |
| userID  | email(匯款人帳戶)   |
| key      | string (認證碼) |
| account  | email(收款人帳戶)   |
| amount   |  int   |
範例格式
```{
{"userID":"test@email.com","key":"akD23ijj4"
"account":"admin@email.com","amount":"700"}

```
#### Response


範例格式
```{
{
    "remittance": "test@email.com",
    "payee": "admin@email.com",
    "amount": "700",
    "charging": 210,
    "updated_at": "2019-11-27 15:49:11",
    "created_at": "2019-11-27 15:49:11",
    "id": 1
    "balance":2000,
}
```
## 存款
####  Request

body欄位：
|欄位名稱  | 資料型態 |
| -------- | -------- |
| userID  | email(匯款人帳戶)   |
| key      | string (認證碼) |
| amount   |  int   |
範例格式
```{
{"userID":"test@email.com","key":"akD23ijj4"
,"amount":"700"}

```
#### Response


範例格式
```{
{
    "account": "test@email.com",
    "deposit": "100",
    "withdraw": 0,
    "updated_at": "2019-11-27 13:50:29",
    "created_at": "2019-11-27 13:50:29",
    "id": 2,
    "balance": 10507
}
```
## 查看餘額&紀錄
####  Request
body欄位：
|欄位名稱  | 資料型態 |
| -------- | -------- |
| userID  | email(匯款人帳戶)   |
| key      | string (認證碼) |

範例格式
```{
{
    "userID":"arcadia@camp.com","key":"1661213801"
}

```
#### Response


範例格式
```{
{
    "success": true,
    "data": [
        {
            "id": 1,
            "remittance": "arcadia@camp.com",
            "payee": "sparta@camp.com",
            "amount": 0,
            "created_at": "2019-11-25 15:49:25",
            "updated_at": "2019-11-25 15:49:25"
        },
        {
            "id": 2,
            "remittance": "arcadia@email.com",
            "payee": "sparta@email.com",
            "amount": 0,
            "created_at": "2019-11-25 15:50:30",
            "updated_at": "2019-11-25 15:50:30"
        },
        {
            "id": 5,
            "remittance": "athens@email.com",
            "payee": "arcadia@email.com",
            "amount": 0,
            "created_at": "2019-11-25 15:51:51",
            "updated_at": "2019-11-25 15:51:51"
        },
        {
            "id": 6,
            "remittance": "arcadia@email.com",
            "payee": "sparta@email.com",
            "amount": 0,
            "created_at": "2019-11-26 00:52:29",
            "updated_at": "2019-11-26 00:52:29"
        },
        {
            "id": 7,
            "remittance": "arcadia@email.com",
            "payee": "sparta@email.com",
            "amount": 0,
            "created_at": "2019-11-26 00:53:18",
            "updated_at": "2019-11-26 00:53:18"
        }
    ],
    "message": {
        "camp": "arcadia",
        "balance": 10000,
        "level":1
    }
}
```


