Create checkout session (server-side)

This page calls a local endpoint that runs python3 merchant-demo/create_checkout_session.py and returns a chk_... session token. The hosted checkout itself uses only the session endpoints.

Also available: Create payout (client withdrawal)

The merchant server runs checkout_flow.md §4: POST /api/v1/orders with amount_usd only (no corridor on create), then POST /api/v1/checkout/sessions. The payer chooses country and method in hosted checkout via POST …/select.

Notes:
  • USD invoice: order create sends only amount_usd and client_order_id; corridor is set in checkout with POST …/select (Steps 3–5 in checkout_flow.md §4).
  • Optional GET …/fx-quote before select when the order has amount_usd.
  • Your merchant key and optional PAYXEA_SUCCESS_URL / PAYXEA_CANCEL_URL / PAYXEA_ERROR_URL are read from payxea_customer/.env by the server script and sent only on POST /api/v1/orders/; they are not exposed to the checkout page.
Ready.