# @integraledger/lcp/lightning

> BOLT11 invoices and the Lightning pairings: on x402 (`x402/exact/lnbtc/payment-hash`) the ATR commits the option's `extra.paymentHash`, and on MPP the seller's node writes the ATR hash as the invoice's description hash `h`.

Source: https://lcp.integraledger.com/reference/api/lightning

Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Every page of this site is listed in https://lcp.integraledger.com/llms.txt.

BOLT11 invoices and the Lightning pairings: on x402 (`x402/exact/lnbtc/payment-hash`) the ATR commits the option's
`extra.paymentHash`, and on MPP the seller's node writes the ATR hash as the invoice's description hash `h`.

The payment hash is that of the invoice the seller's node issues after the agreement. The payer signs nothing; it
pays the invoice.

## Interfaces

### Bolt11

A decoded BOLT11 invoice. `B` is what its bytes are backed by: `decodeBolt11` gives `Bolt11<ArrayBuffer>`, each byte
field in its own fresh `ArrayBuffer`, and a function that reads one takes any backing.

#### Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `B` *extends* `ArrayBufferLike` | `ArrayBufferLike` |

#### Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="property-amountmsat"></a> `amountMsat` | `bigint` \| `null` | - |
| <a id="property-currency"></a> `currency` | `"bc"` \| `"tb"` \| `"tbs"` \| `"bcrt"` | - |
| <a id="property-description"></a> `description` | `string` \| `null` | The `d` field as strict UTF-8, a leading byte-order mark kept as a character; null when the invoice has none. |
| <a id="property-descriptionhash"></a> `descriptionHash` | `Uint8Array`\<`B`\> \| `null` | - |
| <a id="property-expiry"></a> `expiry` | `number` | - |
| <a id="property-metadata"></a> `metadata` | `Uint8Array`\<`B`\> \| `null` | - |
| <a id="property-paymenthash"></a> `paymentHash` | `Uint8Array`\<`B`\> | - |
| <a id="property-signer"></a> `signer` | `string` | The compressed secp256k1 public key that signed the invoice, as 66 lowercase hex digits: the `n` field's key where the invoice has one, and otherwise the key recovered from the signature. |
| <a id="property-tags"></a> `tags` | readonly `number`[] | Every tagged field's type, in invoice order. |
| <a id="property-timestamp"></a> `timestamp` | `number` | - |

***

### LnChoice

The buyer's choice: the 402 document, the option it pays, its validation time in Unix seconds, and its own request.

#### Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="property-accepted"></a> `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | - |
| <a id="property-now"></a> `now` | `number` | - |
| <a id="property-request"></a> `request` | [`LnbtcRequest`](#lnbtcrequest) | The request the buyer means to make, from which `build` computes the scheme's request hash. |
| <a id="property-required"></a> `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | - |

***

### LnMppChoice

#### Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="property-challenge"></a> `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | - |
| <a id="property-returninvoice"></a> `returnInvoice?` | `string` | session only: the payer's return invoice, a BOLT11 invoice with no amount, which the open action registers. |

***

### LnMppUnsigned

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-request-1"></a> `request` | `object` |
| `request.invoice` | `string` |
| `request.kind` | `"bolt11-pay"` |

#### Methods

##### complete()

> **complete**(`preimage`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential)

The credential for the paid invoice's preimage. A credential over the credential size bound, 64 KiB, its echoed
challenge included, is `mpp/credential-malformed`, as `bound` refuses it, and is read first; a preimage that is not
64 lowercase hex digits is `ln/preimage-malformed`.

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `preimage` | `string` |

###### Returns

[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential)

***

### LnRef

The read keys `reference` returns: the invoice's payment hash as lowercase hex, and when the payment can land.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-network"></a> `network` | `string` |
| <a id="property-paymenthash-1"></a> `paymentHash` | `string` |
| <a id="property-settleby"></a> `settleBy` | `number` |

***

### LnUnsigned

#### Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="property-request-2"></a> `request` | `object` | The payer's node pays exactly this invoice. |
| `request.invoice` | `string` | - |
| `request.kind` | `"bolt11-pay"` | - |

#### Methods

##### complete()

> **complete**(`preimage`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnPaymentPayload`](#lnpaymentpayload)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `preimage` | `string` |

###### Returns

[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnPaymentPayload`](#lnpaymentpayload)

## Type Aliases

### ExactLnbtcReason

> **ExactLnbtcReason** = `"unsupported_scheme"` \| `"network_mismatch"` \| `"unsupported_network"` \| `"invalid_exact_lnbtc_asset"` \| `"invalid_exact_lnbtc_amount"` \| `"invalid_exact_lnbtc_amount_mismatch"` \| `"invalid_exact_lnbtc_pay_to_mismatch"` \| `"invalid_exact_lnbtc_pay_to_malformed"` \| `"invalid_exact_lnbtc_max_timeout_mismatch"` \| `"invalid_exact_lnbtc_extra_mismatch"` \| `"invalid_exact_lnbtc_request_binding"` \| `"invalid_exact_lnbtc_request_mismatch"` \| `"invalid_exact_lnbtc_asset_transfer_method"` \| `"invalid_exact_lnbtc_payment_flow"` \| `"invalid_exact_lnbtc_invoice_missing"` \| `"invalid_exact_lnbtc_invoice_decode_failed"` \| `"invalid_exact_lnbtc_invoice_description"` \| `"invalid_exact_lnbtc_invoice_request_mismatch"` \| `"invalid_exact_lnbtc_invoice_payee_mismatch"` \| `"invalid_exact_lnbtc_invoice_currency_mismatch"` \| `"invalid_exact_lnbtc_invoice_amount_mismatch"` \| `"invalid_exact_lnbtc_max_timeout"` \| `"invalid_exact_lnbtc_invoice_expiry_mismatch"` \| `"invalid_exact_lnbtc_invoice_created_in_future"` \| `"invalid_exact_lnbtc_invoice_payment_hash_mismatch"` \| `"invalid_exact_lnbtc_preimage_missing"` \| `"invalid_exact_lnbtc_preimage_malformed"` \| `"invalid_exact_lnbtc_preimage_length"` \| `"invalid_exact_lnbtc_preimage_hash_mismatch"` \| `"invalid_exact_lnbtc_invoice_expired"`

The scheme's `errorReason` strings its validation gives, and this form's one more.

***

### ExactLnbtcValidation

> **ExactLnbtcValidation** = \{ `network`: [`LnNetwork`](#lnnetwork); `paymentHash`: `string`; `valid`: `true`; \} \| \{ `reason`: [`ExactLnbtcReason`](#exactlnbtcreason); `valid`: `false`; \}

The validation's answer: the network and payment hash of the scheme's consumption key, or the scheme's reason.

***

### LnbtcRequest

> **LnbtcRequest** = \{ `body`: `Uint8Array`; `headers?`: [`LnHeaderFields`](#lnheaderfields); `method`: `string`; `profile`: `"http:1"`; `url`: `string`; \} \| \{ `arguments?`: [`Json`](https://lcp.integraledger.com/reference/api.md#json); `meta?`: [`Json`](https://lcp.integraledger.com/reference/api.md#json); `name`: `string`; `profile`: `"mcp:1"`; `server`: `string`; \}

The buyer's intended request, which the scheme's request binding commits to.

#### Union Members

##### Type Literal

\{ `body`: `Uint8Array`; `headers?`: [`LnHeaderFields`](#lnheaderfields); `method`: `string`; `profile`: `"http:1"`; `url`: `string`; \}

| Name | Type | Description |
| ------ | ------ | ------ |
| `body` | `Uint8Array` | The content bytes after transfer decoding; empty where the request has no body. |
| `headers?` | [`LnHeaderFields`](#lnheaderfields) | - |
| `method` | `string` | The method, case kept. |
| `profile` | `"http:1"` | An HTTP request (the scheme's `http:1`). |
| `url` | `string` | The absolute URL the request is made to, its query included. |

***

##### Type Literal

\{ `arguments?`: [`Json`](https://lcp.integraledger.com/reference/api.md#json); `meta?`: [`Json`](https://lcp.integraledger.com/reference/api.md#json); `name`: `string`; `profile`: `"mcp:1"`; `server`: `string`; \}

| Name | Type | Description |
| ------ | ------ | ------ |
| `arguments?` | [`Json`](https://lcp.integraledger.com/reference/api.md#json) | `params.arguments`; absent is `{}`. |
| `meta?` | [`Json`](https://lcp.integraledger.com/reference/api.md#json) | `params._meta`; absent is `{}`. |
| `name` | `string` | - |
| `profile` | `"mcp:1"` | An MCP `tools/call` (the scheme's `mcp:1`). |
| `server` | `string` | The MCP server the buyer means to call, as its own configuration spells it. |

***

### LnHeaderFields

> **LnHeaderFields** = `Readonly`\<`Record`\<`string`, `string` \| readonly `string`[]\>\>

A request's header fields as received: each field's name, in any case, with its lines in order, or its one line.

***

### LnNetwork

> **LnNetwork** = `"lnbtc:000000000019d6689c085ae165831e93"` \| `"lnbtc:000000000933ea01ad0ee984209779ba"`

x402's `lnbtc` network ids, in CAIP-2 form: `lnbtc:` and the first 32 hex digits of the genesis block hash of
Bitcoin mainnet or testnet3. `lnbtc` is x402's own namespace.

***

### LnPaymentPayload

> **LnPaymentPayload** = `object`

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-accepted-1"></a> `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) |
| <a id="property-extensions"></a> `extensions?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired)\[`"extensions"`\] |
| <a id="property-payload"></a> `payload` | `object` |
| `payload.preimage` | `string` |
| <a id="property-resource"></a> `resource?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired)\[`"resource"`\] |
| <a id="property-x402version"></a> `x402Version` | `2` |

## Variables

### chargeLightning

> `const` **chargeLightning**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `advertiseBeforeCarrier`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `broadcaster`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster)\>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnMppUnsigned`](#lnmppunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/lightning"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnRef`](#lnref)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`c`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>

`mpp/charge/lightning`. The payer broadcasts (`broadcaster` answers `"payer"`): its node pays the invoice before the
preimage is presented. The seller's node, which received the payment, confirms it; `reference` names the invoice,
and no `status` reads it.

***

### exactLnbtcPaymentHash

> `const` **exactLnbtcPaymentHash**: `Readonly`\<\{ `advertise`: [`X402Advertise`](https://lcp.integraledger.com/reference/api/casper.md#x402advertise); `advertiseBeforeCarrier`: [`X402Advertise`](https://lcp.integraledger.com/reference/api/casper.md#x402advertise); `bound`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `broadcaster`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster)\>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnUnsigned`](#lnunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/lnbtc/payment-hash"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Read`](https://lcp.integraledger.com/reference/api/aptos.md#x402read); `reference`: (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnRef`](#lnref)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\>

`x402/exact/lnbtc/payment-hash`. The payer broadcasts (`broadcaster` answers `"payer"`): its node pays the invoice
before the preimage is presented. No ledger shows the payment, and no `status` reads it. `advertiseBeforeCarrier`
places the offer the seller issues before its node writes the invoice; `advertise` the option with the invoice.

***

### sessionLightning

> `const` **sessionLightning**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `advertiseBeforeCarrier`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `broadcaster`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster)\>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnMppUnsigned`](#lnmppunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_presented`) => `number` \| `undefined`; \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/lightning"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnRef`](#lnref)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`c`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>

`mpp/session/lightning`. `broadcaster` answers by the payment's action (`sessionBroadcasts`), for the actions
`channel.kind` takes. `"payer"`: the opening and a top-up, whose deposits the payer's node paid, and a bearer proof,
which draws on them; the seller's node, which received each deposit, confirms it, and no `status` reads it.
`"payee"`: the close, whose refund the seller's node pays. Any other action gets `ln/no-payment-in-action`, as `bound`
refuses it.

## Functions

### checkPreimage()

> **checkPreimage**(`preimage`, `paymentHash`): `true` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)

The preimage check: `true` where `preimage` is 64 lowercase hex digits whose SHA-256 is `paymentHash`, itself 64
lowercase hex digits; else `ln/preimage-malformed`, `ln/payment-hash-required` or `ln/preimage-mismatch`, in that
order. A resource server makes it before it serves a Lightning payment.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `preimage` | `string` |
| `paymentHash` | `string` |

#### Returns

`true` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)

***

### decodeBolt11()

> **decodeBolt11**(`invoice`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Bolt11`](#bolt11)\<`ArrayBuffer`\>\>

Decodes a BOLT11 invoice of up to 8,192 characters strictly, past Bech32's 90-character limit, which BOLT 11 lets an
invoice exceed: exactly one `p` and one `s` field, at most one `n` field, and a signature that verifies, by the `n`
key where the invoice has one (a low `s` required) and otherwise by public-key recovery; `signer` is that key. An
invoice that fails is `ln/invoice-malformed`; one of more characters, or of more than 64 tagged fields, is
`ln/invoice-too-large`.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `invoice` | `string` |

#### Returns

`Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Bolt11`](#bolt11)\<`ArrayBuffer`\>\>

***

### invoiceH()

> **invoiceH**(`b`, `field`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``

The one 32-byte `h` or `m` field of an invoice, as the hash it carries.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `b` | [`Bolt11`](#bolt11) |
| `field` | `"h"` \| `"m"` |

#### Returns

[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``

***

### requestHash()

> **requestHash**(`profile`, `params`, `request`, `resourceUrl`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)

The scheme's request hash of `request` under `profile` and `params`, as 64 lowercase hex digits: SHA-256 of the UTF-8
of RFC 8785's form of the profile's binding object. `ln/request-hash-mismatch` where the request is not of `profile`,
where on `http:1` `resourceUrl` is not the request's URL, or on `mcp:1` the option's `server` is not the request's;
`ln/request-binding-malformed` where `params` are not the profile's or the request cannot be bound: a method that is
not a token, a URL that is not an absolute `http` or `https` URL in ASCII without user information or fragment, a
body that is not bytes or is over 1 MiB, a header record that is not a record of strings or lists of strings or a
bound field's value outside the scheme's form, a tool name that is empty, arguments or `_meta` that are not a JSON
object, or a value RFC 8785 cannot write.

A seller's server computes it from the request that will execute, with the option's `extra.requestBindingProfile`
and `extra.requestBindingParams` and the document's `resource.url`, and writes it as the option's `extra.requestHash`,
the invoice's `h` and the requirements it validates a payment against (profile `x402/exact/lnbtc/payment-hash`, rules
2, 5 and 10); the buyer's `build` computes it from the buyer's intended request and holds it to `extra.requestHash`.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `profile` | `unknown` |
| `params` | `unknown` |
| `request` | `unknown` |
| `resourceUrl` | `unknown` |

#### Returns

`string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)

***

### validateExactLnbtc()

> **validateExactLnbtc**(`payload`, `requirements`, `at`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ExactLnbtcValidation`](#exactlnbtcvalidation)

x402's validation of `exact` on `lnbtc` (the scheme's Facilitator Validation, checks 1 to 7 and its Paid-but-expired
Policy), in the scheme's order, with this form's one check added at the end of check 5: the accepted invoice's `p`
is `requirements.extra.paymentHash` (`invalid_exact_lnbtc_invoice_payment_hash_mismatch`). `payload` is the payment
presented; `requirements` the ones the resource server built from its own record of the sale; `now` the validation
time and `skew` the clock-skew allowance, in seconds, 60 by default. A failure answers the scheme's `errorReason`; a
success answers the network and the payment hash of the scheme's consumption key. It moves nothing, reads nothing,
and records nothing: the resource server or a settler records the key once after it. A `now` or `skew` that is not a
non-negative safe integer is `ln/time-malformed`.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `payload` | `unknown` |
| `requirements` | `unknown` |
| `at` | \{ `now`: `number`; `skew?`: `number`; \} |
| `at.now` | `number` |
| `at.skew?` | `number` |

#### Returns

[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ExactLnbtcValidation`](#exactlnbtcvalidation)

## References

### Broadcaster

Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster)

***

### X402Advertise

Re-exports [X402Advertise](https://lcp.integraledger.com/reference/api/casper.md#x402advertise)

***

### X402Read

Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read)
