1. Home
  2. Web services
  3. Sending SOAP requests to a service ‘billon.me’

Sending SOAP requests to a service ‘billon.me’

A service ‘billon.me’ allows to send SOAP requests ‘hello’, ‘requestPaymentInitiation’, ‘getTaskStatus’, ‘getMoneyStatus’ and ‘startSeriesPayment’ manually and receive responses of the application 24/7 of the user of the service. In order to order sending SOAP request by service ‘billon.me’, request must be sent to address ‘https://billon.me:5002/api/v1’ with method POST with parameters:

  • ‘token’ containing an API key, which can be obtained on a settings page;
  • ‘request’ containing the name of operation, eg. ‘hello’;
  • optional ‘params’ containing an associative array with the parameters of the operation.

The response of application 24/7 will be sent in response in the event of the correct key in the parameter ‘token’ and the lack of problem on the side of the service. Example: sending the SOAP request in PHP:

$uid = uniqueId();
$data = array("type" => "NORMAL", "amount" => array("amount" => 1000, "currency" => 'PLN', "colour" => 0), 'seriesId' => null, "commissionPercent" => null, "requestData" => array("username" => 'paying', "uniqueTransferId" => $uid, "title" => 'Payment tile', "merchantBrandName" => 'Merchant brand name', "requestInvoiceData" => "NOT_NEEDED", "requestDeliveryData" => "NOT_NEEDED", "description" => ' ', 'channelInfo' => ' ', 'antiSpamCode' => ' '));
$params = array('token' => "eyJhkGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c3VyIjp7ImlkIjoyNSwic2FsdCI6IjEyZWVkMzQwLTM2NGUtMThNjgyN1hNDM5zA1MiOjEh0OTCJpYXQiDk0NjF9Q1M.zeWXG7Nyr3PFVhb4HRgLi5rh8fLZx41VHySHWUStIzc", 'request' => 'requestPaymentInitiation', 'params' => $data);
$result = @file_get_contents('https://billon.me:5002/api/v1', false, 
			     stream_context_create(array('http' => array('header'  => 
								         "Content-type: application/x-www-form-urlencoded\r\n",
									 'method'  => 'POST',
									 'content' => http_build_query($params)))));
$error = $http_response_header;
if ($result === false && function_exists('curl_init')) 
   $curl = curl_init('https://billon.me:5002/api/v1');
   curl_setopt($curl, CURLOPT_POST, true);
   curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($params));
   curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
   curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
   $result = curl_exec($curl);
   $error = curl_error($curl);

Example: sending the SOAP request in technology ‘Node.js’:

var uniqueId = require('uuid/v1');
var data = {
    type: "NORMAL",
    amount: {
        amount: 1000,
        currency: 'PLN'
    requestData: {
        username: 'paying',
        uniqueTransferId: uniqueId(),
        title: 'Payment title',
        merchantBrandName: 'Merchant brand name',
        requestInvoiceData: "NOT_NEEDED",
        requestDeliveryData: "NOT_NEEDED",
        description: ' '
var request = require('request');
request.post({"rejectUnauthorized": false, url: 'https://billon.me:5002/api/v1', form: {token: "eyJhkGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c3VyIjp7ImlkIjoyNSwic2FsdCI6IjEyZWVkMzQwLTM2NGUtMThNjgyN1hNDM5zA1MiOjEh0OTCJpYXQiDk0NjF9Q1M.zeWXG7Nyr3PFVhb4HRgLi5rh8fLZx41VHySHWUStIzc", request: 'requestPaymentInitiation', params: data} }, function (error, response, body)
   if (error) 

The module ‘Node.js’ billon has been allowing to process payments with application 24/7 of the user of the service ‘billon.me’ and send the operations manually to this service since version 2.2.

Was this article helpful to you? Yes No

How can we help?