This page will help you get started with Bitload4u. You'll be up and running in a jiffy!
Welcome to the Bitload4u API! You can use our API for payin from bitcoin, payout to bitcoin/bank/card etc. as well as getting information of previous transactions.
We have language bindings in cURL for now. cURL examples are provided and can be used in other languages as well. Code examples are viewable in the dark area to the right. Programming language of the examples can be switched via links on top of example box.
To start accepting payments using Bitload4u, you need:
A Bitload4u invoice can be in one of a number of states.
There are two sets of invoice states that may be consulted; base states and exception states. Base states provide a simple and straight-forward understanding of the overall status of an invoice. Exception states provide additional details about the status of the invoice if a payment exception has occurred.
Exception states are used for detecting payment exceptions and subsequent execution of automated rules to perform certain customer support operations. For example, using exception states it is possible to detect an under paid invoice, apply decision logic, and either refund the payment or accept the under payment (thereby updating the invoice to match the amount paid) - all without customer support desk intervention.
paid
As soon as payment is received it is evaluated against the invoice requested amount. If the amount paid is equal to or greater than the amount expected then the invoice is marked as being paid. To detect whether the invoice has been overpaid consult the invoice exception status (exStatus).
confirmed
The transaction speed preference of an invoice determines when an invoice is confirmed. For the high speed setting, it will be confirmed as soon as full payment is received on the bitcoin network (note, the invoice will go from a status of new to confirmed, bypassing the paid status). For the medium speed setting, the invoice is confirmed after the payment transaction(s) have been confirmed by 1 block on the bitcoin network. For the low speed setting, 6 blocks on the bitcoin network are required. Invoices are considered complete after 6 blocks on the bitcoin network, therefore an invoice will go from a paid status directly to a complete status if the transaction speed is set to low.
The Bitload4u API attempts to return the appropriate HTTP status code for every API request to indicate success or failure.
HTTP Status Code | Description |
---|---|
200 - OK |
Worked as expected. |
400 - Bad Request |
Invalid API request due to omitted required field or invalid field value etc. 1 |
401 - Unauthorized |
Authentication Error. Access ID or Secret Key is invalid. |
404 - Not Found |
The requested resource does not exist. |
5xx - Server Errors |
gateway_error or api_error. |
A payin has following flow
QR is created when a user (the customer) fills in and submits the payin information and it is sent to the Bitload4u API. The payin API will send QR in a HTML page in response. Validity is 15 minutes for that particular invoice. No processing has been done on the payin at this stage.
Next step for payin is scanning the QR Code, which was generated previously. User can scan the code from their BTC wallet and pay.
Bitload4U API server will send the payment details to the merchant's callback url as soon as status is changed.
A payout has following flow
User (the customer) fills in Bitcoin address and amount to the Bitload4U API. Bitcoin will be added to user's wallet.
Bitload4U API server will send the payment details to the marchent's callback url as soon as status is changed.
Currencies are fiat currencies supported by Bitload4u
curl --request GET \
--url https://test.bitload4u.com/currencies
Retrieves the list of countries with shortcode, region etc.
curl --request GET \
--url https://test.bitload4u.com/countries
Provides the btc address for the payment. Currency and amount are optional.
secret_id : xxxxxxxxxxxxx
Content-Type : application/json
Accept : application/json
{ merchant_id : [string, required], transactionId : [string, required], currency: [string, optional], amount: [string, optional] }
curl --request POST \
--url https://test.bitload4u.com/payin \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"merchant_id": "xxxxxxxxxxxxx",
"transactionId": "xxxxxxxxxxxxxxxxxx",
"currency":"eur",
"amount":"1"
}'
{"transaction_id":"xxxxxxxxx","status":"paid","confirmation":"0","satoshi_value":"87410","euro_value":"6.08","usd_value":"7.11","transaction_hash":"bcdddxxxxxxxdfaab8165f0a7a"}
{"transaction_id":"xxxxxxxxx","status":"confirmed","confirmation":"5","satoshi_value":"87410","euro_value":"6.08","usd_value":"7.11","transaction_hash":"bcddd8xxxxxxxdfaab8165f0a7a"}
Retrieves satoshi amount paid by the user. Response is same as in the callback of payin.
transactionId : [string, required] (unique transaction id which was requested.)
curl -X GET \
https://test.bitload4u.com/payin/xxxxxxxxxxx \
-H 'merchant_id: xxxxxxxxxxxx' \
-H 'secret_id: KSfUBlz6bxxxxxxxxxxxxxxxxxF5GqCa0oO4d7k='
Retrieves the required fields for a perticular country. Get country list API: https://test.bitload4u.com/countries For this request, send the shortCode(Two digit country code) as a query parameters
country : [string, required] (Two digit country code)
curl --request GET \
--url 'https://test.bitload4u.com/payout/bank/iban/fields?country=US'
Get required bank fields by sending the two digit country code from this API: https://test.bitload4u.com/payout/bank/iban/fields?country=US
secret_id : xxxxxxxxxxxxx
Content-Type : application/json
{ "country": [string, required], "merchant_id": [string, required], "bank": { "BANK_NAME": [string, required], "BIC": [string, required], "IBAN": [string, required], "CUSTOMER_NAME": [string, required], "HOLDING_BRANCH": [string, required] }, "transaction": { "transactionId": [string, required], "transactionMessage": [string, required], "amount": "[string, required], "currency": [string, required] } }
curl --request POST \
--url https://test.bitload4u.com/payout/bank/iban \
--header 'content-type: application/json' \
--header 'secret_id: xxxxxxxxxxxxxx' \
--data '{
"country": "MT",
"merchant_id": "xxxxxxxxxxxxxx",
"bank": {
"BANK_NAME": "SATA BANK",
"BIC":"STBAMTMT",
"IBAN":"MT14STBA19116000000001041918741",
"CUSTOMER_NAME":"BITLOAD4U LTD",
"HOLDING_BRANCH":"VALLETA"
},
"transaction": {
"transactionId": "xxxxxxxxxxxxxx",
"transactionMessage": "Test",
"amount": "100",
"currency": "CAD"
}
}'
Retrieves the IBAN payout by transactionId
secret_id : xxxxxxxxxxxxx
curl --request GET \
--url https://test.bitload4u.com/payout/bank/iban/:transactionId \
--header 'secret_id: xxxxxxxxxxxxxxxx'
secret_id : xxxxxxxxxxxxx
Content-Type : application/json
{ "merchant_id": [string, required], "card": { "cardExMonth": [string, required], "cardExYear": [string, required], "cardNumber": [string, required], "securityCode": [string, required] }, "transaction": { "transactionId": [string, required], "transactionMessage": [string], "amount": [string, required], "currency": [string, required] } }
curl --request POST \
--url https://test.bitload4u.com/payout/card \
--header 'content-type: application/json' \
--header 'secret_id: xxxxxxxxxxxxxx' \
--data '{
"merchant_id": "xxxxxxxxxxxxxx",
"card": {
"cardExMonth": "04",
"cardExYear": "22",
"cardNumber": "4111 1111 1111 1111",
"securityCode": "321"
},
"transaction": {
"transactionId": "xxxxxxxxxxxxxx",
"transactionMessage": "Test",
"amount": "100",
"currency": "EUR"
}
}'
Retrieves the PAC payout by transactionId
secret_id : xxxxxxxxxxxxx
curl --request GET \
--url https://test.bitload4u.com/payout/card/:transactionId \
--header 'secret_id: xxxxxxxxxxxxxxxx'
Retrieves the list of states available for ACH
curl --request GET \
--url https://test.bitload4u.com/payout/bank/ach/states
secret_id : xxxxxxxxxxxxx
Content-Type : application/json
{ "merchant_id": [string, required], "bank": { "ACCOUNT_TYPE": [string, required], "ACCOUNT_NUMBER": [string, required]", "ACCOUNT_NAME": [string, required], "BANK_NAME": [string, required], "BANK_NUMBER": [string, required], "CUSTOMER_STATE": [string, required] }, "transaction": { "transactionId": [string, required], "transactionMessage": [string], "amount": [string, required] } }
curl --request POST \
--url https://test.bitload4u.com/payout/bank/ach \
--header 'content-type: application/json' \
--header 'secret_id: xxxxxxxxxxxxxx' \
--data '{
"merchant_id": "xxxxxxxxxxxxx",
"bank": {
"ACCOUNT_TYPE": "Checking",
"ACCOUNT_NUMBER":"xxxxxxxxx",
"ACCOUNT_NAME":"BITLOAD4U LTD",
"BANK_NAME": "SATA BANK",
"BANK_NUMBER":"xxxxxxxxx",
"CUSTOMER_STATE":"AK"
},
"transaction": {
"transactionId": "xxxxxxxxxxxxxx",
"transactionMessage": "Test",
"amount": "100"
}
}'
Retrieves the ACH payout by transactionId
secret_id : xxxxxxxxxxxxx
curl --request GET \
--url https://test.bitload4u.com/payout/bank/ach/:transactionId \
--header 'secret_id: xxxxxxxxxxxxxxxx'