CreditPurchaseRequest
Request to purchase credits
Properties
| Property | Type | Required | Description |
|---|---|---|---|
user_id | string | β Yes | - |
package_id | string | β Yes | - |
payment_method | string | β No | - |
Example
{
"user_id": "example",
"package_id": "example",
"payment_method": "example"
}Used In
Code Examples
TypeScript
interface CreditPurchaseRequest {
user_id: string;
package_id: string;
payment_method?: string;
}
// Usage example
const data: CreditPurchaseRequest = {
"user_id": "example",
"package_id": "example",
"payment_method": "example"
};Python
from data_layer.schemas import CreditPurchaseRequest
# Create instance
data = CreditPurchaseRequest(
# Add your field values here
)cURL
curl -X POST "https://altsportsleagues-backend-2qcdjegnaa-uc.a.run.app/api/endpoint" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{ "user_id": "example", "package_id": "example", "payment_method": "example" }'Validation Rules
Required Fields: user_id, package_id
Additional Information
- Type: object
- Source: Generated from Pydantic models in
data_layer/schemas/ - Auto-validated: All fields are validated by FastAPI
This documentation is auto-generated from the OpenAPI specification.