Home
Documentation
Resources
Certifications
Community
Validate coupon - Coupons - Mercado Pago Developers

Intelligent search powered by OpenAI 

Validate Wallet Connect coupon

POST

https://api.mercadopago.com/v2/wallet_connect/coupons
This endpoint enables the validation of a Wallet Connect coupon, returning the applicable discount amount. These coupons are designed to provide discounts on payments made through Wallet Connect.
Request's parameters
HEADER
x-payer-token
string

REQUIRED

Token associated to the potential payer who will use the discount. For example - e9449535fe074e0e8ff4f2055f604e51.
BODY
id
string
Unique combination of letters and numbers that stands for the coupon code. For example - BLACKFRIDAY20.
Response parameters
status
string
Indicates the coupon's status post-validation. Reflects if it's "success", "pending", or "invalid".
description
string
A brief overview of the validated coupon's characteristics. For example: 30% discount coupon for Black Friday.
legal_terms
string
URL directing to the specific legal terms associated with the coupon campaign. For example - https://www.mercadopago.com.ar/campaigns/terms-and-conditions/123456.
detail
object
This object offers an in-depth view of advanced payments coming from sellers that have a prior Wallet Connect association.
Errors

400Error encountered during the validation process.

400

Bad-Request - Invalid coupon_id.

400

Bad-Request - Invalid Payer Token.

500Error resulting from internal server issues.

500

Internal server error.

Request
curl -X POST \
    'https://api.mercadopago.com/v2/wallet_connect/coupons'\
    -H 'Content-Type: application/json' \
       -H 'x-payer-token: <PAYER_TOKEN>' \
       -H 'Authorization: Bearer TEST-5599*********291-02171*********139a4791e*********f7f5835-1*********' \
    -d '{
  "id": "BLACKFRIDAY20"
}'
Sample answer
{
  "status": "success",
  "description": "Cupom de desconto de 30% para Black Friday.",
  "legal_terms": "https://www.mercadopago.com.ar/campaigns/terms-and-conditions/123456",
  "detail": {
    "value": 10,
    "type": "percent",
    "cap": 100,
    "min_payment_amount": 100,
    "max_payment_amount": 10000
  }
}