Whish Pay REST API
Add Whish Pay as a payment option in your own checkout. Create a hosted payment page, track its status, and issue refunds, all from your backend.
JSON over HTTPS · USD · LBP
How it worksIntegration flow
The happy path from a checkout to a confirmed order. The full reference documents every endpoint in detail.
- 1
Create a payment
Call Create a payment with the amount, currency, your externalId, and your callback URLs. You receive a collectUrl.
- 2
Redirect the payer
Send the customer to the collectUrl. On that hosted page the payer authorizes the payment from their Whish balance and confirms with a one-time code (OTP) that Whish delivers to them as an in-app notification in the Whish app. This step happens entirely on the hosted page; your integration never sends or verifies the OTP.
- 3
Receive the callback
When the payment settles, Whish calls your successCallbackUrl or failureCallbackUrl by GET.
- 4
Confirm before fulfilling
Call Get payment status to verify the outcome, then release the order. Poll it as a fallback if no callback arrived.
- 5
Refund if needed
Use Refund a payment with the original externalId.
Full API reference
The complete developer documentation lives in the Whish developer hub, kept up to date alongside every other Whish API.
- Authentication and required headers
- Sandbox and Production environments
- Response envelope and outcome handling
- All four endpoints, with request and response examples
- Callbacks and IP whitelisting
- The full error-code reference
- The Postman collection
For credentials, Production access, or clarification, email whishpay@whish.money.