Authenticated resources that allows you to create a user. Any credentials that do not belong to an existing user will be used to create a new user.

Examples

# Request
POST /api/v1/users
{
    "button": {
        "name": "test",
        "type": "buy_now",
        "price_string": "1.23",
        "price_currency_iso": "USD",
        "custom": "Order123",
        "callback_url": "http://www.example.com/my_custom_button_callback",
        "description": "Sample description",
        "type": "buy_now",
        "style": "custom_large",
        "include_email": true
    }
}

# Reponse
{
    "success": true,
    "button": {
        "code": "93865b9cae83706ae59220c013bc0afd",
        "type": "buy_now",
        "style": "custom_large",
        "text": "Pay With Bitcoin",
        "name": "test",
        "description": "Sample description",
        "custom": "Order123",
        "callback_url": "http://www.example.com/my_custom_button_callback",
        "price": {
            "cents": 123,
            "currency_iso": "USD"
        }
    }
}
  

Params

Param name Description
button
required

Button object containing the following params


Value: Must be a Hash
button[name]
required

The name of the item for which you are collecting bitcoin. For example, Acme Order #123 or Annual Pledge Drive


Value: Must be String
button[price_string]
required

Price as a decimal string, for example 1.23. Can be more then two significant digits if price_currency_iso equals BTC.


Value: Must be String
button[price_currency_iso]
required

Price currency as an ISO 4217 code such as USD or BTC. This determines what currency the price is shown in on the payment widget.


Value: Must be String
button[type]
optional

One of buy_now, donation, and subscription. Default is buy_now.


Value: Must be String
button[style]
optional

One of buy_now_large, buy_now_small, donation_large, donation_small, subscription_large, subscription_small, custom_large, custom_small, and none. Default is buy_now_large. none is used if you plan on triggering the payment modal yourself using your own button or link.


Value: Must be String
button[text]
optional

Allows you to customize the button text on custom_large and custom_small styles. Default is Pay With Bitcoin.


Value: Must be String
button[description]
optional

Longer description of the item in case you want it added to the user’s transaction notes.


Value: Must be String
button[custom]
optional

An optional custom parameter. Usually an Order, User, or Product ID corresponding to a record in your database.


Value: Must be String
button[callback_url]
optional

A custom callback URL specific to this button. It will receive the same information that would otherwise be sent to your Instant Payment Notification URL. If you have an Instant Payment Notification URL set on your account, this will be called instead — they will not both be called.


Value: Must be String
button[success_url]
optional

A custom success URL specific to this button. The user will be redirected to this URL after a successful payment. It will receive the same parameters that would otherwise be sent to the default success url set on the account.


Value: Must be String
button[cancel_url]
optional

A custom cancel URL specific to this button. The user will be redirected to this URL after a canceled order. It will receive the same parameters that would otherwise be sent to the default cancel url set on the account.


Value: Must be String
button[info_url]
optional

A custom info URL specific to this button. Displayed to the user after a successful purchase for sharing. It will receive the same parameters that would otherwise be sent to the default info url set on the account.


Value: Must be String
button[variable_price]
optional

Allow users to change the price on the generated button.


Value: Must be Boolean
button[choose_price]
optional

Show some suggested prices


Value: Must be Boolean
button[include_address]
optional

Collect shipping address from customer (not for use with inline iframes).


Value: Must be Boolean
button[include_email]
optional

Collect email address from customer (not for use with inline iframes).


Value: Must be Boolean
button[price1]
optional

Suggested price 1


Value: Must be String
button[price2]
optional

Suggested price 2


Value: Must be String
button[price3]
optional

Suggested price 3


Value: Must be String
button[price4]
optional

Suggested price 4


Value: Must be String
button[price5]
optional

Suggested price 5


Value: Must be String
comments powered by Disqus