Authentication
Authenticate requests to the ICEPAY Checkout API using your Merchant ID and Merchant Secret.
All requests to the ICEPAY Checkout API require HTTP Basic Authentication.
Use your ICEPAY Merchant ID as the username and your Merchant Secret as the password.
Get your API credentials
Section titled “Get your API credentials”Your API credentials belong to an ICEPAY merchant.
-
Sign in to the ICEPAY Portal
Open the ICEPAY Portal and sign in with your ICEPAY User Account. Select the ICEPAY Account that contains the merchant you want to use.
-
Open your merchant
Go to Merchants and select the merchant you want to use for the integration.
-
Find your credentials
Use the Merchant ID and Merchant Secret shown for the merchant.
If you have not configured a merchant yet, see Configure your merchant.
Authenticate a request
Section titled “Authenticate a request”Basic Authentication combines your Merchant ID and Merchant Secret in the following format:
<merchant-id>:<merchant-secret>For example:
10000:xxxxxxThe value is Base64 encoded and sent in the Authorization header:
Authorization: Basic MTAwMDA6eHh4eHh4Most HTTP clients can create this header for you, so you usually do not need to encode the credentials yourself.
With cURL, use the -u option:
curl --request GET \ --url 'https://checkout.icepay.com/api/payments/methods' \ --user '10000:xxxxxx'For example, using Laravel’s HTTP client:
$merchantId = '10000';$merchantSecret = 'xxxxxx';
$response = Http::withBasicAuth($merchantId, $merchantSecret) ->get('https://checkout.icepay.com/api/payments/methods');JavaScript
Section titled “JavaScript”When making requests from a Node.js backend:
const merchantId = '10000';const merchantSecret = 'xxxxxx';
const credentials = Buffer .from(`${merchantId}:${merchantSecret}`) .toString('base64');
const response = await fetch( 'https://checkout.icepay.com/api/payments/methods', { headers: { Authorization: `Basic ${credentials}`, }, },);Next step
Section titled “Next step”Once authentication is configured, you can make your first authenticated request and create a payment.
Create your first payment and redirect the customer to ICEPAY Checkout.

