Create payments/v1/paymentsCreate a payment and add all the information you need. Remember to add the payment details and the payer's information.
POST
Request's parameters
additional_info
Localization: bodyData that could improve fraud analysis and conversion rates. Try to send as much information as possibleobject
application_fee
Localization: bodyFee collected by a marketplace or Mercado Pago Applicationnumber
binary_mode
Localization: bodyWhen set to true, the payment can only be approved or rejected. Otherwise in_process status is addedboolean
callback_url
Localization: bodyURL where mercadopago does the final redirect (only for bank transfers)string
Response parameters
id
Localization: bodyidnumber
date_created
Localization: bodydate_createdstring
date_approved
Localization: bodydate_approvedstring
date_last_updated
Localization: bodydate_last_updatedstring
Request
curl
curl -X POST \
'https://api.mercadopago.com/v1/payments' \
-H 'Authorization: Bearer ACCESS_TOKEN_ENV' \
-d '{
"additional_info": {
"items": [
{
"id": "PR0001",
"title": "Point Mini",
"description": "Producto Point para cobros con tarjetas mediante bluetooth",
"picture_url": "https://http2.mlstatic.com/resources/frontend/statics/growth-sellers-landings/device-mlb-point-i_medium@2x.png",
"category_id": "electronics",
"quantity": 1,
"unit_price": 58.8
}
],
"payer": {
"first_name": "Test",
"last_name": "Test",
"phone": {
"area_code": 11,
"number": "987654321"
},
"address": {}
},
"shipments": {
"receiver_address": {
"zip_code": "12312-123",
"state_name": "Rio de Janeiro",
"city_name": "Buzios",
"street_name": "Av das Nacoes Unidas",
"street_number": 3003
}
},
"barcode": {}
},
"description": "Payment for product",
"external_reference": "MP0001",
"installments": 1,
"metadata": {},
"order": {
"type": "mercadolibre"
},
"payer": {
"entity_type": "individual",
"type": "customer",
"identification": {},
"phone": {}
},
"payment_method_id": "visa",
"transaction_amount": 58.8
}'
Answer
json
{
"id": 20359978,
"date_created": "2019-07-10T14:47:58.000Z",
"date_approved": "2019-07-10T14:47:58.000Z",
"date_last_updated": "2019-07-10T14:47:58.000Z",
"money_release_date": "2019-07-24T14:47:58.000Z",
"issuer_id": 25,
"payment_method_id": "visa",
"payment_type_id": "credit_card",
"status": "approved",
"status_detail": "accredited",
"currency_id": "BRL",
"description": "Point Mini a maquininha que dá o dinheiro de suas vendas na hora",
"taxes_amount": 0,
"shipping_amount": 0,
"collector_id": 448876418,
"payer": {
"first_name": "Test",
"last_name": "Test",
"email": "test_user_80507629@testuser.com",
"identification": {
"number": 19119119100,
"type": "CPF"
},
"phone": {
"area_code": 11,
"number": 987654321
},
"type": "customer",
"entity_type": "individual"
},
"metadata": {},
"additional_info": {
"items": [
{
"id": "PR0001",
"title": "Point Mini",
"description": "Producto Point para cobros con tarjetas mediante bluetooth",
"picture_url": "https://http2.mlstatic.com/resources/frontend/statics/growth-sellers-landings/device-mlb-point-i_medium@2x.png",
"category_id": "electronics",
"quantity": 1,
"unit_price": 58.8
}
],
"payer": {
"phone": {
"area_code": 11,
"number": 987654321
},
"address": {
"zip_code": "06233-200",
"street_name": "Av das Nacoes Unidas",
"street_number": 3003
},
"first_name": "Nome",
"last_name": "Sobrenome",
"registration_date": "2019-01-01T15:01:01.000Z"
},
"shipments": {
"receiver_address": {
"street_name": "Av das Nacoes Unidas",
"street_number": 3003,
"zip_code": 6233200,
"city_name": "Buzios",
"state_name": "Rio de Janeiro"
}
}
},
"order": {},
"external_reference": "MP0001",
"transaction_amount": 58.8,
"transaction_amount_refunded": 0,
"coupon_amount": 0,
"transaction_details": {
"net_received_amount": 56.16,
"total_paid_amount": 58.8,
"overpaid_amount": 0,
"installment_amount": 58.8
},
"fee_details": [
{
"type": "coupon_fee",
"amount": 2.64,
"fee_payer": "payer"
}
],
"statement_descriptor": "MercadoPago",
"installments": 1,
"card": {
"first_six_digits": 423564,
"last_four_digits": 5682,
"expiration_month": 6,
"expiration_year": 2023,
"date_created": "2019-07-10T14:47:58.000Z",
"date_last_updated": "2019-07-10T14:47:58.000Z",
"cardholder": {
"name": "APRO",
"identification": {
"number": 19119119100,
"type": "CPF"
}
}
},
"notification_url": "https://www.suaurl.com/notificacoes/",
"processing_mode": "aggregator",
"point_of_interaction": {
"type": "PIX",
"application_data": {
"name": "NAME_SDK",
"version": "VERSION_NUMBER"
},
"transaction_data": {
"qr_code_base64": "iVBORw0KGgoAAAANSUhEUgAABRQAAAUUCAYAAACu5p7oAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAIABJREFUeJzs2luO3LiWQNFmI+Y/Zd6vRt36KGNXi7ZOBtcagHD4kNLeiLX33v8DAAAAABD879sDAAAAAAA/h6AIAAAAAGSCIgAAAACQCYoAAAAAQCYoAgAAAACZoAgAAAAAZIIiAAAAAJAJigAAAABAJigCAAAAAJmgCAAAAABkgiIAAAAAkAmKAAAAAEAmKAIAAAAAmaAIAAAAAGSCIgAAAACQCYoAAAAAQCYoAgAAAACZoAgAAAAAZIIiAAAAAJAJigAAAABAJigCA...",
"qr_code": "00020126600014br.gov.bcb.pix0117test@testuser.com0217dados adicionais520400005303986540510.005802BR5913Maria Silva6008Brasilia62070503***6304E2CA"
}
}
}
Errors
400bad_request
1
3
5
23
1000
1001
2001
2002
2004
2006
2007
2009
2060
3000
3001
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
4000
4001
4002
4003
4004
4005
4006
4007
4012
4013
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4037
4038
4039
4050
4051
7523
403bad_request
4
3002
404bad_request
2000
Was this information helpful?