1.0.0 • Published 3 years ago
@blockbee/checkout v1.0.0
BlockBee's Checkout NodeJS Library
NodeJS's implementation of BlockBee's Checkout payment gateway
Install
npm install @blockbee/checkoutUsage
Importing in your project file
var BlockBee = require('@blockbee/checkout')Requesting Payment
const bb = new BlockBee(apiKey, params, blockbeeParams)
const address = await bb.paymentRequest(redirectUrl, value)Where:
api_keyis the API Key provided by our Dashboard.paramsis any parameter you wish to send to identify the payment, such as{order_id: 1234}.bb_paramsparameters that will be passed to BlockBee _(check which extra parameters are available here: https://docs.blockbee.io/#operation/create).redirect_urlURL in your platform, where the user will be redirected to following the payment. Should be able to process the payment using thesuccess_token.valueamount in currency set in Payment Settings you want to receive from the user.
Getting notified when the user completes the Payment
When receiving payments, you have the option to receive them in either the
notify_urlor theredirect_url, but adding theredirect_urlis required (refer to our documentation at https://docs.blockbee.io/#operation/paymentipn).
Requesting Deposit
const bb = new BlockBee(apiKey, params, blockbeeParams)
const address = await bb.depositRequest(notifyUrl)api_keyis the API Key provided by our Dashboard.paramsis any parameter you wish to send to identify the payment, such as{order_id: 1234}.bb_paramsparameters that will be passed to BlockBee _(check which extra parameters are available here: https://docs.blockbee.io/#operation/deposit).notify_urlURL in your platform, where the IPN will be sent notifying that a deposit was done. Parameters are available here: https://docs.blockbee.io/#operation/depositipn.
Help
Need help?
Contact us @ https://blockbee.io/contacts/
Changelog
1.0.0
- Initial Release
1.0.0
3 years ago