With SetGetGo, you can use anonymous GET calls in order to create payments, get payments status and also get the latest exchange rates.

SetGetGo is a simple, reliable and fast way to accept Bitcoin on your website.
No registration needed, no credentials to store, no complex authentication required.


It is that simple!
Just SET your input parameters, make a GET call to the endpoint with the required data and you are good to GO!


How does it work

When the payment amount and 6 confirmations have been received at the payment address, SetGetGo will transfer the BTC amount to the merchant address;
At that point only, SetGetGo will apply a flat 0.0025 BTC fee to the amount sent to the merchant address.

Important:
SetGetGo will keep checking an address for 24 hours, if the funds have not been deposited within this timeframe (and confirmed) then the transaction will be abandoned and flagged as expired.


What I need to get started

To start using SetGetGo you just need a BTC wallet and a receiving address where you want us to send you your coins.

To create a new BTC wallet, you can use external providers like CoinBase.

Sample code which shows how easy and stress-free it is to create a new payment using SetGetGo.
Simply call the desired endpoint, provide the required parameters and read the JSON response.

using( var httpClient = new HttpClient()) 
{
    var setGetGoCreatePaymentUri = "https://setgetgo.com/api/create-payment?amount=2.2&merch_addr=moJCudny79kaq2ZAjYtLxHYnZAxajjnPzD&testnet=true";
    var response = await httpClient.GetAsync(setGetGoCreatePaymentUri);
    return await response.Content.ReadAsStringAsync();  
}
var dataString = "amount=2.2&merch_addr=moJCudny79kaq2ZAjYtLxHYnZAxajjnPzD&testnet=true";
$.ajax ({
  type: "GET",
  url: "https://setgetgo.com/api/create-payment",
  data: dataString,
  success: function(response) { alert(response); }
});

This endpoint creates a new payment transaction.


HTTP Request


GET https://setgetgo.com/api/create-payment

Query string parameters


Parameter Type Required Description
amount decimal YES The amount for this transaction espressed as a decimal number.
merch_addr string YES The address where the merchant will receive the amount of BTC if the payment is successful.
testnet boolean NO If set to true, the transaction will be generated in the testnet BTC network.

Response fields

Field Type Description
payment-address string The BTC address where the buyer needs to send the coins to.
merchant-address string The BTC address where the merchant will receive the amount of BTC if the payment is successful.
created-on datetime The string represenation of the datetime of when the payment transaction has been created.
DateTime format is: "YYYY-MM-ddThh:mm:ss Z"
expires-on datetime The string represenation of the datetime of when the payment transaction will expire.
DateTime format is: "YYYY-MM-ddThh:mm:ss Z"
amount decimal The amount of BTC for the buyer to send.
amount-received decimal The amount of BTC which has been received so far.
custom-field string A text field which can be used by the merchant to add additional context to a transaction. Like POS data or a customer identifier.

Important
Since the payment transactions are publicly accessible, it is advisable to avoid any personal details to this field.
currency string The payment transaction currency. Currently always set to "BTC".
status string The status of the payment transaction. See payment statuses to inspect the full list.
is-testnet boolean true if the payment transaction has been created into the BTC TestNet network, false otherwise.
btc-tx-id string The string representation of the BTC transaction id related to a payment made for this SetGetGo payment.
Default value to null when a new transaction is being created.
error string Set to "ok" to confirm that a new payment has been successfully created.
Field Type Description
error string A string description of the encoutered error.

Example


REQUEST
curl https://setgetgo.com/api/create-payment?amount=1.2&merch_addr=moJCudny79kaq2ZAjYtLxHYnZAxajjnPzD&testnet=true

RESPONSE
{
   "transaction": {
      "payment-address": "mzd1cLNZgXEduj3GeJ3iXUW5izhxtbSHJy",
      "merchant-address": "moJCudny79kaq2ZAjYtLxHYnZAxajjnPzD",
      "created-on": "2017-11-18T15:15:41.8655045Z",
      "expires-on": "2017-11-19T03:15:41.8655045Z",
      "amount": 1.2,
      "amount-received": 0,
      "custom-field": null,
      "currency": "BTC",
      "status": "pending",
      "is-testnet": true,
      "btc-tx-id": null
   },
   "error": "ok"
}

You can create a new payment within a modal dialog on your website, in that way the consumer doesn't have to leave your site during the process.


1. To use the modal dialog, just add a reference to the setgetgo.js file into your page:

<script type="text/javascript" src="https://setgetgo.com/scripts/setgetgo.js"></script>

2. Add a button or even a generic <div> with id=sgg_create-payment-btn


