Bitcoin Gateway

Default

gatewayInvoiceGet

Invoice generation. Parameters are auth and amount. Order ID is optional.


/gateway/invoice

Usage and SDK Samples

curl -X GET "https://api.bitmonsters.net/gateway/invoice?token=&amount=&order_id=¤cy_in=¤cy_out=&return_url=&test_return_url="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String token = token_example; // String | auth token (check in pair with IP)
        Double amount = 1.2; // Double | Amount of UAH
        String returnUrl = returnUrl_example; // String | URL подтверждения заказа
        BigDecimal orderId = 8.14; // BigDecimal | Order ID for history
        BigDecimal currencyIn = 8.14; // BigDecimal | Валюта заказа
        BigDecimal currencyOut = 8.14; // BigDecimal | Валюта инвойса
        BigDecimal testReturnUrl = 8.14; // BigDecimal | Валюта инвойса
        try {
            array[Code] result = apiInstance.gatewayInvoiceGet(token, amount, returnUrl, orderId, currencyIn, currencyOut, testReturnUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#gatewayInvoiceGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String token = token_example; // String | auth token (check in pair with IP)
        Double amount = 1.2; // Double | Amount of UAH
        String returnUrl = returnUrl_example; // String | URL подтверждения заказа
        BigDecimal orderId = 8.14; // BigDecimal | Order ID for history
        BigDecimal currencyIn = 8.14; // BigDecimal | Валюта заказа
        BigDecimal currencyOut = 8.14; // BigDecimal | Валюта инвойса
        BigDecimal testReturnUrl = 8.14; // BigDecimal | Валюта инвойса
        try {
            array[Code] result = apiInstance.gatewayInvoiceGet(token, amount, returnUrl, orderId, currencyIn, currencyOut, testReturnUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#gatewayInvoiceGet");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // auth token (check in pair with IP)
Double *amount = 1.2; // Amount of UAH
String *returnUrl = returnUrl_example; // URL подтверждения заказа
BigDecimal *orderId = 8.14; // Order ID for history (optional)
BigDecimal *currencyIn = 8.14; // Валюта заказа (optional)
BigDecimal *currencyOut = 8.14; // Валюта инвойса (optional)
BigDecimal *testReturnUrl = 8.14; // Валюта инвойса (optional) (default to 0)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance gatewayInvoiceGetWith:token
    amount:amount
    returnUrl:returnUrl
    orderId:orderId
    currencyIn:currencyIn
    currencyOut:currencyOut
    testReturnUrl:testReturnUrl
              completionHandler: ^(array[Code] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitcoinGateway = require('bitcoin_gateway');

var api = new BitcoinGateway.DefaultApi()

var token = token_example; // {String} auth token (check in pair with IP)

var amount = 1.2; // {Double} Amount of UAH

var returnUrl = returnUrl_example; // {String} URL подтверждения заказа

var opts = { 
  'orderId': 8.14, // {BigDecimal} Order ID for history
  'currencyIn': 8.14, // {BigDecimal} Валюта заказа
  'currencyOut': 8.14, // {BigDecimal} Валюта инвойса
  'testReturnUrl': 8.14 // {BigDecimal} Валюта инвойса
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.gatewayInvoiceGet(token, amount, returnUrl, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class gatewayInvoiceGetExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();
            var token = token_example;  // String | auth token (check in pair with IP)
            var amount = 1.2;  // Double | Amount of UAH
            var returnUrl = returnUrl_example;  // String | URL подтверждения заказа
            var orderId = 8.14;  // BigDecimal | Order ID for history (optional) 
            var currencyIn = 8.14;  // BigDecimal | Валюта заказа (optional) 
            var currencyOut = 8.14;  // BigDecimal | Валюта инвойса (optional) 
            var testReturnUrl = 8.14;  // BigDecimal | Валюта инвойса (optional)  (default to 0)

            try
            {
                array[Code] result = apiInstance.gatewayInvoiceGet(token, amount, returnUrl, orderId, currencyIn, currencyOut, testReturnUrl);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.gatewayInvoiceGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DefaultApi();
$token = token_example; // String | auth token (check in pair with IP)
$amount = 1.2; // Double | Amount of UAH
$returnUrl = returnUrl_example; // String | URL подтверждения заказа
$orderId = 8.14; // BigDecimal | Order ID for history
$currencyIn = 8.14; // BigDecimal | Валюта заказа
$currencyOut = 8.14; // BigDecimal | Валюта инвойса
$testReturnUrl = 8.14; // BigDecimal | Валюта инвойса

try {
    $result = $api_instance->gatewayInvoiceGet($token, $amount, $returnUrl, $orderId, $currencyIn, $currencyOut, $testReturnUrl);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->gatewayInvoiceGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $token = token_example; # String | auth token (check in pair with IP)
my $amount = 1.2; # Double | Amount of UAH
my $returnUrl = returnUrl_example; # String | URL подтверждения заказа
my $orderId = 8.14; # BigDecimal | Order ID for history
my $currencyIn = 8.14; # BigDecimal | Валюта заказа
my $currencyOut = 8.14; # BigDecimal | Валюта инвойса
my $testReturnUrl = 8.14; # BigDecimal | Валюта инвойса

eval { 
    my $result = $api_instance->gatewayInvoiceGet(token => $token, amount => $amount, returnUrl => $returnUrl, orderId => $orderId, currencyIn => $currencyIn, currencyOut => $currencyOut, testReturnUrl => $testReturnUrl);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->gatewayInvoiceGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
token = token_example # String | auth token (check in pair with IP)
amount = 1.2 # Double | Amount of UAH
returnUrl = returnUrl_example # String | URL подтверждения заказа
orderId = 8.14 # BigDecimal | Order ID for history (optional)
currencyIn = 8.14 # BigDecimal | Валюта заказа (optional)
currencyOut = 8.14 # BigDecimal | Валюта инвойса (optional)
testReturnUrl = 8.14 # BigDecimal | Валюта инвойса (optional) (default to 0)

try: 
    api_response = api_instance.gateway_invoice_get(token, amount, returnUrl, orderId=orderId, currencyIn=currencyIn, currencyOut=currencyOut, testReturnUrl=testReturnUrl)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->gatewayInvoiceGet: %s\n" % e)

Parameters

Query parameters
Name Description
token*
String (string)
auth token (check in pair with IP)
Required
amount*
Double (double)
Amount of UAH
Required
order_id
BigDecimal (int)
Order ID for history
currency_in
BigDecimal (int)
Валюта заказа
currency_out
BigDecimal (int)
Валюта инвойса
return_url*
String (string)
URL подтверждения заказа
Required
test_return_url
BigDecimal (bool)
Валюта инвойса

Responses

Status: 200 - send URL to QR-code with encoded information

Status: 400 - wrong parameters

Status: 403 - auth problem


gatewayIpnGet

Message service


/gateway/ipn

Usage and SDK Samples

curl -X GET "https://api.bitmonsters.net/gateway/ipn?token=&transaction_id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String token = token_example; // String | auth token (check in pair with IP)
        String transactionId = transactionId_example; // String | Order ID for history
        try {
            array[Data] result = apiInstance.gatewayIpnGet(token, transactionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#gatewayIpnGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String token = token_example; // String | auth token (check in pair with IP)
        String transactionId = transactionId_example; // String | Order ID for history
        try {
            array[Data] result = apiInstance.gatewayIpnGet(token, transactionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#gatewayIpnGet");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // auth token (check in pair with IP)
String *transactionId = transactionId_example; // Order ID for history

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance gatewayIpnGetWith:token
    transactionId:transactionId
              completionHandler: ^(array[Data] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BitcoinGateway = require('bitcoin_gateway');

var api = new BitcoinGateway.DefaultApi()

var token = token_example; // {String} auth token (check in pair with IP)

var transactionId = transactionId_example; // {String} Order ID for history


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.gatewayIpnGet(token, transactionId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class gatewayIpnGetExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();
            var token = token_example;  // String | auth token (check in pair with IP)
            var transactionId = transactionId_example;  // String | Order ID for history

            try
            {
                array[Data] result = apiInstance.gatewayIpnGet(token, transactionId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.gatewayIpnGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DefaultApi();
$token = token_example; // String | auth token (check in pair with IP)
$transactionId = transactionId_example; // String | Order ID for history

try {
    $result = $api_instance->gatewayIpnGet($token, $transactionId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->gatewayIpnGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $token = token_example; # String | auth token (check in pair with IP)
my $transactionId = transactionId_example; # String | Order ID for history

eval { 
    my $result = $api_instance->gatewayIpnGet(token => $token, transactionId => $transactionId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->gatewayIpnGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
token = token_example # String | auth token (check in pair with IP)
transactionId = transactionId_example # String | Order ID for history

try: 
    api_response = api_instance.gateway_ipn_get(token, transactionId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->gatewayIpnGet: %s\n" % e)

Parameters

Query parameters
Name Description
token*
String (string)
auth token (check in pair with IP)
Required
transaction_id*
String (string)
Order ID for history
Required

Responses

Status: 200 - get transaction detail

Status: 404 - transaction not found


Generated 2018-10-19T06:57:28.242Z