Get Invoice
Resolving an invoice to make a payment
Last updated
Resolving an invoice to make a payment
Last updated
Once an invoice is created, it is essential to provide a means for another party to receive the invoice and proceed with the payment. The response from the "/invoice" endpoint, typically in JSON format, can be utilized to extract the relevant information required for this process. There are 2 ways to resolve an invoice:
Using an internal invoice ID query for any invoices that may be stored locally.
Using the URL extension in the endpoint that can be resolved externally.
In this method simply pass in the invoice Id value returned from the create invoice step which will return an invoice JSON related to that service ID.
GET
https://api.relysia.com/v1/paymentRequest/:invoiceId
Return Invoice JSON from an internal service using the invoice Id value.
invoiceId*
String
Invoice Id provided from creating invoice
GET
https://api.relysia.com/v1/URI
The URI endpoint helps developers to resolve addresses, paymails and invoices and puts them into a standardized response format.
URI*
Invoice URI provided in the /invoice response in the "uri" field
Depending whether your invoice is DPP or BIP270 will determine the type of response returned. Here are both examples.
These responses can be directly used to make a payment. In the next section we will see how to use these response values.
In this method, invoices can be obtained by utilizing a endpoint with a specific URL extension. This approach serves as a way to externally receive invoices from the system. Here is an example of the URL extended format that is used in the URI endpoint to resolve the invoice and can be found in the "uri" field when creating the invoice.