Taliup\Sdk\Client is the main entry point for the Taliup PHP SDK. You instantiate it once with your merchant credentials and use it to access all available payment resources.
Get your credentials from Taliup → Settings → Payments → Credentials. Never commit your
merchant_secret_key to source control — store it in an environment variable or secrets manager.Constructor
Client instance. Throws an ApiException immediately if either merchant_site_id or merchant_secret_key is empty.
Config parameters
string
required
Your Merchant Site ID, available from Taliup → Settings → Payments → Credentials.
string
required
Your Merchant Secret Key. Used to authenticate every API request and to verify webhook signatures.
string
The base URL of the Taliup API. Defaults to
https://taliuphq.com/api/v1. You do not need to set this unless you have been given a custom endpoint.int
HTTP request timeout in seconds. Defaults to
10.Methods
Example
Error handling
The constructor throwsApiException (status code 0) in two cases:
- Either
merchant_site_idormerchant_secret_keyis missing or empty — message:"Missing merchant credentials." base_urlis explicitly set to an empty string — message:"Missing base_url."
ApiException on failure — see the ApiException reference for details.