
This is a benefit card API. The API is responsible for creating, reloading, activating, as well as processing all purchases of the card.

# Clone this repoository
$ git clone https://github.com/thalesgomest/valex-back.git
# Change to project directory
$ cd valex-back
# Install all dependencies
$ npm install
# Run the project with
$ npm run dev
Route to create a new card
Headers |
Type |
Description |
x-api-key |
string |
adKLNx.DzvOVjQH01TumGl2urPjPQSxUbf67vs0 |
Body |
Type |
Description |
employeeId |
number |
Required → employee Id |
cardType |
enum |
Required → Transaction Type |
TransactionTypes |
groceries |
restaurant |
transport |
education |
health |
{
"number": "4747 7552 7052 6823",
"cardholderName": "CICLANA M MADEIRA",
"expirationDate": "07/27",
"securityCode": "398"
}
❗ Use the response data of the route /card/create for test the below endpoints ⤵️
Route to active a card
Body |
Type |
Description |
number |
string |
Required → card number |
cardholderName |
string |
Required → cardholder name |
expirationDate |
string |
Required → card expiration date |
securityCode |
string |
Required → card securityCode |
password |
string |
Required → card password |
Route to block a card
Body |
Type |
Description |
number |
string |
Required → card number |
cardholderName |
string |
Required → cardholder name |
expirationDate |
string |
Required → card expiration date |
password |
string |
Required → card password |
Route to unblock a card
Body |
Type |
Description |
number |
string |
Required → card number |
cardholderName |
string |
Required → cardholder name |
expirationDate |
string |
Required → card expiration date |
password |
string |
Required → card password |
Route to get card's statement
Body |
Type |
Description |
number |
string |
Required → card number |
cardholderName |
string |
Required → cardholder name |
expirationDate |
string |
Required → card expiration date |
Route to get do a card recharge
Headers |
Type |
Description |
x-api-key |
string |
adKLNx.DzvOVjQH01TumGl2urPjPQSxUbf67vs0 |
Body |
Type |
Description |
number |
string |
Required → card number |
cardholderName |
string |
Required → cardholder name |
expirationDate |
string |
Required → card expiration date |
amount |
number |
Required → recharge amount |
Route to do a payment with a card in a POS (Point of Sale)
POST /card/payment/:businessId
Body |
Type |
Description |
number |
string |
Required → card number |
cardholderName |
string |
Required → cardholder name |
expirationDate |
string |
Required → card expiration date |
password |
string |
Required → card password |
amount |
number |
Required → payment amount |

