Overview
Character Set and Encoding
CURO uses the default character set of the XML specification, UTF-8. ASCII 0 – 127 characters are also valid UTF-8 characters.
ImportantEvery request message send to the API must be UTF-8 encoded. Any other encoding may result in system errors or unexpected behavior.
Security
Connection to the API is only possible using HTTPS (HTTP over SSL) Internet connection, encrypted with 2048-bit encryption.
API Entry-Points
All requests are made to API end-points. There are two available entry-points in this CURO API.
Live API entry-point:
https://secure.curopayments.net/rest/v1/curo/
Test API entry-point:
https://secure-staging.curopayments.net/rest/v1/curo/
Note
- Don't forget to switch from the test API end-point to live one in your production mode.
- Live and Test are two completely separate platforms; by default the authentication info, your merchant id and site ids will be shared for both environments.
- NB: site- or user information changed on the Live backoffice will automatically overwrite the corresponding setting on the test backoffice!
API Authentication
Access to the API is granted via HTTP Basic access authentication over SSL protocol. The "username" and "password" are your merchant_id or account-name and API key respectively. These need to be supplied with each request for a valid communication with the API.
$sMerchant = 'your-account-name';
$sAPI_Key = 'your-API-secret-provided-by-CURO';Using CURL in PHP you can set the authentication information like this:
// set HTTP Basic Authentication
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, $sMerchant . ':' . $sAPI_Key);Passing authentication information in the request header:
header('WWW-Authenticate: Basic' . base64_encode($sMerchant . ':' . $sAPI_Key));Each merchant has their own user-name and API key known to you and CURO only. Don't ever share these credentials — if someone else gets a hold of it, they'll be able to access anything within given privileges.
ImportantPlease contact us for your personal API Key to access the API.
Resellers/partners can use their credentials to submit requests on behalf of their merchants.
DangerDon't ever share your API credentials unless you know what you are doing.
CURO won't indemnify you or your clients for any (ab)use of this API.
Supported Formats
The API is able to process request and response in different formats. This gives you a great flexibility in usage of the API. You can either pass the desired format in a variable, or using the HTTP Accept: header. The default format for the CURO protocol is JSON.
| Name | Format Value | Accept Header | Remarks |
|---|---|---|---|
| JSON | format=json (default) | Accept: application/json | JavaScript Object Notation, is a simple machine-readable data-interchange format. For more information, visit json.org. |
| XML | format=xml | Accept: application/xml | (Extensible Markup Language) is a set of rules for encoding documents in machine-readable form. Defined in the XML 1.0 Specification. |
| Serialize | format=serialize | Accept: application/php | PHP serialised value. |
Updated 2 months ago