# Create discount promise This endpoint creates a discount promise for Wallet Connect. A discount promise is a reference that can be used when creating an advanced payment to apply a specific discount. The information from the discount promise must be included during the payment creation. In case of success, the request will return a response with status 200. **POST** `/v2/wallet_connect/discounts` ## Request parameters ### Header - `x-payer-token` (string, required) Payer token associated with the buyer who will use the discount. - `coupon` (string, optional) Unique coupon code for the discount. Send only when the buyer entered a coupon during the purchase flow. - `amount` (number, optional) Total payment amount before applying the discount. ## Response parameters - `transaction_amount` (number, optional) Total payment amount before applying the discount. - `currency_id` (string, optional) Currency used in the payment. - `legal_terms` (string, optional) URL with the terms and conditions of the discount. - `discount` (object, optional) Discount details. - `discount.amount` (number, optional) Amount to be deducted from the total payment. - `discount.detail` (object, optional) Detailed discount information. - `discount.detail.cap` (number, optional) Maximum amount that can be deducted from the payment. - `discount.detail.type` (string, optional) Type of discount applied. - `discount.detail.value` (number, optional) Discount value according to its type. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | 400 | Bad Request — Invalid amount. | | 400 | 400 | Bad Request — Invalid coupon. | | 400 | 400 | Bad Request — Invalid payer token. | | 500 | internal_error | Some error occurred on our side while attempting to process the request. Please try again later. | ## 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": "BRL", "legal_terms": "https://api.mercadopago.com/v2/discounts/campaign/10580513/terms/html", "discount": { "amount": "24.50", "detail": { "cap": 1000000, "type": "percentage", "value": 10 } } } ```