📀Store, Interact and Do After Actions
Step Five - Store, Interact and Do After Actions
Processing of Metadata By WebLN Powered Bitcoin Lightning Wallets and Browser Extensions
After Actions Performed by Bitcoin Lightning Driven Web Apps
webln.sendPayment(invoice, metadata)
.then(function (r) {
// Required constraint to protect metadata as a rule while paying empty invoices
if (r != undefined) {
// Provide metadata after successful payment
// Eg. Allow users to download a song after payment is successful
}
})
.catch(function (e) {
alert("Failed: " + e.message);
console.log('err pay:', e);
});Last updated