WithPay API Documentation
Integrate tip collection, event ticketing, and wedding RSVPs into your app. Use these REST endpoints to initialize checkouts, verify transactions, and listen to real-time webhooks.
Every API request must include your secret key via the Authorization header as a Bearer token. You can generate keys from your API Keys page.
429 Too Many Requests. Contact support to increase your limit.https://www.withpay.bayainnovation.com/api/checkout
Initializes a new payment checkout session. Returns a secure checkout_url to redirect your payer to.
| Parameter | Type | Description |
|---|---|---|
amount Required |
float | Amount to charge. Must be greater than 0. |
currency |
string | Defaults to ETB. Supported: ETB, USD. |
description |
string | Short reason for the payment (e.g. "Donation", "Tip"). |
callback_url |
string | Webhook URL Chapa POSTs to on success. Overrides account default. |
return_url |
string | Where to redirect the user after a successful transaction. |
checkout_url is designed to be embedded in QR codes. Use any standard QR library to transform it into a scannable code for your users. Tip: https://www.withpay.bayainnovation.com/checkout/{tx_ref}https://www.withpay.bayainnovation.com/api/verify?tx_ref={tx_ref}
Retrieves the status and complete metadata of a specific transaction using its unique reference ID.
| Parameter | Type | Description |
|---|---|---|
tx_ref Required |
string | The unique transaction reference returned during initialization. |
https://www.withpay.bayainnovation.com/api/events/verify/{reference}
Verifies an event ticket booking using its unique reference (e.g., BK-XXXXXXXX). Ideal for scanning QR codes at the door.
| Parameter | Type | Description |
|---|---|---|
reference Required |
string | The unique booking reference (e.g., BK-63B6C4CF). |
https://www.withpay.bayainnovation.com/api/wedding/verify/{reference}
Verifies a wedding RSVP booking using its unique reference (e.g., WD-XXXXXXXX). Use for QR code scanning at the wedding venue entrance.
| Parameter | Type | Description |
|---|---|---|
reference Required |
string | The unique wedding booking reference (e.g., WD-63B6C4CF). |
If you provided a callback_url during checkout initialization, WithPay will send a POST request to your server when the transaction completes.
Authorization Bearer token.