{"id":3437,"date":"2021-03-09T18:53:14","date_gmt":"2021-03-09T18:53:14","guid":{"rendered":"https:\/\/documents.openpay.mx\/?p=3437"},"modified":"2024-01-29T15:01:24","modified_gmt":"2024-01-29T15:01:24","slug":"charge-store","status":"publish","type":"post","link":"https:\/\/documents-mx-dev.opdevhm.com\/en\/docs\/charge-store.html","title":{"rendered":"Payment via a store"},"content":{"rendered":"
This tutorial will guide you step by step to generate store payment references, in order to receive payments through convenience stores.<\/p>\n
Note:<\/strong> You can get notifications<\/strong> minutes after your customer makes the payment.<\/em><\/p>\n This tutorial you can see steps 2 and 3, for step 6 details please check notifications section<\/a><\/p>\n To receive a payment in a store you need to generate a barcode with the reference with which your customer can pay at the store.<\/p>\n To do this you must make a request to our API as follows:<\/p>\n Note:<\/strong> The maximum amount allowed for such charges is $ 9,999.99 MXN<\/em><\/p>\n If the request is successful you will receive an answer with the reference number generated and the barcode URL so you can create your receipt.<\/p>\n Response:<\/strong><\/p>\n Sandbox:<\/strong> You can simulate the payment from the dashboard, so you can get a payment notification on your system via a Webhook<\/a>.<\/em><\/p>\n Production<\/strong> The payment notification is done in real time, that is when your customer makes the payment at the store you will receive a Webhook<\/a> and the balance in your account will be increased.<\/em><\/p>\n For more information see the charges reference<\/a><\/p>\n Basically you can create your receipt with any design and colors, but it should include:<\/p>\n Sandbox:<\/strong> Production<\/strong> Example:<\/p>\n https:\/\/sandbox-dashboard.openpay.mx\/paynet-pdf\/mzdtln0bmtms6o3kck8f\/000020TRT3PGJAWHQHPERTJOQJ0005006<\/a><\/p>\n If you decide not to use the receipt offered by Openpay you can generate it yourself, basically you can create it with any design and colors, but it must include:<\/p>\n If you want to find out about how to include the map to see nearby stores, please click here<\/a><\/p>\n Note:<\/em><\/strong><\/p>\n Make sure your integration meets version compatibility requirements see details<\/a> *Implement Notifications<\/a> to know the status of payments in real time<\/em><\/p>","protected":false},"excerpt":{"rendered":" El objetivo de esta gu\u00eda es explicar paso a paso como generar referencias de pago para tiendas, mediante las cuales tus clientes podr\u00e1n realizar pagos en alguna de las tiendas de conveniencia afiliadas. Nota: Mediante el uso de este m\u00e9todo de pago podr\u00e1s recibir notificaciones minutos despues que tu cliente realice el pago en la… Read More »Payment via a store<\/span><\/a><\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"off","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[133],"tags":[],"class_list":["post-3437","post","type-post","status-publish","format-standard","hentry","category-docs"],"yoast_head":"\nProcess to make store charges<\/h3>\n
<\/center>Steps:<\/p>\n\n
Create a charge (Step 2)<\/h2>\n
\r\n $openpay = Openpay::getInstance('mzdtln0bmtms6o3kck8f',\r\n 'sk_e568c42a6c384b7ab02cd47d2e407cab');\r\n $chargeData = array(\r\n 'method' => 'store',\r\n 'amount' => 100.00,\r\n 'description' => 'Cargo a tienda');\r\n $charge = $openpay->charges->create($chargeData);<\/code><\/pre>\n<\/figure>\n{\r\n \"id\" : \"t6utz9dywve6zipnppys\",\r\n \"description\" : \"Cargo con tienda\",\r\n \"error_message\" : null<\/strong>,\r\n \"authorization\" : null<\/strong>,\r\n \"amount\" : 100,\r\n \"operation_type\" : \"in\",\r\n \"payment_method\" : {\r\n \"type\" : \"store\",\r\n \"reference\" : \"123456ABCDEFGHIJLKMNOPQRSTVW010000\",\r\n \"barcode_url\" : \"https:\/\/sandbox-api.openpay.mx\/barcode\/123456ABCDEFGHIJLKMNOPQRSTVW010000?width=1&height=45\"\r\n },\r\n \"order_id\" : \"oid-00052\",\r\n \"transaction_type\" : \"charge\",\r\n \"creation_date\" : \"2013-12-05T17:50:09-06:00\",\r\n \"currency\" : \"MXN\",\r\n \"status\" : \"in_progress\",\r\n \"method\" : \"store\"\r\n}<\/code><\/pre>\n<\/figure>\nCreate a payment receipt (Step 3)<\/h2>\n
{DASHBOARD_PATH}\/paynet-pdf\/{MERCHANT_ID}\/{REFERENCE}<\/code><\/pre>\n<\/figure>\n{DASHBOARD_PATH}<\/code> = https:\/\/sandbox-dashboard.openpay.mx<\/em><\/p>\n{DASHBOARD_PATH}<\/code> = https:\/\/dashboard.openpay.mx<\/em><\/p>\n{MERCHANT_ID}<\/code> = your merchant id<\/p>\n{TRANSACTION_ID}<\/code> = field value payment_method.reference<\/code> of the transaction object returned when the charge was created<\/p>\nCreate Custom Payment Receipt (Optional Step 3.1)<\/h2>\n
\n
\n
\n
\n
reference<\/code><\/li>\n<\/ul>\n<\/li>\n\n
barcode_url<\/code><\/li>\n<\/ul>\n<\/li>\n\n
amount<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\nExample Custom Payment Receipt (Optional Step 3.1)<\/h2>\n
<\/center>Download the payment receipt example here<\/a><\/p>\n