Mkt Place Integration

2013

This document will provide you all necessary information to integrate MercadoPago Marketplace tool.

MercadoPago

MarketPlace Integration

Index Sign-up for MercadoPago.............................................................................................................. 3 Create a MarketPlace application ................................................................................................. 3 Sign-up sellers in your MarketPlace .............................................................................................. 3 Request authorization to the seller........................................................................................... 3 Get your seller’s credentials for the first time .......................................................................... 4 Example: ................................................................................................................................ 5 Get the seller’s credentials........................................................................................................ 5 Example: ................................................................................................................................ 6 Create payment buttons ............................................................................................................... 7 Authenticate.............................................................................................................................. 7 Example: ................................................................................................................................ 7 Button creation ......................................................................................................................... 8 Payment Process Look&Feel ................................................................................................... 10 Instant Payment Notification (IPN) ............................................................................................. 13 Glossary of attributes .............................................................................................................. 13

2

MarketPlace Integration

Sign-up for MercadoPago You first need to sign up for MercadoPago. If you’re already member, please go directly to “Create a MarketPlace application”.

   

Argentina: https://registration-ar.mercadopago.com/registration-mp?mode=mp Brazil: https://www.mercadopago.com/mlb/cadastro/register Venezuela: https://registration-ve.mercadopago.com/registration-mp/?mode=mp México: https://registration-mx.mercadopago.com/registration-mp/?mode=mp

Create a MarketPlace application Go to http://applications.mercadolibre.com.ar/home and choice your country. Then login whit your account previously created.

Create a new account as follow:         

Name: Your company name Short name: Your company short name or name Description : Short description about your company Callback URL : If you don’t know enter http://www.yoursite.com. You can change it later. Scopes: Select all Notifications callback URL: Blank Topics: Blank Domains: Blank Accept terms of use

Sign-up sellers in your MarketPlace Seller authorization request To request the seller’s authorization you may open an Iframe or redirect (302 redirect) the sellers to this URL: 3

MarketPlace Integration https://auth.mercadolibre.com.ar/authorization?client_id=YOUR_APP_ID&response_type=cod e&platform_id=mp&redirect_uri=MARKETPLACE_REDIRECT_URI Note: In MARKETPLACE REDIRECT_URI field you should set an URL to receive the authorization code from MercadoPago. When the seller finishes the process, MercadoPago will GET the URL seted in MARKETPLACE_REDIRECT_URI with this information: MARKETPLACE_REDIRECT_URI?code=AUTHORIZATION_CODE With this code (AUTHORIZATION_CODE) you could authenticate in MercadoPago to use their APIs.

Get your seller’s credentials for the first time When you get the authorization code you can create a refresh_token for this account. The refresh_token obtained will be granted you to create payment links in name of this seller. Send a POST message to the Authentication API as follows: POST https://api.mercadolibre.com/oauth/token Accept: application/json Content-Type: x-www-form-urlencoded grant_type = authorization_code client_id = market_place-client_id client_secret = market_place-client_secret code = obtained_authorization_code redirect_uri = seted_marketplace_redirect_uri

