Automated Action f2b2889ea1 Implement complete Stripe payment integration service
- Created FastAPI application with Stripe payment processing
- Added payment intent creation, retrieval, and webhook handling
- Implemented SQLite database with payments and payment_methods tables
- Set up Alembic for database migrations
- Added comprehensive API endpoints for payment management
- Configured CORS middleware for cross-origin requests
- Added health check and service information endpoints
- Created complete project documentation with setup instructions
- Integrated Ruff for code formatting and linting
2025-06-20 12:23:34 +00:00

163 lines
3.9 KiB
JSON

{
"openapi": "3.1.0",
"info": {
"title": "Stripe Payment Integration Service",
"description": "A FastAPI service for handling Stripe payments",
"version": "1.0.0"
},
"paths": {
"/": {
"get": {
"summary": "Root",
"operationId": "root__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/health": {
"get": {
"summary": "Health Check",
"operationId": "health_check_health_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/api/v1/payments/create-payment-intent": {
"post": {
"tags": ["payments"],
"summary": "Create Payment Intent",
"operationId": "create_payment_intent_api_v1_payments_create_payment_intent_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreatePaymentIntentRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaymentIntentResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"CreatePaymentIntentRequest": {
"properties": {
"amount": {
"type": "integer",
"title": "Amount"
},
"currency": {
"type": "string",
"title": "Currency",
"default": "usd"
},
"customer_email": {
"anyOf": [
{
"type": "string",
"format": "email"
},
{
"type": "null"
}
],
"title": "Customer Email"
},
"customer_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Customer Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"metadata": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"title": "Metadata"
}
},
"type": "object",
"required": ["amount"],
"title": "CreatePaymentIntentRequest"
},
"PaymentIntentResponse": {
"properties": {
"client_secret": {
"type": "string",
"title": "Client Secret"
},
"payment_intent_id": {
"type": "string",
"title": "Payment Intent Id"
},
"amount": {
"type": "integer",
"title": "Amount"
},
"currency": {
"type": "string",
"title": "Currency"
},
"status": {
"type": "string",
"title": "Status"
}
},
"type": "object",
"required": ["client_secret", "payment_intent_id", "amount", "currency", "status"],
"title": "PaymentIntentResponse"
}
}
}
}