Stores
Create and manage merchant stores, configure callback URLs, and attach wallets to accept Bitcoin payments.
8 endpoints
Endpoints
The store object
A store represents a merchant storefront. Each store has a callback URL and can have one or more wallets attached to it.
Attributes
idintegerUnique identifier of the store
namestringGiven name
emailidstringEmail of the store owner
http_callbackstringCallback URL of the store
walletsarray of objects▶Show item fields
idintegerUnique identifier of the wallet
namestringGiven name
emailidstringEmail of the wallet owner
cryptostringCryptocurrency of the wallet
addressstringAddress of the wallet
xpub_indexintegerThe current xPub index for BTC wallet
gap_limitintegerThe gap limit for BTC wallet
created_atstring (date-time)Datetime of the wallet creation
balanceobjectAggregate wallet balance (only present when balance=true is requested).
▶Show nested fields
confirmed_satsintegerConfirmed balance in satoshis.
unconfirmed_satsintegerUnconfirmed balance in satoshis.
confirmed_fiatnumberConfirmed balance in fiat currency.
unconfirmed_fiatnumberUnconfirmed balance in fiat currency.
fiat_currencystringFiat currency code.
total_addressesintegerTotal number of derived addresses.
Example object
{
"id": 0,
"name": "",
"emailid": "",
"http_callback": "",
"wallets": [
{
"id": 0,
"name": "",
"emailid": "",
"crypto": "",
"address": "",
"xpub_index": 0,
"gap_limit": 0,
"created_at": "2024-01-01T00:00:00Z",
"balance": {
"confirmed_sats": 0,
"unconfirmed_sats": 0,
"confirmed_fiat": 0,
"unconfirmed_fiat": 0,
"fiat_currency": "",
"total_addresses": 0
}
}
]
}/v2/storesAuth requiredList all stores
Returns a list of all stores associated with your Blockonomics account.
Requires Bearer token authentication. Include Authorization: Bearer YOUR_API_KEY in the request header.
Query Parameters
walletsbooleandefault: falseWhether to include details of attached wallets
Responses
walletsquery · booleanWhether to include details of attached wallets
Response will appear here
/v2/storesAuth requiredCreate a new store
Create a new store in your Blockonomics account.
Requires Bearer token authentication. Include Authorization: Bearer YOUR_API_KEY in the request header.
Request Body
namestringName of the store
http_callbackstringrequiredWebsite's callback URL
Responses
namebody · stringName of the store
http_callbackbody · stringrequiredWebsite's callback URL
Response will appear here
/v2/stores/{id}Auth requiredGet store details
Returns details of a specific store.
Requires Bearer token authentication. Include Authorization: Bearer YOUR_API_KEY in the request header.
Path Parameters
idintegerrequiredThe unique ID of the store
Responses
idpath · integerrequiredThe unique ID of the store
Response will appear here
/v2/stores/{id}Auth requiredUpdate a store
Update the details of a specific store.
Requires Bearer token authentication. Include Authorization: Bearer YOUR_API_KEY in the request header.
Path Parameters
idintegerrequiredThe unique ID of the store
Request Body
namestringNew name for the store
http_callbackstringNew callback URL for the store
Responses
idpath · integerrequiredThe unique ID of the store
namebody · stringNew name for the store
http_callbackbody · stringNew callback URL for the store
Response will appear here
/v2/stores/{id}Auth requiredDelete store
Delete a store from your Blockonomics account.
Requires Bearer token authentication. Include Authorization: Bearer YOUR_API_KEY in the request header.
Path Parameters
idintegerrequiredThe unique ID of the store
Responses
idpath · integerrequiredThe unique ID of the store
Response will appear here
/v2/stores/{id}/walletsAuth requiredGet store wallets
Returns a list of wallets attached to a specific store.
Requires Bearer token authentication. Include Authorization: Bearer YOUR_API_KEY in the request header.
Path Parameters
idintegerrequiredThe unique ID of the store
Responses
idpath · integerrequiredThe unique ID of the store
Response will appear here
/v2/stores/{id}/walletsAuth requiredAttach wallet to store
Attach an existing wallet in your Blockonomics account to a specific store.
Requires Bearer token authentication. Include Authorization: Bearer YOUR_API_KEY in the request header.
Path Parameters
idintegerrequiredThe unique ID of the store
Request Body
wallet_idintegerrequiredThe unique ID of the wallet to attach
Responses
idpath · integerrequiredThe unique ID of the store
wallet_idbody · integerrequiredThe unique ID of the wallet to attach
Response will appear here
/v2/stores/{id}/wallets/{wallet_id}Auth requiredDetach wallet from store
Detach a wallet from a specific store.
Requires Bearer token authentication. Include Authorization: Bearer YOUR_API_KEY in the request header.
Path Parameters
idintegerrequiredThe unique ID of the store
wallet_idintegerrequiredThe unique ID of the wallet to detach
Responses
idpath · integerrequiredThe unique ID of the store
wallet_idpath · integerrequiredThe unique ID of the wallet to detach
Response will appear here