{"info":{"_postman_id":"e533cccd-3d0c-47ae-b559-d252e7149315","name":"GreenPay API Services","description":"<html><head></head><body><p>This collection list the API services that you can use.</p>\n<p>To use our services, you must need to create <a href=\"https://sandbox-dashboard.greenpay.me/merchants/new\">Sandbox credentials</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"21265782","collectionId":"e533cccd-3d0c-47ae-b559-d252e7149315","publishedId":"UzQyq3fo","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-07-19T17:30:01.000Z"},"item":[{"name":"Checkout","item":[{"name":"Checkout with card data","item":[{"name":"Create checkout order","event":[{"listen":"test","script":{"id":"adab0c2a-bd8a-4a4a-918d-4a46dd9b0eb5","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"liszt-token\", jsonData.token);","postman.setEnvironmentVariable(\"GP_SESSION\", jsonData.session);","","if(typeof jsonData.token!== \"undefined\"){","    postman.setEnvironmentVariable(\"GP_TOKEN\", jsonData.token);","};","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"891af46f-ca82-47fb-af1e-1094042083bf","exec":[""],"type":"text/javascript","packages":{}}}],"id":"b7870a58-8091-406e-9371-2e20e341a2a1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"terminal\": \"MADERA Y METAL-7074-BNCR-CRC\",\n    \"amount\": 100,\n    \"currency\": \"CRC\",\n    \"description\": \"TEST\",\n    \"orderReference\": \"TEST-GP\",\n    \"additional\": {\n        \"customer\": {\n            \"name\": \"DPALACIO\",\n            \"email\": \"DPALACIO@GREENPAY.ME\",\n            \"identification\": \"\",\n            \"billingAddress\": {\n                \"country\": \"CR\",\n                \"street1\": \"CR\"\n            },\n            \"shippingAddress\": {\n                \"country\": \"CR\",\n                \"street1\": \"CR\"\n            }\n        },\n        \"products\": [\n            {\n                \"skuId\": \"0\",\n                \"description\": \"CARGO PRUEBA\",\n                \"price\": 100,\n                \"quantity\": 1,\n                \"type\": \"TEST\"\n            }\n        ]\n    }\n}\n"},"url":"{{merchant_url}}","description":"<p>Returns a JSON object with sesion an liszt-token params to use in the checkout invocation</p>\n","urlObject":{"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[{"id":"219842a4-00d8-4d43-87aa-e877ec511027","name":"Create checkout order","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"secret\": \"{{secret}}\",\n\t\"merchantId\": \"{{merchantId}}\",\n\t\"terminal\": \"{{terminal_PEI_CR}}\",\n\t\"amount\": 3,\n\t\"currency\": \"CRC\",\n\t\"description\": \"27-08-01\",\n\t\"orderReference\": \"27-08-01\"\n}\n"},"url":"https://dev-merchant.greenpay.me/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"session\": \"57727e32-9007-4f24-afa1-18c3a10cced8\",\n    \"token\": \"7021d471-0b98-410f-81e3-59a2e1b15b8b\"\n}"},{"id":"798e52a3-b038-4fcb-b544-02e5055c6661","name":"Normal","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"terminal\": \"{{terminalBN}}\",\n    \"amount\": 443,\n    \"currency\": \"CRC\",\n    \"description\": \"Compra producto 837\",\n    \"orderReference\": \"QA-935-closure2\",\n    \"callback\": \"https://localhost.com/callback\",\n    \"additional\": {\n        \"customer\": {\n            \"name\": \"userclosure2\",\n            \"email\": \"amatamoros@greenpay.me\",\n            \"billingAddress\": {\n                \"country\": \"CR\",\n                \"province\": \"Nombre de la provincia\",\n                \"city\": \"Ciudad\",\n                \"street1\": \"Dirección Calle 1\",\n                \"street2\": \"Dirección Calle 2\",\n                \"zip\": \"10801\"\n            },\n            \"shippingAddress\": {\n                \"country\": \"CR\",\n                \"province\": \"Nombre de la provincia\",\n                \"city\": \"Ciudad\",\n                \"street1\": \"Dirección Calle 1\",\n                \"street2\": \"Dirección Calle 2\",\n                \"zip\": \"10801\"\n            }\n        },\n        \"products\": [{\n            \"description\": \"manga\",\n            \"skuId\": \"123\",\n            \"quantity\": 1,\n            \"price\": 150,\n            \"type\": \"TD\"\n        }]\n    }\n}\n"},"url":"{{host-merchant}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"session\": \"44049b90-a053-4da0-9f88-7418fef5d4f2\",\n    \"token\": \"8b4ccd1f-fe7e-4275-b1c1-974b15c8233a\"\n}"}],"_postman_id":"b7870a58-8091-406e-9371-2e20e341a2a1"},{"name":"Checkout invocation","id":"9bfe08ad-937a-4ab7-b2c2-d93bab64770a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"liszt-token","value":"{{GP_TOKEN}}"}],"body":{"mode":"raw","raw":"{\n    \"session\": \"{{GP_SESSION}}\",\n    \"ld\": \"{{GP_LD}}\",\n    \"lk\": \"{{GP_LK}}\"\n}"},"url":"{{checkout_url}}","description":"<p>Makes debit with the amount from the card receive. See our code examples in [Gitlab] [<a href=\"https://gitlab.com/gp-examples/checkout%5D\">https://gitlab.com/gp-examples/checkout]</a> to know how to encrypt the data (lk and ld params).</p>\n<h4 id=\"card-data-object-to-be-encrypted\">Card data object to be encrypted</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-JSON\">{\n  \"card\": {\n    \"cardHolder\": \"Nombre del titular de la tarjeta\",\n    \"expirationDate\": {\n      \"month\": número del mes, del 1 al 12,\n      \"year\": últimos dos dígitos del año\n    },\n    \"cardNumber\": Número_de_la_tarjeta,\n    \"cvc\": Código de seguridad de la tarjeta\n  },\n  \"tokenize\": true,\n  \"options\": {\n    \"numberOfPayments\": \"3\"\n  }\n}\n</code></pre>\n","urlObject":{"host":["{{checkout_url}}"],"query":[],"variable":[]}},"response":[{"id":"5a958c17-8130-4f97-9d1a-81708f21940f","name":"Checkout invocation success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"},{"key":"liszt-token","value":"{{liszt-token}}"}],"body":{"mode":"raw","raw":"{\n    \"session\": \"{{session}}\",\n    \"ld\": \"{{liszt data}}\",\n    \"lk\": \"{{liszt key}}\"\n}"},"url":"{{checkout_url}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"orderId\": \"04ab0486-7f46-4295-ac50-17935da12acb\",\n    \"authorization\": \"533793\",\n    \"amount\": 119,\n    \"currency\": \"CRC\",\n    \"result\": {\n        \"time_local_tran\": \"165407\",\n        \"systems_trace_audit_number\": \"000283\",\n        \"success\": true,\n        \"retrieval_ref_num\": \"701016540713\",\n        \"resp_code\": \"00\",\n        \"reserved_private4\": null,\n        \"proc_code\": \"000000\",\n        \"network_international_id\": \"0003\",\n        \"mti\": \"0210\",\n        \"merchant_id\": 1280,\n        \"date_local_tran\": \"0110\",\n        \"card_acceptor_terminal_id\": \"00112478\",\n        \"authorization_id_resp\": \"533793\"\n    },\n    \"errors\": [],\n    \"callback\": null,\n    \"_signature\": \"5ef45855bcea6c44c49b2e34a6ff69b5d4e1850c73776c2463512261a5769ab8be86ef95b2f6ac4278ae19ea02173fa14626f33accb1476cc31c1c8d3916d8ed6844d3cc505490d885dbaa33fa744c92c9850c5670f4a2ad0b967c9d249d92ce66e67cf2a031589f7b0d22739217b68917be5bdc124039c03d7b74846af7be83\",\n    \"last4\": \"7777\",\n    \"brand\": \"Visa\"\n}"}],"_postman_id":"9bfe08ad-937a-4ab7-b2c2-d93bab64770a"}],"id":"c9690d04-138b-448f-9b34-34330553eeca","description":"<p>This service has to steps</p>\n<ul>\n<li>First, you have to create an <strong>payment order</strong> in <a href=\"https://sandbox-merchant.greenpay.me\">https://sandbox-merchant.greenpay.me</a>. See <strong>POST Create checkout order</strong></li>\n<li>Second, invoke our checkout endpoint <a href=\"https://sandbox-checkout.greenpay.me\">https://sandbox-checkout.greenpay.me</a>, this is the endpoint that will charge the amount to the card. See <strong>POST Checkout invocation</strong></li>\n</ul>\n","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"3efc073c-79b5-4e06-82fe-e47ac047f962"}},{"listen":"test","script":{"type":"text/javascript","exec":[""],"id":"4e3e2c0f-7e77-4aa7-9ef4-bb06e9d91e97"}}],"_postman_id":"c9690d04-138b-448f-9b34-34330553eeca"},{"name":"Checkout with card token","item":[{"name":"Checkout with card token","event":[{"listen":"test","script":{"id":"63649bb2-05c1-4e2b-89de-c0cfadbda14f","exec":["var jsonData = JSON.parse(responseBody);","pm.environment.set(\"liszt-token\", jsonData.token);"],"type":"text/javascript","packages":{}}}],"id":"2a0daeb2-e78e-4df1-9fd5-4ff9ce79b6b4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"merchantId\": \"e441a22d-3c9d-4025-a1a3-54ffd728fadc\",\n    \"secret\": \"ZTE4NzhjNDQxNzBmMDYxYzQ1NDU4NTVmOGVjOWJlNzcyN2IyZmYyMzA5OWFmNDAyMjgzNDFkZmE0MWNiZWIxMTkxNmNjNjAwYzQ2MDI1Mzg5ZjhhYTk3NzQ3ZTU2NzQ2MzBkNWJlMTYyZjZiYWNiZjY5YjE0ZDQ3NzUyMzUyNzE=\",\n    \"terminal\": \"FacturaradorPaquetes-BNCR-Dolares\",\n    \"currency\": \"USD\",\n    \"amount\": 33.9,\n    \"token\": \"85736120-0fd4-11f0-ae95-ff64f0d0d386\",\n    \"orderReference\": \"paymentBill-12965-6\",\n    \"description\": \"Monthly payment Accesos Automáticos S.A (6)\",\n    \"additional\": {\n        \"customer\": {\n            \"name\": \"Accesos Automáticos S.A\",\n            \"email\": \"fe@accesos.co.cr\",\n            \"billingAddress\": {\n                \"country\": \"CR\",\n                \"street1\": \"De la bomba Calle Blancos 400 Oeste, Goicoechea, San José, Costa Rica.\"\n            }\n        },\n        \"products\": [\n            {\n                \"quantity\": 1,\n                \"type\": \"Billing plan\"\n            }\n        ]\n    }\n}"},"url":"{{merchant_url}}/tokenPayment/","description":"<p>Creates a new payment using tokens</p>\n","urlObject":{"path":["tokenPayment",""],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2a0daeb2-e78e-4df1-9fd5-4ff9ce79b6b4"}],"id":"6bd45b18-8830-4ecb-810a-04f01c750cad","_postman_id":"6bd45b18-8830-4ecb-810a-04f01c750cad","description":""}],"id":"098dea2b-9acb-4cdf-a132-8b7864b6bf4a","description":"<p>This service allow you to make debits to their customers cards.</p>\n<p>You can do checkout with the card data or with a previously registered card token in our system.</p>\n","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"27e2d7e4-7a5d-4a01-a243-46db461bfb34"}},{"listen":"test","script":{"type":"text/javascript","exec":[""],"id":"7c51c44c-b289-4006-938a-7838b53843c4"}}],"_postman_id":"098dea2b-9acb-4cdf-a132-8b7864b6bf4a"},{"name":"Tokenize debit/credit cards","item":[{"name":"Update card token information","item":[{"name":"Create update token order","event":[{"listen":"test","script":{"exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"liszt-token\", jsonData.token);","postman.setEnvironmentVariable(\"session\", jsonData.session);","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","id":"53c551b1-020b-48d1-afb5-d977cdb7a3f7"}}],"id":"bf18f559-787e-4352-bebe-9ad0ab32e59e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"requestId\": \"fe7edca5-64a3-4835-95b6-76891854f2dc\"\n}"},"url":"{{merchant_url}}/tokenize","description":"<p>Returns a JSON object with sesion an liszt-token params to use in the tokenization invocation</p>\n","urlObject":{"path":["tokenize"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[{"id":"df16d2f1-91b5-47e3-a1f7-299c7b0356b3","name":"Create tokenize order","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"secret\": \"{{secret}}\",\r\n    \"merchantId\": \"{{merchantId}}\",\r\n    \"requestId\": \"xxxxx\"\r\n}"},"url":"https://sandbox-merchant.greenpay.me/tokenize"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"session\": \"4ce8a42e-7d26-43bb-9dcb-61277d59c0bf\",\n    \"token\": \"098ef762-f23a-45f4-acc2-b84432b52d8a\"\n}"}],"_postman_id":"bf18f559-787e-4352-bebe-9ad0ab32e59e"},{"name":"Update Tokenization request","event":[{"listen":"test","script":{"exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"cardToken\", jsonData.result.token);","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","id":"d7db116d-4541-4c7b-bd9d-0ffdec6d76d9"}}],"id":"918caf32-d745-4679-bd03-2176d9d2de1c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"liszt-token","value":"{{liszt-token}}"},{"key":"Accept","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"session\": \"{{session}}\",\n    \"ld\": \"{{liszt data}}\",\n    \"lk\": \"{{liszt key}}\"\n}"},"url":"{{checkout_url}}/tokenize/update","description":"<p>This service return a token from de card receive. See our code examples in [Gitlab] [<a href=\"https://gitlab.com/gp-examples/tokenize%5D\">https://gitlab.com/gp-examples/tokenize]</a> to know how to encrypt the data (lk and ld params)</p>\n","urlObject":{"path":["tokenize","update"],"host":["{{checkout_url}}"],"query":[],"variable":[]}},"response":[{"id":"d03e51b8-9ec7-49c2-8875-8d755aded039","name":"Tokenization invocation","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"liszt-token","value":"{{liszt-token}}"}],"body":{"mode":"raw","raw":"{\n  \"session\": \"{{session}}\",\n  \"ld\": \"ld_data_generated\",\n  \"lk\": \"lk_data_generated\"\n}"},"url":"https://sandbox-checkout.greenpay.me/tokenize"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 201,\n    \"requestId\": 1,\n    \"result\": {\n        \"token\": \"fb3d1a7b-9cb1-45b7-b49d-b2a3efd98371\",\n        \"last_digits\": \"7777\",\n        \"bin\": \"477777\"\n    },\n    \"expiration_date\": \"2109\",\n    \"brand\": \"Visa\",\n    \"nickname\": \"Visa\",\n    \"errors\": [],\n    \"callback\": \"http://localhost:3000/callback\",\n    \"_signature\": \"5005b0d596e607825ea4385d48b1c2f39aaae2a1965e135e47a050e00018e7f799aea524f489fe4d77416f4e2534d308e9bf967333ed695b0b1d73a0ce751e85f9b04edb12ec06096352535934f993ae4d68644896470f619cba8aa0fd5e7b7cb12b75fdb11bcc4d70da915c3c47dc835bf68e6f60c35bbbd9dcd44431100\"\n}"}],"_postman_id":"918caf32-d745-4679-bd03-2176d9d2de1c"}],"id":"48db075d-d793-447f-ba5f-a58335fe91b7","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"fb007505-7fa8-44d9-b830-cc3194224c1e"}},{"listen":"test","script":{"type":"text/javascript","exec":[""],"id":"61bc4773-63b7-44ad-96d3-69b8f538ea4f"}}],"_postman_id":"48db075d-d793-447f-ba5f-a58335fe91b7","description":""},{"name":"Delete GreenPay card token Copy","item":[{"name":"Delete Token","event":[{"listen":"test","script":{"exec":[""],"type":"text/javascript","id":"f1d1f392-d57b-4f3a-8280-bec8df144ca0"}}],"id":"7bb7f82d-a7b6-4983-bc1a-f6de0aac93a1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"token\": \"7ad6fa2d-ba97-4512-b54c-47c148825f3e\",\n    \"requestId\": \"9249be03-5104-48de-9db5-23c12810bc5e\"\n}"},"url":"{{merchant_url}}/deleteToken/","description":"<p>Deletes a token from GreenPay</p>\n","urlObject":{"path":["deleteToken",""],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[{"id":"9273b406-f32a-472a-aa25-c8fd32fe2952","name":"Delete Token","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"secret\": \"{{secret}}\",\r\n    \"merchantId\": \"{{merchantId}}\",\r\n\t\"token\": \"df4c16c1-3a34-4123-8108-a4df9c359b75\",\r\n\t\"requestId\": \"mg500\"\r\n}"},"url":"https://sandbox-merchant.greenpay.me/deleteToken/"},"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"DELETED\",\n    \"requestId\": \"mg500\",\n    \"errors\": [],\n    \"callback\": \"http://magento.local/greenpay/index/closeOrder/response\",\n    \"_signature\": \"33e6fa7b89c43ac3bd3eff17dfc081c1d2e77079c5aef8ac507dda2a32e45029c3a468e7773feb81fe6db9b78d0de1d566027954ef3ea725e3d2315710cf20c2595c99a3c06fef983529b2c6642ecd5a04563dbc78b0fd3b961b74bbd1e12ddce95022820e219de0e78d29bfb2cd7cfcde0c5117f9f4ad11490baa2f00d9c060\"\n}"}],"_postman_id":"7bb7f82d-a7b6-4983-bc1a-f6de0aac93a1"}],"id":"e6135b0d-3b15-43e1-b3d7-9323e1f6b9e9","_postman_id":"e6135b0d-3b15-43e1-b3d7-9323e1f6b9e9","description":""},{"name":"Get card token info","item":[{"name":"Get card token info","id":"e4719106-4fa0-45de-a90d-0c75cffc8672","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"token\": \"5e3f1249-76e9-4b2c-a6a2-66a08ed74557\"\n}","options":{"raw":{"language":"json"}}},"url":"{{merchant_url}}/getToken","urlObject":{"path":["getToken"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[{"id":"f3fffe3b-5525-48fa-a315-7d95632c803c","name":"Invalid card token","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"secret\": \"Njg3RDM5RDc1QkE3MzI0MTJEM0YwMjAxRjdFRDQ4NUI2RUQ2NEU2RDQ3NkVCMDJEMTNEQzEyQTUyMkY2RURBMjkxODY2OTFDRDBBMTM1QTE4OTdCNzkzNzhBREQ3QkU5RTMxMUFGODNEMzQ0NzY3MjAzQjVDQjNEQjBDRDJGQzk=\",\n    \"merchantId\": \"06c229a2-2632-46ac-a9a5-f63397e59573\",\n    \"token\": \"a00af5b1-8a63-4da9-b3b1-e35889ca3ed4\"\n}","options":{"raw":{"language":"json"}}},"url":"{{merchant_url}}/getToken/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": 500,\n    \"errors\": [\n        \"Error: Invalid card token\"\n    ]\n}"}],"_postman_id":"e4719106-4fa0-45de-a90d-0c75cffc8672"}],"id":"10816c58-bab0-4984-82db-6a04e61d5c13","_postman_id":"10816c58-bab0-4984-82db-6a04e61d5c13","description":""},{"name":"Create card token","item":[{"name":"Create tokenize order","event":[{"listen":"test","script":{"id":"c06b60f5-ae12-4019-b82d-cb361aa912b7","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"liszt-token\", jsonData.token);","postman.setEnvironmentVariable(\"session\", jsonData.session);","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript"}}],"id":"db831dfc-2617-466c-992a-e6eb4e6b9e9d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"secret\": \"ZTE4NzhjNDQxNzBmMDYxYzQ1NDU4NTVmOGVjOWJlNzcyN2IyZmYyMzA5OWFmNDAyMjgzNDFkZmE0MWNiZWIxMTkxNmNjNjAwYzQ2MDI1Mzg5ZjhhYTk3NzQ3ZTU2NzQ2MzBkNWJlMTYyZjZiYWNiZjY5YjE0ZDQ3NzUyMzUyNzE=\",\n    \"merchantId\": \"e441a22d-3c9d-4025-a1a3-54ffd728fadc\",\n    \"requestId\": \"14324312432\"\n}"},"url":"{{merchant_url}}/tokenize","description":"<p>Returns a JSON object with sesion an liszt-token params to use in the tokenization invocation</p>\n","urlObject":{"path":["tokenize"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"db831dfc-2617-466c-992a-e6eb4e6b9e9d"},{"name":"Tokenization invocation","event":[{"listen":"test","script":{"exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"cardToken\", jsonData.result.token);","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","id":"21bcf376-24c7-4473-83b0-c43a82622205"}}],"id":"a6005a0f-f5e2-4a69-a856-cdea16ed17f4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"liszt-token","value":"{{liszt-token}}"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"session\": \"{{session}}\",\n    \"ld\": \"{{liszt data}}\",\n    \"lk\": \"{{liszt key}}\"\n}"},"url":"{{checkout_url}}/tokenize","description":"<p>This service return a token from de card receive. See our code examples in [Gitlab] [<a href=\"https://gitlab.com/gp-examples/tokenize%5D\">https://gitlab.com/gp-examples/tokenize]</a> to know how to encrypt the data (lk and ld params)</p>\n","urlObject":{"path":["tokenize"],"host":["{{checkout_url}}"],"query":[],"variable":[]}},"response":[{"id":"9a30c672-0285-4e3d-89e3-7ce37a3f168c","name":"Tokenization invocation","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"liszt-token","value":"{{liszt-token}}"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"session\": \"{{session}}\",\n  \"ld\": \"ld_data_generated\",\n  \"lk\": \"lk_data_generated\"\n}"},"url":"https://sandbox-checkout.greenpay.me/tokenize"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 201,\n    \"requestId\": 1,\n    \"result\": {\n        \"token\": \"fb3d1a7b-9cb1-45b7-b49d-b2a3efd98371\",\n        \"last_digits\": \"7777\",\n        \"bin\": \"477777\"\n    },\n    \"expiration_date\": \"2109\",\n    \"brand\": \"Visa\",\n    \"nickname\": \"Visa\",\n    \"errors\": [],\n    \"callback\": \"http://localhost:3000/callback\",\n    \"_signature\": \"5005b0d596e607825ea4385d48b1c2f39aaae2a1965e135e47a050e00018e7f799aea524f489fe4d77416f4e2534d308e9bf967333ed695b0b1d73a0ce751e85f9b04edb12ec06096352535934f993ae4d68644896470f619cba8aa0fd5e7b7cb12b75fdb11bcc4d70da915c3c47dc835bf68e6f60c35bbbd9dcd44431100\"\n}"}],"_postman_id":"a6005a0f-f5e2-4a69-a856-cdea16ed17f4"}],"id":"e23c55a3-1a09-4afc-8ef2-1be7bd483513","_postman_id":"e23c55a3-1a09-4afc-8ef2-1be7bd483513","description":""}],"id":"d84e42e1-fae2-43c4-9319-90ec800c2413","description":"<p>This service allow you to tokenize the customers cards. </p>\n<p>This service has to steps</p>\n<ul>\n<li>First, you have to create an <strong>tokenization order</strong> in <a href=\"https://sandbox-merchant.greenpay.me/tokenize\">https://sandbox-merchant.greenpay.me/tokenize</a>. See <strong>POST Create tokenize order</strong></li>\n<li>Second, invoke our tokenization endpoint <a href=\"https://sandbox-checkout.greenpay.me/tokenize\">https://sandbox-checkout.greenpay.me/tokenize</a>, this is the endpoint that tokenize the card. See <strong>POST Tokenization invocation</strong></li>\n</ul>\n","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"3da602e4-ebf8-463e-95b6-f5d96c58baca"}},{"listen":"test","script":{"type":"text/javascript","exec":[""],"id":"f451ab65-f0de-496f-948a-727c35137e10"}}],"_postman_id":"d84e42e1-fae2-43c4-9319-90ec800c2413"},{"name":"Bulk Payments","item":[{"name":"Bulk payment request","event":[{"listen":"test","script":{"id":"849d1f03-65bd-49ab-8ae5-1655fc075353","exec":[""],"type":"text/javascript"}}],"id":"a5534396-e5d9-4593-9073-1e688c0e1a5a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"secret\": \"{{secret}}\",\n  \"merchantId\": \"{{merchantId}}\",\n  \"currency\": \"CRC\",\n  \"terminal\": \"Prueba GreenPay-bdf6-BNCR-CRC\",\n  \"payments\": [\n    {\n      \"orderReference\": \"637\",\n      \"amount\": 1000,\n      \"token\": [\"6ba6bae0-8d9c-46eb-a21f-e3fa4b57bdd8\"\n      ],\n      \"name\": \"Angel Fabricio\",\n      \"email\": \"msanchez@greenpay.me\",\n      \"details\": {\n        \"description\": \"testing 1\"\n     \n    }\n    },\n     {\n      \"orderReference\": \"350\",\n      \"amount\": 1000,\n      \"token\": [\"6ba6bae0-8d9c-46eb-a21f-e3fa4b57bdd8\"\n      ],\n      \"name\": \"Angel Fabricio\",\n      \"email\": \"msanchez@greenpay.me\",\n      \"details\": {\n        \"description\": \"testing 1\"\n     \n    }\n    },\n     {\n      \"orderReference\": \"213\",\n      \"amount\": 1000,\n      \"token\": [\"6ba6bae0-8d9c-46eb-a21f-e3fa4b57bdd8\"\n      ],\n      \"name\": \"Angel Fabricio\",\n      \"email\": \"msanchez@greenpay.me\",\n      \"details\": {\n        \"description\": \"testing 1\"\n     \n    }\n    },\n     {\n      \"orderReference\": \"5\",\n      \"amount\": 1000,\n      \"token\": [\"6ba6bae0-8d9c-46eb-a21f-e3fa4b57bdd8\"\n      ],\n      \"name\": \"Angel Fabricio\",\n      \"email\": \"msanchez@greenpay.me\",\n      \"details\": {\n        \"description\": \"testing 1\"\n     \n    }\n    },\n     {\n      \"orderReference\": \"236\",\n      \"amount\": 1000,\n      \"token\": [\"6ba6bae0-8d9c-46eb-a21f-e3fa4b57bdd8\"\n      ],\n      \"name\": \"Angel Fabricio\",\n      \"email\": \"msanchez@greenpay.me\",\n      \"details\": {\n        \"description\": \"testing 1\"\n     \n    }\n    },\n     {\n      \"orderReference\": \"801\",\n      \"amount\": 1000,\n      \"token\": [\"6ba6bae0-8d9c-46eb-a21f-e3fa4b57bdd8\"\n      ],\n      \"name\": \"Angel Fabricio\",\n      \"email\": \"msanchez@greenpay.me\",\n      \"details\": {\n        \"description\": \"testing 1\"\n     \n    }\n    },\n     {\n      \"orderReference\": \"175\",\n      \"amount\": 1000,\n      \"token\": [\"6ba6bae0-8d9c-46eb-a21f-e3fa4b57bdd8\"\n      ],\n      \"name\": \"Angel Fabricio\",\n      \"email\": \"msanchez@greenpay.me\",\n      \"details\": {\n        \"description\": \"testing 1\"\n     \n    }\n     },\n     {\n      \"orderReference\": \"188\",\n      \"amount\": 1000,\n      \"token\": [\"6ba6bae0-8d9c-46eb-a21f-e3fa4b57bdd8\"\n      ],\n      \"name\": \"Angel Fabricio\",\n      \"email\": \"msanchez@greenpay.me\",\n      \"details\": {\n        \"description\": \"testing 1\"\n     \n    }\n    },\n     {\n      \"orderReference\": \"937\",\n      \"amount\": 1000,\n      \"token\": [\"6ba6bae0-8d9c-46eb-a21f-e3fa4b57bdd8\"\n      ],\n      \"name\": \"Angel Fabricio\",\n      \"email\": \"msanchez@greenpay.me\",\n      \"details\": {\n        \"description\": \"testing 1\"\n     \n    }\n    },\n    {\n      \"orderReference\": \"103\",\n      \"amount\": 1000,\n      \"token\": [\"6ba6bae0-8d9c-46eb-a21f-e3fa4b57bdd8\"\n      ],\n      \"name\": \"Angel Fabricio\",\n      \"email\": \"msanchez@greenpay.me\",\n      \"details\": {\n        \"description\": \"testing 1\"\n     \n    }\n    }\n\n  ]\n  }\n\n     "},"url":"{{merchant_url}}/bulk","description":"<p>Example</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"secret\": \"{{secret}}\",\n  \"merchantId\": \"{{merchantId}}\",\n  \"terminal\": \"{{terminal}}\",\n  \"payments\": [\n    {\n      \"orderReference\": \"65666f2a-e83d-4d7f-b56e-21ea8935b1a8\",\n      \"amount\": 804,\n      \"token\": [\n        \"{{cardTokendev}}\"\n      ],\n      \"name\": \"Full name\",\n      \"email\": \"example@greenpay.me\",\n      \"products\": []\n    },\n    {\n      \"orderReference\": \"55aebbcc-62f7-4578-9dfb-a3e89d408d0b\",\n      \"amount\": 797,\n      \"token\": [\n        \"{{cardTokendev}}\"\n      ],\n      \"name\": \"Full name\",\n      \"email\": \"example@greenpay.me\",\n      \"products\": []\n    },\n    {\n      \"orderReference\": \"2b0a08a1-b0e5-4439-bb91-44bc1982d1aa\",\n      \"amount\": 991,\n      \"token\": [\n        \"{{cardTokendev}}\"\n      ],\n      \"name\": \"Full name\",\n      \"email\": \"example@greenpay.me\",\n      \"products\": []\n    }\n  ]\n}\n</code></pre>","urlObject":{"path":["bulk"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[{"id":"72060831-a73c-4294-bbfc-eb022449d3cd","name":"Bulk payment request","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"secret\": \"{{secret}}\",\n  \"merchantId\": \"{{merchantId}}\",\n  \"terminal\": \"{{terminal}}\",\n  \"payments\": [\n    {\n      \"orderReference\": \"xwy_2700\",\n      \"amount\": 20000,\n      \"token\": [\n        \"b2aa389d-929b-459d-b5b4-00bb93a2ee95\"\n      ]\n    }\n  ]\n}"},"url":"https://sandbox-merchant.greenpay.me/bulk"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"bulkId\": \"bae66bb2-d111-442a-9eee-21541ee7cfd9\"\n}"}],"_postman_id":"a5534396-e5d9-4593-9073-1e688c0e1a5a"}],"id":"4d5ffd9a-5580-49fa-b515-c53da9c045c7","_postman_id":"4d5ffd9a-5580-49fa-b515-c53da9c045c7","description":""},{"name":"Subscriptions","item":[{"name":"Create","event":[{"listen":"test","script":{"exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"subscriptionId\", jsonData.subscriptionId);","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","id":"a1cd500f-fa50-4d28-86b0-057483ad351d"}}],"id":"193492dd-d233-4e10-bd3a-ed414a4b398d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"terminal\": \"{{terminalPBAC_USD}}\",\n    \"userId\": \"66\",\n    \"description\": \"Subscription with identification test\",\n    \"currency\": \"USD\",\n    \"tokens\": [\n        \"7edc76df-2957-4f50-a544-b29713c57b70\"\n    ],\n    \"initialPayment\": {\n        \"amount\": 200,\n        \"description\": \"First payment \"\n    },\n    \"subscription\": [\n        {\n            \"amount\": 10,\n            \"cadence\": {\n                \"mode\": \"EVERY\",\n                \"unit\": \"MONTH\",\n                \"every\" : 1\n            }\n        }\n    ],\n    \"optional\": {\n        \"countryCode\": \"CRC\",\n        \"postalCode\": \"30701\",\n        \"name\": \"Fabricio Gonzalez\",\n        \"email\": \"angelfabriciogonzalez@gmail.com\",\n        \"identification\": \"10102020\"\n    }\n}"},"url":"{{merchant_url}}/subscriptions","description":"<h2 id=\"optional-params-for-susbcription-object\">Optional params for susbcription Object:</h2>\n<ul>\n<li>startDate : Timestamp with milisecons, if this param isnt sended it will be run when is created in our system</li>\n<li>endDate : Timestamp with milisecons, if this param isnt sended the suscripction will be active until it be canceled throght the cancell service.</li>\n</ul>\n<h2 id=\"optional-param-for-request-body\">Optional param for request body</h2>\n<ul>\n<li>initialPayment</li>\n</ul>\n","urlObject":{"path":["subscriptions"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[{"id":"cbbbf0cd-2f4d-4bb7-a7de-b4eba961f732","name":"Create subscription success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"terminal\": \"{{terminal_CRC}}\",\n    \"userId\": \"Jhon Doe\",\n    \"description\": \"subscription description\",\n    \"currency\": \"CRC\",\n    \"tokens\": [\n        \"{{cardToken}}\"\n    ],\n    \"initialPayment\": {\n        \"amount\": 100,\n        \"description\": \"some set up description\"\n    },\n    \"subscription\": [\n        {\n            \"amount\": 10,\n            \"cadence\": {\n                \"mode\": \"EVERY\",\n                \"unit\": \"MONTH\",\n                \"every\": 1\n            }\n        }\n    ],\n    \"optional\": {\n        \"countryCode\": \"CRC\",\n        \"postalCode\": \"30701\",\n        \"email\": \"example@greenpay.me\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{merchant_url}}/subscriptions"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"subscriptionId\": \"26e354c0d45b16d9b9d9c0255bf4e4e4\",\n    \"result\": {\n        \"success\": true,\n        \"initialPayment\": {\n            \"orderId\": \"26e354c0d45b16d9b9d9c0255bf4e4e4_0\",\n            \"authorization\": \"533793\",\n            \"errors\": []\n        }\n    },\n    \"errors\": [],\n    \"nextPaymentDate\": \"2019-01-18\"\n}"}],"_postman_id":"193492dd-d233-4e10-bd3a-ed414a4b398d"},{"name":"Cancel","id":"309af869-000f-4c40-839b-9d3166f997a6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"subscriptionId\": \"{{subscriptionId}}\",\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"user\": \"3395ef10-3f65-49b3-87b8-770cf5c1c0db\",\n    \"reason\": \"I will no longer use the service\"\n}"},"url":"{{merchant_url}}/subscriptions/cancel","urlObject":{"path":["subscriptions","cancel"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"309af869-000f-4c40-839b-9d3166f997a6"},{"name":"Update payment method","id":"0d914050-34f3-4d82-9de2-e1268866eba9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"subscriptionId\": \"{{subscriptionId}}\",\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"user\": \"API\",\n    \"token\": \"{{cardToken}}\"\n}"},"url":"{{merchant_url}}/subscriptions/update/card_token","description":"<p>Update the card token where is charge the subscription cost</p>\n","urlObject":{"path":["subscriptions","update","card_token"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[{"id":"b7a95afd-e393-433a-b882-3160b599dd8b","name":"Update payment method success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"subscriptionId\": \"{{subscriptionId}}\",\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"user\": \"API\",\n    \"token\": \"{{cardToken}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{merchant_url}}/subscriptions/update/card_token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"status\": \"SUCCESS\",\n    \"result\": {\n        \"id\": \"261\",\n        \"merchant_id\": \"06c229a2-2632-46ac-a9a5-f63397e59573\",\n        \"status\": \"ACTIVE\",\n        \"user_id\": \"Jhon Doe\",\n        \"user_type\": 1,\n        \"card_tokens\": [\n            \"a00af5b1-8a63-4da9-b3b1-e35889ca3ed4\"\n        ],\n        \"purchase_order\": {\n            \"secret\": \"Njg3RDM5RDc1QkE3MzI0MTJEM0YwMjAxRjdFRDQ4NUI2RUQ2NEU2RDQ3NkVCMDJEMTNEQzEyQTUyMkY2RURBMjkxODY2OTFDRDBBMTM1QTE4OTdCNzkzNzhBREQ3QkU5RTMxMUFGODNEMzQ0NzY3MjAzQjVDQjNEQjBDRDJGQzk=\",\n            \"terminal\": \"Postman Examples-efe6-BNCR-CRC\",\n            \"description\": \"subscription description\",\n            \"currency\": \"CRC\",\n            \"initialPayment\": {\n                \"amount\": 100,\n                \"description\": \"some set up description\"\n            },\n            \"subscription\": [\n                {\n                    \"amount\": 10,\n                    \"cadence\": {\n                        \"mode\": \"EVERY\",\n                        \"unit\": \"MONTH\",\n                        \"day\": 17\n                    },\n                    \"startDate\": 1547765614348\n                }\n            ],\n            \"optional\": {\n                \"countryCode\": \"CRC\",\n                \"postalCode\": \"30701\",\n                \"email\": \"example@greenpay.me\"\n            }\n        },\n        \"next_payment\": \"2019-01-18T00:00:00.000Z\",\n        \"enabled\": true,\n        \"inserted_at\": \"2019-01-17T22:53:34.350Z\",\n        \"updated_at\": \"2019-01-17T22:54:07.110Z\",\n        \"general_info\": {\n            \"user\": \"API\"\n        },\n        \"sys_period\": \"[\\\"2019-01-17 22:54:07.110294+00\\\",)\"\n    },\n    \"errors\": []\n}"}],"_postman_id":"0d914050-34f3-4d82-9de2-e1268866eba9"},{"name":"Update amount","id":"dbd0077c-9f3e-4f4a-bf58-39542476b684","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"subscriptionId\": \"{{subscriptionId}}\",\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"user\": \"API\",\n    \"amount\": 5500.99\n}"},"url":"{{merchant_url}}/subscriptions/update","urlObject":{"path":["subscriptions","update"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[{"id":"c566f506-3a6f-4142-9050-bb6ad1f9ce5e","name":"Update amount success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"subscriptionId\": \"{{subscriptionId}}\",\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"user\": \"API\",\n    \"amount\": 5500.99\n}"},"url":"{{merchant_url}}/subscriptions/update"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"SUCCESS\",\n    \"code\": 200,\n    \"result\": {\n        \"id\": \"261\",\n        \"merchant_id\": \"06c229a2-2632-46ac-a9a5-f63397e59573\",\n        \"status\": \"ACTIVE\",\n        \"user_id\": \"Jhon Doe\",\n        \"user_type\": 1,\n        \"card_tokens\": [\n            \"a00af5b1-8a63-4da9-b3b1-e35889ca3ed4\"\n        ],\n        \"purchase_order\": {\n            \"secret\": \"Njg3RDM5RDc1QkE3MzI0MTJEM0YwMjAxRjdFRDQ4NUI2RUQ2NEU2RDQ3NkVCMDJEMTNEQzEyQTUyMkY2RURBMjkxODY2OTFDRDBBMTM1QTE4OTdCNzkzNzhBREQ3QkU5RTMxMUFGODNEMzQ0NzY3MjAzQjVDQjNEQjBDRDJGQzk=\",\n            \"currency\": \"CRC\",\n            \"optional\": {\n                \"email\": \"example@greenpay.me\",\n                \"postalCode\": \"30701\",\n                \"countryCode\": \"CRC\"\n            },\n            \"terminal\": \"Postman Examples-efe6-BNCR-CRC\",\n            \"description\": \"subscription description\",\n            \"subscription\": [\n                {\n                    \"amount\": 5500.99,\n                    \"cadence\": {\n                        \"day\": 17,\n                        \"mode\": \"EVERY\",\n                        \"unit\": \"MONTH\"\n                    },\n                    \"startDate\": 1547765614348\n                }\n            ],\n            \"initialPayment\": {\n                \"amount\": 100,\n                \"description\": \"some set up description\"\n            }\n        },\n        \"next_payment\": \"2019-01-18T00:00:00.000Z\",\n        \"enabled\": true,\n        \"inserted_at\": \"2019-01-17T22:53:34.350Z\",\n        \"updated_at\": \"2019-01-17T22:54:07.110Z\",\n        \"general_info\": {\n            \"user\": \"API\"\n        },\n        \"sys_period\": \"[\\\"2019-01-17 22:54:21.198234+00\\\",)\"\n    },\n    \"errors\": []\n}"}],"_postman_id":"dbd0077c-9f3e-4f4a-bf58-39542476b684"},{"name":"Execute manual payment","id":"466d0c86-1f01-4df4-970d-417d88881a38","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"subscriptionId\": \"{{subscriptionId}}\",\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\"\n}"},"url":"{{merchant_url}}/subscriptions/pay","urlObject":{"path":["subscriptions","pay"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"466d0c86-1f01-4df4-970d-417d88881a38"},{"name":"List","id":"a8f67ab9-5a61-46a4-9b75-b1775066517f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"pageSize\": 20,\n    \"page\": 1,\n    \"filters\": {\n        \"status\": [\n            \"ON_HOLD\", \"PENDING\", \"CANCELLED\", \"REVIEW\", \"ACTIVE\"\n        ],\n        \"user\": \"user_id\",\n        \"minAmount\": 0,\n        \"maxAmount\": 0,\n        \"subsDate\": \"AAAA-MM-DDThh:mm:ss\"\n    }\n}"},"url":"{{merchant_url}}/subscriptions/list","description":"<h2 id=\"description\">Description</h2>\n<ul>\n<li>List all the subscription records from a specific merchant</li>\n</ul>\n<h2 id=\"params\">Params</h2>\n<ul>\n<li>pageSize must be a number between 1 and 100</li>\n<li>page must be a number &gt; 0</li>\n</ul>\n","urlObject":{"path":["subscriptions","list"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[{"id":"3d24fa22-7564-49e8-9620-ea7f927bfa69","name":"Success request","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"pageSize\": 20,\n    \"page\": 1\n}"},"url":"{{merchant_url}}/subscriptions/list"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"SUCCESS\",\n    \"code\": 200,\n    \"result\": {\n        \"entries\": [\n            {\n                \"id\": \"f258e44104d2d6e5f814036a6cec586e\",\n                \"status\": \"ACTIVE\",\n                \"user_id\": \"Jhon Doe\",\n                \"description\": \"subscription description\",\n                \"currency\": \"CRC\",\n                \"amount\": \"10\",\n                \"startdate\": \"1547761666903\",\n                \"enddate\": null,\n                \"cadence\": \"EVERY  MONTH\",\n                \"next_payment_date\": \"2019-01-18T00:00:00.000Z\"\n            }\n        ],\n        \"page\": 1,\n        \"totalEntries\": 1,\n        \"totalPages\": 1\n    },\n    \"errors\": []\n}"}],"_postman_id":"a8f67ab9-5a61-46a4-9b75-b1775066517f"},{"name":"List payments","id":"72effb0d-353b-40e3-b4d1-0f5d9146423a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"subscriptionId\": \"{{subscriptionId}}\",\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"pageSize\": 20,\n    \"page\": 1\n}"},"url":"{{merchant_url}}/subscriptions/list/payments","description":"<h2 id=\"description\">Description</h2>\n<ul>\n<li>List all the payment records from a specific subscription</li>\n</ul>\n<h2 id=\"params\">Params</h2>\n<ul>\n<li>pageSize must be a number between 1 and 200</li>\n<li>page must be a number &gt; 0</li>\n</ul>\n","urlObject":{"path":["subscriptions","list","payments"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[{"id":"333ba976-7d2f-41d8-98d1-40fb4e0e0604","name":"Success request","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"subscriptionId\": \"{{subscriptionId}}\",\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"pageSize\": 20,\n    \"page\": 1\n}"},"url":"{{merchant_url}}/subscriptions/list/payments"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"SUCCESS\",\n    \"code\": 200,\n    \"result\": {\n        \"entries\": [\n            {\n                \"reference_number\": \"f258e44104d2d6e5f814036a6cec586e_0\",\n                \"payment_date\": \"2019-01-17T21:47:49.342Z\",\n                \"payment_result\": {\n                    \"status\": 200,\n                    \"orderId\": \"f258e44104d2d6e5f814036a6cec586e_0\",\n                    \"authorization\": \"533793\",\n                    \"amount\": 100,\n                    \"currency\": \"CRC\",\n                    \"result\": {\n                        \"time_local_tran\": \"165407\",\n                        \"systems_trace_audit_number\": \"000283\",\n                        \"success\": true,\n                        \"retrieval_ref_num\": \"701016540713\",\n                        \"resp_code\": \"00\",\n                        \"reserved_private4\": null,\n                        \"proc_code\": \"000000\",\n                        \"network_international_id\": \"0003\",\n                        \"mti\": \"0210\",\n                        \"merchant_id\": 1280,\n                        \"date_local_tran\": \"0110\",\n                        \"card_acceptor_terminal_id\": \"00112478\",\n                        \"authorization_id_resp\": \"533793\"\n                    },\n                    \"errors\": [],\n                    \"_signature\": \"86ddea1d23cfda05b771696077281d43e2c8930de9cb01409940823fb005cc390b709c9c5e575f8746897604a8b94223cd5b9e8453f50615a8b584c527e692a96683faa64328bcd6bfd1c7fa71f4d7caba5fb8eb467bbd1210da55045d908b67508e96d6a5e0f519301a2aa6c246dae05e4bac5e4bad615ea16284f59cc28081\",\n                    \"last4\": \"7777\",\n                    \"brand\": \"Visa\"\n                },\n                \"payment_retries\": []\n            }\n        ],\n        \"page\": 1,\n        \"totalEntries\": 1,\n        \"totalPages\": 1\n    },\n    \"errors\": []\n}"}],"_postman_id":"72effb0d-353b-40e3-b4d1-0f5d9146423a"}],"id":"0e7714b4-b100-4ace-9f0a-5c38c40d707f","_postman_id":"0e7714b4-b100-4ace-9f0a-5c38c40d707f","description":""},{"name":"Transactions","item":[{"name":"Get transaction details","id":"a4dec67c-8e0b-43fa-b77f-72ca37f24989","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"merchantId\":\"{{merchantId}}\",\n\t\"orderReference\":\"490b1732-146d-4eba-99f4-c4f2570d9019\"\n}","options":{"raw":{"language":"json"}}},"url":"{{merchant_url}}/transactions/get","urlObject":{"path":["transactions","get"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[{"id":"5f937c01-ee5b-460c-abfd-4ed2c8a5cdd3","name":"SUCCESS","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"merchantId\":\"f22c73c3-dd85-4827-be65-66225aa1907f\",\n\t\"orderReference\":\"117\"\n}","options":{"raw":{"language":"json"}}},"url":"{{merchant_url}}/transactions/get"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"status\": \"SUCCESS\",\n    \"result\": {\n        \"amount\": \"500.00\",\n        \"authorizer\": \"bncr\",\n        \"date\": \"2020-04-17T14:32:51.578746\",\n        \"merchant\": \"PluginsDev-BNCR-Colones\",\n        \"referenceNumber\": \"117\",\n        \"state\": \"approved\",\n        \"retrievalNumber\": \"701016540713\",\n        \"authorizationID\": \"533793\",\n        \"currency\": \"CRC\",\n        \"creditCardBin\": \"424242\",\n        \"cardNumber\": \"4242\",\n        \"description\": \"Pago suscripción 117\",\n        \"source\": \"on_demand\"\n    },\n    \"errors\": []\n}"},{"id":"e8996b2e-6fc8-43e7-8db5-d9bb535937ad","name":"Transaction not found","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"merchantId\":\"f22c73c3-dd85-4827-be65-66225aa19078\",\n\t\"orderReference\":\"117\"\n}","options":{"raw":{"language":"json"}}},"url":"{{merchant_url}}/transactions/get"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"code\": 404,\n    \"status\": \"FAIL\",\n    \"result\": {},\n    \"errors\": [\n        \"transaction not found\"\n    ]\n}"},{"id":"0b901390-ef3c-4d90-8c52-d6aa9e4c60f7","name":"Bad request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"merchantId\":\"f22c73c3-dd85-4827-be65-66225aa1907\",\n\t\"orderReference\":\"117\"\n}","options":{"raw":{"language":"json"}}},"url":"{{merchant_url}}/transactions/get"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    {\n        \"keyword\": \"minLength\",\n        \"dataPath\": \".merchantId\",\n        \"schemaPath\": \"#/definitions/merchantId/minLength\",\n        \"params\": {\n            \"limit\": 36\n        },\n        \"message\": \"should NOT be shorter than 36 characters\"\n    },\n    {\n        \"keyword\": \"pattern\",\n        \"dataPath\": \".merchantId\",\n        \"schemaPath\": \"#/definitions/merchantId/pattern\",\n        \"params\": {\n            \"pattern\": \"([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}){1}\"\n        },\n        \"message\": \"should match pattern \\\"([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}){1}\\\"\"\n    }\n]"}],"_postman_id":"a4dec67c-8e0b-43fa-b77f-72ca37f24989"},{"name":"Void transaction","id":"d4db6459-6ba8-4e22-9942-bf3820714b20","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"merchantId\": \"{{merchantId}}\",\n\t\"secret\": \"{{secret}}\",\n\t\"bin\": \"453201\",\n\t\"last4\": \"8518\",\n\t\"authorization\": \"533793\",\n\t\"orderReference\": \"void-5\"\n}","options":{"raw":{"language":"json"}}},"url":"{{merchant_url}}/transactions/void","description":"<p>This service allows the merchant to reverse a transaction. It should be considered that if it was processed by BN or the facilitating scheme, the transaction must be reversed within 3 hours after being applied.</p>\n","urlObject":{"path":["transactions","void"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d4db6459-6ba8-4e22-9942-bf3820714b20"},{"name":"Capture transaction","id":"b548d6d5-e4d6-44d0-964c-93cbfa07c064","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"merchantId\": \"{{merchantId}}\",\n\t\"secret\": \"{{secret}}\",\n\t\"bin\": \"XXXXXX\",\n\t\"last4\": \"XXXX\",\n\t\"authorization\": \"XXXXXX\",\n\t\"orderReference\": \"orderReference\",\n    \"amount\": 10\n}","options":{"raw":{"language":"json"}}},"url":"{{merchant_url}}/transactions/capture","description":"<p>This service allows the merchant to capture authorized transactions from BAC Bank.</p>\n<h4 id=\"optional-fields\">Optional fields:</h4>\n<ol>\n<li>amount: double</li>\n</ol>\n","urlObject":{"path":["transactions","capture"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b548d6d5-e4d6-44d0-964c-93cbfa07c064"},{"name":"Refund transaction","id":"36c3e5ad-ad72-43a9-81e3-6e3904c6065a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"merchantId\": \"{{merchantId}}\",\n\t\"secret\": \"{{secret}}\",\n\t\"bin\": \"XXXXXX\",\n\t\"last4\": \"XXXX\",\n\t\"authorization\": \"XXXXXX\",\n\t\"orderReference\": \"void-5\"\n}","options":{"raw":{"language":"json"}}},"url":"{{merchant_url}}/transactions/refund","description":"<h2 id=\"1-this-method-only-works-with-bac-transactions\">1. This method only works with BAC transactions.</h2>\n<h5 id=\"json-body\">Json Body</h5>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"merchantId\": \"{{merchantId}}\",\n    \"secret\": \"{{secret}}\",\n    \"bin\": \"XXXXXX\",\n    \"last4\": \"XXXX\",\n    \"authorization\": \"XXXXXX\",\n    \"orderReference\": \"void-5\"\n}\n</code></pre>\n","urlObject":{"path":["transactions","refund"],"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[{"id":"ea224ec3-a0f1-4bf6-b798-b9c8abd984b4","name":"Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"merchantId\": \"7729a10f-f7f9-481a-97d3-a4a84466bc28\",\n\t\"secret\":\"NENBOTQxMTZFQUVFOERCREEwQ0YyQTZBQzZFNUEzRTJEMkE5RUIxQ0E1ODlGMDAwNEFDNEZFMERGQzY0RjhFMDVEQzVGQkEzQjExRUIwNUM1OUEzMDE4RjlCMjVGNEI0MjU3RERDMzA4RjZCREEwMzFCMDQ1QzkyREU0RDFGNzk=\",\n\t\"bin\": \"491669\",\n\t\"last4\": \"6179\",\n\t\"authorization\": \"1592242177\",\n\t\"orderReference\": \"a1efd684-ac75-45eb-8c2e-f44232a5ce8a\"\n}","options":{"raw":{"language":"json"}}},"url":"{{merchant_url}}/transactions/refund"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"status\": \"SUCCESS\",\n    \"result\": {\n        \"orderReference\": \"a1efd684-ac75-45eb-8c2e-f44232a5ce8a\",\n        \"refund\": true\n    },\n    \"errors\": []\n}"}],"_postman_id":"36c3e5ad-ad72-43a9-81e3-6e3904c6065a"},{"name":"Create checkout order","event":[{"listen":"test","script":{"exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"liszt-token\", jsonData.token);","postman.setEnvironmentVariable(\"session\", jsonData.session);","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","id":"87f2b8de-777a-4987-90ff-065522447a34"}},{"listen":"prerequest","script":{"exec":[""],"type":"text/javascript","id":"905e184b-1013-48b8-a4aa-4e7ea4063372"}}],"id":"2c7a794a-9816-4ab0-b8ca-dc758b57e14b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"terminal\": \"{{terminal_CRC}}\",\n    \"amount\": 634,\n    \"currency\": \"CRC\",\n    \"description\": \"Compra producto 747\",\n    \"orderReference\": \"9d37009d-47a3-4b44-a525-182b8e790179\",\n    \"callback\": \"https://localhost.com/callback\",\n    \"numberOfPayments\":[\"3\", \"6\", \"12\"],\n    \"additional\": {\n        \"customer\": {\n            \"name\": \"Ashley\",\n            \"email\": \"amatamoros@greenpay.me\",\n            \"billingAddress\": {\n                \"country\": \"CR\",\n                \"province\": \"Nombre de la provincia\",\n                \"city\": \"Ciudad\",\n                \"street1\": \"Dirección Calle 1\",\n                \"street2\": \"Dirección Calle 2\",\n                \"zip\": \"10801\"\n            },\n            \"shippingAddress\": {\n                \"country\": \"CR\",\n                \"province\": \"Nombre de la provincia\",\n                \"city\": \"Ciudad\",\n                \"street1\": \"Dirección Calle 1\",\n                \"street2\": \"Dirección Calle 2\",\n                \"zip\": \"10801\"\n            }\n        },\n        \"products\": [{\n            \"description\": \"Videojuegos\",\n            \"skuId\": \"241532\",\n            \"quantity\": 1,\n            \"price\": 7500,\n            \"type\": \"TD\"\n        }],\n        \"details\": {\n            \"seller\": \"abcs\",\n            \"topic\": \"qwer\"\n        }\n    }\n}"},"url":"{{merchant_url}}","description":"<p>Returns a JSON object with sesion an liszt-token params to use in the checkout invocation</p>\n","urlObject":{"host":["{{merchant_url}}"],"query":[],"variable":[]}},"response":[{"id":"57c128fd-ffc4-43b0-b66e-9303b4c97140","name":"Create checkout order succes","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"secret\": \"{{secret}}\",\n    \"merchantId\": \"{{merchantId}}\",\n    \"terminal\": \"{{terminal_CRC}}\",\n    \"amount\": 153,\n    \"currency\": \"CRC\",\n    \"description\": \"Compra producto 174\",\n    \"orderReference\": \"07e4d6e9-0256-4107-9ace-832c734f9d5e\",\n    \"callback\": \"https://localhost.com/callback\",\n    \"additional\": {\n        \"customer\": {\n            \"name\": \"User Example\",\n            \"email\": \"user@example.com\",\n            \"billingAddress\": {\n                \"country\": \"CR\",\n                \"province\": \"San José\",\n                \"city\": \"Ciudad\",\n                \"street1\": \"San Pedro, outlet Mall\",\n                \"street2\": \"Dirección Calle 2\",\n                \"zip\": \"10001\"\n            },\n            \"shippingAddress\": {\n                \"country\": \"CR\",\n                \"province\": \"San José\",\n                \"city\": \"Ciudad\",\n                \"street1\": \"San Pedro, outlet Mall\",\n                \"street2\": \"Dirección Calle 2\",\n                \"zip\": \"10001\"\n            }\n        },\n        \"products\": [{\n            \"description\": \"Ticket San José - Cartago\",\n            \"skuId\": \"xwr-200\",\n            \"quantity\": 1,\n            \"price\": 100.00,\n            \"type\": \"Ticket electrónico\"\n        }]\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{merchant_url}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"session\": \"b5b82098-e65d-40ac-88b2-b5445a93afb9\",\n    \"token\": \"caf622e0-88f4-4cb5-9dd2-9d94048c5cf6\"\n}"}],"_postman_id":"2c7a794a-9816-4ab0-b8ca-dc758b57e14b"}],"id":"2836427a-d537-4422-915a-6c802ca25925","_postman_id":"2836427a-d537-4422-915a-6c802ca25925","description":""}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"4b4e2601-735b-4fc7-a04e-c5f5bf8294a4"}},{"listen":"test","script":{"type":"text/javascript","exec":[""],"id":"461dac90-64eb-44f7-83ed-454d5a02b8ee"}}]}