PesaBridge
Ìwé/Owó tó ń wọlé/Hosted checkout and payment links

Owó tó ń wọlé

Hosted checkout and payment links

A ready-made payment page: create a session, redirect the customer, get the result.

Ìṣẹ́jú 3 láti kà

A kọ àwọn ìtọ́sọ́nà olùgbéṣẹ́ ní èdè Gẹ̀ẹ́sì kí kóòdù, orúkọ àwọn pápá àti àwọn ìfiránṣẹ́ àṣìṣe lè bá API mu gẹ́lẹ́.

Lórí ojú-ìwé yìí
  1. Create a session
  2. Send the customer there
  3. Check the result

Create a session

Hosted checkout needs no token: it uses your publishable key, so you can call it from a simple back end or a no-code tool. Send a fixed amount, or a catalogue product SKU so the price can't be tampered with.

Request
curl -s https://pesa-bridge.com/api/bridgepay/v1/checkout/create \
  -H "Content-Type: application/json" \
  -d '{"key":"pk_test_…","amount":100,"reference":"ORDER-9",
       "success_url":"https://your-app.com/thanks","cancel_url":"https://your-app.com/cart"}'
Response
{ "checkout_id": "chk_123", "url": "https://pesa-bridge.com/api/bridgepay/v1/pay/chk_123", "status": "open" }

Send the customer there

Redirect to url, or share it as a payment link by SMS, email or chat. The customer pays on a PesaBridge page and returns to your success_url.

Don't treat the return to success_url as proof of payment. Confirm with the checkout.completed event or by polling the status.

Check the result

Shell
curl -s https://pesa-bridge.com/api/bridgepay/v1/pay/chk_123/status

Àwọn onímọ̀-ẹ̀rọ wa ń dáhùn ìbéèrè nípa ìsopọ̀. Fi nọ́mbà ìtọ́kasí ìbéèrè náà ránṣẹ́ sí wa, a ó sì rí ìpè náà gẹ́lẹ́.

Kàn sí ìrànlọ́wọ́