User Tools

Site Tools


referralprogram

ReferralProgram API

Web service address

Test web service address (for testing purposes) https://testapi.moneypolo.com:26443/ReferralProgram.asmx

Real web service address https://api.moneypolo.com:26442/ReferralProgram.asmx

Please note, that test and prod keys are different from each other. Working key will be issued by MoneyPolo company at the end of the testing period.

Security

Each transmitted request must be signed with a key. MoneyPolo issues a key for the merchant at the beginning of testing. When switching to the operating mode of the service the key is changed. MoneyPolo will distribute “keys” among their clients, which has to be transmitted to web service in parametrical form.

- Each request method should have Signature object:

Name Type Required Description
MerchantCode string * Merchants's code
Sign string * Signature

Each response method has ErrorResponse object:

Name Type Required Description
ErrorCode int * Error code or 0,- if the answer is without errors.
ErrorMessage string * Error description or empty line,- if the answer is without errors.

Rules for compiling signatures to a Web service request.

Each method has an object sign:

<sign>
  <MerchantCode>string</MerchantCode>
  <Sign>string</Sign>
</sign>
  • For the correct signature generation (Sign) the following is needed:
  • produce a concatenation of data, transferred to the method of service in request object, and Key.
  • apply to the result algorythm SHA512.
  • transfer the result to the upper case.



API methods list

API consists of following methods:

CreateReferralProgram method

This method’s purpose is to create a new Referral Program UID.

Input parameters of the method are:

Name Type Required Example Description
AccountPersonDataobject * See object MoneyPoloAccountPersonData
ReferralUID string(36) B192E862-D8CB-45C9-853A-0DC1A788C431 Empty or gen. by merchant
ReferralProgramID string(11) “666” Empty or ID for Edit data
Title string(100) “Test 1 Title” Program Title
Comment string(255) “Test 1 Comment” Program Comment

Output parameters of the method are:

Name Type Description
ReferralProgramID string Referral Program ID
ReferralUID string Referral Program UID

Signature:

PersonAccountID + PersonRUID + ReferralUID + ReferralProgramID + Title + Comment + Key

PHP Example

//CreateReferralProgram
$request = array();
$request['AccountPersonData']['PersonAccountID'] = '1234';
$request['AccountPersonData']['PersonRUID'] = '456';
$request['ReferralUID'] = 'B192E862-D8CB-45C9-853A-0DC1A788C555';
$request['ReferralProgramID'] = '666';
$request['Title'] = 'Test 1 Title';
$request['Comment'] = 'Test 1 Comment';
 
if($wsRequest->Prepare_Data($request))
{
    $result = $wsRequest->Send('CreateReferralProgram');
}


LogReferralAction method

This method’s purpose is to log Referral Program Action.

Input parameters of the method are:

Name Type Required Example Description
ReferralUID string(36) * B192E862-D8CB-45C9-853A-0DC1A788C431 Referral Program UID
HTTPReferer string(100) * “google.com” HTTPReferer
RemoteIP string(100) * “Test 1 Title” Client IP address

Output parameters of the method are:

Name Type Description
ReferralLogID string Referral Action Log ID

Signature:

ReferralUID + HTTPReferer + RemoteIP + Key

PHP Example

//LogReferralAction
$request = array();
$request['ReferralUID'] = 'D08B90ED-6643-467A-AD1E-32B77CCF640E';
$request['HTTPReferer'] = 'google.cz';
$request['RemoteIP'] = '127.0.0.2';
 
if($wsRequest->Prepare_Data($request))
{
    $result = $wsRequest->Send('LogReferralAction');
}


MoneyPoloAccountPersonData object

Name Type Required Example Description
PersonAccountID int * 1235 Client’s MoneyPolo account ID
PersonRUID string * “4567” Client’s RUID


referralprogram.txt · Last modified: 2018/05/04 10:36 by Dmitry Tserashonak