3. Decorate your div with the following parameters: sgg-amount , sgg-merch-addr , sgg-testnet which will be used to generate your payment request.

Demo button




The modal will automatically update showing the latest state of the current payment.


Code example

<script type="text/javascript" src="https://setgetgo.com/scripts/setgetgo.js"></script>
<button type="submit" id="sgg_create-payment-btn" 
    sgg-amount="0.005" 
    sgg-merch-addr="mnQmbmvpDm7aRpubja8hZL8ihjtM3RdQYi" 
    sgg-testnet="true" 
    class="btn btn-lg btn-warning">
        <i class="fa fa-btc" aria-hidden="true"></i> Pay with SetGetGo
</button>

Button parameters


Parameter Type Required Description
sgg-amount decimal YES The amount for this transaction espressed as a decimal number.
sgg-merch-addr string YES The address where the merchant will receive the amount of BTC if the payment is successful.
sgg-testnet boolean NO If set to true, the transaction will be generated in the testnet BTC network.

Button generator

For an even easier integration, you can use our button generator which will generate the code you need, based on your needs.

Button Generator

This endpoint returns detailed information related to the requested transaction.


HTTP Request


GET https://setgetgo.com/api/get-payment-status

Query string parameters


Parameter Type Required Description
payment_addr string YES The payment address where which identifies the transaction.
testnet boolean NO If set to true, the transaction will be retrieved from the testnet BTC network.

Response fields

Field Type Description
payment-address string The BTC address where the buyer needs to send the coins to.
merchant-address string The BTC address where the merchant will receive the amount of BTC if the payment is successful.
created-on datetime The string represenation of the datetime of when the payment transaction has been created.
DateTime format is: "YYYY-MM-ddThh:mm:ss Z"
expires-on datetime The string represenation of the datetime of when the payment transaction will expire.
DateTime format is: "YYYY-MM-ddThh:mm:ss Z"
amount decimal The amount of BTC for the buyer to send.
amount-received decimal The amount of BTC which has been received so far.
custom-field string The text field which contains the additional data that have been assigned to this transaction payment, if any.
currency string The payment transaction currency.
status string The status of the payment transaction. See payment statuses to inspect the full list.
is-testnet boolean Set to true if the payment transaction has been created into the BTC TestNet network, false otherwise.
btc-tx-id string The string representation of the BTC transaction id related to a payment made for this SetGetGo payment.
error string Set to "ok" to confirm a successful response.
Field Type Description
error string A string description of the encoutered error.

Example


REQUEST
curl https://setgetgo.com/api/get-payment-status?payment_addr=mnQmbmvpDm7aRpubja8hZL8ihjtM3RdQYi&testnet=true

RESPONSE
{
    "transaction": {
        "payment-address": "mnQmbmvpDm7aRpubja8hZL8ihjtM3RdQYi",
        "merchant-address": "moJCudny79kaq2ZAjYtLxHYnZAxajjnPzD",
        "created-on": "2017-11-19T06:33:08.423",
        "expires-on": "2017-11-20T18:33:08.423",
        "amount": 1.2,
        "amount-received": 1.3,
        "custom-field": null,
        "currency": "BTC",
        "status": "payment_sent_to_merchant",
        "is-testnet": true,
        "btc-tx-id": "4bd935003fbc2055bace5b3213f60d93d838662d6e8ad208ad"
    },
    "error": "ok"
}

You can get the status of any payment using a simple HTML endpoint.


Calling this endpoint will point to the page related to the specified transaction. The page will automatically update reflecting the latest transaction status.

Browser Request


GET https://setgetgo.com/payment/get-payment-html

Query string parameters


Parameter Type Required Description
payment_addr string YES The payment address where which identifies the transaction.
testnet boolean NO If set to true, the transaction will be retrieved from the testnet BTC network.

Code example

<a target="_blank" href="https://setgetgo.com/payment/get-payment-html?payment_addr=&testnet=true">Link to payment request</a>

Link example

Link to payment request

This endpoint returns the ltest exchange rate of BTC to the given currency.


HTTP Request


GET https://setgetgo.com/api/get-rate

Query string parameters


Parameter Type Required Description
currency string YES The currency requested the exchange rate with BTC.

Response fields

Field Type Description
name string The currency name.
btc_rate string The current exchange rate with BTC.
full_name string The full currency name
error string Set to "ok" to confirm a successful response.
Field Type Description
error string A string description of the encoutered error.

Example


REQUEST
curl https://setgetgo.com/api/get-rate?currency=gbp

RESPONSE
{
    "rate": {
        "name": "GBP",
        "btc_rate": "0.00016432",
        "full_name": "British Pound"
    },
    "error": "ok"
}