Payments
Specify the amount you need of a token (e.g. stable coin) or BitcoinSV
As We learned in the earlier section about invoices, there are advantages to pre-determine request amounts. From a infrastructure perspective, it is advantageous to create invoice alike schemas even if no invoice was given to exactly determine what script to use to make certain payments.
Whereas the payment endpoint is essential to complete invoice requests, we created utility wrappers around the pay endpoint, such as the /send endpoint that lets you define address, type and amount to make transactions in a simpler format.
To make a invoice payment, take the response of the URI endpoint (the data) without any additional changes to pay a payment invoice.
get
https://api.relysia.com
/v1/URI
Resolve address and paymail alias information.
var parameters = {
serviceId: 'optional',
walletID: 'optional',
data: {
"uri": "string",
"type": "string",
"mainProtocol": "string",
"outputs": [
{
"script": "string",
"satoshi": "string"
}
],
"inputs": [
{
"txid": "string",
"vout": 0,
"satoshis": 0,
"scriptPubKey": "string",
"scriptType": "string",
"scriptSig": "string"
}
],
"memo": "string",
"isBSV": true,
"peer": "string",
"peerData": "string",
"peerProtocol": "string"
}
}
const response = await relysia.transaction.v1.pay(parameters);
post
https://api.relysia.com
/v1/pay
Pay an invoice request.
Last modified 6mo ago