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 fee to the amount sent to the merchant address. We take the fee calculated by the Bitcoin network to process a transaction within 20 minutes and then we add our service fee of $1.

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); }
});
A SetGetGo payment can be in one of the following states:

Pending

Any new payment starts in the pending state.
If the payment doesn't get paid within its expiration window (currently set to 24 hours), it will be be moved to the expired state.


Payment Received (Unconfirmed)

As soon as the payment has been received on the payment address, the transaction will be moved to the payment_received_unconfirmed state.
Payments in this state has been broadcasted into the Bitcoin Blockchain but no confirmation has been received yet.
This is an intermediate state which improves the user expirience, showing to the end-user that the current payment has been received but that still needs further processing.


Payment Received

Once the payment has been fully confirmed, the transaction will be moved to the payment_received state.
For security purposes we consider a payment as fully confirmed once it received at least 6 confirmations from the Bitcoin Blockchain.
If the amount paid is equal to or greater than the original transaction amount, we flag the transaction as paid and we send the amount received to the final merchant address.


Payment Received Awaiting Withdrawal

Payments in the payment_received_awaiting_withdrawal state, are payment which have been created using our Email Payment Service (SetGetGo.My).
These are transactions with a fully confirmed (6 confirmations) payment but that are waiting for the merchant to provide a valid destination address.
Once the merchant address has been provided and verified, the payment will be moved to the payment_received state.


Payment Sent To Merchant

Fully completed payments will be moved to the payment_sent_to_merchant state.
Once a payment is complete and fully confirmed, we credit the Merchant address with the amount received for that transaction.


Expired

A transaction is moved to the expired state when the payment has not been received on the payment address within the expiration window (currently 24 hours).
SetGetGo won't monitor transactions in this state any further.

A Callback is an HTTP GET message that SetGetGo sends to the provided callback URL everytime the transaction state changes.

You will need a server-side logic to handle the callback to get notified when the transaction state is changed.


Remarks

1. We only send HTTP GET request messages containing the details of the transaction, in addition to any parameter already present in the original Callback URL.
2. We only support callback URLs which use HTTPS and which are not longer than 1024 characters.
3. Make sure to properly URL Encode the Callback URL to avoid any loss of parameters being sent over.

Invalid callback URLs will just be ignored.

For security reasons we recommend to include a unique, secret parameter in your callback URL, which will be passed back to you when the callback will be sent. It should be checked against the original secret string to ensure that the received callback is coming from us and it is not forged.

To uniquely identify a received callback message, you can also add additional parameters to your callback URL like an invoice id or a payment identifier.

Make sure to not rely on whitelisting SetGetGo’s sending IP addresses, as these IP addresses are subject to change without notice.

The following table shows all the GET paramaters we will send to your server on the Query String:


Parameter Type Description
amount decimal The amount of BTC for the buyer to send.
amount_received decimal The amount of BTC which has been received so far.
merchant_address string The BTC address where the merchant will receive the amount of BTC, if the payment is successful.
status string The status of the payment transaction. See payment statuses to inspect the full list.
testnet boolean true if the payment transaction has been created into the BTC TestNet network, false otherwise.

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.
callback string NO The URL where we will send a GET notification message every time the transaction state changes.

Important

1. We only accept callbacks URLs which use HTTPS.
2. The callback URL cannot be longer than 1024 characters.
3. The callback URL has to be properly URL encoded. Otherwise a loss in the provided list of parameters may occurr.

Invalid callback URLs will be just ignored.
For more information about Receiving Callbacks please follow this link.
affid string NO The affiliate identifier.
return-url string NO The URL which will be used to return the customer to the merchant site.

Important

1. The return URL cannot be longer than 1024 characters.
2. The return URL has to be properly URL encoded. Otherwise a loss in the provided list of parameters may occurr.

Invalid return URLs will be just ignored.

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.
applied-fee decimal The amount of BTC we charged you to create this transaction.
callback-url string The URL where we will send a GET notification message every time the transaction state changes.
payment-url string The URL which will show the payment status as a simple HTML page.
affiliate-id string The affiliate identifier assigned to the transaction request.
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&callback=https://test.com/callback?invoiceId=123%26secret=thisismysecret

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,
      "applied-fee": 0.000501,
      "callback-url": "https://test.com/callback?invoiceId=123&secret=thisismysecret",
      "payment-url": "https://setgetgo.com/payment/getpaymenthtml?payment_addr=mzd1cLNZgXEduj3GeJ3iXUW5izhxtbSHJy&testnet=True",
      "affiliate-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.
applied-fee decimal The amount of BTC we charged you to create this transaction.
callback-url string The URL where we will send a GET notification message every time the transaction state will change.
payment-url string The URL which will show the payment status as a simple HTML page.
affiliate-id string The affiliate identifier assigned to the transaction request.
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",
        "applied-fee": 0.000501,
        "callback-url": null,
        "payment-url": "https://setgetgo.com/payment/getpaymenthtml?payment_addr=mnQmbmvpDm7aRpubja8hZL8ihjtM3RdQYi&testnet=True",
        "affiliate-id": null
    },
    "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 latest 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"
}