125 lines
3.0 KiB
Plaintext
125 lines
3.0 KiB
Plaintext
|
|
MISSING APIs - TO BE IMPLEMENTED BY BACKEND
|
||
|
|
==============================================
|
||
|
|
|
||
|
|
Get User Balance
|
||
|
|
----------------
|
||
|
|
Get the current balance of the authenticated user.
|
||
|
|
Protocol: https
|
||
|
|
Root Path: api.Fastcheck.store
|
||
|
|
Type: GET
|
||
|
|
Path: /balance
|
||
|
|
HEADER: Authorization - {"sessionID": "1AF3781BF6B94604B771AEA1D44FA63A"}
|
||
|
|
Request Parameters:
|
||
|
|
{
|
||
|
|
}
|
||
|
|
Response (200-OK):
|
||
|
|
{
|
||
|
|
"balance": 150000,
|
||
|
|
"currency": "RUB"
|
||
|
|
}
|
||
|
|
Response (401-ERROR):
|
||
|
|
{
|
||
|
|
"message": "not authorized"
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
Get Active FastChecks
|
||
|
|
---------------------
|
||
|
|
Get all active (unused) FastChecks created by the current user.
|
||
|
|
Protocol: https
|
||
|
|
Root Path: api.Fastcheck.store
|
||
|
|
Type: GET
|
||
|
|
Path: /fastcheck/active
|
||
|
|
HEADER: Authorization - {"sessionID": "1AF3781BF6B94604B771AEA1D44FA63A"}
|
||
|
|
Request Parameters:
|
||
|
|
{
|
||
|
|
}
|
||
|
|
Response (200-OK):
|
||
|
|
{
|
||
|
|
"checks": [
|
||
|
|
{
|
||
|
|
"fastcheck": "1234-5678-0001",
|
||
|
|
"amount": 15000,
|
||
|
|
"currency": "RUB",
|
||
|
|
"code": "5864",
|
||
|
|
"createdAt": "2026-01-19T09:08:18Z",
|
||
|
|
"expiration": "2026-01-26T09:08:18Z",
|
||
|
|
"status": "active"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"fastcheck": "1234-5678-0002",
|
||
|
|
"amount": 25000,
|
||
|
|
"currency": "RUB",
|
||
|
|
"code": "1234",
|
||
|
|
"createdAt": "2026-01-19T10:15:30Z",
|
||
|
|
"expiration": "2026-01-26T10:15:30Z",
|
||
|
|
"status": "active"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
Response (401-ERROR):
|
||
|
|
{
|
||
|
|
"message": "not authorized"
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
Get FastCheck History
|
||
|
|
---------------------
|
||
|
|
Get all used/expired FastChecks (both created and accepted by user).
|
||
|
|
Protocol: https
|
||
|
|
Root Path: api.Fastcheck.store
|
||
|
|
Type: GET
|
||
|
|
Path: /fastcheck/history
|
||
|
|
HEADER: Authorization - {"sessionID": "1AF3781BF6B94604B771AEA1D44FA63A"}
|
||
|
|
Request Parameters:
|
||
|
|
{
|
||
|
|
}
|
||
|
|
Response (200-OK):
|
||
|
|
{
|
||
|
|
"checks": [
|
||
|
|
{
|
||
|
|
"fastcheck": "1234-5678-0003",
|
||
|
|
"amount": 5000,
|
||
|
|
"currency": "RUB",
|
||
|
|
"type": "created",
|
||
|
|
"createdAt": "2026-01-15T09:08:18Z",
|
||
|
|
"usedAt": "2026-01-15T10:20:00Z",
|
||
|
|
"status": "used"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"fastcheck": "9876-5432-0100",
|
||
|
|
"amount": 10000,
|
||
|
|
"currency": "RUB",
|
||
|
|
"type": "accepted",
|
||
|
|
"acceptedAt": "2026-01-14T14:30:00Z",
|
||
|
|
"status": "used"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
Response (401-ERROR):
|
||
|
|
{
|
||
|
|
"message": "not authorized"
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
Bank Top-Up Integration (To be provided by bank)
|
||
|
|
-------------------------------------------------
|
||
|
|
WHAT WE NEED FROM BANK:
|
||
|
|
1. Payment page URL or API endpoint to initialize payment
|
||
|
|
2. Required parameters:
|
||
|
|
- Amount
|
||
|
|
- Currency
|
||
|
|
- Return URL (redirect after payment)
|
||
|
|
- Callback URL (for payment confirmation webhook)
|
||
|
|
3. Payment confirmation webhook format
|
||
|
|
4. Transaction ID for tracking
|
||
|
|
|
||
|
|
EXPECTED FLOW:
|
||
|
|
1. User clicks "Top Up Balance"
|
||
|
|
2. Frontend redirects to bank payment page (or opens popup)
|
||
|
|
3. User completes card payment on bank side
|
||
|
|
4. Bank sends webhook to backend with payment confirmation
|
||
|
|
5. Backend updates user balance
|
||
|
|
6. Bank redirects user back to our app
|
||
|
|
7. Frontend refreshes balance
|