Tan Code

Reward function

Main purpose of this function is to send money to customer’s MonPay account as a gift. In order to use this function to send money, customer phone number is needed.

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
    <customer system="ISDN">9999XXXX</customer>
    <description>Reward description of your choice</description>


  'Content-Type' => 'application/xml',
  'Authorization' => 'Bearer {your token}'

$response = $client->getResponse();
echo $response->getBody();
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/xml");

RequestBody body = RequestBody.create(mediaType, "<request>
    <customer system="ISDN">9999XXXX</customer>
    <description>Reward description of your choice</description>

Request request = new Request.Builder()
  .method("POST", body)
  .addHeader("Content-Type", "application/xml")
  .addHeader("Authorization", "Bearer {your token}")

Response response = client.newCall(request).execute();
Method POST
Authorization Bearer XXXXXXXXXX
Content-Type application/xml
Parameters Type Required Description Example
request customer object Yes Customer ID /99xxxxxx, 9999888877776666, 12FA5B1A5D6C5E9E7A/'|trans }} xml:<customer system="ISDN">99xxxxxx</customer>
attribute Yes ISDN – Phone number, CARDID – Card number, NFCID - NFC Card number, LOYALTYID – Account number
amount double Yes Amount
description string Yes Transaction note description
Parameters Type Description Example
code integer Code determines if request was successful or not 0
info string Description
requestId string Request ID
transactionId string Transaction No
Response type
Parameters Response Description
code 0 Successful
1 Bad request
999 Internal error
info Successful
... Other descriptions