> For the complete documentation index, see [llms.txt](https://developers.mtpelerin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.mtpelerin.com/checkout-payments/integration/instructions.md).

# Instructions

### 1. Calling the payment widget

To trigger a payment, you need to call our checkout widget with the following URL and mandatory parameters:

```
https://widget.mtpelerin.com/?_ctkn=<integrationKey>&tabs=merchant&bdc=<SettlementCurrency>&bda=<amountInSettlementCurrency>&oid=<merchant_order_id>
```

* **integrationKey:** the unique integration key that you will have received from us by email.
* **SettlementCurrency:** the crypto or fiat currency in which you want to denominate the payment.
* **amountInSettlementCurrency:** the payment amount in the SettlementCurrency.
* **merchant\_order\_id:** your internal payment order ID.

Here are all the codes that you can use for the SettlementCurrency parameter:

**Fiat codes:** AUD, CAD, CHF, CZK, DKK, EUR, GBP, HKD, HUF, JPY, MXN, NOK, NZD, PLN, SEK, SGD, USD, ZAR

**Crypto codes:** AVAX, BNB, BTC, BTC.b, BTCB, cbBTC, CELO, crvUSD, DAI, ETH, EURA, EURC, EURS, FRAX, GHO, LUSD, PAXG, POL, RBTC, RIF, S, sat, tzBTC, USDC, USDC.e, USDRIF, USDT, WBTC, WETH, XAUt, XDAI, XTZ, ZCHF

### 2. Payment confirmation

Once a payment has been made successfully, we call a webhook on your side to let you know that the transaction is completed. The webhook contains the following info:

```
{
    "id": "664369c938b3ca001a3cd44f" // our own transaction id,
    "amount": 123.45,
    "currency": "USDC",
    "external_id": "123456789", // The order id that you passed in the widget parameters (oid)
}
```

#### Webhook setup

For us to setup the webhook, we need from you the webhook URL that we must call, as well as 2 keys (authentication and signature) that we will exchange.

The authentication key will be used in the "Authentication" header.

The signature key will allow to compute a HMAC on your side. This HMAC will have to be the same as the "Mtp-Signature" header parameters. The HMAC has to be computed on the full request body. JS example:

```
const computedSignature = crypto.createHmac('sha256', SIGNATURE_KEY).update(JSON.stringify(body)).digest('hex')
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://developers.mtpelerin.com/checkout-payments/integration/instructions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
