mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
17 lines
429 B
TypeScript
17 lines
429 B
TypeScript
import { receivePayment } from '@breeztech/react-native-breez-sdk'
|
|
|
|
const exampleReceiveLightningPayment = async () => {
|
|
// ANCHOR: receive-payment
|
|
try {
|
|
const receivePaymentResponse = await receivePayment({
|
|
amountMsat: 3_000_000,
|
|
description: 'Invoice for 3000 sats'
|
|
})
|
|
|
|
const invoice = receivePaymentResponse.lnInvoice
|
|
} catch (err) {
|
|
console.error(err)
|
|
}
|
|
// ANCHOR_END: receive-payment
|
|
}
|