# Confirm buy offer

{% hint style="info" %}
An API Key is required to interact with Launchpad APIs. Please contact us to get an API Key and get started.
{% endhint %}

This endpoint completes the purchase of an inscription.

This requires the signed psbt from /create-launch-offer end point. Which is a psbt signed by the buyer and base64 encoded. This returns a transaction id for the ordinal sale transaction.\
\
The PSBT will only be created and returned for an active launchpad and only  if the ordinal address of the buyer has an available allocation to buy in the currently active phase.

### `POST` /launchpad/submit-launch-offer

<mark style="color:green;">`POST`</mark> `https://api.ordinalsbot.com/launchpad/submit-launch-offer`

API Key is required in the header:

`headers: { 'x-api-key': '<YOUR_API_KEY>', ...otherHeaders }`

Example Request Body:

```json
{
  "launchpadPhase": "65a123b789cdef0123456789",
  "ordinalId": "8f46149faff54a7efe0c5c73a633077a8009b374ebcf6d80609807eab8d73218i0",
  "signedPsbt": "cHNidP8BAHECAAAAAfPQ0OTWpSxwRJK..."
}
```

#### Request Body

| Name        | Type   | Description                                                                                       |
| ----------- | ------ | ------------------------------------------------------------------------------------------------- |
| launchpadId | String | Launchpad id                                                                                      |
| ordinalId   | String | The ordinal id being purchased from the launchpad, this is available in the create offer response |
| signedPsbt  | String | <p>The PSBT signed by the buyer's payment wallet</p><p></p>                                       |

{% tabs %}
{% tab title="200: OK " %}

```json
// Returns transaction id

{
  "txId": "2c8e7ec23d8b4f91e98034b288721b9b7d0eb14d618bef59fe238b5023a4a34a"
}

```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```json
{
    status: 'error',
    error: 'error reason'
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ordinalsbot.com/preinscribedlaunchpad/confirm-buy-offer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