In response you will get a “200 Ok” and a JSON as follows: { "access_token":"seller_access_token", "token_type":"bearer", "expires_in":10800, "scope":"offline_access read write", "refresh_token":"TG-XXXXXXXX” }

4

MarketPlace Integration Example: curl -H "Accept: application/json" -X POST -d "grant_type=authorization_code&client_id=market_placeclient_id&client_secret=market_placeclient_secret&code=obtained_authorization_code&redirect_uri=seted_marketpla ce_redirect_uri” –v "https://api.mercadolibre.com/oauth/token" Response: { "access_token":"seller_access_token ", "token_type":"bearer", "expires_in":10800, "scope":"offline_access read write", "refresh_token":"TG-XXXXXXXX” }

Important note: The refresh token does not change in time but it expires in the first use. Is the field that we will use in the future to create payment links in name of the seller. We suggest that you save this field in your DB and update it on each use

Get the seller’s credentials When you authenticate with the saved refresh_token to obtain an access_token, the refresh_token that you used in the API call expires. In the API response you will obtain a new refresh_token. Send a POST message to the Authentication API as follows: POST https://api.mercadolibre.com/oauth/token Accept: application/json Content-Type: x-www-form-urlencoded grant_type = refresh_token client_id = market_place-client_id client_secret = market_place-client_secret refresh_token = saved_seller_refresh_token

In response you will get a “200 Ok” and a JSON as follows: { "access_token":"seller_access_token ", "token_type":"bearer", "expires_in":10800, "scope":"offline_access read write", "refresh_token":"new_seller_refresh_token” }

5

MarketPlace Integration Example: curl -H "Accept: application/json" -X POST -d "grant_type= refresh_token&client_id=market_place-client_id&client_secret=market_placeclient_secret&refresh_token=seller_refresh_token” –v "https://api.mercadolibre.com/oauth/token" Response: { "access_token":"seller_access_token ", "token_type":"bearer", "expires_in":10800, "scope":"offline_access read write", "refresh_token":"new_seller_refresh_token” }

Note: The access_token obtained will be able for 3 hours after the creation. We suggest obtain a new access_token. We suggest get a new one every time that you want to interact with MercadoPago APIs. In addition you should store the new refresh_token obtained to reauthenticate in future opportunities.

6

MarketPlace Integration

Create payment buttons Authenticate Whenever you have to work with APIs MercadoPago, either to create payment buttons for your Marketplace sellers, check the status of these or search operations, you must authenticate previously. That is, whenever you have to work with MercadoPago APIs you must obtain a valid access_token for your vendor. To do that you must use the refresh_token previously obtained. Send a POST message to the Authentication API as follows: POST https://api.mercadolibre.com/oauth/token Accept: application/json Content-Type: x-www-form-urlencoded grant_type = refresh_token client_id = market_place-client_id client_secret = market_place-client_secret refresh_token = seller_refresh_token

In response you will get a “200 Ok” and a JSON as follows: { "access_token":"seller_access_token ", "token_type":"bearer", "expires_in":10800, "scope":"offline_access read write", "refresh_token":"seller_refresh_token” }

Example: curl -H "Accept: application/json" -X POST -d "grant_type= refresh_token&client_id=market_place-client_id&client_secret=market_placeclient_secret&refresh_token=seller_refresh_token” –v "https://api.mercadolibre.com/oauth/token" Response: { "access_token":"seller_access_token ", "token_type":"bearer", "expires_in":10800, "scope":"offline_access read write", "refresh_token":"seller_refresh_token” }

Note: The access_token obtained will be able for 3 hours after the creation. We suggest obtain a new access_token. We suggest get a new one every time that you want to interact with MercadoPago APIs. 7

MarketPlace Integration

Button creation When you obtain a valid access_token for your seller you should generate a payment preference. The payment preference tells to MercadoPago how it has to show the CheckOut process to the buyer user. That is the preference tells what are you selling, the allowed payment methods, the marketplace fee, etc. The marketplace fee charged to the seller must be an absolute value. If you don’t set any value MercadoPago will set in 0$. To create a preference you must send a POST message to our CheckOut/Preferences APIs as follows: POST https://api.mercadolibre.com/checkout/preferences?access_token=SELLER_ACCES S_TOKEN HEADERS: Accept: application/json Content-Type: application/json JSON: { "items": [ { "id": "Code", "title": "Name", "description": "Description", "quantity": 1, "unit_price": 50, "currency_id": "Currency Type", // See API for Currencies "picture_url": "https://www.mercadopago.com/orgimg/MP3/home/logomp3.gif" } ], // Optional setups "external_reference": "OPERATION-ID-1234", "payer": { "name": "user-name", "surname": "user-surname", "email": "[email protected]" }, "back_urls": { "pending": "http://www.pending.com", "success": "https://www.success.com" }, "payment_methods": { "excluded_payment_methods": [ {

8

MarketPlace Integration "id": "amex" } ], "excluded_payment_types": [ { "id": "ticket" } ], "installments": 12 }, "marketplace_fee": 2.29 }

