Tool for creating a aggregated gateway to accept cryptocurrencies as a payment system.
Synkrony Pay is a payment gateway application that allows e-commerce, applications and developers to implement a crypto checkout payment. With Synkrony Pay, you can pay everything you want with your 4RYA wallet, public chain or classic payment.
Follow the documentation here
This tool can be used as Express server, this is the most common method to use the library. Merchant Backend can use this tool via REST CALL locally without exposing ports to the public network. nderapprovala
- edit ./src/SynkronyPayConfig.json with your credentials
- run npm api (or 'api:dev' to use this tool in testnet environment)
This tool expose two different api endpoint:
{
"main": { "sign": "#BTC", "units": 1000000 },
"other": [{ "sign": "#EURS", "units": 1000 }],
"payload": {"yourItem" : "yourValue"}
}
Note: for Bitcoin, you must use "Satoshi" value : 1 BTX = 1 x 108 Satoshi
Note: for Euros, you must use "Cents" value : 1 EURO = 1 x 100 Cents
Note: you can fill "payload" with an object that contains any information, payment system take care about send this object in each webhook, you can store cart datail, payment id, or all e-commerce stuff that you need to recovery the cart from webhook.
take the result and use it as input parameter of PayComponent in browser
window.SynkronyPay.pay(json.paymentObject).then(payComponentResponse => {
// send the result to your server to sign & submit stransaction
});
{
"base58Bulk": "dataResultFromPayComponent.base58Bulk"
}
This tool can be used as cli command. Merchant Backend can use this tool as a shell command (batch) passing args as a json string.
- edit ./src/SynkronyPayConfig.json with your credentials
For each payment run in shell:
node ./src/cli.js -c createIntent -e dev (or -e prod) -a '{"main": { "sign": "#BTC", "units": 1000000 },"other": [{ "sign": "#EURS", "units": 1000 }],"payload": {"yourItem" : "yourValue"}}'
Note: for Bitcoin, you must use "Satoshi" value : 1 BTX = 1 x 108 Satoshi
Note: for Euros, you must use "Cents" value : 1 EURO = 1 x 100 Cents
Note: you can fill "payload" with an object that contains any information, payment system take care about send this object in each webhook, you can store cart datail, payment id, or all e-commerce stuff that you need to recovery the cart from webhook.
take the result and use it as input parameter of PayComponent in browser
window.SynkronyPay.pay(json.paymentObject).then(payComponentResponse => {
// send the result to your server to sign & submit stransaction
});
node ./src/cli.js -c submitPayment -e dev (or -e prod) -a '{"base58Bulk": "dataResultFromPayComponent.base58Bulk"}'