The BalanceBowl project contract assigned to NESA by Makers
#APIS Cards
Where full URLs are provided in responses they will be rendered as if service is running on 'http://testserver/'.
Closed endpoints requre authorization header
- card :
GET /api/card/
- addToCards :
POST /api/card/addToCards
Get a list of all the cards arranged according to their card type
URL : /api/cards/
Method : GET
Auth required : YES
Data constraints
None
Data example
None
Code : 200 OK
Content example
[
{
cardType:[card type mastercard||visa],
cards:[
{
cvc:[cvc number],
exp:[expiration date of card],
cardNumber:[card number]
}
]
}
]
Code : 400 BAD REQUEST
Content :
[
{
cardType:[card type mastercard||visa],
cards:[
{
cvc:string,
exp:string,
cardNumber:string
},
{
cvc:string,
exp:string,
cardNumber:string
},
{
cvc:string,
exp:string,
cardNumber:string
}
]
}
]
Adds a card to the database with the user table charge the card like 5 naira to check if the card works,paystack has something called auth_code thats what we save not card details
URL : /api/card/addtocard
Method : POST
Auth required : YES
Data constraints
{
cardNumber:[card number],
cardCVC:[cvc number],
exp:[exp date]
}
Data example
{
cardNumber:string,
cardCVC:string,
exp:'sting
}
Code : 200 OK
Content example
{
status:true
}
Code : 400 BAD REQUEST
Content :
{
"status": false,
"error": "error message"
}