¿No sabes cómo empezar la integración?
Accede a los primeros pasosPOST
400Error
collector_does_not_comply_with_current_regulation
identity validation required.
invalid_collector_id
collector_id invalid.
invalid_sponsor_id
sponsor_id is not an active user.
invalid_collector_email
collector is not collector_email owner
invalid_operation_type
operation_type invalid.
invalid_expiration_date_to
expiration_date_to invalid.
invalid_date
invalid date of expiration.
invalid_expiration_date_from
expiration_date_from invalid.
invalid_items
unit_price invalid.
invalid_back_urls
back_urls invalid. Wrong format
invalid_payment_methods
installments invalid. Should be a number between 1 and 36.
invalid_marketplace_fee
marketplace_fee must not be greater than total amount.
invalid_id
preference_id not found.
invalid_access_token
access denied
invalid_shipments
invalid type (<type>) for field shipments.cost.
invalid_binary_mode
binary_mode must be boolean.
¿Te sirvió esta información?
Sí
No
curl -X POST \
'https://api.mercadopago.com/checkout/preferences'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TEST-7434*********159-03141*********cee51edf8*********f94f589-1*********' \
-d '{
"back_urls": {},
"differential_pricing": {
"id": null
},
"expires": false,
"items": [
{
"title": "Dummy Title",
"description": "Dummy description",
"picture_url": "http://www.myapp.com/myimage.jpg",
"category_id": "car_electronics",
"quantity": 1,
"currency_id": "U$",
"unit_price": 10
}
],
"marketplace_fee": null,
"metadata": {},
"payer": {
"phone": {
"number": null
},
"identification": {},
"address": {
"street_number": null
}
},
"payment_methods": {
"excluded_payment_methods": [
{}
],
"excluded_payment_types": [
{}
],
"installments": null,
"default_installments": null
},
"shipments": {
"local_pickup": false,
"default_shipping_method": null,
"free_methods": [
{
"id": null
}
],
"cost": null,
"free_shipping": false,
"receiver_address": {
"street_number": null
}
},
"tracks": [
{
"type": "google_ad"
}
]
}'
{
"collector_id": 202809963,
"items": [
{
"title": "Dummy Item",
"description": "Multicolor Item",
"currency_id": "$",
"quantity": 1,
"unit_price": 10
}
],
"payer": {
"phone": {},
"identification": {},
"address": {}
},
"back_urls": {},
"payment_methods": {
"excluded_payment_methods": [
{}
],
"excluded_payment_types": [
{}
]
},
"client_id": 6295877106812064,
"marketplace": "MP-MKT-6295877106812064",
"marketplace_fee": 0,
"shipments": {
"receiver_address": {}
},
"statement_descriptor": "MERCADOPAGO",
"date_created": "2018-02-02T19:22:23.535Z",
"id": "202809963-920c288b-4ebb-40be-966f-700250fa5370",
"init_point": "https://www.mercadopago.com/mla/checkout/start?pref_id=202809963-920c288b-4ebb-40be-966f-700250fa5370",
"sandbox_init_point": "https://sandbox.mercadopago.com/mla/checkout/pay?pref_id=202809963-920c288b-4ebb-40be-966f-700250fa5370",
"metadata": {}
}