Checkout settings: payment and delivery methods
How a custom site reads available payment and delivery methods and rules from `checkout-config`.
Do not hard-code payment and delivery methods: the merchant configures them in the dashboard. GET /v1/storefront/checkout-config returns an already filtered list with an available flag.
curl https://api.bazzario.app/v1/storefront/checkout-config \
-H "Authorization: Bearer bzp_YOUR_KEY"| Field | Contents |
|---|---|
data, checkoutEnabled | The response is { "data": { … } }; checkoutEnabled is inside data |
store | Name, logo, currency, storeCountry, timezone, primaryLocale, contentLocales, public contacts and legal details |
paymentMethods[] | { method, available }: cod, card, cash-pickup, installments, iban. available already accounts for the store currency and connected providers |
installmentProviders[] | Installment providers |
codFeePayer | Who pays the COD fee |
paymentProviders[] | Card providers enabled for the store currency |
deliveryMethods[] | { method, available }: carrier (providers[]), courier (area, time, flatFee, freeFrom), self_pickup (pickupPoints[]), flat_rate (zones[]) |
freeShippingFrom, dispatchDays | Domestic free-shipping threshold; dispatch time |
fxRates | Euros per one unit of each currency (EUR: 1 included), for the store currency and the currencies of the shipping zone countries; only when the store shows an approximate price in local currency |
rules | The rules below |
The `rules` block
cashPickupRequiresSelfPickup: true: cash on pickup only with self-pickup.installmentsViaPaymentSession: true: installments cannot go throughPOST /orders; usePOST /payment-sessions.codAndCashPickupDomesticOnly: true: COD and cash on pickup only when the shipping country is the store’s home country.installmentsRequireUaPhone: true: Ukrainian installment providers need a Ukrainian phone.minimumOrderAmountis checked against the subtotal before discount and delivery.- Free courier delivery applies from the lower of
courierFreeFromandfreeShippingFrom, or when a cart line hasisFreeShipping. It does not apply toflat_rate.
Carriers and prices
Carrier prices are not in the configuration. List the carriers with GET /v1/storefront/delivery/providers, look up addresses with /v1/storefront/delivery/:provider/{localities,pickup-points,streets} and get the price with POST /v1/storefront/delivery/:provider/quote. :provider is a carrier id from the providers list. flat_rate needs no quote: the price is the zone fee.
Card and installments
For card and installments the order is created after a successful payment: POST /v1/storefront/payment-sessions returns the payment page URL and the order appears once the provider confirms. Use POST /v1/storefront/orders for every other method.
curl -X POST https://api.bazzario.app/v1/storefront/payment-sessions \
-H "Authorization: Bearer bzp_YOUR_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d @checkout.jsonProviders with an inline widget (halyk_epay, wayforpay) also return widgetParams (string map). For halyk_epay load widgetParams.scriptUrl, then call halyk.pay({ ...JSON.parse(widgetParams.paymentObject), auth: JSON.parse(widgetParams.auth) }). For wayforpay pass widgetParams to new Wayforpay().run(...). The widget redirects to the return page itself; poll the order by invoiceId meanwhile. Without widgetParams, redirect to checkoutUrl.