# Create discount promise This endpoint allows you to create a "discount promise" for Wallet Connect. This "discount promise" serves as a reference that can be used when generating an Advanced Payment, enabling the application of a specific discount to the payment. During the payment creation process, it's essential to include the information from the previously provided "discount promise". **POST** `/v2/wallet_connect/discounts` ## Request parameters ### Header - `x-payer-token` (string, required) Token associated to the potential payer who will use the discount. For example - e9449535fe074e0e8ff4f2055f604e51. - `coupon` (string, optional) UUnique ID that identifies the coupon for discount application. This field should be filled out only when the user enters a coupon during the purchasing process with the seller. - `amount` (number, optional) Total payment amount before aplying discount. For example, 15.05. ## Response parameters - `transaction_amount` (number, optional) Total payment amount before aplying discount. For example, 150. - `currency_id` (string, optional) Type of currency to be used in payment. - `legal_terms` (string, optional) Terms and conditions of discount. - `discount` (object, optional) Discount description. - `discount.amount` (number, optional) Discounted amount from the total payment amount. - `discount.detail` (object, optional) Discount information details. - `discount.detail.cap` (number, optional) Discount Limit. This field indicates the maximum amount to be deducted from the payment. - `discount.detail.type` (string, optional) Type of discount applied. - `discount.detail.value` (number, optional) Discount value determined by its type. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | 400 | Bad-Request - Invalid amount in discount. | | 400 | 400 | Bad-Request - Invalid coupon in discount. | | 400 | 400 | Bad-Request - Invalid payer token. | | 500 | 500 | Error - Internal server error. | ## Request example ### cURL ```bash curl -X POST \ 'https://api.mercadopago.com/v2/wallet_connect/discounts' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "coupon": "WALLET10", "amount": "50.00" }' ``` ## Response example ```json { "transaction_amount": "24.50", "currency_id": "MXN", "legal_terms": "https://api.mercadopago.com/v2/discounts/campaign/10580513/terms/html", "discount": { "amount": "24.50", "detail": { "cap": 1000000, "type": "percentage", "value": 10 } } } ```