Skip to content
Bazzario

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.

bash
curl https://api.bazzario.app/v1/storefront/checkout-config \
  -H "Authorization: Bearer bzp_YOUR_KEY"
FieldContents
data, checkoutEnabledThe response is { "data": { … } }; checkoutEnabled is inside data
storeName, 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
codFeePayerWho 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, dispatchDaysDomestic free-shipping threshold; dispatch time
fxRatesEuros 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
rulesThe rules below

The `rules` block

  • cashPickupRequiresSelfPickup: true: cash on pickup only with self-pickup.
  • installmentsViaPaymentSession: true: installments cannot go through POST /orders; use POST /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.
  • minimumOrderAmount is checked against the subtotal before discount and delivery.
  • Free courier delivery applies from the lower of courierFreeFrom and freeShippingFrom, or when a cart line has isFreeShipping. It does not apply to flat_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.

Payment session
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.json

Providers 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.