Create Payment Intent
To allow the checkout of a shopping cart being managed on your website, it's mandatory to configure an Intent. The Intent contains the necessary information to generate the Lightning Network invoice.
Without setting up an Intent it's impossible to receive a payment in TurinPay
Uri
Headers
GraphQL Query
Variables (sample)
Parameters description
orderId: (mandatory) identifier of the order associated to this payment intent in your system.
description: (mandatory) description associated to the payment intent.
currency: (mandatory) currency associated to the payment intent. EUR or USD allowed.
price: (mandatory) price associated to the payment intent. Directly related with the currency field.
initDate: (mandatory) Init Date of the period of validity of the payment intent.
endDate: (mandatory) End Date of the period of validity of the payment intent.
multipleInvoicesAllowed: (optional, false as default value) if true, multiple invoices could be created from this payment intent.
invoiceExpirationTimeMin: (optional, 30 as default value) Expiration time used in the creation of the invoice from this payment intent.
onlyLN: (mandatory) if true, only Lightning invoices will be generated from this payment intent. If false, the invoice creation result will contain info related with BTC, that will allow the invoice onchain payment.
notificationUrl: (mandatory) webhook url that will be used when an invoice associated to this payment intent has been paid.
Last updated