This endpoint creates a payment ("advanced_payment") for Wallet Connect. During the agreement process, the integrator receives a payer token from the buyer, which will allow the integrator to execute the payment directly from the buyer's wallet. To apply discounts to the payment, first create a discount promise using the "/v2/wallet_connect/discounts" endpoint before creating a payment through this endpoint. In case of success, the request will return a response with status 201.
POST
REQUIRED
REQUIRED
REQUIRED
REQUIRED
400Request error.
empty_required_header
The "X-Idempotency-Key" header is required and was not sent. Make the request again including it.
500Generic error.
internal_error
An internal server error occurred. Please try again later. If the problem persists, contact support and provide the x-request-id and details about the operation performed.
curl -X POST \
'https://api.mercadopago.com/v1/advanced_payments'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer APP_USR-8*********88776-122*********fc20dede6*********a497d7225*********64' \
-H 'X-Idempotency-Key: d74e8bb9-9436-401a-82c1-5cfb5ef77b11' \
-H 'X-Meli-Session-Id: DEVICE_ID' \
-d '{
"wallet_payment": {
"transaction_amount": 24.5,
"description": "Payment for the purchase of furniture",
"external_reference": "Payment_seller_123",
"statement_descriptor": "descriptor",
"forward_data": {
"sub_merchant": {
"sub_merchant_id": "123123",
"mcc": "5462",
"country": "BR",
"address_door_number": 3003,
"zip": "06233-903",
"document_number": "222222222222222",
"city": "Osasco",
"address_street": "RUA A",
"legal_name": "LOJINHA DO ZÉ",
"region_code_iso": "BR-MG",
"region_code": "BR",
"document_type": "CPF",
"phone": "98765-4321",
"url": "www.nomedofacilitador.com.br"
}
},
"discount": {
"amount": 10,
"description": "DESC20",
"detail": {
"cap": 1000000,
"type": "percentage",
"value": 10
}
}
},
"payer": {
"token": "abcdef1e23f4567d8e9123eb6591ff68df74c57930551ed980239f4538a7e530",
"type_token": "wallet-tokens"
},
"binary_mode": false,
"capture": false
}'{
"id": 10267812,
"payments": [
{
"id": 3870106238,
"status": "approved",
"status_detail": "accredited",
"payment_type_id": "credit_card",
"payment_method_id": "credit_card",
"transaction_amount": "24.50",
"installments": 1,
"description": "Payment for the purchase of furniture",
"capture": true,
"external_reference": "payment_123"
}
],
"wallet_payment": {
"transaction_amount": "24.50",
"description": "Payment for the purchase of furniture",
"external_reference": "Payment_seller_123",
"discount": {
"amount": 10,
"code": "WALLET10"
}
},
"disbursements": [
{
"collector_id": "987654"
}
],
"payer": {
"id": 8879
},
"site_id": "MLB",
"binary_mode": true,
"date_created": "2018-10-20T09:34:20.518-04:00",
"date_last_updated": "2018-10-20T09:34:20.518-04:00"
}