Validate Wallet Connect couponhttps://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.
POST
Request parameters
Header
Authorization
Access Token obtained through the developer panel. Must be sent in all requests.string
REQUIRED
x-payer-token
Token associated to the potential payer who will use the discount. For example - e9449535fe074e0e8ff4f2055f604e51.string
REQUIRED
Body
id
Unique combination of letters and numbers that stands for the coupon code. For example - BLACKFRIDAY20.string
Response parameters
status
Indicates the coupon's status post-validation. Reflects if it's "success", "pending", or "invalid".string
description
A brief overview of the validated coupon's characteristics. For example: 30% discount coupon for Black Friday.string
legal_terms
URL directing to the specific legal terms associated with the coupon campaign. For example - https://www.mercadopago.com.ar/campaigns/terms-and-conditions/123456.string
detail
This object offers an in-depth view of advanced payments coming from sellers that have a prior Wallet Connect association.object
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 'Authorization: Bearer APP_USR-8*********932064-12*********edf6d3c99*********2236c703f*********668' \
-H 'x-payer-token: <PAYER_TOKEN>' \
-d '{
"id": "BLACKFRIDAY20"
}'Response
{
"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
}
}