1
Install the SDK
Add the SDK to your project with Composer:The SDK requires PHP 8.2+. Guzzle is pulled in automatically as a dependency — there are no other manual steps.
2
Get your credentials
Log in to your Taliup dashboard and navigate to Taliup → Settings → Payments → Credentials.You need two values:
3
Initialise the client
Load the Composer autoloader and create a The The constructor throws
Client instance with your credentials:base_url defaults to https://taliuphq.com/api/v1 and the HTTP timeout defaults to 10 seconds — you can override either if needed:Taliup\Sdk\Exceptions\ApiException immediately if either required credential is empty, so misconfiguration surfaces at boot time rather than at the first API call.4
Create a checkout URL and redirect the customer
Call
createCheckoutUrl() with the details of the order, then redirect the customer to the returned URL:redirect_url, cancel_url, and webhook_url must all use HTTPS. Plain HTTP URLs are rejected by the API.5
Handle the webhook after payment
After a payment is captured, Taliup sends a A successful
POST request to your webhook_url with a JSON body and an X-Taliup-Signature header. Always verify the signature before acting on the event.Webhook::constructEvent() verifies the HMAC-SHA256 signature and decodes the JSON body in one call, throwing ApiException if the signature is invalid. If you only need a quick boolean guard, use Webhook::verify() instead:payment.captured event looks like this:6
Verify the transaction server-side (optional)
In addition to webhook events, you can confirm a completed transaction programmatically using the
token returned by createCheckoutUrl(). This is useful as a fallback or for server-to-server confirmation flows.verifyTransaction() is a server-side check against the Taliup API. Use it alongside — not as a replacement for — webhook verification.What’s next?
Introduction
Explore the full public API surface — every method, parameter, and error type documented in one place.