In response you will get a “201 Created” and a JSON as follows: { "external_reference": "OPERATION-ID-1234", "items": [ { "id": "Code", "currency_id": "Currency Type",// Argentina: ARS (peso argentino) ó USD (Dólar estadounidense); Brasil: BRL (Real). "title": "Name", "picture_url": "https://www.mercadopago.com/orgimg/MP3/home/logomp3.gif", "description": "Description", "quantity": 1, "unit_price": 50 } ], "date_created": "2011-08-16T21:28:42.606-04:00", "subscription_plan_id": null, "id": "preference_id", "collector_id": "your MercadoPago user ID", "init_point": "https://www.mercadopago.com/checkout/pay?pref_id=preference_id", "payer": { "email": "[email protected]", "name": "user-name", "surname": "user-surname" }, "back_urls": { "pending": "http://www.pending.com", "success": "https://www.success.com" }, "marketplace": "market_place_id", "marketplace_fee": 2.29, "payment_methods": { "excluded_payment_methods": [ { "id": "amex" } ], "excluded_payment_types": [ {

9

MarketPlace Integration "id": "ticket" } ], "installments": 12 } }

Payment Process Look&Feel Add your Preference URL within the render:

Pay!

You can customize “Buy Now” button choosing between different colors, sizes, shapes, text fonts, messages and payment methods logos. Text: You can display different texts within the “Buy Button” such as “Buy now”, “Pay” or “Donate”. We strongly recommend not using more than 30 characters. Insert text in html tag. Example: Buy.

10

MarketPlace Integration Look & feel: The Class structure offers you these different options: color-size-form-font-logos.

class

Color

Size

Form

Font

Logos

blue orange red green lightblue grey

L (large)

Sq (square)

Ar (Arial)

M (medium)

Rn (rounded)

Tr (Trebuchet)

S (small)

Ov (oval)

Ge (Georgia)

BrAll (Include all the logos of our payment methods) BrOn (Include only the logos of the payment methods with instant accreditation)

Check Out Style: Using "mp-mode" attribute you can choose between different check out window possibilities: Window’s type mp-mode

modal (modal window) popup (pop-up window) blank (new window or a tab) redirect (same window)

If possible, we strongly recommend using “redirect” window type. This check out window showed the better conversion rates.

11

MarketPlace Integration Callback function: Define “callback" attributes to assign Javascript function. This will handle communication between render and your site:

Pay!

12

MarketPlace Integration This function will receive a JSON as follows:

{ "back_url":"back url according to the payment status" || null, "collection_id":"collection_id " || null, "collection_status":"collection_status" || null, "external_reference":" preference external reference" || null, "preference_id":"preference-id" }

Instant Payment Notification (IPN) IPN is a message service that lets you synchronize automatically your back office system and MercadoPago. Using IPN You can also check your payments statuses at any time.

Glossary of attributes collection

Payment information id

Payment ID

site_id

Web Site in which payment was initialized

operation_type

Operation type

external_reference

Attribute reserved for discretional use of merchant. It is usually used for storing operation id given from merchant back office system.

status

Payment status

status_detail

Payment status detail

payment_type

Payment type

date_created

Date of Payment creation

last_modified

Date of Payment last modification

date_approved

Date of Payment approbation date

money_release_date

Money release date

currency_id

Currency ID. See API for Currencies

transaction_amount

Original payment amount

shipping_cost

Shipping amount

total_paid_amount

Total amount to be paid by the buyer

finance_charge

Financing amount

net_received_amount Net amount received by the seller reason

Name of product or service to be purchased. This title is exactly the one showed throughout the checkout process. Buyer’s information

payer id

Buyer’s ID

first_name

Buyer’s first name

last_name

Buyer’s last name

13

MarketPlace Integration Buyer’s phone information

phone

area_code

Area code

number

Number

extension

Extension

email

Buyer’s email

nickname

Buyer’s nickname Seller’s information

collector id

Seller’s ID

first_name

Seller’s first name

last_name

Seller’s last name

phone

Seller’s phone information area_code

Area code

number

Number

extension

Extension

email

Seller’s email

nickname

Seller’s nickname

14

Mkt Place Integration -


1MB Sizes 19 Downloads 467 Views

Recommend Documents

Artisan Mkt Reg. Form -
You have the option to break down your booth at 5pm, or remain set up during the Hot Air Balloon Glow which starts at 7pm, followed by the Outdoor Concert ...

2017 Silabo MKT I - ADM.pdf
ASIGNATURA: MARKETING I. 2. INFORMACIÓN ACADÉMICA. Periodo académico: 2017 - A. Escuela profesional: Administración. Código de la asignatura: ...

