Este endpoint crea un pago ("advanced_payment") para Wallet Connect. Durante el proceso de vinculación, el integrador recibe un token de pago del comprador, lo que permitirá que el integrador debite el pago directamente de la billetera del comprador. Para aplicar descuentos en el pago, primero crea una promesa de descuento a partir del endpoint "/v2/wallet_connect/discounts" antes de crear un pago a través de este endpoint. En caso de éxito, la solicitud devolverá una respuesta con el estado 201.
POST
REQUERIDO
REQUERIDO
REQUERIDO
REQUERIDO
400Error de solicitud.
empty_required_header
El header "X-Idempotency-Key" es requerido y no fue enviado. Vuelve a realizar la solicitud incluyéndolo.
500Error genérico.
internal_error
Ocurrió un error interno en el servidor. Intenta nuevamente más tarde. Si el problema persiste, contacta al soporte y proporciona el x-request-id y detalles sobre la operación realizada.
curl -X POST \
'https://api.mercadopago.com/v1/advanced_payments'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer APP_USR-1*********685765-12*********1b4332e5c*********e077d7679*********664' \
-H 'X-Idempotency-Key: 4ed70860-2bac-443e-a1df-3cf9024e5c7c' \
-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",
"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": "MLA",
"binary_mode": true,
"date_created": "2018-10-20T09:34:20.518-04:00",
"date_last_updated": "2018-10-20T09:34:20.518-04:00"
}