> For the complete documentation index, see [llms.txt](https://cryptadium.gitbook.io/cryptadium-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cryptadium.gitbook.io/cryptadium-api/webhooks.md).

# Webhooks

## Setting up webhooks

To set up webhooks you need to go to the “Store Connection” section of the Personal Account, go to the “Store Management” subsection.

* Then enter the URL address in the system from which the payment is made, to this address will be sent data on the status of payments&#x20;
* Specify the CMS system to be used, in case the CMS system is not used you should select “None of the above listed”&#x20;
* Specify the password that will be used in the signature of the message sent from Cryptadium

Pay attention! If you want to submit a payment linked to cryptocurrency - use Amount and Currency. If you want to submit a payment linked to fiat, for example, to USD - use AmountFiat and FiatCurrency.

FiatCurrency can be omitted if the payment is in cryptocurrency (can be ignored, default is always USD).

Response Type: JSON

Parameters

<table><thead><tr><th width="165">Name</th><th width="477">Description</th><th>Type</th></tr></thead><tbody><tr><td>PaymentId</td><td>Transaction ID in the Cryptadium system</td><td>int</td></tr><tr><td>ShopId</td><td>Shop Id in Cryptadium system</td><td>string</td></tr><tr><td>Amount</td><td>Amount of payment in cryptocurrency. Optional parameter if sent by AmountFiat</td><td>Double</td></tr><tr><td>AmountFiat</td><td>Amount of payment in fiat. Optional parameter if Amount is passed</td><td>Double</td></tr><tr><td>FiatCurrency</td><td>Fiat currency <br>Values: USD, EUR, TRY</td><td>String</td></tr><tr><td>Currency</td><td>Currency of payment</td><td>String</td></tr><tr><td>Email</td><td>Payer's e-mail</td><td>String</td></tr><tr><td>ClientId</td><td>Unique identifier of the user in the system from which the payment is made</td><td>String</td></tr><tr><td>Status</td><td>Payment status <br>Possible values: <br>Success - the payment was successful <br>Canceled - payment was cancelled (check with Cryptadium technical support for the reason) <br>Insufficient - payment is underpaid (the payment is considered underpaid if the payment window has expired and the payment has not been fully executed and the callback will contain AmountUSD and Amount corresponding to the real amount of funds received)</td><td>String</td></tr><tr><td>BillingID</td><td>Unique payment identifier in the system from which the payment is made</td><td>String</td></tr><tr><td>Signature</td><td>A checksum to verify the authenticity of the request (to ensure that the request came from Cryptadium)</td><td>String</td></tr><tr><td>Insufficient</td><td>If "Confirm underpayments" is set in the shop settings, the underpayments will automatically be confirmed as successfully made after the end of the payment validity period (window). You will then receive a second callback, which will give information about the amount actually received (underpaid). You need to process this callback on the payment generation side and modify the original payment to match the actual funds received</td><td>Boolean</td></tr><tr><td>Source.Amount</td><td>The amount specified when creating the payment</td><td>Double</td></tr><tr><td>Source.Type</td><td>Pointer to the currency to which Source.Amount value was specified. Can take values USD, EUR, TRY, Crypto.</td><td>String</td></tr><tr><td>Test</td><td>Indicates whether the payment will be a test payment. This parameter is optional and should only be used to carry out tests. To use this parameter, you should be authenticated by the shop. If authentication is passed and the request is sent with Test=true, you will see three buttons on the payment form "Payment successful", "Payment cancelled", "Payment underpaid", clicking on which, there will be sent the corresponding callbacks to your CallbackUrl. The total number of attempts to send is 30, the interval between attempts is 15 seconds. Test payments are not displayed in your shop and are not counted</td><td>Boolean</td></tr></tbody></table>

**Signature check:**

1. A string of the following kind should be generated: "PaymentId":"ShopId":"Email":"Currency":"Password" (Without inverted commas with a colon)
2. Encrypt the resulting string using the MD5 algorithm
3. Compare the resulting string with the one that came in via Webhook
4. If the strings match, an HTTP Status 200 response should be returned (Mandatory) Webhook JSON example:

```json
{
  "PaymentId": 2359,
  "ShopId": "L9Sp6TCXh7",
  "Amount": 100,
  "Currency": "USDT",
  "Email": "Leilani.Macejkovic@yahoo.com",
  "ClientId": "542",
  "Status": "Success",
  "Signature": "b13deba2ab89a5bcc572b9878aa7acc5",
  "BillingID": "04202508500704000400",
  "AmountFiat": 100.1,
  "FiatCurrency": "USD",
  "Insufficient": false,
  "Source": {
    "Amount": 100,
    "Type": "Crypto"
  },
  "Test": false
}
```


---

# 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://cryptadium.gitbook.io/cryptadium-api/webhooks.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.