CP-CC-MKT-USS.pdf
Whoops! There was a problem loading more pages. Retrying... CP-CC-MKT-USS.pdf. CP-CC-MKT-USS.pdf. Open. Extract. Open with. Sign In. Main menu.

PR-CSP-MKT-USS.pdf
Asistente Técnico. de Marketing. 8. Descripción de actividades ... PR-CSP-MKT-USS.pdf. PR-CSP-MKT-USS.pdf. Open. Extract. Open with. Sign In. Main menu.

Page 1 RL's Place Lydia's Place LLuke's Place ... s. His Name ...
I, hereby voluntarily consent to substance abuse recovery services by Antioch ... No information will be released outside the recovery ... best of my knowledge.

MacLW-4thQ 2017 Denver Retail Mkt Report.PDF
Christopher P. Gallo of KPMG Peat Marwick noted that Will has "that rare. quality of both detail and ... craft and become a very sharp, master negotiator. Superior ...

ITRA MacLW-1stQ 2017 US Office Mkt Report.pdf
Indonesia Tahun 1945;. 2. Undang-Undang Nomor 40 Tahun 2004 tentang. Sistem Jaminan Sosial Nasional (Lembaran Negara. Republik Indonesia Tahun ...

MacLW-4thQ 2017 US Retail Mkt Report.PDF
Ross Company (now Newmark Grubb Knight Frank), Iliff, Thorn &. Company ... and done right," says Phil Dunne, Executive Director of the Texas Medical. Foundation. ... Knight. Frank. MacLaurin. Williams. Worldwide. Sole business is. Tenant & Buyer. Rep

MacLW-4thQ 2017 US Indl Mkt Report.PDF
With decades at the table as Tenant Rep, Will has honed his. craft and become a ... The truth: No conflicts of interest are acceptable. When you need to Be ... Worldwide ✓ ✓ ✓ ✓ ✓ ✅. CBRE, C&W, JLL, etc. Page 3 of 40. MacLW-4thQ 2017 US I

Integration Testing.PDF
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Integration ...

SPECIAL EDUCATION - INTEGRATION
Apr 12, 2016 - Learner Support Plan (LSP). 2. Principals will ensure that all staff members understand the above requirement and that. LSP statements are ...

Process Integration in Semantic Enterprise Application Integration: a ...
Process Integration in Semantic Enterprise Application Integration: a Systematic Mapping.pdf. Process Integration in Semantic Enterprise Application Integration: ...

PeopleSoft Integration Broker - SOAIS
Jun 11, 2009 - web, email, and legacy PeopleSoft applications. You can build it yourself with ..... on this presentation at http://www.soais.com/askexpert.html ...

ITRA MacLW-1stQ 2017 US Office Mkt Report.pdf
... Palm Beach County, Philadelphia, Phoenix, Pittsburgh, Raleigh/Durham,. Sacramento, San Diego, San Francisco, Seattle/Puget Sound, South Bay/San Jose, ...

MacLW-4thQ 2017 Denver Office Mkt Report.PDF
A patient and detailed professional, Will prides himself in finding creative. and effective solutions to problems. "He has a reputation of getting the job done,. and done right," says Phil Dunne, Executive Director of the Texas Medical. Foundation. W

PR-EVP-M&P-MKT-USS.pdf
Dirección de Marketing. Lic. Ana Karina Cardoso Aurazo. Firma: ..... PR-EVP-M&P-MKT-USS.pdf. PR-EVP-M&P-MKT-USS.pdf. Open. Extract. Open with. Sign In.

Integration Requirements - GitHub
Integration Requirements. Project Odin. Kyle Erwin. Joshua Cilliers. Jason van Hattum. Dimpho Mahoko. Keegan Ferrett ...

ITRA MacLW-1stQ 2017 Denver Retail Mkt Report.pdf
CoStar Group, Inc. 1331 L ST NW • Washington, DC 20005• (800) 204-5960 • www.costar.com • NASDAQ: CSGP. For information on subscribing to CoStar's ...

place value tens.pdf
Latoya Reed 2014. 20. 50. 90. 100. 10. 40. 60. 80. 30. 70. Page 1 of 3 ... Page 3 of 3. Credits. Page 3 of 3. place value tens.pdf. place value tens.pdf. Open.