# @integraledger/lcp/ack

> The exports of @integraledger/lcp/ack.

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

## Interfaces

### AckBody

The 402 body.

#### Properties

| Property               | Type                          |
| ---------------------- | ----------------------------- |
|  `legalContext`        | [`Json`](https://lcp.integraledger.com/reference/api#json) |
|  `paymentRequest?`     | [`Json`](https://lcp.integraledger.com/reference/api#json) |
|  `paymentRequestToken` | `string`                      |

***

### AckPaymentOption

An ACK payment option as the seller wrote it.

#### Indexable

> \[`k`: `string`]: [`Json`](https://lcp.integraledger.com/reference/api#json)

#### Properties

| Property | Type     |
| -------- | -------- |
|  `id`    | `string` |

***

### AckValues

What the seller's stack places: the Payment Request's `id`, and the legal context beside the request, with the
agreement URL after the link when one is given.

#### Properties

| Property                                 | Type                |
| ---------------------------------------- | ------------------- |
|  `legalContext`                          | `object`            |
| `legalContext.legalContextAgreementUrl?` | `string`            |
| `legalContext.legalContextUrl`           | `string`            |
| `legalContext.type`                      | `"sha256"`          |
| `legalContext.value`                     | `` `0x${string}` `` |
|  `paymentRequestId`                      | `string`            |

## Variables

### paymentRequest

> `const` **paymentRequest**: `Readonly`\<\{ `advertise`: (`_doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AckValues`](#ackvalues); `bound`: (`_presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`_doc`, `_h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `claims`: `boolean`; `id`: `"ack/payment-request"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `options`: readonly [`Json`](https://lcp.integraledger.com/reference/api#json)\[]; }; }; `tie`: (`options`) => \[`"ack"`, \{ `paymentOptions`: readonly [`AckPaymentOption`](#ackpaymentoption)\[]; }]; `unplaced`: (`option`) => [`AckPaymentOption`](#ackpaymentoption); }>

## Functions

### fromReceipt()

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

The hash in a receipt: the `id` of the Payment Request token embedded in its `credentialSubject`. Verifies nothing;
a party calls it on a receipt it has verified.

#### Parameters

| Parameter           | Type      |
| ------------------- | --------- |
| `credentialSubject` | `unknown` |

#### Returns

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

***

### tie()

> **tie**(`options`): \[`"ack"`, \{ `paymentOptions`: readonly [`AckPaymentOption`](#ackpaymentoption)\[]; }]

The binding slot: the Payment Request's options exactly as issued.

#### Parameters

| Parameter | Type                                                |
| --------- | --------------------------------------------------- |
| `options` | readonly [`AckPaymentOption`](#ackpaymentoption)\[] |

#### Returns

\[`"ack"`, \{ `paymentOptions`: readonly [`AckPaymentOption`](#ackpaymentoption)\[]; }]
