BechinBerim Partner API
Integrate our full travel catalogue — flights, hotels, tours, residence, visa and travel products (pocket WiFi, SIMs) — into your own platform, and pay for everything from a single credit wallet you hold with us.
Available Services v1
One API key, one credit wallet, all services. Create an order through any service below, then settle it from your partner credit — no per-transaction gateway needed.
Flights
Search, revalidate, book and issue tickets for domestic and international flights.
Hotels
Search availability, check live rates, book and cancel domestic & international hotels.
Travel Products
Pocket WiFi modems, SIM cards and accessories delivered to the traveller.
Tours
Browse tour packages, prebook and finalize with passenger details.
Residence
Villa & residence reservations with modify / cancel workflows.
Visa
Visa product catalogue and application requests.
Authentication
Every request is authenticated with your two partner credentials, sent as HTTP headers. There is no OAuth or bearer token — just your key and secret on each call over HTTPS.
application/jsonHow Billing Works
You hold a credit wallet with us. It has a prepaid balance plus a credit_limit we grant you — so your spendable amount is available = balance + credit_limit, and the balance may go negative down to -credit_limit. Every service purchase is settled against this wallet.
POST /api/products/checkout/, POST /api/hotel/order/, POST /api/flights/air_booking/). The order is created in pending state and returns an id.POST /api/partners/pay/ with the order_id (travel) or product_order_id (products). We atomically debit your wallet and finalize the booking (ticketing / reservation).order_status: "completed" and your new_balance. You can also poll GET /api/partners/orders/.idempotency_key on /pay/. Retries with the same key never double-charge. If finalization fails (e.g. the airline rejects), the debit is automatically reversed and the key released so you can retry.Response Envelope & Errors
Every response is wrapped in a consistent envelope. Success returns ok: true with a data payload; failures return ok: false with an error message. Lists are paginated.
| Code | Meaning |
|---|---|
200 / 201 | Success. |
400 | Validation error, or order not payable (already completed / not yours). |
401 | Missing or invalid X-API-KEY / X-API-SECRET. |
402 | Insufficient credit — amount exceeds your available balance + limit. |
404 | Resource not found. |
Credit & Wallet API
Inspect your wallet, review the transaction ledger, pay orders, and list what you've purchased.
Returns your current balance, granted credit limit, spendable amount and currency.
Paginated, append-only history of every movement: payments, refunds, top-ups and credit grants. Each row carries a balance_after snapshot.
debit or creditpayment, refund, topup, credit_grant, adjustmentSettle a travel order or a product order from your wallet. Provide exactly one of the two ids.
Order id (flight / hotel / tour / residence).ProductOrder id (WiFi / SIM / accessory).Paginated list of your travel orders (flight / hotel / tour / residence) with service, status, total_price and payment_method.
Paginated list of your product orders with status, total_price_irt and payment_method.
Travel Products API
Pocket WiFi modems, SIM cards and accessories. Build a basket, check out to create a product order, then pay it with credit.
/api/products/product-categories/).GET /api/products/products/{id}/. Categories: GET /api/products/product-categories/.GET /api/products/basket/current · Remove item: DELETE /api/products/basket/items/{id}/Turns the current basket into a ProductOrder. The response data.id is the product_order_id to pass to /api/partners/pay/.
PARTNER_CREDIT for credit settlement. Default GATEWAY.Hotels API
A multi-step flow: search → check live rate → book → order. The order step creates the travel Order you then pay with credit.
YYYY-MM-DDYYYY-MM-DDadult_count, child_count, child_ages[].true for domestic (Iranian) hotels. Default false.Confirms the selected room's current price and cancellation policy before booking. Pass the room/rate identifiers returned by search.
Holds the room with the selected rate and passenger details (first/last name, nationality, national id or passport per guest).
Finalizes the booking into a travel Order. Take its id and call POST /api/partners/pay/ with order_id.
/prebook/ holds a provisional booking; /booking_data/ fetches a booking's current data; /cancel_display/ previews the cancellation penalty; /cancel/ performs the cancellation.
Flights API
Search → revalidate → book → issue ticket. The air_booking step creates the travel Order to settle with credit.
THR.IST.1.Each takes the fare_source_code from a search result. revalidate_flight re-confirms availability & price; air_rules returns fare rules; air_baggages returns the baggage allowance.
phone_number, email) + air_travelers[]: each with name, birth date, gender, passenger type, nationality, and national_id (Iranian) or passport (foreign).POST /api/flights/air_order_ticket/; fetch state with POST /api/flights/air_booking_data/.air_refund_display previews the refundable amount; air_refund performs an online refund; air_refund_offline raises a manual refund request. Refunded amounts are credited back to your wallet.
Tours · Residence · Visa
The same pattern: browse, create an order/booking, then settle with POST /api/partners/pay/.
GET /api/tours/ lists tours · GET /api/tours/{id}/ details · GET /api/tours/search-options/ filters · POST /api/tours/prebook/ holds seats with passengers · POST /api/tours/finalize/ creates the order.
/properties/list/ & /properties/detail/ to browse · POST /api/residence/reserve/ then /reserve/book/ to reserve · /reserve/time/, /reserve/detail/ for status · /bookings/cancel/ & /bookings/accept-cancel/ for cancellation.
GET /api/visa/ lists visa products · GET /api/visa/{id}/ details · POST /api/visa/request/ submits a visa application request.
Need a partner account or a higher credit limit? Contact your BechinBerim account manager.