Create Payment Intent​
POST
/bridge-payment/payments/intents
Create a new payment intent with intelligent pricing calculation. Supports both authenticated users and guest checkout. The system automatically calculates missing pricing fields (subtotal, tax, discount, total) based on provided values.
Authorizations​
SessionAuth
Session ID from Flowless authentication
TypeAPI Key (header: X-Session-ID)
or
GuestToken
Guest token for anonymous checkout
TypeAPI Key (query: token)
or
Request Body​
application/json
JSON
{
"subtotal_cents": 5000,
"tax_cents": 500,
"discount_cents": 0,
"total_cents": 5500,
"currency": "USD",
"concept": "Product Purchase",
"description": "Purchase of premium subscription",
"provider_id": "stripe",
"payment_method_id": "pm_1234567890",
"return_url": "https://example.com/payment/success",
"metadata": {
"additionalProperties": "string"
},
"guest_data": {
"name": "John Doe",
"phone": "+1234567890"
},
"reference_code": "donation_general",
"category": "donation",
"tags": "recurring,premium"
}
Responses​
Payment intent created successfully
application/json
JSON
{
"success": true,
"data": {
"id": "pay_1234567890",
"client_secret": "pi_xxx_secret_yyy",
"amount_cents": 5500,
"currency": "USD",
"status": "requires_payment_method",
"provider_id": "stripe",
"created_at": "string"
}
}