Quickstart
Create an order from your CRM, open hosted checkout, and confirm the payment.
Create an order
From your CRM server, POST to http://127.0.0.1:43120/v1/orders. Authenticate every call with . Amounts are decimal strings. payer_id is your user id so the portal can group activity on Customers.
bash
curl -X POST "http://127.0.0.1:43120/v1/orders" \
-H "Authorization: Bearer pk_..." \
-H "Content-Type: application/json" \
-d '{
"order_id": "ord_001",
"order_amount": "50.00",
"order_currency": "USD",
"payer_id": "user_1001"
}'The same order_id for your merchant returns the existing order. Persist and open . A new order is HTTP 201 with envelope code 00000.
Open checkout
Open a blank 400×720 popup in the click handler before any await, then navigate to the checkout URL. Browsers ignore window size if window.open runs after a network call.
html
<script src="http://127.0.0.1:43123/merchant-popup.js"></script>
<script>
button.addEventListener("click", async () => {
const checkout = GatewayCheckout.begin({
onPaid() {},
onCancelled() {},
});
const { data } = await createOrderOnYourBackend();
checkout.go(data.checkout_url);
});
</script>Confirm
- Handle the webhook and return the plain text body
success. See Webhooks. - Or poll POST /v1/orders/info with
cidororder_id. Treatpaidandpaid_overas settled for fulfillment.
Next
- Credentials — keys, Base URL, webhook secret.
- Checkout popup — branding, timeout, helper.
- Authentication — Bearer vs portal cookie.
- Withdrawals — pay customers from available USD.
- Create Order — full request fields.