https://github.com/rafaelmagalhaesguedes/pickpaybackendchallenge
PickPay Backend Challenge Simplified with Java and Spring Boot
https://github.com/rafaelmagalhaesguedes/pickpaybackendchallenge
java maven spring-boot
Last synced: 4 months ago
JSON representation
PickPay Backend Challenge Simplified with Java and Spring Boot
- Host: GitHub
- URL: https://github.com/rafaelmagalhaesguedes/pickpaybackendchallenge
- Owner: rafaelmagalhaesguedes
- Created: 2024-08-06T12:13:18.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-08-06T18:40:10.000Z (9 months ago)
- Last Synced: 2025-01-17T07:09:02.549Z (4 months ago)
- Topics: java, maven, spring-boot
- Language: Java
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PickPay Backend Challenge Simplified
![]()
![]()
Simplified PickPay is a Spring Boot application that provides RESTful APIs for user and transaction management. Users can create accounts, retrieve user details, and perform transactions.
## Setup Instructions
### 1. Clone the Repository
```
git clone https://github.com/yourusername/pickpaysimplificado.git
cd pickpaysimplificado
```### 2. Install dependencies with Maven
```
mvn install
```### 3. Start the application with Maven
The application will start on http://localhost:8080.
## Usage
### User Endpoints
- Create User: POST /users
- Request Body:
```
{
"firstName": "Jhon",
"lastName": "Doe",
"document": "06067296071",
"email": "[email protected]",
"password": "password",
"balance": 10,
"userType": "COMMON"
}
```
- Response:
```
{
"id": "4810a470-067b-40c8-9e3e-520128c6ed48",
"firstName": "Jhon",
"lastName": "Doe",
"document": "06067296071",
"balance": 10,
"email": "[email protected]",
"userType": "COMMON"
}
```- Create Transaction: POST /transaction
- Request Body:
```
{
"value": 10,
"senderId": "4810a470-067b-40c8-9e3e-520128c6ed48",
"receiverId": "b6f66166-9962-45b3-8714-e3ea5de5becf"
}
```
- Response:
```
{
"id": "9d9372c9-ee5c-4a68-bca5-6296923cc457",
"value": 10.00,
"sender": {
"id": "4810a470-067b-40c8-9e3e-520128c6ed48",
"firstName": "John",
"lastName": "Doe",
"document": "06067296071",
"email": "[email protected]",
"balance": 0.00,
"userType": "COMMON"
},
"receiver": {
"id": "b6f66166-9962-45b3-8714-e3ea5de5becf",
"firstName": "Jane",
"lastName": "Smith",
"document": "987654321",
"email": "[email protected]",
"balance": 20.00,
"userType": "MERCHANT"
},
"timestamp": "2024-08-06T12:50:49.434348234"
}
```