API Example Payment Credit Card

From InClickAdServer

Funding an Advertiser Account with a Credit Card (Gateway)

This API Service Request will fund an Advertiser account using the credit card gateway system. This API Service Request can also be used to setup the account for Automatic Billing.

The Code Example

Breaking it Down

This require references the local inClick Ad Server deployment configuration files allowing your code to utilize the pre-packaged API Objects as well as the bundled PHPOlait services.


These requires (includes) contain the API Objects and Classes needed for this API Service Request.


The $base_url is the URL to your inClick Ad Server deployment, the ad server root URL. For local host API usage, the constant of INCLICK_WEB_URL is defined in the globals.php file referenced earlier. Remote deployments, deployments where the ad server and API Request Location are not on the same server, would change this to the fully qualified URL to the ad server root directory.

The $service_key is one of the the api_service_keys values you created for your ad server. (more information)


Here we set the value for each credit card object.


Here we set the additional values to complete the transaction.

TIP: When performing test transactions, be sure to use the House Advertiser account, 1001. Credits posted to the House Advertiser account will not count towards your inClick.net account.

With all required parameters set, we process the API Service Reqeuest.


This section of code is provided to give you a visual confirmation of what occurred.