Overview

High level API provides objects for easy manipulation with common entities, like affiliates, commissions, etc. For every entity there are two main objects: - row object – (for example: Pap_Api_Affiliate) – it can retrieve one record, you can edit, or add new record using this object - grid object – (for example: Pap_Api_AfiliatesGrid) – it can retrieve grid of affiliates (list of affiliate records) High level API classes have names start with Pap_Api_****** Row o...

Pap_Api_Transaction

Row object - class representing one transaction (commission) record. You can use it to retrieve, edit and manually add commissions. Methods: load() - loads record with given transaction id. You have to set transaction id before calling this method. save() - save changes in given record (record must be loaded first). add() - inserts new record refund($note = '', $fee = 0, $refundMultiTier = false, $refundValue = 0) - makes refund of transaction with optional note and fee that is sub...

Pap_Api_TransactionsGrid

Grid object - this class handles requests to the list of transactions. You can use it to search and filter in the registered transactions (commissions). Example retrieving list of all transactions (do not forget to login via api as merchant (https://support.qualityunit.com/389075-Getting-started-example)): //---------------------------------------------- // get recordset of list of transactions $request = new Pap_Api_TransactionsGrid($session); // set filter $request->addFilter('dateinser...

Pap_Api_RecurringCommission

Triggering the recurring commission via php API can be useful when you want some special recurrence presets or you are integrating PAP with some custom payment processor - you want to trigger a recurring commission when there was a payment in your payment processor. Make sure the Recurring commissions (https://support.qualityunit.com/980100-Recurring-commissions#302274) feature is turned on in the Features section in your merchant panel. As soon as it is turned on click the Configure button n...

Pap_Api_Affiliate

Pap_Api_Affiliate class is a row object which represents one affiliate record. You can use it to retrieve, edit and add affiliates. Methods: load() - loads record with given user id or other parameters. You have to set at least one field before calling this method. Note: If you try to load some affiliate data, you must first setup data to load from, for example username, then call load method and after that all other available informations will be available to you. save() - save changes in g...

Pap_Api_AffiliateSignup

Object for affiliates signup, it doesn't require merchant's credentials or session. Methods: add() - inserts new record setLanguage('en-US') – notification signup email will be sent in 'en-US' language instead of default language, this function is for adding affiliate. setUserid($value) setRefid($value) setParentUserId($value) - signup would fail if incorrect $value is passed. If you want to ignore incorrect value and not fail the process use also setField('parentUserIdValidate', 'N') ...

Pap_Api_AffiliatesGrid

Grid object - this class handles requests to the list of affiliates. You can use it to search and filter in affiliates. Methods: - all methods are inherited from Gpf_Rpc_GridRequest class, check it's documentation. Example retrieving list of all affiliates //---------------------------------------------- // get recordset with list of affiliates $request = new Pap_Api_AffiliatesGrid($session); //Filtering affiliate with username affiliate@example.com - Filters are not mandatory $re...

Pap_Api_BannersGrid

Grid object - this class handles requests to the list of banners. You can use it to search and filter in banners. Methods: - all methods are inherited from Gpf_Rpc_GridRequest class, check it's documentation. Example retrieving list of all banners (first 30 records) //---------------------------------------------- // get recordset with list of banners $request = new Pap_Api_BannersGrid($session); //columns that you want to load (unless the default columns are enough) $request-&...

Pap_Api_Payouts

Grid object - this class handles requests to the list of payouts. You can use it to search and filter in merchant payouts. Note: This api is for merchant only. Methods: - all methods are inherited from Gpf_Rpc_GridRequest class, check it's documentation. - addAllAffiliatesToPay() - this adds all affiliates loaded to payouts grid to payout process - addAffiliateToPay(affiliateid) - this adds affiliate with id affiliateid to payout process - payAffiliates(paymentNote, affiliateNote...

Pap_Api_PayoutsHistory

Grid object - this class handles requests to the list of payouts already payed to affiliates. You can use it to search and filter in merchant payouts history. Note: This api is for merchant only. Methods: - all methods are inherited from Gpf_Rpc_GridRequest class, check it's documentation. - getPayeesDeatilsInfo(payeeid) - gets info about affiliates in specified payout Possible filters you can use: - dateinserted - date value - merchantnote - text value - userid - id of...
×