Website: https://www.bitonic.nl Author: Roy van Zanten Company e-mail: info@bitonic.nl Author e-mail: bitmerchant@bitonic.nl BITMERCHANT API DOCS V0.1 --------------------------------------------------- - Table of Contents - 1 - Get your Bitonic merchant key 1.1 - Register & login 1.2 - Create merchants 1.3 - Your merchant key 2 - Start a payment 2.1 - Initiating 2.2 - Response 3 - Checking the status of a payment 3.1 - Reporting 3.2 - Fetch transaction status --------------------------------------------------- [1] Get your Bitonic merchant key [1.1] Register & login (If you already have a verified Bitonic user account and you are logged in, then skip this step.) -Browse to: https://www.bitonic.nl/user-signup -Register as a Bitonic user. -Activate your account by clicking the activation link in the email -Log in with your email and password at: https://www.bitonic.nl/user -Please send us the according documents to get your account verified. This is needed to turn off test mode and accept real Bitcoin payments. [1.2] Create a merchant -Click the button : 'Voeg winkel toe'. A form will appear. -Fill in all the requested information and submit the form by clicking the button 'Verzenden' if you agree with the terms and conditions which you can find on the left hand of the submit button. -If the merchant form did not show any errors you will be redirected to the same page, only this time you will see a blue bar with the name of your shop. You just created your own merchant! [1.3] Your merchant key -Open the merchant tab by clicking the blue bar wich contains the regarding merchant name. -You will see all the info about your merchant. -Under the heading: 'Technische informatie' you will find your merchant key. Its very important that you keep this string of letters and numbers a secret. --------------------------------------------------- [2] Start a payment [2.1] Initiating To start a payment you first need to initiate one. Make a get or post request to http://www.bitonic.nl/json/btcpay Add the following parameters to the request: euro The amount in euro cents multiplied by 100 This amount must be between 100 and 500000. description A description which is showed to the customer on the payment page. return_url An url where the customer gets returned to. report_url The url where Bitonic can report the status of the payment. merchant_key Your merchant key. euro_payout_percentage (Optional) The euro payout percentage of this particular transaction. Set to 25 will pay out the merchant 25% paid out in euros and 75% in Bitcoins. If this field is empty, the transaction will use the user defined value from the control panel. This field is optional. [2.2] Response A response from our JSON API would be build up like this: result (fail) errors {} or result (success) url: payment page-url transaction_id: transaction id If the result of the requested payment returns success you can grab the payment url and redirect your customer to this url. The customer will land on the payment page where the regarding euro amount can be paid in Bitcoins. --------------------------------------------------- [3] Checking the status of a payment [3.1] Reporting Once the requested payment is paid in full and when the actual transaction is confirmed once by the Bitcoin network, Bitonic will make a call to the given report url 2 times with the transaction_id as GET value. This call will not contain the status. [3.2] Fetch transaction status To fetch the status of a payment, make a request to https://bitonic.nl/json/btcpay/check and add the following parameters: merchant_key Your merchant key. transaction_id The transaction id which has been received at the initiation of the payment. You will get a response with the following data: result (fail) error {} or result (success) status (open/paid/confirmed/cancelled/expired/failure) amount: paid amount in euro cents