TuxoPay Docs
APIPayment flows

Initiate payment with flow

Initiate a payment using a configured payment flow with customer data and custom redirect URLs

POST
/payment-flows/initiate

Authorization

Authorization<token>

Enter token in format (Bearer )

In: header

Request Body

application/jsonRequired
flow_name
Required
string
amount
Required
number
Format: "float"
currency
Required
string
Maximum length: 3
descriptionstring
return_urlstring
Format: "url"
webhook_endpointstring
Format: "url"
cancel_urlstring
Format: "url"
first_visit_redirect_urlstring
Format: "url"
subsequent_visit_redirect_urlstring
Format: "url"
customerobject
itemsarray<object>
metadataobject
curl -X POST "https://orchestrator.tuxopay.com/api/payment-flows/initiate" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "flow_name": "default_blackpay",
    "amount": 49.99,
    "currency": "USD",
    "description": "Premium subscription",
    "return_url": "https://mystore.com/payment/success",
    "webhook_endpoint": "https://mystore.com/payment/webhook",
    "cancel_url": "https://mystore.com/payment/cancel",
    "first_visit_redirect_url": "https://mystore.com/welcome-new-customer",
    "subsequent_visit_redirect_url": "https://mystore.com/customer-dashboard",
    "customer": {
      "email": "[email protected]",
      "phone": "+1-555-123-4567",
      "first_name": "John",
      "last_name": "Doe",
      "address": "123 Main Street, Apt 4B",
      "city": "New York",
      "region": "NY",
      "postal_code": "10001",
      "country_code": "US"
    },
    "items": [
      {
        "name": "Premium Subscription",
        "price": 49.99,
        "quantity": 1,
        "description": "Monthly premium plan"
      }
    ],
    "metadata": {
      "order_id": "ORD-2025-001"
    }
  }'

Payment initiated successfully

{
  "success": true,
  "data": {
    "flow_result": {},
    "payment_result": {
      "success": true,
      "payment_id": 123,
      "redirect_url": "string",
      "payment_session_id": "abc123def456",
      "expires_at": "2019-08-24T14:15:22Z",
      "provider": "blackpay"
    },
    "attempts": 1
  }
}