Hosted checkout
Every payment has a hosted checkout page at https://pay.codeappear.com/pay/{reference}
(returned as checkout_url when you create the payment). The page walks your
customer through the payment in Bangla and English:
- The customer picks a provider (bKash / Nagad / Rocket / Upay) from your active MFS accounts.
- They see your number, the exact amount due (which may include a small gateway charge), and step-by-step Send Money instructions.
- After sending the money, they enter the TrxID from their confirmation SMS and the number they sent from.
- The page polls while Fastaar matches the SMS forwarded by your paired phone — usually under a minute — then shows the result.
amount vs amount_due
amount is the price you set. amount_due is what the customer
must actually send — it equals amount plus any cash-out charge configured on
the selected payment method (a fixed or percentage fee to cover the provider's cash-out cost).
The checkout page always shows amount_due.
Integration tips
- Redirect to
checkout_urlright after creating the payment; the link is single-use and expires. - Pass
success_urlandcancel_urlto send the customer back to your site when they finish or cancel. Fastaar appendspayment_idandinvoice_numberto the URL. invoice_numberis required — your order reference, echoed back in the API response, webhooks, and the success redirect. Usemetadatafor any extra key/values.invoice_numberis idempotent: retrying with the same value while the previous payment is still active is rejected with409 duplicate_invoice_numberinstead of creating a duplicate. Look the existing payment up withGET https://pay.codeappear.com/api/v1/payments?invoice_number=…rather than retrying blindly.- Add per-account instructions (e.g. "Use reference: shop") under MFS Accounts — they appear on the checkout page.
- The success redirect is for UX only — confirm orders from the
payment.completedwebhook, which is the source of truth.
Checkout domain
By default checkout_url, payment link, and invoice URLs are served on Fastaar's
own domain. Under Developer → Domains in the merchant panel you can
point a subdomain you own — e.g. pay.yourshop.com — at Fastaar, so customers pay
on your own domain instead. How many domains you can register depends on your plan's
Domain Limit.
- Pick a subdomain you own for checkout, e.g.
pay.yourshop.com— don't use your root domain. - In your DNS settings, add a CNAME record pointing that subdomain at the target host shown on the Domains page in the merchant panel.
- Wait for DNS to propagate — this can take a few minutes up to a few hours depending on your registrar.
- Add the domain in the merchant panel, then click Verify. Fastaar checks the CNAME automatically and marks the domain verified once it resolves correctly.
Once verified, checkout_url for new payments, payment links, and invoices under
that merchant automatically use the domain. Existing/already-generated URLs are not
rewritten. TLS for the domain is handled at the infrastructure level (reverse proxy)
— this only covers domain ownership verification and URL generation.