Skip to main content

Documentation Index

Fetch the complete documentation index at: https://api.docs.onlydrams.app/llms.txt

Use this file to discover all available pages before exploring further.

Creates a Stripe payment intent for purchasing giveaway tickets. Returns a client secret that can be used with the Stripe SDK to complete the payment.

Endpoint

GET /api/v1/payment-sheet

Parameters

quantity
integer
required
The number of tickets to purchase. Must be at least 1.
curl -X GET https://api.onlydrams.app/api/v1/payment-sheet?quantity=5 \
  -H "Authorization: Bearer $ACCESS_TOKEN"
{
  "client_secret": "pi_3OqX8X2eZvKYlo2C1gQJ8X8X_secret_abc123def456ghi789"
}

Error Responses

null
{
  "error": "Quantity parameter is required"
}
{
  "error": "Invalid quantity"
}

Notes

  • The 418 status code is returned when quantity is less than 1
  • The client secret should be used with the Stripe SDK to complete the payment
  • Payment intents are created with automatic payment methods enabled
  • The user’s Stripe customer ID is automatically associated with the payment intent
  • Metadata includes the user ID and quantity for tracking purposes