Ajax loader
closes in 10 sec
You've just discovered an error in our application, we've been notified and will take care of it.

Documentation

Create

URL STRUCTURE

POST https://gateway.gear.mycelium.com/api/gateways

PARAMETERS (* Required field)

name* (String) Gateway name (will appear on payment page)
pubkey* (String) BIP32 public key
confirmations_required* (Integer) Bitcoin network confirmations required (0-6)
orders_expiration_period* (Integer) Time (in seconds) which is given customer to make payment
default_currency* (String) Currency code (ISO 4217) in which prices are shown to customer
active (Boolean) Whether a gateway can process new orders
test_mode (Boolean) Whether to use testnet for payment processing
test_pubkey (String) BIP32 testnet pulic key (used when test_mode is true)
address_derivation_scheme (String) Address derivation scheme: m/0/n or n
callback_url (String) URL to send server POST notifications of order statuses
auto_redirect (Boolean) Whether to enable redirection on successful payment
after_payment_redirect_to (String) URL to which redirect customers after successful payment (if auto_redirect is true)
back_url (String) URL to which redirect customers on order cancellation
convert_currency_to (Integer) ID of Address Provider which is to process payments, otherwise string 'BTC'
exchange_rate_adapter_names (Array) Array of String names of exchange rate adapters. Default: ["Bitstamp", "Btce", "Kraken"]
receive_payments_notifications (Boolean) Whether to send email notifications of payments
allow_links (Boolean) Allow links and <a> tags in field values
api_gateway_id (Integer) Straight server gateway ID
custom_css_url (String) URL to CSS file with a payment UI customizations
description (Integer) Description of merchant
merchant_url (Integer) URL of merchant site
country (String) Country of merchant
city (String) City of merchant
region (Integer) Region of merchant

RETURNS

id (Integer) ID of Gateway
secret (String) API secret (showed only on creation and regeneration)
name (String) Gateway name (will appear on payment page)
pubkey (String) BIP32 public key
confirmations_required (Integer) Bitcoin network confirmations required (0-6)
orders_expiration_period (Integer) Time (in seconds) which is given customer to make payment
default_currency (String) Currency code (ISO 4217) in which prices are shown to customer
active (Boolean) Whether a gateway can process new orders
test_mode (Boolean) Whether to use testnet for payment processing
test_pubkey (String) BIP32 testnet pulic key (used when test_mode is true)
address_derivation_scheme (String) Address derivation scheme: m/0/n or n
callback_url (String) URL to send server POST notifications of order statuses
auto_redirect (Boolean) Whether to enable redirection on successful payment
after_payment_redirect_to (String) URL to which redirect customers after successful payment (if auto_redirect is true)
back_url (String) URL to which redirect customers on order cancellation
convert_currency_to (Integer) ID of Address Provider which is to process payments, otherwise string 'BTC'
exchange_rate_adapter_names (Array) Array of String names of exchange rate adapters. Default: ["Bitstamp", "Btce", "Kraken"]
receive_payments_notifications (Boolean) Whether to send email notifications of payments
allow_links (Boolean) Allow links and <a> tags in field values
api_gateway_id (Integer) Straight server gateway ID
custom_css_url (String) URL to CSS file with a payment UI customizations
description (Integer) Description of merchant
merchant_url (Integer) URL of merchant site
country (String) Country of merchant
city (String) City of merchant
region (Integer) Region of merchant

Example Request

REQUEST POST https://gateway.gear.mycelium.com/api/gateways
PARAMETERS
{
  "name": "Test gateway",
  "pubkey": "xpub661MyMwAqRbcGTVZXfa6XHb9VHLBZ8BqyGpRdVFryUDEC4TQq1Y9L2r7Am9d5TUGVQfbfMr7PB1jZqY4bSmh34ZprSKwJ9BSGmPnKJPMVZy",
  "confirmations_required": 1,
  "orders_expiration_period": 1000,
  "default_currency": "USD"
}
RETURNS
{
  "id": 4,
  "name": "Test gateway",
  "confirmations_required": 1,
  "orders_expiration_period": 1000,
  "default_currency": "USD",
  "pubkey": "xpub661MyMwAqRbcGTVZXfa6XHb9VHLBZ8BqyGpRdVFryUDEC4TQq1Y9L2r7Am9d5TUGVQfbfMr7PB1jZqY4bSmh34ZprSKwJ9BSGmPnKJPMVZy",
  "active": true,
  "address_derivation_scheme": "m/0/n",
  "callback_url": null,
  "after_payment_redirect_to": null,
  "auto_redirect": false,
  "city": null,
  "test_pubkey": null,
  "test_mode": false,
  "convert_currency_to": "BTC",
  "country": null,
  "exchange_rate_adapter_names": [
    "Bitstamp",
    "Btce",
    "Kraken",
    "Bitpay"
  ],
  "description": null,
  "merchant_url": null,
  "receive_payments_notifications": false,
  "region": null,
  "locale": null,
  "allow_links": false,
  "secret": "32zyyq7KSurYKofePoarY8QA8RdcTTgjGvwZxqDtKkpWY7tPQ5NRqu5aP3VWYz7R",
  "api_gateway_id": "546c6503395d19ccb6742066aae06a361ad701b76f18fefd161a97d262cd2cf7",
  "back_url": null,
  "custom_css_url": null
}