createCheckoutUrl(), and redirect your customer to the returned URL — Taliup handles the payment form, card processing, and post-payment redirect for you.
1
Install and configure the client
Install the SDK via Composer. PHP 8.2 or higher is required.Get your credentials from Taliup → Settings → Payments → Credentials, then instantiate the The following configuration options are available:
Client:2
Build the checkout payload
Construct the payload array with the fields you need. Only The session remains valid for between 5 and 60 minutes. If you omit
amount is strictly required, but including reference, redirect_url, cancel_url, and customer details is strongly recommended.expires_in_minutes, it defaults to 30 minutes. Once the session expires, the customer will need to start a new checkout.3
Call createCheckoutUrl()
Pass your payload to A successful response contains three fields:
createCheckoutUrl(). The SDK sends the request to the Taliup API and returns an associative array with the hosted checkout details.4
Redirect the customer to checkout_url
Once you have the
checkout_url, redirect your customer’s browser to it immediately. The customer completes their payment on Taliup’s secure hosted page.redirect_url, cancel_url, and webhook_url must all use HTTPS. Plain HTTP URLs will be rejected by the API.5
Handle the return
After the payment is completed or abandoned, Taliup redirects the customer back to one of two URLs you provided in the payload:
redirect_url— the customer completed the payment flow (this does not guarantee approval; always confirm via the webhook).cancel_url— the customer clicked Cancel or closed the checkout page.