# MD for: https://www.mercadopago.cl/developers/es/docs/qr-code/create-store-and-pos.md \# Create store and cash register After \[creating the application\](https://www.mercadopago.cl/developers/en/docs/qr-code/create-application) and obtaining the credentials, it is necessary to configure the store and cash register, which will be associated with transactions. \*\*Stores\*\* represent physical establishments registered in Mercado Pago and can have one or more cash registers linked. \*\*Cash registers\*\* correspond to points of sale (POS) and must always be associated with a store, ensuring reconciliation of QR Code payments in physical establishments. !\[Stores and POS\](/images/qr-orders/stores\_pos-v1.es.png) It is possible to create stores and cash registers from your system through our \*\*APIs for in-person payments\*\*. To do this, follow the steps below. ## Create store To create a store via API, send a \*\*POST\*\* with the :toolTipComponent\[test Access Token\]{link="/developers/en/docs/qr-code/create-application#bookmark\_access\_test\_credentials" linkText="Access test credentials" content="Private key linked to an application, used in the \_backend\_ to authenticate operations in the test environment. You can find it in the application's Credentials section, within the test environment. It cannot process real payments, must never be exposed in the \_frontend\_, and starts with the \`APP\_USR\` prefix."} to the endpoint :TagComponent{tag="API" text="Create store" href="/developers/en/reference/in-person-payments/qr-code/stores/create-store/post" color="accent"}. You must add the :toolTipComponent\[test account \`user\_id\`\]{content="Numeric identifier for a test account, used to simulate the seller during the integration. You can find it with the account details. In production, replace it with the User ID of the real account that will receive the payments."} in the \_path\_ of your request and complete the required parameters with the business details as indicated below. > WARNING > > It is essential to correctly fill in all store location information (\`city\_name\`, \`state\_name\`, \`latitude\` and \`longitude\`). Incorrect data can cause errors in tax calculations, directly impacting billing and fiscal compliance of your company. \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/users/USER\_ID/stores'\\ -H 'Content-Type: application/json' \\ -H 'Authorization: Bearer ACCESS\_TOKEN' \\ -d '{ "name": "Instore Shop", "business\_hours": { "monday": \[ { "open": "08:00", "close": "12:00" } \], "tuesday": \[ { "open": "09:00", "close": "18:00" } \] }, "external\_id": "SHOP001", "location": { "street\_number": "0123", "street\_name": "Example street name.", "city\_name": "City name.", "state\_name": "State name.", "latitude": 27.175193925922862, "longitude": 78.04213533235064, "reference": "Near Mercado Pago." } }' \`\`\` | Parameter | Description and examples | Required | | ---- | ---- | ---- | | \`user\_id\` | Identifier of the Mercado Pago account that receives the money for sales made at the store. During development, use the \`user\_id\` from the test account, available in \*\*Your integrations > Integration data > Test credentials > Test credentials data\*\*. When going to production, replace it with the \`user\_id\` from the real account that will receive payments: If you are performing your :toolTipComponent\[own\]{content="QR Code integrations to your system for your own use and configured using your application's credentials."} integration, you will find this value in the \[Integration data\](https://www.mercadopago.cl/developers/en/docs/qr-code/resources/application-details). If, on the other hand, you are performing an integration :toolTipComponent\[for third parties\]{content="QR Code integrations to your system on behalf of a seller and configured using credentials obtained through the OAuth security protocol."}, you will obtain the value in the \_response\_ to :toolTipComponent\[linking through OAuth\]{link="/developers/en/docs/qr-code/resources/security/landing-hub" linkText="OAuth" content="Private key generated through the OAuth security protocol, which allows managing integrations on behalf of third parties. For more information, go to the documentation."}. | Required | | \`name\` | Name of the created store. | Required | | \`business\_hours\` | Business hours. Operating hours are divided by day of the week and up to four opening and closing times per day are allowed. Provide this data so that your store is displayed in the Mercado Pago application with the correct operating hours. | Optional | | \`external\_id\` | External identifier of the store for the integrator system. Can contain any alphanumeric value up to 60 characters and must be unique for each store. For example, \`SHOP001\`. | Obligatorio | | \`location\` | This \_object\_ must contain all store location information. It is important to fill everything correctly , especially the \`latitude\` and \`longitude\` fields with geographical coordinates, using the simple decimal format and real location data. For example, \`"latitude": 27.175193925922862\` and \`"longitude": 78.04213533235064\`, which correspond to the exact location of the Taj Mahal in India. When entering this data correctly, the store will appear on the map at the indicated location. | Required | If the request was sent correctly, the response will be as the following example: \`\`\`json { "id": 1234567, "name": "Instore Shop", "date\_created": "2019-08-08T19:29:45.019Z", "business\_hours": { "monday": \[ { "open": "08:00", "close": "12:00" } \], "tuesday": \[ { "open": "09:00", "close": "18:00" } \] }, "location": { "address\_line": "Example street name, 0123, City name, State name.", "latitude": 27.175193925922862, "longitude": 78.04213533235064, "reference": "Near Mercado Pago" }, "external\_id": "SHOP001" } \`\`\` In addition to the data sent in the request, the endpoint will return the \*\*identifier assigned to the store by Mercado Pago\*\* under the \`id\` parameter. ## Create cash register To enable sales with Mercado Pago, it is essential that each registered store has at least one cash register linked. To create a cash register and associate it with the previously created store, send a \*\*POST\*\* including your :toolTipComponent\[test Access Token\]{link="/developers/en/docs/qr-code/create-application" linkText="Access test credentials" content="Private key linked to an application, used in the \_backend\_ to authenticate operations in the test environment. You can find it in the application's Credentials section, within the test environment. It cannot process real payments, must never be exposed in the \_frontend\_, and starts with the \`APP\_USR\` prefix."} to the endpoint :TagComponent{tag="API" text="Create cash register" href="/developers/en/reference/in-person-payments/qr-code/pos/create-pos/post" color="accent"} as shown below. \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/v2/pos'\\ -H 'Content-Type: application/json' \\ -H 'Authorization: Bearer ACCESS\_TOKEN' \\ -H 'X-Idempotency-Key: UNIQUE\_KEY' \\ -d '{ "name": "POS-001", "store\_id": "1234567", "external\_id": "SHOP001POS001", "config": { "qr": { "operating\_mode": "pdv" } } }' \`\`\` | Parameter | Description and examples | Required | | ---- | ---- | ---- | | \`name\` | Name of the created cash register. | Optional | | \`store\_id\` | Identifier of the store to which the cash register belongs, assigned to that store by Mercado Pago. It is returned in the \_response\_ to store creation under the \`id\` parameter. Required if \`external\_store\_id\` is not provided. If both are sent, they must refer to the same store. | Conditional | | \`external\_store\_id\` | External identifier of the store, defined by the integrator when creating the store under the \`external\_id\` parameter. Required if \`store\_id\` is not provided. If both are sent, they must refer to the same store. | Conditional | | \`external\_id\` | Unique identifier of the cash register defined by the integrator system. Must be a unique alphanumeric value for each cash register and can contain up to 40 characters. Although optional in the API, it is strongly recommended: it is required to create QR Code orders associated with this cash register. Without this field, payment processing will not be possible. | Optional | | \`config.qr.operating\_mode\` | Operating mode of the cash register for QR Code payments. Possible values: \`pdv\`: attended mode where a cashier is present and processes the transaction. The \`config.qr.url\` field must be absent. \`standalone\`: \*\*non-integrated\*\* QR Code mode. The generated QR is static and not linked to any external system; the customer scans and pays directly from the Mercado Pago app without the integrator managing the order. The \`config.qr.url\` field must be absent. | Optional | | \`config.qr.category\` | MCC code that indicates the cash register category. The code varies depending on the country of operation. If not specified, it remains as a generic category. For more information about the codes, consult the :TagComponent{tag="API" text="API Reference" href="/developers/en/reference/in-person-payments/qr-code/pos/create-pos/post" color="accent"}. | Optional | | \`config.qr.url\` | URL to get the order from the integrator system when a payment is initiated. The \`config.qr.url\` field must be null if \`operating\_mode\` is \`pdv\` or \`standalone\`. | Conditional | If the request was sent correctly, the response will be as the following example. \`\`\`json { "id": 1234567, "name": "POS-001", "status": "active", "date\_created": "2024-01-15T10:30:00Z", "date\_last\_updated": "2024-01-15T10:30:00Z", "user\_id": 123456, "store\_id": "1234567", "external\_store\_id": "SHOP001", "external\_id": "SHOP001POS001", "config": { "qr": { "operating\_mode": "pdv" } }, "qr\_response": { "uuid": "0977011a027c4b4387e52069da4264deae2946af4dcc44ee98a8f1dbb376c8a1", "image": "https://www.mercadopago.com/instore/merchant/qr/1234567/abc123.png", "template\_document": "https://www.mercadopago.com/instore/merchant/qr/1234567/template\_abc123.pdf", "template\_image": "https://www.mercadopago.com/instore/merchant/qr/1234567/template\_abc123.png", "qr\_code": "00020101021226940014BR.GOV.BCB.PIX2572pix-qr-h.mercadopago.com/instore/h/p/v2/abc123" } } \`\`\` See in the table below the description of some of the returned parameters that may be useful to continue with your integration later. | Parameter | Description | | ---- | ---- | | \`id\` | Point of sale creation ID. When registering a point of sale, you will receive a corresponding ID. This ID can be used for various operations, including querying, updating, or deleting its data. | | \`config\` | Configuration \_object\_ for the cash register. It contains the \`qr\` configuration node with the \`operating\_mode\` and, when applicable, \`category\` and \`url\`. | | \`qr\_response\` | Static QR code automatically created and associated with the cash register to process point of sale transactions. This QR code is necessary when orders are created in static (\`static\`) or hybrid (\`hybrid\`) mode. The \`qr\_response\` \_object\_ contains the following attributes: \`uuid\`: Unique identifier of the QR code associated with this point of sale, represented as a 64-character hexadecimal \_string\_ (SHA-256 hash). \`image\`: URL of the QR code image to be used to perform transactions. \`template\_document\`: URL of the file (in PDF format) of the \_template\_ with the QR code to be used to perform transactions. \`template\_image\`: URL of the file (in image format) of the \_template\_ with the QR code to be used to process transactions. \`qr\_code\`: raw QR code \_string\_ that can be encoded into a QR image by the integrator system. | | \`status\` | Current \_status\_ of the cash register. Possible values: \`active\` (enabled and available to receive payments) and \`inactive\` (disabled, cannot receive payments). | | \`user\_id\` | Identifier of the Mercado Pago account that receives money from sales made at the cash register. | | \`name\` | Name assigned to the cash register at the time of its creation. | | \`store\_id\` | Identifier of the store to which the point of sale belongs, assigned to that store by Mercado Pago. | | \`external\_store\_id\` | External identifier of the store, which was assigned by the integrator system at the time of its creation under the \`external\_id\` parameter. | | \`external\_id\` | Unique identifier of the cash register defined by the integrator system. | If both requests were successful, you will have created and configured the store and cash register necessary for QR Code integration. > NOTE > > Stores are automatically displayed on the map of Mercado Pago and Mercado Libre applications, expanding the establishment's visibility as payments are processed. With the store and cash register created, you can \[integrate payment processing\](https://www.mercadopago.cl/developers/en/docs/qr-code-ca/payment-processing).