{"id":3876,"date":"2021-03-25T20:36:05","date_gmt":"2021-03-25T20:36:05","guid":{"rendered":"https:\/\/documents.openpay.mx\/?page_id=3876"},"modified":"2022-02-14T14:22:22","modified_gmt":"2022-02-14T14:22:22","slug":"api-reference-node-js","status":"publish","type":"page","link":"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-node-js","title":{"rendered":"API Reference | Node.js"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"3876\" class=\"elementor elementor-3876\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-13402b0b elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"13402b0b\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-4c88fdb9\" data-id=\"4c88fdb9\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-21860ca3 elementor-widget elementor-widget-image\" data-id=\"21860ca3\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/www.openpay.mx\">\n\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"466\" src=\"https:\/\/documents-mx-dev.opdevhm.com\/wp-content\/uploads\/2020\/08\/01_Logotipo_Openpay_Versi\u00f3nPrincipal-1024x466.png\" class=\"attachment-large size-large wp-image-1445\" alt=\"\" srcset=\"https:\/\/documents-mx-dev.opdevhm.com\/wp-content\/uploads\/2020\/08\/01_Logotipo_Openpay_Versi\u00f3nPrincipal-1024x466.png 1024w, https:\/\/documents-mx-dev.opdevhm.com\/wp-content\/uploads\/2020\/08\/01_Logotipo_Openpay_Versi\u00f3nPrincipal-600x273.png 600w, https:\/\/documents-mx-dev.opdevhm.com\/wp-content\/uploads\/2020\/08\/01_Logotipo_Openpay_Versi\u00f3nPrincipal-300x137.png 300w, https:\/\/documents-mx-dev.opdevhm.com\/wp-content\/uploads\/2020\/08\/01_Logotipo_Openpay_Versi\u00f3nPrincipal-768x350.png 768w, https:\/\/documents-mx-dev.opdevhm.com\/wp-content\/uploads\/2020\/08\/01_Logotipo_Openpay_Versi\u00f3nPrincipal-1536x699.png 1536w, https:\/\/documents-mx-dev.opdevhm.com\/wp-content\/uploads\/2020\/08\/01_Logotipo_Openpay_Versi\u00f3nPrincipal-2048x933.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3e2922bd elementor-nav-menu__align-start elementor-nav-menu--dropdown-none elementor-widget elementor-widget-nav-menu\" data-id=\"3e2922bd\" data-element_type=\"widget\" data-settings=\"{&quot;layout&quot;:&quot;vertical&quot;,&quot;sticky_parent&quot;:&quot;yes&quot;,&quot;sticky&quot;:&quot;top&quot;,&quot;submenu_icon&quot;:{&quot;value&quot;:&quot;&lt;i class=\\&quot;fas fa-chevron-down\\&quot;&gt;&lt;\\\/i&gt;&quot;,&quot;library&quot;:&quot;fa-solid&quot;},&quot;sticky_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;,&quot;mobile&quot;],&quot;sticky_offset&quot;:0,&quot;sticky_effects_offset&quot;:0,&quot;sticky_anchor_link_offset&quot;:0}\" data-widget_type=\"nav-menu.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t<nav aria-label=\"Menu\" class=\"elementor-nav-menu--main elementor-nav-menu__container elementor-nav-menu--layout-vertical e--pointer-background e--animation-none\">\n\t\t\t\t<ul id=\"menu-1-3e2922bd\" class=\"elementor-nav-menu sm-vertical\"><li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3197\"><a href=\"#introducci-n\" class=\"elementor-item elementor-item-anchor\">Intro<\/a><\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3198\"><a href=\"#api-endpoints\" class=\"elementor-item elementor-item-anchor\">API Endpoints<\/a><\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3199\"><a href=\"#autenticaci-n\" class=\"elementor-item elementor-item-anchor\">Authentication<\/a><\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3200\"><a href=\"#errores\" class=\"elementor-item elementor-item-anchor\">Errors<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3201\"><a href=\"#objeto-error\" class=\"elementor-sub-item elementor-item-anchor\">Error Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3202\"><a href=\"#c-digos-de-error\" class=\"elementor-sub-item elementor-item-anchor\">Error codes<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3203\"><a href=\"#cargos\" class=\"elementor-item elementor-item-anchor\">Charges<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3204\"><a href=\"#con-id-de-tarjeta-o-token\" class=\"elementor-sub-item elementor-item-anchor\">With a card id or token<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3205\"><a href=\"#con-redireccionamiento\" class=\"elementor-sub-item elementor-item-anchor\">With redirect<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3206\"><a href=\"#cargo-en-tienda\" class=\"elementor-sub-item elementor-item-anchor\">Charge via store<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3207\"><a href=\"#cargo-en-banco\" class=\"elementor-sub-item elementor-item-anchor\">Charge via bank<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3208\"><a href=\"#cargo-en-alipay\" class=\"elementor-sub-item elementor-item-anchor\">With Alipay<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3209\"><a href=\"#cargo-con-ivr\" class=\"elementor-sub-item elementor-item-anchor\">Charge with IVR<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3210\"><a href=\"#confirmar-un-cargo\" class=\"elementor-sub-item elementor-item-anchor\">Confirming a charge<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3211\"><a href=\"#devolver-un-cargo\" class=\"elementor-sub-item elementor-item-anchor\">Refunding a charge<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3212\"><a href=\"#obtener-un-cargo\" class=\"elementor-sub-item elementor-item-anchor\">Obtener un cargo<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3213\"><a href=\"#listado-de-cargos\" class=\"elementor-sub-item elementor-item-anchor\">List of charges<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3214\"><a href=\"#pagos-o-retiros\" class=\"elementor-item elementor-item-anchor\">Payouts or withdrawals<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3215\"><a href=\"#pago-a-id-registrado\" class=\"elementor-sub-item elementor-item-anchor\">Payout to a registered id<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3216\"><a href=\"#pago-a-cuenta-bancaria\" class=\"elementor-sub-item elementor-item-anchor\">Payment to a bank account<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3217\"><a href=\"#obtener-un-pago\" class=\"elementor-sub-item elementor-item-anchor\">Get a payout<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3218\"><a href=\"#cancelar-un-pago\" class=\"elementor-sub-item elementor-item-anchor\">Cancel a payout<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3219\"><a href=\"#listado-de-pagos\" class=\"elementor-sub-item elementor-item-anchor\">List of payouts<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3220\"><a href=\"#resumen-de-pagos\" class=\"elementor-sub-item elementor-item-anchor\">Summary Payouts<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3221\"><a href=\"#objeto-resumen-de-pagos\" class=\"elementor-sub-item elementor-item-anchor\">Summary Payout Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3222\"><a href=\"#detalle-de-pagos\" class=\"elementor-sub-item elementor-item-anchor\">Payout Detail<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3223\"><a href=\"#clientes\" class=\"elementor-item elementor-item-anchor\">Customers<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3224\"><a href=\"#objeto-cliente\" class=\"elementor-sub-item elementor-item-anchor\">Customer object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3225\"><a href=\"#crear-un-nuevo-cliente\" class=\"elementor-sub-item elementor-item-anchor\">Create a new customer<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3226\"><a href=\"#actualizar-un-cliente\" class=\"elementor-sub-item elementor-item-anchor\">Update a customer<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3227\"><a href=\"#obtener-un-cliente-existente\" class=\"elementor-sub-item elementor-item-anchor\">Get an existing customer<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3228\"><a href=\"#eliminar-un-cliente\" class=\"elementor-sub-item elementor-item-anchor\">Delete a customer<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3229\"><a href=\"#listado-de-clientes\" class=\"elementor-sub-item elementor-item-anchor\">List of customers<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3230\"><a href=\"#transferencias\" class=\"elementor-item elementor-item-anchor\">Wire transfers<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3231\"><a href=\"#transferir-entre-clientes\" class=\"elementor-sub-item elementor-item-anchor\">Transfers between customers<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3232\"><a href=\"#obtener-una-transferencia\" class=\"elementor-sub-item elementor-item-anchor\">Get a transfer<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3233\"><a href=\"#listado-de-transferencias\" class=\"elementor-sub-item elementor-item-anchor\">List of transfers<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3234\"><a href=\"#tarjetas\" class=\"elementor-item elementor-item-anchor\">Cards<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3235\"><a href=\"#objeto-tarjeta\" class=\"elementor-sub-item elementor-item-anchor\">Card Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3236\"><a href=\"#crear-una-tarjeta\" class=\"elementor-sub-item elementor-item-anchor\">Create a card<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3237\"><a href=\"#crear-una-tarjeta-con-token\" class=\"elementor-sub-item elementor-item-anchor\">Create a card with token<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3238\"><a href=\"#obtener-una-tarjeta\" class=\"elementor-sub-item elementor-item-anchor\">Get a card<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3239\"><a href=\"#consulta-de-puntos\" class=\"elementor-sub-item elementor-item-anchor\">Card points<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3240\"><a href=\"#eliminar-una-tarjeta\" class=\"elementor-sub-item elementor-item-anchor\">Delete a card<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3241\"><a href=\"#listado-de-tarjetas\" class=\"elementor-sub-item elementor-item-anchor\">List of cards<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3242\"><a href=\"#actualizar-tarjeta\" class=\"elementor-sub-item elementor-item-anchor\">Updating a card<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3243\"><a href=\"#cuentas-bancarias\" class=\"elementor-item elementor-item-anchor\">Bank Accounts<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3244\"><a href=\"#objeto-cuenta-bancaria\" class=\"elementor-sub-item elementor-item-anchor\">Bank account object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3245\"><a href=\"#crear-una-cuenta-bancaria\" class=\"elementor-sub-item elementor-item-anchor\">Create a bank account<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3246\"><a href=\"#obtener-una-cuenta-bancaria\" class=\"elementor-sub-item elementor-item-anchor\">Get a bank account<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3247\"><a href=\"#eliminar-una-cuenta-bancaria\" class=\"elementor-sub-item elementor-item-anchor\">Delete a bank account<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3248\"><a href=\"#listado-de-cuentas-bancarias\" class=\"elementor-sub-item elementor-item-anchor\">List of bank accounts<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3249\"><a href=\"#planes\" class=\"elementor-item elementor-item-anchor\">Plans<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3250\"><a href=\"#objeto-plan\" class=\"elementor-sub-item elementor-item-anchor\">Plan Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3251\"><a href=\"#crear-un-nuevo-plan\" class=\"elementor-sub-item elementor-item-anchor\">Create a new Plan<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3252\"><a href=\"#actualizar-un-plan-existente\" class=\"elementor-sub-item elementor-item-anchor\">Update existing plans.<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3253\"><a href=\"#obtener-un-plan\" class=\"elementor-sub-item elementor-item-anchor\">Get a plan<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3254\"><a href=\"#eliminar-un-plan\" class=\"elementor-sub-item elementor-item-anchor\">Delete a plan<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3255\"><a href=\"#listado-de-planes\" class=\"elementor-sub-item elementor-item-anchor\">Plan list<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3256\"><a href=\"#suscripciones\" class=\"elementor-item elementor-item-anchor\">Subscriptions<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3257\"><a href=\"#objeto-suscripci-n\" class=\"elementor-sub-item elementor-item-anchor\">Subscription object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3258\"><a href=\"#crear-una-nueva-suscripci-n\" class=\"elementor-sub-item elementor-item-anchor\">Create a new Subscription<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3259\"><a href=\"#actualizar-una-suscripci-n\" class=\"elementor-sub-item elementor-item-anchor\">Updating a Subscription<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3260\"><a href=\"#obtener-un-suscripci-n\" class=\"elementor-sub-item elementor-item-anchor\">Get a Subscription<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3261\"><a href=\"#cancelar-suscripci-n\" class=\"elementor-sub-item elementor-item-anchor\">Cancel a Subscription<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3262\"><a href=\"#listado-de-suscripciones\" class=\"elementor-sub-item elementor-item-anchor\">Subscription list<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3263\"><a href=\"#comisiones\" class=\"elementor-item elementor-item-anchor\">Fees<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3264\"><a href=\"#cobrar-comisi-n\" class=\"elementor-sub-item elementor-item-anchor\">Charging a Fee<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3265\"><a href=\"#devolver-comisi-n\" class=\"elementor-sub-item elementor-item-anchor\">Refund Fee<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3266\"><a href=\"#listado-de-comisiones\" class=\"elementor-sub-item elementor-item-anchor\">Fee list<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3267\"><a href=\"#webhooks\" class=\"elementor-item elementor-item-anchor\">Webhooks<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3268\"><a href=\"#objeto-webhook\" class=\"elementor-sub-item elementor-item-anchor\">Webhook Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3269\"><a href=\"#caracter-sticas-de-un-servicio-webhook-v-lido\" class=\"elementor-sub-item elementor-item-anchor\">Valid Webhook service features<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3270\"><a href=\"#crear-un-webhook\" class=\"elementor-sub-item elementor-item-anchor\">Webhook Creation<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3271\"><a href=\"#obtener-un-webhook\" class=\"elementor-sub-item elementor-item-anchor\">Get a Webhook<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3272\"><a href=\"#eliminar-un-webhook\" class=\"elementor-sub-item elementor-item-anchor\">Delete a Webhook<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3273\"><a href=\"#listado-de-webhook\" class=\"elementor-sub-item elementor-item-anchor\">Webhook list<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3274\"><a href=\"#tokens\" class=\"elementor-item elementor-item-anchor\">Tokens<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3275\"><a href=\"#objeto-token\" class=\"elementor-sub-item elementor-item-anchor\">Token Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3276\"><a href=\"#crear-un-nuevo-token\" class=\"elementor-sub-item elementor-item-anchor\">Create a new token<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3277\"><a href=\"#obtener-un-token\" class=\"elementor-sub-item elementor-item-anchor\">Get a Token<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3278\"><a href=\"#comercio\" class=\"elementor-item elementor-item-anchor\">Merchant<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3279\"><a href=\"#objeto-comercio\" class=\"elementor-sub-item elementor-item-anchor\">Merchant Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3280\"><a href=\"#obtener-un-comercio\" class=\"elementor-sub-item elementor-item-anchor\">Request a Merchant Object<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3281\"><a href=\"#tiendas\" class=\"elementor-item elementor-item-anchor\">Stores<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3282\"><a href=\"#objeto-tienda\" class=\"elementor-sub-item elementor-item-anchor\">Store object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3283\"><a href=\"#obtener-lista-de-tiendas-por-ubicaci-n\" class=\"elementor-sub-item elementor-item-anchor\">Get list of shops by location<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3284\"><a href=\"#objetos-comunes\" class=\"elementor-item elementor-item-anchor\">Common Objects<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3285\"><a href=\"#objeto-transacci-n\" class=\"elementor-sub-item elementor-item-anchor\">Transaction Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3286\"><a href=\"#objeto-direcci-n\" class=\"elementor-sub-item elementor-item-anchor\">Address Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3287\"><a href=\"#objeto-store\" class=\"elementor-sub-item elementor-item-anchor\">Store object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3288\"><a href=\"#objeto-paymentplan\" class=\"elementor-sub-item elementor-item-anchor\">PaymentPlan Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3289\"><a href=\"#objeto-cardpoints\" class=\"elementor-sub-item elementor-item-anchor\">Cardpoints Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3290\"><a href=\"#objeto-geolocation\" class=\"elementor-sub-item elementor-item-anchor\">Object Geolocation<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3291\"><a href=\"#objeto-paynetchain\" class=\"elementor-sub-item elementor-item-anchor\">Object PaynetChain<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3292\"><a href=\"#objeto-transaction-status\" class=\"elementor-sub-item elementor-item-anchor\">Object Transaction Status<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3293\"><a href=\"#facturaci-n-electr-nica\" class=\"elementor-item elementor-item-anchor\">Electronic Invoice<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3294\"><a href=\"#objeto-generaci-n-de-cfdi\" class=\"elementor-sub-item elementor-item-anchor\">Generation of CFDI Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3295\"><a href=\"#objeto-tipo-de-comprobante\" class=\"elementor-sub-item elementor-item-anchor\">Voucher Type Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3296\"><a href=\"#objeto-forma-de-pago\" class=\"elementor-sub-item elementor-item-anchor\">Form of Payment Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3297\"><a href=\"#objeto-metodo-de-pago\" class=\"elementor-sub-item elementor-item-anchor\">Payment Method Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3298\"><a href=\"#objeto-doctorelacionado\" class=\"elementor-sub-item elementor-item-anchor\">DoctoRelacionado Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3299\"><a href=\"#objeto-concepto\" class=\"elementor-sub-item elementor-item-anchor\">Concept Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3300\"><a href=\"#objeto-impuesto\" class=\"elementor-sub-item elementor-item-anchor\">Tax Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3301\"><a href=\"#objeto-tipo-de-impuesto\" class=\"elementor-sub-item elementor-item-anchor\">Tax Type Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3302\"><a href=\"#objeto-receptor\" class=\"elementor-sub-item elementor-item-anchor\">Receiver Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3303\"><a href=\"#objeto-uso-de-cfdi\" class=\"elementor-sub-item elementor-item-anchor\">Object Use of CFDI<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3304\"><a href=\"#objeto-relacionado\" class=\"elementor-sub-item elementor-item-anchor\">Related Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3305\"><a href=\"#objeto-tipo-de-relaci-n\" class=\"elementor-sub-item elementor-item-anchor\">Object Type of Relationship<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3306\"><a href=\"#objeto-cfdi-relacionado\" class=\"elementor-sub-item elementor-item-anchor\">CFDI Object Related<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3307\"><a href=\"#objeto-complementos\" class=\"elementor-sub-item elementor-item-anchor\">Complements Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3308\"><a href=\"#objeto-complemento-aerol-neas\" class=\"elementor-sub-item elementor-item-anchor\">Complement Airlines Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3555\"><a href=\"#objeto-aerol-neas-cargo\" class=\"elementor-sub-item elementor-item-anchor\">Charge Airlines Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3309\"><a href=\"#objeto-complemento-pago\" class=\"elementor-sub-item elementor-item-anchor\">Complement Payment Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3310\"><a href=\"#objeto-complemento-donatarias\" class=\"elementor-sub-item elementor-item-anchor\">Complement Donee Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3311\"><a href=\"#objeto-respuesta-de-solicitud-de-generaci-n\" class=\"elementor-sub-item elementor-item-anchor\">Request Response Generation Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3312\"><a href=\"#objeto-notificaciones\" class=\"elementor-sub-item elementor-item-anchor\">Notifications Object<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\t\t\t<\/nav>\n\t\t\t\t\t\t<nav class=\"elementor-nav-menu--dropdown elementor-nav-menu__container\" aria-hidden=\"true\">\n\t\t\t\t<ul id=\"menu-2-3e2922bd\" class=\"elementor-nav-menu sm-vertical\"><li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3197\"><a href=\"#introducci-n\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Intro<\/a><\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3198\"><a href=\"#api-endpoints\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">API Endpoints<\/a><\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3199\"><a href=\"#autenticaci-n\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Authentication<\/a><\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3200\"><a href=\"#errores\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Errors<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3201\"><a href=\"#objeto-error\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Error Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3202\"><a href=\"#c-digos-de-error\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Error codes<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3203\"><a href=\"#cargos\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Charges<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3204\"><a href=\"#con-id-de-tarjeta-o-token\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">With a card id or token<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3205\"><a href=\"#con-redireccionamiento\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">With redirect<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3206\"><a href=\"#cargo-en-tienda\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Charge via store<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3207\"><a href=\"#cargo-en-banco\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Charge via bank<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3208\"><a href=\"#cargo-en-alipay\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">With Alipay<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3209\"><a href=\"#cargo-con-ivr\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Charge with IVR<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3210\"><a href=\"#confirmar-un-cargo\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Confirming a charge<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3211\"><a href=\"#devolver-un-cargo\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Refunding a charge<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3212\"><a href=\"#obtener-un-cargo\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Obtener un cargo<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3213\"><a href=\"#listado-de-cargos\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">List of charges<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3214\"><a href=\"#pagos-o-retiros\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Payouts or withdrawals<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3215\"><a href=\"#pago-a-id-registrado\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Payout to a registered id<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3216\"><a href=\"#pago-a-cuenta-bancaria\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Payment to a bank account<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3217\"><a href=\"#obtener-un-pago\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Get a payout<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3218\"><a href=\"#cancelar-un-pago\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Cancel a payout<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3219\"><a href=\"#listado-de-pagos\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">List of payouts<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3220\"><a href=\"#resumen-de-pagos\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Summary Payouts<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3221\"><a href=\"#objeto-resumen-de-pagos\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Summary Payout Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3222\"><a href=\"#detalle-de-pagos\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Payout Detail<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3223\"><a href=\"#clientes\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Customers<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3224\"><a href=\"#objeto-cliente\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Customer object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3225\"><a href=\"#crear-un-nuevo-cliente\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Create a new customer<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3226\"><a href=\"#actualizar-un-cliente\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Update a customer<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3227\"><a href=\"#obtener-un-cliente-existente\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Get an existing customer<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3228\"><a href=\"#eliminar-un-cliente\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Delete a customer<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3229\"><a href=\"#listado-de-clientes\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">List of customers<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3230\"><a href=\"#transferencias\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Wire transfers<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3231\"><a href=\"#transferir-entre-clientes\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Transfers between customers<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3232\"><a href=\"#obtener-una-transferencia\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Get a transfer<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3233\"><a href=\"#listado-de-transferencias\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">List of transfers<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3234\"><a href=\"#tarjetas\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Cards<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3235\"><a href=\"#objeto-tarjeta\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Card Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3236\"><a href=\"#crear-una-tarjeta\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Create a card<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3237\"><a href=\"#crear-una-tarjeta-con-token\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Create a card with token<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3238\"><a href=\"#obtener-una-tarjeta\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Get a card<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3239\"><a href=\"#consulta-de-puntos\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Card points<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3240\"><a href=\"#eliminar-una-tarjeta\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Delete a card<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3241\"><a href=\"#listado-de-tarjetas\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">List of cards<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3242\"><a href=\"#actualizar-tarjeta\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Updating a card<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3243\"><a href=\"#cuentas-bancarias\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Bank Accounts<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3244\"><a href=\"#objeto-cuenta-bancaria\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Bank account object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3245\"><a href=\"#crear-una-cuenta-bancaria\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Create a bank account<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3246\"><a href=\"#obtener-una-cuenta-bancaria\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Get a bank account<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3247\"><a href=\"#eliminar-una-cuenta-bancaria\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Delete a bank account<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3248\"><a href=\"#listado-de-cuentas-bancarias\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">List of bank accounts<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3249\"><a href=\"#planes\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Plans<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3250\"><a href=\"#objeto-plan\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Plan Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3251\"><a href=\"#crear-un-nuevo-plan\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Create a new Plan<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3252\"><a href=\"#actualizar-un-plan-existente\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Update existing plans.<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3253\"><a href=\"#obtener-un-plan\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Get a plan<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3254\"><a href=\"#eliminar-un-plan\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Delete a plan<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3255\"><a href=\"#listado-de-planes\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Plan list<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3256\"><a href=\"#suscripciones\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Subscriptions<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3257\"><a href=\"#objeto-suscripci-n\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Subscription object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3258\"><a href=\"#crear-una-nueva-suscripci-n\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Create a new Subscription<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3259\"><a href=\"#actualizar-una-suscripci-n\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Updating a Subscription<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3260\"><a href=\"#obtener-un-suscripci-n\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Get a Subscription<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3261\"><a href=\"#cancelar-suscripci-n\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Cancel a Subscription<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3262\"><a href=\"#listado-de-suscripciones\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Subscription list<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3263\"><a href=\"#comisiones\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Fees<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3264\"><a href=\"#cobrar-comisi-n\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Charging a Fee<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3265\"><a href=\"#devolver-comisi-n\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Refund Fee<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3266\"><a href=\"#listado-de-comisiones\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Fee list<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3267\"><a href=\"#webhooks\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Webhooks<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3268\"><a href=\"#objeto-webhook\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Webhook Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3269\"><a href=\"#caracter-sticas-de-un-servicio-webhook-v-lido\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Valid Webhook service features<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3270\"><a href=\"#crear-un-webhook\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Webhook Creation<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3271\"><a href=\"#obtener-un-webhook\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Get a Webhook<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3272\"><a href=\"#eliminar-un-webhook\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Delete a Webhook<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3273\"><a href=\"#listado-de-webhook\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Webhook list<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3274\"><a href=\"#tokens\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Tokens<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3275\"><a href=\"#objeto-token\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Token Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3276\"><a href=\"#crear-un-nuevo-token\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Create a new token<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3277\"><a href=\"#obtener-un-token\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Get a Token<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3278\"><a href=\"#comercio\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Merchant<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3279\"><a href=\"#objeto-comercio\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Merchant Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3280\"><a href=\"#obtener-un-comercio\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Request a Merchant Object<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3281\"><a href=\"#tiendas\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Stores<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3282\"><a href=\"#objeto-tienda\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Store object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3283\"><a href=\"#obtener-lista-de-tiendas-por-ubicaci-n\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Get list of shops by location<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3284\"><a href=\"#objetos-comunes\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Common Objects<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3285\"><a href=\"#objeto-transacci-n\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Transaction Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3286\"><a href=\"#objeto-direcci-n\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Address Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3287\"><a href=\"#objeto-store\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Store object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3288\"><a href=\"#objeto-paymentplan\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">PaymentPlan Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3289\"><a href=\"#objeto-cardpoints\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Cardpoints Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3290\"><a href=\"#objeto-geolocation\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Object Geolocation<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3291\"><a href=\"#objeto-paynetchain\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Object PaynetChain<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3292\"><a href=\"#objeto-transaction-status\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Object Transaction Status<\/a><\/li>\n<\/ul>\n<\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-3293\"><a href=\"#facturaci-n-electr-nica\" class=\"elementor-item elementor-item-anchor\" tabindex=\"-1\">Electronic Invoice<\/a>\n<ul class=\"sub-menu elementor-nav-menu--dropdown\">\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3294\"><a href=\"#objeto-generaci-n-de-cfdi\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Generation of CFDI Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3295\"><a href=\"#objeto-tipo-de-comprobante\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Voucher Type Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3296\"><a href=\"#objeto-forma-de-pago\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Form of Payment Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3297\"><a href=\"#objeto-metodo-de-pago\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Payment Method Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3298\"><a href=\"#objeto-doctorelacionado\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">DoctoRelacionado Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3299\"><a href=\"#objeto-concepto\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Concept Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3300\"><a href=\"#objeto-impuesto\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Tax Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3301\"><a href=\"#objeto-tipo-de-impuesto\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Tax Type Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3302\"><a href=\"#objeto-receptor\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Receiver Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3303\"><a href=\"#objeto-uso-de-cfdi\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Object Use of CFDI<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3304\"><a href=\"#objeto-relacionado\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Related Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3305\"><a href=\"#objeto-tipo-de-relaci-n\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Object Type of Relationship<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3306\"><a href=\"#objeto-cfdi-relacionado\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">CFDI Object Related<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3307\"><a href=\"#objeto-complementos\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Complements Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3308\"><a href=\"#objeto-complemento-aerol-neas\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Complement Airlines Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3555\"><a href=\"#objeto-aerol-neas-cargo\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Charge Airlines Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3309\"><a href=\"#objeto-complemento-pago\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Complement Payment Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3310\"><a href=\"#objeto-complemento-donatarias\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Complement Donee Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3311\"><a href=\"#objeto-respuesta-de-solicitud-de-generaci-n\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Request Response Generation Object<\/a><\/li>\n\t<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-3312\"><a href=\"#objeto-notificaciones\" class=\"elementor-sub-item elementor-item-anchor\" tabindex=\"-1\">Notifications Object<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\t\t\t<\/nav>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-46cde66f\" data-id=\"46cde66f\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-52fbab6d elementor-nav-menu__align-center elementor-nav-menu--dropdown-none elementor-widget elementor-widget-nav-menu\" data-id=\"52fbab6d\" data-element_type=\"widget\" data-settings=\"{&quot;submenu_icon&quot;:{&quot;value&quot;:&quot;&lt;i class=\\&quot;fas fa-chevron-down\\&quot;&gt;&lt;\\\/i&gt;&quot;,&quot;library&quot;:&quot;fa-solid&quot;},&quot;layout&quot;:&quot;horizontal&quot;}\" data-widget_type=\"nav-menu.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t<nav aria-label=\"Menu\" class=\"elementor-nav-menu--main elementor-nav-menu__container elementor-nav-menu--layout-horizontal e--pointer-background e--animation-none\">\n\t\t\t\t<ul id=\"menu-1-52fbab6d\" class=\"elementor-nav-menu\"><li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3891\"><a href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-curl\" class=\"elementor-item\">cURL<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3890\"><a href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-php\" class=\"elementor-item\">PHP<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3889\"><a href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-java\" class=\"elementor-item\">JAVA<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3888\"><a href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-c\" class=\"elementor-item\">C#<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3887\"><a href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-node-js\" class=\"elementor-item\">Node.js<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3886\"><a href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-ruby\" class=\"elementor-item\">Ruby<\/a><\/li>\n<\/ul>\t\t\t<\/nav>\n\t\t\t\t\t\t<nav class=\"elementor-nav-menu--dropdown elementor-nav-menu__container\" aria-hidden=\"true\">\n\t\t\t\t<ul id=\"menu-2-52fbab6d\" class=\"elementor-nav-menu\"><li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3891\"><a href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-curl\" class=\"elementor-item\" tabindex=\"-1\">cURL<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3890\"><a href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-php\" class=\"elementor-item\" tabindex=\"-1\">PHP<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3889\"><a href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-java\" class=\"elementor-item\" tabindex=\"-1\">JAVA<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3888\"><a href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-c\" class=\"elementor-item\" tabindex=\"-1\">C#<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3887\"><a href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-node-js\" class=\"elementor-item\" tabindex=\"-1\">Node.js<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3886\"><a href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-ruby\" class=\"elementor-item\" tabindex=\"-1\">Ruby<\/a><\/li>\n<\/ul>\t\t\t<\/nav>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5349dbc4 elementor-widget elementor-widget-theme-post-title elementor-page-title elementor-widget-heading\" data-id=\"5349dbc4\" data-element_type=\"widget\" data-widget_type=\"theme-post-title.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">API Reference | Node.js<\/h1>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bb68a26 elementor-widget elementor-widget-text-editor\" data-id=\"bb68a26\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h2 id=\"introducci-n\">Intro<\/h2><p>The Openpay API is designed on <a href=\"http:\/\/es.wikipedia.org\/wiki\/Representational_State_Transfer\">REST<\/a>, therefore you\u2019ll find that URLs are oriented to resources and that HTTP response codes are used to indicate errors in the API.<\/p><p>All the API responses are in <a href=\"http:\/\/www.json.org\/\">JSON<\/a>format, including the errors.<\/p><p>In the case to use the existents Openpay API clients (<a href=\"https:\/\/github.com\/open-pay\/openpay-java\">Java<\/a>, <a href=\"https:\/\/github.com\/open-pay\/openpay-php\">Php<\/a>, <a href=\"https:\/\/github.com\/open-pay\/openpay-dotnet\">C#<\/a>, <a href=\"https:\/\/github.com\/open-pay\/openpay-python\">Python<\/a>, <a href=\"https:\/\/github.com\/open-pay\/openpay-ruby\">Ruby<\/a>, <a href=\"https:\/\/github.com\/open-pay\/openpay-node\">NodeJS<\/a>), the responses are specifically of type defined in the clients and their respective languajes.<\/p><h2 id=\"api-endpoints\">API Endpoints<\/h2><blockquote><p>Available resourcers<\/p><\/blockquote><blockquote><p>a) By Merchant<\/p><\/blockquote><pre><code>\/v1\/{MERCHANT_ID}\/...\n\n\/fees\n\/fees\/{FEE_ID}\n\/charges\n\/charges\/{TRANSACTION_ID}\n\/payouts\n\/payouts\/{TRANSACTION_ID}\n\/cards\n\/cards\/{CARD_ID}\n\/customers\n\/customers\/{CUSTOMER_ID}\n\/plans\n\/plans\/{PLAN_ID}\n\u200b\/tokens\n\/tokens\/{TOKEN_ID}\n<\/code><\/pre><blockquote><p>b) By Customer<\/p><\/blockquote><pre><code>\/v1\/{MERCHANT_ID}\/customers\/{CUSTOMER_ID}\/...\n\n\/cards\n\/cards\/{CARD_ID}\n\/bankaccounts\n\/bankaccounts\/{BANKACCOUNT_ID}\n\/charges\n\/charges\/{TRANSACTION_ID}\n\/payouts\n\/payouts\/{TRANSACTION_ID}\n\/transfers\n\/transfers\/{TRANSACTION_ID}\n\/subscriptions\n\/subscriptions\/{SUBSCRIPTION_ID}\n<\/code><\/pre><p>The Openpay REST API has a test environment (sandbox) and a production environment. For integrating your system with Openpay, use the credentials that were generated when you signed up. Once you are ready to move to production environment and your request is approved, new credentials will be generated for accessing the production environment.<\/p><p>The following URIs are the basis of the endpoints for the supported environments:<\/p><ul><li><strong>Testing<\/strong>, URI base: <br \/><code>Production:<\/code><\/li><li><strong>Production<\/strong>, URI base: <br \/><code>https:\/\/api.openpay.mx<\/code><\/li><\/ul><p>A complete endpoint consists of the base URI of the environment, the identifier of the Merchant and the resource.<\/p><p>For example, if we want to create a new customer, the endpoint would be:<\/p><p><code>POST https:\/\/sandbox-api.openpay.mx\/v1\/mzdtln0bmtms6o3kck8f\/customers<\/code><\/p><p>In order to create a complete request is necessary to send the right HTTP headers and the information in JSON format.<\/p><h2 id=\"autenticaci-n\">Authentication<\/h2><blockquote><p>Authentication example<\/p><\/blockquote><pre><code>var Openpay = require('openpay');\nvar openpay = new Openpay('moiep6umtcnanql3jrxp','sk_3433941e467c4875b178ce26348b0fac');\n<\/code><\/pre><blockquote><p>Production<\/p><\/blockquote><pre><code>openpay.setProductionReady(true);\n<\/code><\/pre><p>To make requests to the Openpay API, is necessary to send the API Key on all your calls to our servers. You can get the key from the <a href=\"https:\/\/sandbox-dashboard.openpay.mx\/\">dashboard<\/a>.<\/p><p>There are 2 types of API keys:<\/p><ul><li><strong>Private.-<\/strong> For calls between servers and full access to all API operations (should never be shared).<\/li><\/ul><ul><li><strong>Public.-<\/strong> should only be used in JavaScript calls. This key is only allowed to create cards or create tokens.<\/li><\/ul><p>For API authentication you must use the <a href=\"http:\/\/es.wikipedia.org\/wiki\/Autenticaci%C3%B3n_de_acceso_b%C3%A1sica\">basic access authentication<\/a>, where the API key is the username. The password is not required and it should be left blank for purposes of simplicity<\/p><h2 id=\"errores\">Errors<\/h2><p>Openpay returns JSON objects in the service responses.<\/p><h2 id=\"objeto-error\">Error Object<\/h2><blockquote><p>Object example<\/p><\/blockquote><pre><code>{\n    \"category\" : \"request\",\n    \"description\" : \"The customer with id 'm4hqp35pswl02mmc567' does not exist\",\n    \"http_code\" : 404,\n    \"error_code\" : 1005,\n    \"request_id\" : \"1981cdb8-19cb-4bad-8256-e95d58bc035c\",\n    \"fraud_rules\": [\n        \"Billing &lt;&gt; BIN Country for VISA\/MC\"\n    ]\n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>category<\/td><td><p><strong><em>string<\/em><\/strong> <br \/><strong>request:<\/strong> It means an error caused by data sent by the customer. For example, an invalid request, an attempt of a transaction without funds or a transfer to an account that does not exist.<\/p><p><strong>internal:<\/strong> It means an error on the Openpay side, this will occur very rarely.<\/p><p><strong>gateway:<\/strong> It means an error during the transaction of funds from one card to the Openpay account or from the to a bank account or card.<\/p><\/td><\/tr><tr><td>error_code<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>This is the Openpay error code.<\/td><\/tr><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> <br \/>Error description.<\/td><\/tr><tr><td>http_code<\/td><td><strong><em>string<\/em><\/strong> <br \/>HTTP error code from the response.<\/td><\/tr><tr><td>request_id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Request identifier<\/td><\/tr><tr><td>fraud_rules<\/td><td><strong><em>array<\/em><\/strong> <br \/>Array with antifraud rules broken according to fraud detection rules.<\/td><\/tr><\/tbody><\/table><h2 id=\"c-digos-de-error\">Error codes<\/h2><h3 id=\"generales\">General<\/h3><table><thead><tr><th>Code<\/th><th>HTTP Error<\/th><th>Cause<\/th><\/tr><\/thead><tbody><tr><td>1000<\/td><td>500 Internal Server Error<\/td><td>An error happened in the internal Openpay server.<\/td><\/tr><tr><td>1001<\/td><td>400 Bad Request<\/td><td>The request is not JSON valid format, the fields don\u2019t have the correct format, or the request doesn\u2019t have the required fields.<\/td><\/tr><tr><td>1002<\/td><td>401 Unauthorized<\/td><td>The request is not authenticated or is incorrect.<\/td><\/tr><tr><td>1003<\/td><td>422 Unprocessable Entity<\/td><td>The operation could not be completed because the value of one or more of the parameters is incorrect.<\/td><\/tr><tr><td>1004<\/td><td>503 Service Unavailable<\/td><td>A required service is not available.<\/td><\/tr><tr><td>1005<\/td><td>404 Not Found<\/td><td>A required resource doesn\u2019t exist.<\/td><\/tr><tr><td>1006<\/td><td>409 Conflict<\/td><td>There is already a transaction with the same ID order.<\/td><\/tr><tr><td>1007<\/td><td>402 Payment Required<\/td><td>The funds transfer between the bank account or card and the Openpay account was rejected.<\/td><\/tr><tr><td>1008<\/td><td>423 Locked<\/td><td>One of the required accounts is deactivated.<\/td><\/tr><tr><td>1009<\/td><td>413 Request Entity too large<\/td><td>The request body is too large.<\/td><\/tr><tr><td>1010<\/td><td>403 Forbidden<\/td><td>The public key is being used to make a request that requires the private key, or the private key is being using from Javascript.<\/td><\/tr><\/tbody><\/table><h3 id=\"almacenamiento\">Storage<\/h3><table><thead><tr><th>Code<\/th><th>HTTP Error<\/th><th>Cause<\/th><\/tr><\/thead><tbody><tr><td>2001<\/td><td>409 Conflict<\/td><td>The bank account already exists.<\/td><\/tr><tr><td>2002<\/td><td>409 Conflict<\/td><td>The card with this number is already registered on the customer.<\/td><\/tr><tr><td>2003<\/td><td>409 Conflict<\/td><td>The external_id already exists.<\/td><\/tr><tr><td>2004<\/td><td>422 Unprocessable Entity<\/td><td>The check digit card number is invalid according to the Luhn algorithm.<\/td><\/tr><tr><td>2005<\/td><td>400 Bad Request<\/td><td>The expiration date has expired.<\/td><\/tr><tr><td>2006<\/td><td>400 Bad Request<\/td><td>The CVV2 security code is required.<\/td><\/tr><tr><td>2007<\/td><td>412 Precondition Failed<\/td><td>The card number is only valid in sandbox.<\/td><\/tr><tr><td>2008<\/td><td>412 Precondition Failed<\/td><td>The consulted card is not valid for points.<\/td><\/tr><tr><td>2009<\/td><td>412 Precondition Failed<\/td><td>The card security code (CVV2) is not valid.<\/td><\/tr><\/tbody><\/table><h3 id=\"tarjetas\">Cards<\/h3><table><thead><tr><th>Code<\/th><th>HTTP Error<\/th><th>Cause<\/th><\/tr><\/thead><tbody><tr><td>3001<\/td><td>402 Payment Required<\/td><td>Card declined.<\/td><\/tr><tr><td>3002<\/td><td>402 Payment Required<\/td><td>Card is expired.<\/td><\/tr><tr><td>3003<\/td><td>402 Payment Required<\/td><td>Card has not enough funds.<\/td><\/tr><tr><td>3004<\/td><td>402 Payment Required<\/td><td>Card has been flagged as stolen.<\/td><\/tr><tr><td>3005<\/td><td>402 Payment Required<\/td><td>The card has been identified as a fraudulent card.<\/td><\/tr><tr><td>3006<\/td><td>412 Precondition Failed<\/td><td>The operation is not allowed for this customer or transaction.<\/td><\/tr><tr><td>3008<\/td><td>412 Precondition Failed<\/td><td>The card is not supported in online transactions.<\/td><\/tr><tr><td>3009<\/td><td>402 Payment Required<\/td><td>Card has been flagged as lost.<\/td><\/tr><tr><td>3010<\/td><td>402 Payment Required<\/td><td>The card has been restricted by the bank.<\/td><\/tr><tr><td>3011<\/td><td>402 Payment Required<\/td><td>The bank has requested to hold this card. Please contact the bank.<\/td><\/tr><tr><td>3012<\/td><td>412 Precondition Failed<\/td><td>Bank authorization is required to make this payment.<\/td><\/tr><\/tbody><\/table><h3 id=\"cuentas\">Accounts<\/h3><table><thead><tr><th>Code<\/th><th>HTTP Error<\/th><th>Cause<\/th><\/tr><\/thead><tbody><tr><td>4001<\/td><td>412 Preconditon Failed<\/td><td>The Openpay account doesn\u2019t have enough funds.<\/td><\/tr><\/tbody><\/table><h2 id=\"cargos\">Charges<\/h2><p>Charges can be made to cards, stores and banks. Each charge is assigned with an unique identifier in the system.<\/p><p>You can do card charges by using a saved card id, using a token or you can send the card information at the time of invocation.<\/p><h2 id=\"con-id-de-tarjeta-o-token\">With a card id or token<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.charges.create(chargeRequest, callback);\n\n\/\/ Cliente\nopenpay.customers.charges.create(customerId, chargeRequest, callback);\n<\/code><\/pre><blockquote><p>Merchant request example<\/p><\/blockquote><pre><code>var chargeRequest = {\n   'source_id' : 'kqgykn96i7bcs1wwhvgw',\n   'method' : 'card',\n   'amount' : 100,\n   'currency' : 'MXN',\n   'description' : 'Cargo inicial a mi cuenta',\n   'order_id' : 'oid-00051',\n   'device_session_id' : 'kR1MiQhz2otdIuUlQkbEyitIqVMiI16f',\n   'customer' : {\n        'name' : 'Juan',\n        'last_name' : 'Vazquez Juarez',\n        'phone_number' : '4423456723',\n        'email' : 'juan.vazquez@empresa.com.mx'\n   }\n}\n\nopenpay.charges.create(chargeRequest, function(error, charge) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"trzjaozcik8msyqshka4\",\n   \"amount\":100.00,\n   \"authorization\":\"801585\",\n   \"method\":\"card\",\n   \"operation_type\":\"in\",\n   \"transaction_type\":\"charge\",\n   \"card\":{\n      \"id\":\"kqgykn96i7bcs1wwhvgw\",\n      \"type\":\"debit\",\n      \"brand\":\"visa\",\n      \"address\":null,\n      \"card_number\":\"411111XXXXXX1111\",\n      \"holder_name\":\"Juan Perez Ramirez\",\n      \"expiration_year\":\"20\",\n      \"expiration_month\":\"12\",\n      \"allows_charges\":true,\n      \"allows_payouts\":true,\n      \"creation_date\":\"2014-05-26T11:02:16-05:00\",\n      \"bank_name\":\"Banamex\",\n      \"bank_code\":\"002\"\n   },\n   \"status\":\"completed\",\n   \"currency\":\"USD\",\n   \"exchange_rate\" : {\n      \"from\" : \"USD\",\n      \"date\" : \"2014-11-21\",\n      \"value\" : 13.61,\n      \"to\" : \"MXN\"\n   },\n   \"creation_date\":\"2014-05-26T11:02:45-05:00\",\n   \"operation_date\":\"2014-05-26T11:02:45-05:00\",\n   \"description\":\"Cargo inicial a mi cuenta\",\n   \"error_message\":null,\n   \"order_id\":\"oid-00051\"\n}\n<\/code><\/pre><p>This type of charge requires a saved card or a previously generated token. To save cards read <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-una-tarjeta\">Create a card<\/a> and to use tokens visit the <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-un-nuevo-token\">Creation of tokens<\/a>.<\/p><p>Once you have a saved card or token use the <code>source_id<\/code> property to send the identifier.<\/p><p>The <code>device_session_id<\/code> property must be generated using JavaScript API, see <a href=\"https:\/\/github.com\/open-pay\/openpay-js#fraud-detection-using-device-data\">Fraud detection using device data<\/a>.<\/p><p><strong><em>Customized antifraud system<\/em><\/strong><br \/>You can send extra data to Openpay in order to increase number of variables and get better results in antifraud detection for your transactions.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>method<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>It must contain the <strong>card<\/strong> value in order to specify the charge will be made from card.<\/td><\/tr><tr><td>source_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>ID of the saved card or token id created from where the funds will be withdrawn.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Amount of charge. Must be an amount greater than zero, with up to two decimal digits.<\/td><\/tr><tr><td>cvv2<\/td><td><strong><em>numeric<\/em><\/strong> (length = 3 or 4) <br \/>Security code as it appears on the back of the card. Usually 3 digits.<br \/>It\u2019s used only charges with <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-una-tarjeta\">Stored Cards<\/a>.<\/td><\/tr><tr><td>currency<\/td><td><strong><em>string<\/em><\/strong> (optional) <br \/>Type of currency of charge. At the moment only two types of currencies are supported: Mexican Pesos (MXN) and American Dollars (USD).<\/td><\/tr><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> (required, length = 250) <br \/>A description associated with the position.<\/td><\/tr><tr><td>order_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Unique identifier of the position. Must be unique among all transactions.<\/td><\/tr><tr><td>device_session_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 255) <br \/>Identifier of the device generated by the antifraud tool.<\/td><\/tr><tr><td>capture<\/td><td><strong><em>boolean<\/em><\/strong> (opcional, default = true) <br \/>Indicates whether the charge is made immediately or not , when the value is false the charge is handled as authorized (or pre-authorization) and the amount is only to be confirmed or canceled in a second call.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-un-nuevo-cliente\">customer<\/a><\/td><td><p><strong><em>object<\/em><\/strong> (required) <br \/>Customer information who is charged. You can use the same parameters used in the creation of a customer but an account for the customer will not be created.<\/p><p><strong>Note:<\/strong> This parameter can be used only by creating the charge at the merchant level<\/p><p>To create a customer and keep a record of their charges history refer to <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-un-nuevo-cliente\">create a customer<\/a> and do the charge at the customer level.<\/p><\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-paymentplan\">payment_plan<\/a><\/td><td><strong><em>object<\/em><\/strong> (optional) <br \/>Plan data months without interest is desired as use in the charge. Refer to <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-paymentplan\">PaymentPlan Object<\/a>.<\/td><\/tr><tr><td>metadata<\/td><td><strong><em>list(key, value)<\/em><\/strong> (optional) <br \/>Field list to send antifraud system, It must be according to <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#reglas-para-creaci\u00f3n-de-campos-personalizados-de-antifraude\">Rules to send custom antifraud fields.<\/a><\/td><\/tr><tr><td>use_card_points<\/td><td><p><strong><em>string<\/em><\/strong> (optional, default = NONE)<\/p><table><tbody><tr><td><strong>ONLY_POINTS<\/strong><\/td><td>Charge only with points (<a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#consulta-de-puntos\">Card points<\/a>)<\/td><\/tr><tr><td><strong>MIXED<\/strong><\/td><td>Charge with points and pesos<\/td><\/tr><tr><td><strong>NONE<\/strong><\/td><td>Charge only with pesos<\/td><\/tr><\/tbody><\/table><p>The values that indicate points must be used only if the points_card property is true, otherwise an error will occur.<\/p><\/td><\/tr><tr><td>send_email<\/td><td><strong><em>boolean<\/em><\/strong> (optional) <br \/>Used in redirect charges. Indicates if is need send a email that redirect to the openpay payment form.<\/td><\/tr><tr><td>redirect_url<\/td><td><p><strong><em>string<\/em><\/strong> (required) <br \/>Used in redirect charges. It indicates the url to which redirect after a successful transaction in the openpay payment form.<\/p><p><strong>Note:<\/strong> Este par\u00e1metro solo se puede utilizar si se especifica el manejo de 3D Secure.<\/p><\/td><\/tr><tr><td>use_3d_secure<\/td><td><strong><em>string<\/em><\/strong> (optional) <br \/>Used to specify if 3D Secure should be used. <code>true<\/code> para manejar 3D Secure.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> with the charge information or with an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"con-redireccionamiento\">With redirect<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.charges.create(chargeRequest, callback);\n\n\/\/ Cliente\nopenpay.customers.charges.create(customerId, chargeRequest, callback);\n<\/code><\/pre><blockquote><p>Merchant request example<\/p><\/blockquote><pre><code>var chargeRequest = {\n   'method' : 'card',\n   'amount' : 100,\n   'description' : 'Cargo inicial a mi cuenta',\n   'order_id' : 'oid-00051',\n   'customer' : {\n        'name' : 'Juan',\n        'last_name' : 'Vazquez Juarez',\n        'phone_number' : '4423456723',\n        'email' : 'juan.vazquez@empresa.com.mx'\n   },\n  'send_email' : false,\n  'confirm' : false,\n  'redirect_url' : 'http:\/\/www.openpay.mx\/index.html')\n}\n\nopenpay.charges.create(chargeRequest, function(error, charge) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>\n{\n  \"id\": \"trq7yrthx5vc4gtjdkwg\",\n  \"authorization\": null,\n  \"method\": \"card\",\n  \"operation_type\": \"in\",\n  \"transaction_type\": \"charge\",\n  \"status\": \"charge_pending\",\n  \"conciliated\": false,\n  \"creation_date\": \"2016-09-09T18:52:02-05:00\",\n  \"operation_date\": \"2016-09-09T18:52:02-05:00\",\n  \"description\": \"Cargo desde terminal virtual de 111\",\n  \"error_message\": null,\n  \"amount\": 100,\n  \"currency\": \"MXN\",\n  \"payment_method\": {\n    \"type\": \"redirect\",\n    \"url\": \"https:\/\/sandbox-api.openpay.mx\/v1\/mexzhpxok3houd5lbvz1\/charges\/trq7yrthx5vc4gtjdkwg\/card_capture\"\n  },\n  \"customer\": {\n    \"name\": \"Juan\",\n    \"last_name\": \"Vazquez Juarez\",\n    \"email\": \"juan.vazquez@empresa.com.mx\",\n    \"phone_number\": \"4423456723\",\n    \"creation_date\": \"2016-09-09T18:52:02-05:00\",\n    \"clabe\": null,\n    \"external_id\": null\n  }\n}\n<\/code><\/pre><p>This type of charge don\u2019t requires a saved card or a previously generated token<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>method<\/td><td><strong><em>string<\/em><\/strong> (required in card) <br \/>It must contain the <strong>card<\/strong> value in order to specify the charge will be made from card.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Amount of charge. Must be an amount greater than zero, with up to two decimal digits.<\/td><\/tr><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> (required, length = 250) <br \/>A description associated with the position.<\/td><\/tr><tr><td>order_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Unique identifier of the position. Must be unique among all transactions.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-un-nuevo-cliente\">customer<\/a><\/td><td><p><strong><em>object<\/em><\/strong> (required) <br \/>Customer information who is charged. You can use the same parameters used in the creation of a customer but an account for the customer will not be created.<\/p><p><strong>Note:<\/strong> This parameter can be used only by creating the charge at the merchant level<\/p><p>To create a customer and keep a record of their charges history refer to <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-un-nuevo-cliente\">create a customer<\/a> and do the charge at the customer level.<\/p><\/td><\/tr><tr><td>confirm<\/td><td><strong><em>boolean<\/em><\/strong> (required in false) <br \/>Indicates whether the charge is made immediately or not , when the value is false the charge is handled as authorized (or pre-authorization) and the amount is only to be confirmed or canceled in a second call. <code>false<\/code> indica que se trata de un cargo con terminal virtual.<\/td><\/tr><tr><td>send_email<\/td><td><strong><em>boolean<\/em><\/strong> (optional) <br \/>Indicates if is need send a email that redirect to the openpay payment form.<\/td><\/tr><tr><td>redirect_url<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>It indicates the url to which redirect after a successful transaction in the openpay payment form.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> with the charge information or with an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"cargo-en-tienda\">Charge via store<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/Customer\nopenpayAPI.ChargeService.Create(string customer_id, ChargeRequest request);\n\n\/\/Merchant\nopenpayAPI.ChargeService.Create(ChargeRequest request);\n<\/code><\/pre><pre><code>\/\/Comercio\nopenpay.charges.create(chargeRequest, callback);\n\n\/\/Cliente\nopenpay.customers.charges.create(customerId, chargeRequest, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>var storeChargeRequest = {\n   'method' : 'store',\n   'amount' : 100,\n   'description' : 'Cargo con tienda',\n   'order_id' : 'oid-00053',\n   'due_date' : '2014-05-28T13:45:00'\n};\n\nopenpay.customers.charges.create('ag4nktpdzebjiye1tlze', storeChargeRequest, function(error, charge) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"trnirkiyobo5qfex55ef\",\n   \"amount\":100.00,\n   \"authorization\":null,\n   \"method\":\"store\",\n   \"operation_type\":\"in\",\n   \"transaction_type\":\"charge\",\n   \"status\":\"in_progress\",\n   \"currency\":\"MXN\",\n   \"creation_date\":\"2014-05-26T13:48:25-05:00\",\n   \"operation_date\":\"2014-05-26T13:48:25-05:00\",\n   \"due_date\":\"2014-05-28T13:45:00-05:00\",\n   \"description\":\"Cargo con tienda\",\n   \"error_message\":null,\n   \"order_id\":\"oid-00053\",\n   \"customer_id\":\"ag4nktpdzebjiye1tlze\",\n   \"payment_method\":{\n      \"type\":\"store\",\n      \"reference\":\"000020TRNIRKIYOBO5QFEX55EF0100009\",\n      \"paybin_reference\":\"0101990000001065\",\n      \"barcode_url\":\"https:\/\/sandbox-api.openpay.mx\/barcode\/000020TRNIRKIYOBO5QFEX55EF0100009?width=1&amp;height=45&amp;text=false\",\n      \"barcode_paybin_url\":\"https:\/\/sandbox-api.openpay.mx\/barcode\/0101990000001065?width=1&amp;height=45&amp;text=false\"\n   }\n}\n<\/code><\/pre><p>For payments at a convenience store you should create a charge type request by indicating <strong>store<\/strong>as method. This will generate a response with a reference number and a URL with a barcode, which you must use to create a receipt so your customer can make the payment in one of the convenience stores. The barcode is Code 128 type.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>method<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>It must contain the <strong>store<\/strong> value in order to specify you want to pay at store.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Amount of charge. Must be an amount greater than zero, with up to two decimal digits.<\/td><\/tr><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> (required, length = 250) <br \/>A description associated with the position.<\/td><\/tr><tr><td>order_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Unique identifier of the position. Must be unique among all transactions.<\/td><\/tr><tr><td>due_date<\/td><td><p><strong><em>datetime<\/em><\/strong> (optional) <br \/>Due date for making the payment in the store in ISO 8601 format.<\/p><p>Example (UTC): 2014-08-01T00:50:00Z <br \/><strong><em>Note:<\/em><\/strong> On the server side the date will be changeg to central time<\/p><p>Example (Central Time): 2014-08-01T11:51:23-05:00<\/p><\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-un-nuevo-cliente\">customer<\/a><\/td><td><p><strong><em>object<\/em><\/strong> (required) <br \/>Customer information who is charged. You can use the same parameters used in the creation of a customer but an account for the customer will not be created.<\/p><p><strong>Note:<\/strong> This parameter can be used only by creating the charge at the merchant level<\/p><p>To create a customer and keep a record of their charges history refer to <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-un-nuevo-cliente\">create a customer<\/a> and do the charge at the customer level.<\/p><\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> with the charge information or with an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"cargo-en-banco\">Charge via bank<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.charges.create(chargeRequest, callback);\n\n\/\/ Cliente\nopenpay.customers.charges.create(customerId, chargeRequest, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>var bankChargeRequest = {\n   'method' : 'bank_account',\n   'amount' : 100,\n   'description' : 'Cargo con banco',\n   'order_id' : 'oid-00055'\n};\n\nopenpay.customers.charges.create('ag4nktpdzebjiye1tlze', bankChargeRequest, function(error, charge) {\n  \/\/ ...\n});\n\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"trnzf2xjwpupjfryyj23\",\n   \"amount\":100.00,\n   \"authorization\":null,\n   \"method\":\"bank_account\",\n   \"operation_type\":\"in\",\n   \"transaction_type\":\"charge\",\n   \"status\":\"in_progress\",\n   \"currency\":\"MXN\",\n   \"creation_date\":\"2014-05-26T13:51:25-05:00\",\n   \"operation_date\":\"2014-05-26T13:51:25-05:00\",\n   \"description\":\"Cargo con banco\",\n   \"error_message\":null,\n   \"order_id\":\"oid-00055\",\n   \"customer_id\":\"ag4nktpdzebjiye1tlze\",\n   \"payment_method\":{\n      \"type\":\"bank_transfer\",\n      \"agreement\" : \"1411217\",\n      \"bank\":\"BBVA Bancomer\",\n      \"clabe\":\"012914002014112176\",\n      \"name\":\"11030021342311520255\"\n   }\n}\n<\/code><\/pre><p>For a charge via bank you must create a charge type request by indicating <strong>bank_account<\/strong>as method. This will generate a response with a Bancomer CIE agreement number, a CLABE account number and a reference, you have to indicate these data in a receipt so your customer can do the wire transfer via SPEI.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>method<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>It must contain the <strong>bank_account<\/strong> value to specify the pay will be made with bank transfer.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Amount of charge. Must be an amount greater than zero, with up to two decimal digits.<\/td><\/tr><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> (required, length = 250) <br \/>A description associated with the position.<\/td><\/tr><tr><td>order_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Unique identifier of the position. Must be unique among all transactions.<\/td><\/tr><tr><td>due_date<\/td><td><p><strong><em>datetime<\/em><\/strong> (optional) <br \/>Due date for making the bank charge in the ISO 8601 format.<\/p><p>Example (UTC): 2014-08-01T00:50:00Z <br \/><strong><em>Note:<\/em><\/strong> On the server side the date will be changeg to central time<\/p><p>Example (Central Time): 2014-08-01T11:51:23-05:00<\/p><\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-un-nuevo-cliente\">customer<\/a><\/td><td><p><strong><em>object<\/em><\/strong> (optional) <br \/>Customer information who is charged. You can use the same parameters used in the creation of a customer but an account for the customer will not be created.<\/p><p><strong>Note:<\/strong> This parameter can be used only by creating the charge at the merchant level<\/p><p>To create a customer and keep a record of their charges history refer to <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-un-nuevo-cliente\">create a customer<\/a> and do the charge at the customer level.<\/p><\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> with the charge information or with an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"cargo-en-alipay\">With Alipay<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/Customer\nopenpayAPI.ChargeService.Create(string customer_id, ChargeRequest request);\n\n\/\/Merchant\nopenpayAPI.ChargeService.Create(ChargeRequest request);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>var alipayChargeRequest = {\n   'method' : 'alipay',\n   'amount' : 100,\n   'description' : 'Cargo Alipay',\n   'order_id' : 'oid-00055',\n   'redirect_url' : 'http:\/\/www.example.com\/myRedirectUrl'\n};\n\nopenpay.customers.charges.create('ag4nktpdzebjiye1tlze', alipayChargeRequest, function(error, charge) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n    \"id\": \"truq1dwjz0kmssvpbrlj\",\n    \"authorization\": null,\n    \"operation_type\": \"in\",\n    \"method\": \"alipay\",\n    \"transaction_type\": \"charge\",\n    \"status\": \"charge_pending\",\n    \"conciliated\": false,\n    \"creation_date\": \"2018-06-14T12:42:11-05:00\",\n    \"operation_date\": \"2018-06-14T12:42:11-05:00\",\n    \"description\": \"Cargo Alipay\",\n    \"error_message\": null,\n    \"order_id\": null,\n    \"due_date\": \"2018-06-15T12:42:11-05:00\",\n    \"payment_method\": {\n        \"type\": \"redirect\",\n        \"url\": \"https:\/\/sandbox-api.openpay.mx\/v1\/mzdtln0bmtms6o3kck8f\/charges\/truq1dwjo0kmssvqbrlj\/redirect\/\"\n    },\n    \"amount\": 2000,\n    \"currency\": \"MXN\",\n    \"fee\": {\n        \"amount\": 2.00  ,\n        \"tax\": 0,\n        \"currency\": \"MXN\"\n    }\n}\n<\/code><\/pre><p>To start a transaction using Alipay you should create a charge type request by indicating <strong>alipay<\/strong>as method. This will generate a response with an URL which will redirect the customer to the Alipay website where they can then enter their account details, or scan the QR Code in their mobile app.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>method<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>It must contain the <strong>alipay<\/strong> value in order to specify you want the customer to pay using Alipay.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Amount of charge. Must be an amount greater than zero, with up to two decimal digits.<\/td><\/tr><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> (required, length = 250) <br \/>A description associated with the position.<\/td><\/tr><tr><td>order_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Unique identifier of the position. Must be unique among all transactions.<\/td><\/tr><tr><td>due_date<\/td><td><p><strong><em>datetime<\/em><\/strong> (optional) <br \/>Due date for making the payment in Alipay in ISO 8601 format. The customer may have an additional 15 minutes after this date after they login to their Alipay account to complete payment.<\/p><p>Example (UTC): 2014-08-01T00:50:00Z <br \/><strong><em>Note:<\/em><\/strong> On the server side the date will be changeg to central time<\/p><p>Example (Central Time): 2014-08-01T11:51:23-05:00<\/p><\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-un-nuevo-cliente\">customer<\/a><\/td><td><p><strong><em>object<\/em><\/strong> <br \/>Customer information who is charged. You can use the same parameters used in the creation of a customer but an account for the customer will not be created.<\/p><p><strong>Note:<\/strong> This parameter can be used only by creating the charge at the merchant level<\/p><p>To create a customer and keep a record of their charges history refer to <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-un-nuevo-cliente\">create a customer<\/a> and do the charge at the customer level.<\/p><\/td><\/tr><tr><td>redirect_url<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>It indicates the url to which redirect after a successful transaction in the openpay payment form, when a request is receiven in this url, merchant must get id attribute to request for the transaction final result.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> with the charge information or with an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"cargo-con-ivr\">Charge with IVR<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.charges.create(chargeRequest, callback);\n\n\/\/ Cliente\nopenpay.customers.charges.create(customerId, chargeRequest, callback);\n<\/code><\/pre><blockquote><p>Merchant request example<\/p><\/blockquote><pre><code>var chargeRequest = {\n   'method' : 'card',\n   'confirm' : 'ivr',\n   'amount' : 100,\n   'currency' : 'MXN',\n   'description' : 'Cargo IVR',\n   'order_id' : 'oid-00051',\n   'customer' : {\n        'name' : 'Juan',\n        'last_name' : 'Vazquez Juarez',\n        'phone_number' : '4423456723',\n        'email' : 'juan.vazquez@empresa.com.mx'\n   }\n}\n\nopenpay.charges.create(chargeRequest, function(error, charge) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n    \"id\": \"tranxr78lb4i58xaliu2\",\n    \"authorization\": null,\n    \"operation_type\": \"in\",\n    \"transaction_type\": \"charge\",\n    \"status\": \"charge_pending\",\n    \"conciliated\": false,\n    \"creation_date\": \"2020-10-16T12:22:25-05:00\",\n    \"operation_date\": \"2020-10-16T12:22:25-05:00\",\n    \"description\": \"Cargo IVR\",\n    \"error_message\": null,\n    \"order_id\": \"ord-323\",\n    \"due_date\": \"2020-10-17T00:59:59-05:00\",\n    \"payment_method\": {\n        \"type\": \"ivr\",\n        \"phone_number\": \"525588969143\",\n        \"ivr_key\": 676105,\n        \"attempts\": 0\n    },\n    \"amount\": 100.00,\n    \"currency\": \"MXN\",\n    \"customer\": {\n        \"name\": \"JUAN\",\n        \"last_name\": \"PEREZ\",\n        \"email\": \"juan.urbina@hotmail.com\",\n        \"phone_number\": \"45155352828\",\n        \"address\": null,\n        \"creation_date\": \"2020-10-16T12:22:25-05:00\",\n        \"external_id\": null,\n        \"clabe\": null\n    },\n    \"method\": \"card\"\n}\n<\/code><\/pre><p><strong><em>Customized antifraud system<\/em><\/strong><br \/>You can send extra data to Openpay in order to increase number of variables and get better results in antifraud detection for your transactions.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>method<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>It must contain the <strong>card<\/strong> value in order to specify the charge will be made from card.<\/td><\/tr><tr><td>confirm<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>It must contain the <strong>ivr<\/strong> value in order to specify the charge will be confirm from IVR.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Amount of charge. Must be an amount greater than zero, with up to two decimal digits.<\/td><\/tr><tr><td>currency<\/td><td><strong><em>string<\/em><\/strong> (optional) <br \/>Type of currency of charge. At the moment only two types of currencies are supported: Mexican Pesos (MXN) and American Dollars (USD).<\/td><\/tr><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> (required, length = 250) <br \/>A description associated with the position.<\/td><\/tr><tr><td>order_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Unique identifier of the position. Must be unique among all transactions.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-un-nuevo-cliente\">customer<\/a><\/td><td><p><strong><em>object<\/em><\/strong> (required) <br \/>Customer information who is charged. You can use the same parameters used in the creation of a customer but an account for the customer will not be created.<\/p><p><strong>Note:<\/strong> This parameter can be used only by creating the charge at the merchant level<\/p><p>To create a customer and keep a record of their charges history refer to <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-un-nuevo-cliente\">create a customer<\/a> and do the charge at the customer level.<\/p><\/td><\/tr><tr><td>metadata<\/td><td><strong><em>list(key, value)<\/em><\/strong> (optional) <br \/>Field list to send antifraud system, It must be according to <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#reglas-para-creaci\u00f3n-de-campos-personalizados-de-antifraude\">Rules to send custom antifraud fields.<\/a><\/td><\/tr><tr><td>send_email<\/td><td><strong><em>boolean<\/em><\/strong> (optional) <br \/>Used in redirect charges. Indicates if is need send a email that redirect to the openpay payment form.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> with the charge information or with an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"confirmar-un-cargo\">Confirming a charge<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.charges.capture(transactionId, captureRequest, callback);\n\n\/\/ Cliente\nopenpay.customers.charges.capture(customerId, transactionId, captureRequest, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>var captureRequest = {\n  'amount' : 100.00\n};\n\nopenpay.customers.charges.capture('ag4nktpdzebjiye1tlze', 'tryqihxac3msedn4yxed', captureRequest,\n    function(error, charge){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"tryqihxac3msedn4yxed\",\n   \"amount\":100.00,\n   \"authorization\":\"801585\",\n   \"method\":\"card\",\n   \"operation_type\":\"in\",\n   \"transaction_type\":\"charge\",\n   \"card\":{\n      \"type\":\"debit\",\n      \"brand\":\"visa\",\n      \"address\":null,\n      \"card_number\":\"411111XXXXXX1111\",\n      \"holder_name\":\"Juan Perez Ramirez\",\n      \"expiration_year\":\"20\",\n      \"expiration_month\":\"12\",\n      \"allows_charges\":true,\n      \"allows_payouts\":true,\n      \"bank_name\":\"Banamex\",\n      \"bank_code\":\"002\"\n   },\n   \"status\":\"completed\",\n   \"currency\":\"MXN\",\n   \"creation_date\":\"2014-05-26T14:00:17-05:00\",\n   \"operation_date\":\"2014-05-26T14:00:17-05:00\",\n   \"description\":\"Cargo inicial a mi cuenta\",\n   \"error_message\":null,\n   \"order_id\":null,\n   \"customer_id\":\"ag4nktpdzebjiye1tlze\"\n}\n<\/code><\/pre><p>Confirm a charge created with the <code>capture = \"false\"<\/code>property, this method is the second part of the <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#con-id-de-tarjeta-o-token\">create a charge with a card (id or token)<\/a> and it can confirm the amount captured on the first call or a lesser amount.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (optional) <br \/>Amount to confirm. It can be less than or equal to the amount given with up to two decimal digits<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> with the charge information or with an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"devolver-un-cargo\">Refunding a charge<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.charges.refund(transactionId, refundRequest, callback);\n\n\/\/ Cliente\nopenpay.customers.charges.refund(customerId, transactionId, refundRequest, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>var refundRequest = {\n   'description' : 'devoluci\u00f3n',\n   'amount' : 100.00\n};\n\nopenpay.customers.charges.refund('ag4nktpdzebjiye1tlze', 'tryqihxac3msedn4yxed', refundRequest,\n    function(error, charge) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"tr6cxbcefzatd10guvvw\",\n   \"amount\":100.00,\n   \"authorization\":\"801585\",\n   \"method\":\"card\",\n   \"operation_type\":\"in\",\n   \"transaction_type\":\"charge\",\n   \"card\":{\n      \"type\":\"debit\",\n      \"brand\":\"visa\",\n      \"address\":null,\n      \"card_number\":\"411111XXXXXX1111\",\n      \"holder_name\":\"Juan Perez Ramirez\",\n      \"expiration_year\":\"20\",\n      \"expiration_month\":\"12\",\n      \"allows_charges\":true,\n      \"allows_payouts\":true,\n      \"bank_name\":\"Banamex\",\n      \"bank_code\":\"002\"\n   },\n   \"status\":\"completed\",\n   \"refund\":{\n      \"id\":\"trcbsmjkroqmjobxqhpb\",\n      \"amount\":100.00,\n      \"authorization\":\"801585\",\n      \"method\":\"card\",\n      \"operation_type\":\"out\",\n      \"transaction_type\":\"refund\",\n      \"status\":\"completed\",\n      \"currency\":\"MXN\",\n      \"creation_date\":\"2014-05-26T13:56:21-05:00\",\n      \"operation_date\":\"2014-05-26T13:56:21-05:00\",\n      \"description\":\"devolucion\",\n      \"error_message\":null,\n      \"order_id\":null,\n      \"customer_id\":\"ag4nktpdzebjiye1tlze\"\n   },\n   \"currency\":\"MXN\",\n   \"creation_date\":\"2014-05-26T11:56:25-05:00\",\n   \"operation_date\":\"2014-05-26T11:56:25-05:00\",\n   \"description\":\"Cargo inicial a mi cuenta\",\n   \"error_message\":null,\n   \"order_id\":\"oid-00052\",\n   \"customer_id\":\"ag4nktpdzebjiye1tlze\"\n}\n<\/code><\/pre><p>You can use this method if you want to make a charge refund to a card. The amount to be returned will be the total charge or a lower amount. Note that the refund may be delayed in the statement of your customer for 1-3 business days.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> (optional, length = 250) <br \/>Text to describe the refund reason.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (optional) <br \/>Amount to refund. Must be an amount greater than zero and lesser or equal than the original amount, with up to two decimal digits.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> with the charge information or with an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"obtener-un-cargo\">Obtener un cargo<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.charges.get(transactionId, callback);\n\n\/\/ Cliente\nopenpay.customers.charges.get(customerId, transactionId, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>openpay.customers.charges.get('ag4nktpdzebjiye1tlze', 'tr6cxbcefzatd10guvvw', function(error, charge){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"tr6cxbcefzatd10guvvw\",\n   \"amount\":100.00,\n   \"authorization\":\"801585\",\n   \"method\":\"card\",\n   \"operation_type\":\"in\",\n   \"transaction_type\":\"charge\",\n   \"card\":{\n      \"type\":\"debit\",\n      \"brand\":\"visa\",\n      \"address\":null,\n      \"card_number\":\"411111XXXXXX1111\",\n      \"holder_name\":\"Juan Perez Ramirez\",\n      \"expiration_year\":\"20\",\n      \"expiration_month\":\"12\",\n      \"allows_charges\":true,\n      \"allows_payouts\":true,\n      \"bank_name\":\"Banamex\",\n      \"bank_code\":\"002\"\n   },\n   \"status\":\"completed\",\n   \"refund\":{\n      \"id\":\"trcbsmjkroqmjobxqhpb\",\n      \"amount\":100.00,\n      \"authorization\":\"801585\",\n      \"method\":\"card\",\n      \"operation_type\":\"out\",\n      \"transaction_type\":\"refund\",\n      \"status\":\"completed\",\n      \"currency\":\"MXN\",\n      \"creation_date\":\"2014-05-26T13:56:21-05:00\",\n      \"operation_date\":\"2014-05-26T13:56:21-05:00\",\n      \"description\":\"devolucion\",\n      \"error_message\":null,\n      \"order_id\":null,\n      \"customer_id\":\"ag4nktpdzebjiye1tlze\"\n   },\n   \"currency\":\"MXN\",\n   \"creation_date\":\"2014-05-26T11:56:25-05:00\",\n   \"operation_date\":\"2014-05-26T11:56:25-05:00\",\n   \"description\":\"Cargo inicial a mi cuenta\",\n   \"error_message\":null,\n   \"order_id\":\"oid-00052\",\n   \"customer_id\":\"ag4nktpdzebjiye1tlze\"\n}\n<\/code><\/pre><p>Returns a transaction object with the charge information or with an error response.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>transaction_id<\/td><td><em><strong>string<\/strong><\/em> (required, length = 45)<br \/>Charge Id.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> with the charge information or with an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"listado-de-cargos\">List of charges<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.charges.list(callback);\nopenpay.charges.list(searchParams, callback);\n\n\/\/ Cliente\nopenpay.customers.charges.list(customerId, callback);\nopenpay.customers.charges.list(customerId, searchParams, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>var searchParams = {\n  'creation[gte]' : '2013-11-01',\n  'limit' : 2\n};\n\nopenpay.customers.charges.list('ag4nktpdzebjiye1tlze',searchParams, function(error, chargeList) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>[\n   {\n      \"id\":\"tryqihxac3msedn4yxed\",\n      \"amount\":100.00,\n      \"authorization\":\"801585\",\n      \"method\":\"card\",\n      \"operation_type\":\"in\",\n      \"transaction_type\":\"charge\",\n      \"card\":{\n         \"type\":\"debit\",\n         \"brand\":\"visa\",\n         \"address\":null,\n         \"card_number\":\"411111XXXXXX1111\",\n         \"holder_name\":\"Juan Perez Ramirez\",\n         \"expiration_year\":\"20\",\n         \"expiration_month\":\"12\",\n         \"allows_charges\":true,\n         \"allows_payouts\":true,\n         \"bank_name\":\"Banamex\",\n         \"bank_code\":\"002\"\n      },\n      \"status\":\"completed\",\n      \"currency\":\"MXN\",\n      \"creation_date\":\"2014-05-26T14:00:17-05:00\",\n      \"operation_date\":\"2014-05-26T14:00:17-05:00\",\n      \"description\":\"Cargo inicial a mi cuenta\",\n      \"error_message\":null,\n      \"order_id\":null,\n      \"customer_id\":\"ag4nktpdzebjiye1tlze\"\n   },\n   {\n      \"id\":\"trnzf2xjwpupjfryyj23\",\n      \"amount\":100.00,\n      \"authorization\":null,\n      \"method\":\"bank_account\",\n      \"operation_type\":\"in\",\n      \"transaction_type\":\"charge\",\n      \"status\":\"in_progress\",\n      \"currency\":\"MXN\",\n      \"creation_date\":\"2014-05-26T13:51:25-05:00\",\n      \"operation_date\":\"2014-05-26T13:51:25-05:00\",\n      \"description\":\"Cargo con banco\",\n      \"error_message\":null,\n      \"order_id\":\"oid-00055\",\n      \"customer_id\":\"ag4nktpdzebjiye1tlze\",\n      \"payment_method\":{\n         \"type\":\"bank_transfer\",\n         \"agreement\" : \"1411217\",\n         \"bank\":\"BBVA Bancomer\",\n         \"clabe\":\"012914002014112176\",\n         \"name\":\"11030021342311520255\"\n      }\n   }\n]\n<\/code><\/pre><p>Gets a list of the charges made by Merchant or customer.<\/p><h3 id=\"petici-n\">Request<\/h3><p>You can search using the following parameters as filters.<\/p><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>order_id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Unique order id generated by the merchant and associated to the transaction by the order_id field of the charge request.<\/td><\/tr><tr><td>creation<\/td><td><strong><em>date<\/em><\/strong> <br \/>Same as creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[gte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>After the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[lte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>Before the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>offset<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of records to skip at the beginning, default 0.<\/td><\/tr><tr><td>limit<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of required records, default 10.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Same as the amount.<\/td><\/tr><tr><td>amount[gte]<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Greater than or equal to the amount.<\/td><\/tr><tr><td>amount[lte]<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Less than or equal to the amount.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transaction-status\">status<\/a><\/td><td><strong><em>TransactionStatus<\/em><\/strong> <br \/>Estado de la transacci\u00f3n (IN_PROGRESS,COMPLETED,REFUNDED,CHARGEBACK_PENDING,CHARGEBACK_ACCEPTED,CHARGEBACK_ADJUSTMENT,CHARGE_PENDING,CANCELLED,FAILED).<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns an array of <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction objects<\/a> charges in descending order by creation date.<\/p><h2 id=\"pagos-o-retiros\">Payouts or withdrawals<\/h2><p>A payout is the transaction that allows to extract funds from a Openpay account and send the funds to a bank account. Payouts can be made from the accounts of the customers or from the Merchant account.<\/p><h2 id=\"pago-a-id-registrado\">Payout to a registered id<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.payouts.create(payoutRequest, callback);\n\n\/\/ Cliente\nopenpay.customers.payouts.create(customerId, payoutRequest, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>var payoutRequest = {\n    'method': 'bank_account',\n    'destination_id': 'b3d54sd3mdjf75udjfvoc',\n    'amount': 10.50,\n    'description': 'Retiro de saldo semanal',\n    'order_id': 'oid-00021'\n};\n\nopenpay.customers.payouts.create('ag4nktpdzebjiye1tlze', payoutRequest, function(error, payout) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"amount\":10.5,\n   \"authorization\":null,\n   \"method\":\"bank_account\",\n   \"currency\":\"MXN\",\n   \"operation_type\":\"out\",\n   \"transaction_type\":\"payout\",\n   \"bank_account\":{\n      \"id\":\"b3d54sd3mdjf75udjfvoc\",\n      \"clabe\":\"012XXXXXXXXXX24616\",\n      \"bank_code\":\"012\",\n      \"bank_name\":\"BANCOMER\",\n      \"alias\":null,\n      \"holder_name\":\"Mi empresa\"\n   },\n   \"status\":\"in_progress\",\n   \"id\":\"tm50pl40gf6awvalw1ei\",\n   \"creation_date\":\"2013-11-15T13:42:00-06:00\",\n   \"description\":\"Retiro de saldo semanal\",\n   \"error_message\":null,\n   \"order_id\":\"oid-00021\",\n   \"customer_id\":\"aayr5jjb1fln44yautef\"\n}\n<\/code><\/pre><p>Sends a payout to a previously registered bank account. Refer to <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-una-cuenta-bancaria\">create a bank account<\/a><\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>method<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>It must contain the <strong>bank_account<\/strong>.<\/td><\/tr><tr><td>destination_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>ID of the registered bank account.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Amount of charge. Must be an amount greater than zero, with up to two decimal digits.<\/td><\/tr><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> (required, length = 250) <br \/>A description associated with the position.<\/td><\/tr><tr><td>order_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Unique identifier of the position. Must be unique among all transactions.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> with the payout information or with an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"pago-a-cuenta-bancaria\">Payment to a bank account<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.payouts.create(payoutRequest, callback);\n\n\/\/ Cliente\nopenpay.customers.payouts.create(customerId, payoutRequest, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>var payoutRequest = {\n   'method':'bank_account',\n   'bank_account':{\n      'clabe':'012298026516924616',\n      'holder_name':'Mi empresa'\n   },\n   'amount':10.50,\n   'description':'Retiro de saldo semanal',\n   'order_id':'oid-1110011'\n};\n\nopenpay.customers.payouts.create('ag4nktpdzebjiye1tlze', payoutRequest, function(error, payout) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"tr4f2atubqchinw71vfs\",\n   \"amount\":10.50,\n   \"authorization\":null,\n   \"method\":\"bank_account\",\n   \"operation_type\":\"out\",\n   \"transaction_type\":\"payout\",\n   \"status\":\"in_progress\",\n   \"currency\":\"MXN\",\n   \"creation_date\":\"2014-05-26T17:23:03-05:00\",\n   \"operation_date\":\"2014-05-26T17:23:03-05:00\",\n   \"description\":\"Retiro de saldo semanal\",\n   \"error_message\":null,\n   \"order_id\":\"oid-1110011\",\n   \"bank_account\":{\n      \"clabe\":\"012XXXXXXXXXX24616\",\n      \"bank_code\":\"012\",\n      \"bank_name\":\"BANCOMER\",\n      \"alias\":null,\n      \"holder_name\":\"Mi empresa\"\n   },\n   \"customer_id\":\"asynwirguzkgq2bizogo\"\n}\n<\/code><\/pre><p>Sends a payment to a bank account.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>method<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>It must contain the <strong>bank_account<\/strong>.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-cuenta-bancaria\">bank_account<\/a><\/td><td><p><strong><em>object<\/em><\/strong> (required) <br \/>Data of the bank account where the funds will be sent.<\/p><p><strong>clabe<\/strong>.- CLABE account number where the funds will be sent. <br \/><strong>holder_name<\/strong>.- Name of the account owner .<\/p><\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Amount of charge. Must be an amount greater than zero, with up to two decimal digits.<\/td><\/tr><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> (required, length = 250) <br \/>A description associated with the position.<\/td><\/tr><tr><td>order_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Unique identifier of the position. Must be unique among all transactions.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> with the payout information or with an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"obtener-un-pago\">Get a payout<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.payouts.get(transactionId, callback);\n\n\/\/ Cliente\nopenpay.customers.payouts.get(customerId, transactionId, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>openpay.customers.payouts.get('ag4nktpdzebjiye1tlze', 'tr6cxbcefzatd10guvvw', function(error, payout) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"trwpxhrgfeub9eqdyvqz\",\n   \"amount\":10.50,\n   \"authorization\":\"TRWPXHRGFEUB9EQDYVQZ\",\n   \"method\":\"bank_account\",\n   \"operation_type\":\"out\",\n   \"transaction_type\":\"payout\",\n   \"bank_account\":{\n      \"clabe\":\"012XXXXXXXXXX24616\",\n      \"bank_code\":\"012\",\n      \"bank_name\":\"BANCOMER\",\n      \"alias\":null,\n      \"holder_name\":\"Mi empresa\"\n   },\n   \"status\":\"completed\",\n   \"currency\":\"MXN\",\n   \"creation_date\":\"2014-05-26T17:04:26-05:00\",\n   \"operation_date\":\"2014-05-26T17:06:28-05:00\",\n   \"description\":\"Retiro de saldo semanal\",\n   \"error_message\":null,\n   \"order_id\":\"oid-00021\",\n   \"customer_id\":\"asynwirguzkgq2bizogo\"\n}\n<\/code><\/pre><p>Returns de information of the payout. You must know the payout id.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>transaction_id<\/td><td><em><strong>string<\/strong><\/em> (required, length = 45)<br \/>Id of the payout you want to get.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> with the payout information or with an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"cancelar-un-pago\">Cancel a payout<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.payouts.delete(transactionId, callback);\n\n\/\/ Cliente\nopenpay.customers.payouts.delete(customerId, transactionId, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>openpay.customers.payouts.delete('ag4nktpdzebjiye1tlze', 'trozeipf364jqrsbt3ej', function(error, payout) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"trozeipf364jqrsbt3ej\",\n   \"amount\":10.50,\n   \"authorization\":\"TROZEIPF364JQRSBT3EJ\",\n   \"method\":\"bank_account\",\n   \"operation_type\":\"out\",\n   \"transaction_type\":\"payout\",\n   \"bank_account\":{\n      \"clabe\":\"012XXXXXXXXXX24616\",\n      \"bank_code\":\"012\",\n      \"bank_name\":\"BANCOMER\",\n      \"alias\":null,\n      \"holder_name\":\"Mi empresa\"\n   },\n   \"status\":\"cancelled\",\n   \"currency\":\"MXN\",\n   \"creation_date\":\"2014-05-26T17:04:26-05:00\",\n   \"operation_date\":\"2014-05-26T17:06:28-05:00\",\n   \"description\":\"Retiro de saldo semanal\",\n   \"error_message\":null,\n   \"order_id\":\"oid-00021\",\n   \"customer_id\":\"asynwirguzkgq2bizogo\"\n}\n<\/code><\/pre><p>Cancels a payout in in_progress status, it means not yet completed. You must know the payout id.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>transaction_id<\/td><td><em><strong>string<\/strong><\/em> (required, length = 45)<br \/>Payout Id you want to cancel.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> with the cancelled payout or with an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"listado-de-pagos\">List of payouts<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.payouts.list(callback);\nopenpay.payouts.list(searchParams, callback);\n\n\/\/ Cliente\nopenpay.customers.payouts.list(customerId, callback);\nopenpay.customers.payouts.list(customerId, searchParams, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var searchParams = {\n  'creation[gte]' : '2013-11-01',\n  'payout_type' : 'AUTOMATIC',\n  'limit' : 2\n};\n\nopenpay.customers.payouts.list('asynwirguzkgq2bizogo', searchParams, function(error, list) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>[\n   {\n      \"id\":\"tr4f2atubqchinw71vfs\",\n      \"amount\":10.50,\n      \"authorization\":\"TR4F2ATUBQCHINW71VFS\",\n      \"method\":\"bank_account\",\n      \"operation_type\":\"out\",\n      \"transaction_type\":\"payout\",\n      \"status\":\"completed\",\n      \"currency\":\"MXN\",\n      \"creation_date\":\"2014-05-26T17:23:03-05:00\",\n      \"operation_date\":\"2014-05-26T17:26:27-05:00\",\n      \"description\":\"Retiro de saldo semanal\",\n      \"error_message\":null,\n      \"order_id\":\"oid-1110011\",\n      \"bank_account\":{\n         \"clabe\":\"012XXXXXXXXXX24616\",\n         \"bank_code\":\"012\",\n         \"bank_name\":\"BANCOMER\",\n         \"alias\":null,\n         \"holder_name\":\"Mi empresa\"\n      },\n      \"customer_id\":\"asynwirguzkgq2bizogo\"\n   },\n   {\n      \"id\":\"trwpxhrgfeub9eqdyvqz\",\n      \"amount\":10.50,\n      \"authorization\":\"TRWPXHRGFEUB9EQDYVQZ\",\n      \"method\":\"bank_account\",\n      \"operation_type\":\"out\",\n      \"transaction_type\":\"payout\",\n      \"bank_account\":{\n         \"clabe\":\"012XXXXXXXXXX24616\",\n         \"bank_code\":\"012\",\n         \"bank_name\":\"BANCOMER\",\n         \"alias\":null,\n         \"holder_name\":\"Mi empresa\"\n      },\n      \"status\":\"completed\",\n      \"currency\":\"MXN\",\n      \"creation_date\":\"2014-05-26T17:04:26-05:00\",\n      \"operation_date\":\"2014-05-26T17:06:28-05:00\",\n      \"description\":\"Retiro de saldo semanal\",\n      \"error_message\":null,\n      \"order_id\":\"oid-00021\",\n      \"customer_id\":\"asynwirguzkgq2bizogo\"\n   }\n]\n<\/code><\/pre><p>Gets a list of payouts made at Merchant or customer level.<\/p><h3 id=\"petici-n\">Request<\/h3><p>You can search using the following parameters as filters.<\/p><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>creation<\/td><td><strong><em>date<\/em><\/strong> <br \/>Same as creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[gte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>After the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[lte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>Before the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>offset<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of records to skip at the beginning, default 0.<\/td><\/tr><tr><td>limit<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of required records, default 10.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Same as the amount.<\/td><\/tr><tr><td>amount[gte]<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Greater than or equal to the amount.<\/td><\/tr><tr><td>amount[lte]<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Less than or equal to the amount.<\/td><\/tr><tr><td>payout_type<\/td><td><strong><em>string (opcional, ALL, AUTOMATIC o MANUAL)<\/em><\/strong> <br \/>Payout type used to filter the transactions<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a list of <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction objects<\/a> payouts in descending order by creation date.<\/p><h2 id=\"resumen-de-pagos\">Summary Payouts<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.transactionsPayout.get(transactionId, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>openpay.transactionsPayout.get('tr6cxbcefzatd10guvvw', function(error, payout) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n  \"in\": 2700,\n  \"out\": 2400,\n  \"charged_adjustments\": 0,\n  \"refunded_adjustments\": 0\n}\n<\/code><\/pre><p>Return the summary of the payout. You must know the payout id.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>transaction_id<\/td><td><em><strong>string<\/strong><\/em> (required, length = 45)<br \/>Id of the payout you want to get.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-resumen-de-pagos\">summary payouts object<\/a> with the summary of the payout or a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"objeto-resumen-de-pagos\">Summary Payout Object<\/h2><blockquote><p>Object example<\/p><\/blockquote><pre><code>{\n   \"in\":2700,\n   \"out\":2400,\n   \"charged_adjustments\":0,\n   \"refunded_adjustments\":0\n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>in<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Total amount in, Must be an amount with up to two decimal digits.<\/td><\/tr><tr><td>out<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Total amount out, Must be an amount with up to two decimal digits.<\/td><\/tr><tr><td>charged_adjustments<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Total amount of adjustment charges, Must be an amount with up to two decimal digits.<\/td><\/tr><tr><td>refunded_adjustments<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Total amount of refund charges, Must be an amount with up to two decimal digits.<\/td><\/tr><\/tbody><\/table><h2 id=\"detalle-de-pagos\">Payout Detail<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.transactionsPayout.getDetails(transactionId, searchParams, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var searchParams = {\n  'detail_type' : 'IN',\n  'offset' : 0,\n  'limit' : 100\n};\n\nopenpay.transactionsPayout.get('tr6cxbcefzatd10guvvw', searchParams, function(error, payout) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>[\n  {\n    \"id\": \"trqcwapqeilg596zwrvr\",\n    \"authorization\": \"7BXqDL1fjb\",\n    \"method\": \"bank_account\",\n    \"operation_type\": \"in\",\n    \"transaction_type\": \"charge\",\n    \"status\": \"completed\",\n    \"conciliated\": true,\n    \"creation_date\": \"2016-09-13T12:57:34-05:00\",\n    \"operation_date\": \"2016-09-13T12:57:34-05:00\",\n    \"description\": \"mexzhpxok3houd5lbvz1\",\n    \"error_message\": null,\n    \"order_id\": null,\n    \"bank_account\": {\n      \"clabe\": \"113XXXXXXXXXX09568\",\n      \"bank_code\": \"113\",\n      \"bank_name\": \"VE POR MAS\",\n      \"rfc\": \"OPE130906HN4\",\n      \"holder_name\": \"persona003\"\n    },\n    \"amount\": 700,\n    \"currency\": \"MXN\"\n  },\n  {\n    \"id\": \"tru6lsl6xpvseqp87vjd\",\n    \"authorization\": \"FPVYiN4nyw\",\n    \"method\": \"card\",\n    \"operation_type\": \"in\",\n    \"transaction_type\": \"charge\",\n    \"card\": {\n      \"type\": \"debit\",\n      \"brand\": \"mastercard\",\n      \"address\": null,\n      \"card_number\": \"555555XXXXXX4444\",\n      \"holder_name\": \"persona003\",\n      \"expiration_year\": null,\n      \"expiration_month\": null,\n      \"allows_charges\": false,\n      \"allows_payouts\": false,\n      \"bank_name\": \"MASARI\",\n      \"bank_code\": \"602\"\n    },\n    \"status\": \"completed\",\n    \"conciliated\": true,\n    \"creation_date\": \"2016-09-13T12:57:16-05:00\",\n    \"operation_date\": \"2016-09-13T12:57:16-05:00\",\n    \"description\": \"mexzhpxok3houd5lbvz1\",\n    \"error_message\": null,\n    \"order_id\": null,\n    \"amount\": 2000,\n    \"currency\": \"MXN\"\n  }\n]\n<\/code><\/pre><p>Returns a list of the transactions involved in a payout. You must know the payout id.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>transaction_id<\/td><td><em><strong>string<\/strong><\/em> (required, length = 45)<br \/>Id of the payout you want to get.<\/td><\/tr><tr><td>detail_type<\/td><td><em><strong>string<\/strong><\/em> (<strong><em>IN<\/em><\/strong>, <strong><em>OUT<\/em><\/strong>, <strong><em>CHARGED_ADJUSTMENTS<\/em><\/strong>, <strong><em>REFUNDED_ADJUSTMENTS<\/em><\/strong>) <br \/>The detail type.<\/td><\/tr><tr><td>offset<\/td><td><em><strong>numeric<\/strong><\/em> <br \/>Number of records to skip at the beginning, default 0.<\/td><\/tr><tr><td>limit<\/td><td><em><strong>numeric<\/strong><\/em> <br \/>Number of required records, default 10.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a list of <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction objects<\/a> or a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"clientes\">Customers<\/h2><p>Customers are Openpay resources that are handled within the Merchant account and can represent users, customers or partners according to the type of Merchant.<\/p><p>You can add cards and bank accounts to the customers so you can make transactions like Charges, Transfers or Payouts.<\/p><h2 id=\"objeto-cliente\">Customer object<\/h2><blockquote><p>Object example<\/p><\/blockquote><pre><code>{\n   \"id\":\"cz4nkhrlcu9k7qd4lwqx\",\n   \"creation_date\":\"2013-11-08T12:04:46-06:00\",\n   \"name\":\"Rodrigo\",\n   \"last_name\":\"Velazco Perez\",\n   \"email\":\"rodrigo.velazco@payments.com\", \n   \"phone_number\":\"4425667045\",\n   \"external_id\":\"cliente1\",\n   \"status\":\"active\",\n   \"balance\":103,\n   \"address\":{\n      \"line1\":\"Av. 5 de febrero No. 1080 int Roble 207\",\n      \"line2\":\"Carrillo puerto\",\n      \"line3\":\"Zona industrial carrillo puerto\",\n      \"postal_code\":\"06500\",\n      \"state\":\"Quer\u00e9taro\",\n      \"city\":\"Quer\u00e9taro\",\n      \"country_code\":\"MX\"\n   },\n   \"store\": {\n       \"reference\": \"OPENPAY02DQ35YOY7\",\n       \"barcode_url\": \"https:\/\/sandbox-api.openpay.mx\/barcode\/OPENPAY02DQ35YOY7?width=1&amp;height=45&amp;text=false\"\n   },\n   \"clabe\": \"646180109400423323\"\n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Customer unique identifier.<\/td><\/tr><tr><td>creation_date<\/td><td><strong><em>datetime<\/em><\/strong> <br \/>Date and time when the customer was created in ISO 8601 format.<\/td><\/tr><tr><td>name<\/td><td><strong><em>string<\/em><\/strong> <br \/>Name of the customer.<\/td><\/tr><tr><td>last_name<\/td><td><strong><em>string<\/em><\/strong> <br \/>Customer's last name.<\/td><\/tr><tr><td>email<\/td><td><strong><em>string<\/em><\/strong> <br \/>Last name of the customer.<\/td><\/tr><tr><td>phone_number<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Customer's telephone number.<\/td><\/tr><tr><td>status<\/td><td><strong><em>string<\/em><\/strong> <br \/>Account status of the customer can be active or deleted. If the account is on deleted status, no transaction is allowed.<\/td><\/tr><tr><td>balance<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Account balance with two decimal digits.<\/td><\/tr><tr><td>clabe<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>CLABE account used to receive funds by transfer from any bank in Mexico.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-direcci-n\">address<\/a><\/td><td><strong><em>object<\/em><\/strong> <br \/>Address of the customer. It is usually used as shipping address.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-store\">store<\/a><\/td><td><strong><em>object<\/em><\/strong> <br \/>Contains reference string to go to Store and make deposits, the url to generate barcode is contained too.<\/td><\/tr><\/tbody><\/table><h2 id=\"crear-un-nuevo-cliente\">Create a new customer<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.create(customerRequest, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var customerRequest = {\n   'name': 'customer name',\n   'email': 'customer_email@me.com',\n   'requires_account': false \n   };\n\nopenpay.customers.create(customerRequest, function(error, customer) {\n  \/\/ ... \n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"anbnldwgni1way3yp2dw\",\n   \"name\":\"customer name\",\n   \"last_name\":null,\n   \"email\":\"customer_email@me.com\",\n   \"phone_number\":null,\n   \"address\":null,\n   \"creation_date\":\"2014-05-20T16:47:47-05:00\",\n   \"external_id\":null,\n   \"store\": {\n       \"reference\": \"OPENPAY02DQ35YOY7\",\n       \"barcode_url\": \"https:\/\/sandbox-api.openpay.mx\/barcode\/OPENPAY02DQ35YOY7?width=1&amp;height=45&amp;text=false\"\n   },\n   \"clabe\": \"646180109400423323\"\n}\n<\/code><\/pre><p>Create a customer object.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>external_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Unique external identifier of the customer assigned for the Merchant.<\/td><\/tr><tr><td>name<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100)<br \/>Customer's name(s).<\/td><\/tr><tr><td>last_name<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100)<br \/>Customer's last name.<\/td><\/tr><tr><td>email<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100)<br \/>Customer's email.<\/td><\/tr><tr><td>requires_account<\/td><td><strong><em>boolean<\/em><\/strong> (opcional, default = false) <br \/>Send it with <strong>true<\/strong> value if you need to create the customer with an account to manage the balance.<\/td><\/tr><tr><td>phone_number<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Customer's telephone number.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-direcci-n\">address<\/a><\/td><td><strong><em>object<\/em><\/strong> (optional) <br \/>Address of the customer. It is usually used as shipping address.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-cliente\">object customer<\/a> when all the data were sent correctly, or returns an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a> if an error occurred during the creation.<\/p><h2 id=\"actualizar-un-cliente\">Update a customer<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.update(customerId, customerRequest, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var customerRequest = {\n    'name': 'customer name',\n    'email': 'customer_email@me.com',\n    'address':{\n      'city':'Queretaro',\n      'state':'Queretaro',\n      'line1':'Calle 10',\n      'postal_code':'76000',\n      'line2':'col. san pablo',\n      'line3':'entre la calle 1 y la 2',\n      'country_code':'MX'\n    }\n};\n\nopenpay.customers.update('anbnldwgni1way3yp2dw', customerRequest, function(error, customer) {\n  \/\/ ... \n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"anbnldwgni1way3yp2dw\",\n   \"name\":\"customer name\",\n   \"last_name\":null,\n   \"email\":\"customer_email@me.com\",\n   \"phone_number\":\"44209087654\",\n   \"address\":{\n      \"line1\":\"Calle 10\",\n      \"line2\":\"col. san pablo\",\n      \"line3\":\"entre la calle 1 y la 2\",\n      \"state\":\"Queretaro\",\n      \"city\":\"Queretaro\",\n      \"postal_code\":\"76000\",\n      \"country_code\":\"MX\"\n   },\n   \"store\": {\n       \"reference\": \"OPENPAY02DQ35YOY7\",\n       \"barcode_url\": \"https:\/\/sandbox-api.openpay.mx\/barcode\/OPENPAY02DQ35YOY7?width=1&amp;height=45&amp;text=false\"\n   },\n   \"clabe\": \"646180109400423323\",\n   \"creation_date\":\"2014-05-20T16:47:47-05:00\",\n   \"external_id\":null\n}\n<\/code><\/pre><p>Updates one or more data of the customer.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>name<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100)<br \/>Customer's name(s).<\/td><\/tr><tr><td>last_name<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Customer's last name.<\/td><\/tr><tr><td>email<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100)<br \/>Customer's email.<\/td><\/tr><tr><td>phone_number<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Customer's telephone number.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-direcci-n\">address<\/a><\/td><td><strong><em>object<\/em><\/strong> <br \/>Address of the customer. It is usually used as shipping address.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-cliente\">object customer<\/a> with the updated info, or returns an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a> if a problem happened while updating.<\/p><h2 id=\"obtener-un-cliente-existente\">Get an existing customer<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.get(customerId, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>openpay.customers.get('a9pvykxz4g5rg0fplze0', function(error, customer) {\n  \/\/ ... \n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"anbnldwgni1way3yp2dw\",\n   \"name\":\"customer name\",\n   \"last_name\":null,\n   \"email\":\"customer_email@me.com\",\n   \"phone_number\":\"44209087654\",\n   \"address\":{\n      \"line1\":\"Calle 10\",\n      \"line2\":\"col. san pablo\",\n      \"line3\":\"entre la calle 1 y la 2\",\n      \"state\":\"Queretaro\",\n      \"city\":\"Queretaro\",\n      \"postal_code\":\"76000\",\n      \"country_code\":\"MX\"\n   },\n   \"store\": {\n       \"reference\": \"OPENPAY02DQ35YOY7\",\n       \"barcode_url\": \"https:\/\/sandbox-api.openpay.mx\/barcode\/OPENPAY02DQ35YOY7?width=1&amp;height=45&amp;text=false\"\n   },\n   \"clabe\": \"646180109400423323\",\n   \"creation_date\":\"2014-05-20T16:47:47-05:00\",\n   \"external_id\":null\n}\n<\/code><\/pre><p>Gets the current information of an existing customer. You only need to specify the id returned when creating the customer.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><em><strong>string<\/strong><\/em> (required, length = 45)<br \/>Unique identifier of the customer.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>If the identifier exists, it returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-cliente\">object customer<\/a> with the customer information.<\/p><h2 id=\"eliminar-un-cliente\">Delete a customer<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.delete(customerId, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>openpay.customers.delete('a9pvykxz4g5rg0fplze0', function(error) {\n  \/\/ ... \n});\n<\/code><\/pre><p>Deletes a customer permanently. All the related subscriptions will be canceled. Openpay keeps the operations records.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><em><strong>string<\/strong><\/em> (required, length = 45)<br \/>Unique identifier of the customer you want to delete.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>If the customer is deleted correctly, it returns an empty response, if the customer can not be deleted it returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error object<\/a> explaining the reason.<\/p><h2 id=\"listado-de-clientes\">List of customers<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.list(callback);\nopenpay.customers.list(searchParams, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var searchParams = {\n  'creation[gte]' : '2013-11-01',\n  'limit' : 2\n};\n\nopenpay.customers.list(searchParams, function(error, list) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>[{\n   \"id\":\"cpjdhf754ythr65yu9k7q\",\n   \"creation_date\":\"2013-11-08T12:04:46-06:00\",\n   \"name\":\"Rodrigo\",\n   \"last_name\":\"Velazco Perez\",\n   \"email\":\"rodrigo.velazco@payments.com\",\n   \"phone_number\":\"4425667045\",\n   \"status\":\"active\",\n   \"balance\":142.5,\n   \"store\": {\n       \"reference\": \"OPENPAY02DQ35YOY7\",\n       \"barcode_url\": \"https:\/\/sandbox-api.openpay.mx\/barcode\/OPENPAY02DQ35YOY7?width=1&amp;height=45&amp;text=false\"\n   },\n   \"clabe\": \"646180109400423323\"\n}, {\n   \"id\":\"cz4nkhrlcu9k7qd4lwqx\",\n   \"creation_date\":\"2013-11-07T14:54:46-06:00\",\n   \"name\":\"Eriberto\",\n   \"last_name\":\"Rodriguez Lopez\",\n   \"email\":\"eriberto.rodriguez@payments.com\",\n   \"phone_number\":\"442\",\n   \"status\":\"active\",\n   \"balance\":103,\n   \"store\": {\n       \"reference\": \"OPENPAY02DQWERWJ3\",\n       \"barcode_url\": \"https:\/\/sandbox-api.openpay.mx\/barcode\/OPENPAY02DQWERWJ3?width=1&amp;height=45&amp;text=false\"\n   },\n   \"clabe\": \"646180109400423323\"\n}]\n<\/code><\/pre><p>Returns a list of registered customers, if you want to delimit the result you may use filters.<\/p><h3 id=\"petici-n\">Request<\/h3><p>You can search using the following parameters as filters.<\/p><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>external_id<\/td><td><em><strong>string<\/strong><\/em> <br \/>Unique customer id generated by the merchant and associated to the customer by the external_id field of the create customer request<\/td><\/tr><tr><td>creation<\/td><td><strong><em>date<\/em><\/strong> <br \/>Same as the customer creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[gte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>After the customer creation date .Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[lte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>Before the customer creation date.Format yyyy-mm-dd<\/td><\/tr><tr><td>offset<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of records to skip at the beginning, default 0.<\/td><\/tr><tr><td>limit<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of required records, default 10.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns an array of <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-cliente\">customer object<\/a>.<\/p><h2 id=\"transferencias\">Wire transfers<\/h2><p>The transfers allow to send funds between accounts of your customers.<\/p><h2 id=\"transferir-entre-clientes\">Transfers between customers<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.transfers.create(customerId, transferRequest, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var transferRequest = {                                          \n  'customer_id' : 'dvocf97jd20es3tw5laz',\n  'amount' : 12.50,          \n  'description' : 'Transferencia entre cuentas',\n  'order_id' : 'oid-1245'\n};\n\nopenpay.customers.transfers.create('ag4nktpdzebjiye1tlze', transferRequest, function(error, transfer) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"amount\":12.50,\n   \"authorization\":null,\n   \"method\":\"customer\",\n   \"operation_type\":\"out\",\n   \"currency\":\"MXN\",\n   \"transaction_type\":\"transfer\",\n   \"status\":\"completed\",\n   \"id\":\"twpmbike2jejex3pahzd\",\n   \"creation_date\":\"2013-11-15T10:33:19-06:00\",\n   \"description\":\"Transferencia entre cuentas\",\n   \"error_message\":null,\n   \"order_id\":\"oid-1245\",\n   \"customer_id\":\"a9pvykxz4g5rg0fplze0\",\n   \"store\": {\n       \"reference\": \"OPENPAY02DQ35YOY7\",\n       \"barcode_url\": \"https:\/\/sandbox-api.openpay.mx\/barcode\/OPENPAY02DQ35YOY7?width=1&amp;height=45&amp;text=false\"\n   },\n   \"clabe\": \"646180109400423323\"\n}\n<\/code><\/pre><p>Makes the transfer of funds from one account of the customer to another. The funds will be charged to an origin account and added to a destination account, which will create two transactions.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>customer_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>The Openpay ID of the customer you want to send the funds.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Amount to transfer. It must be an amount greater than one peso with up to two decimal digits.<\/td><\/tr><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> (required, length = 250) <br \/>A description associated to the transfer.<\/td><\/tr><tr><td>order_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Unique identifier of the transfer. It will be assigned to the withdrawal transaction.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>If the transaction is successful, the response will contain a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a>. This object represents the withdrawal of the account of the current customer. On error, the error object will be returned.<\/p><h2 id=\"obtener-una-transferencia\">Get a transfer<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.transfers.get(customerId, transactionId, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>openpay.customers.transfers.get('ag4nktpdzebjiye1tlze', 'twpmbike2jejex3pahzd', function(error, transfer) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"amount\":12.50,\n   \"authorization\":null,\n   \"method\":\"customer\",\n   \"operation_type\":\"out\",\n   \"currency\":\"MXN\",\n   \"transaction_type\":\"transfer\",\n   \"status\":\"completed\",\n   \"id\":\"twpmbike2jejex3pahzd\",\n   \"creation_date\":\"2013-11-15T10:33:19-06:00\",\n   \"description\":\"Transferencia entre cuentas\",\n   \"error_message\":null,\n   \"order_id\":\"oid-1245\",\n   \"customer_id\":\"dvocf97jd20es3tw5laz\"\n}\n<\/code><\/pre><p>With the customer identifier and the transfer identifier, you can get the details of the transaction. The output transaction will be on the customer from which the transfer was made, and the entry transaction will be on the customer that received the amount.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>customer_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Identifier of the customer.<\/td><\/tr><tr><td>transaction_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Identifier of the transfer.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a><\/p><h2 id=\"listado-de-transferencias\">List of transfers<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.transfers.list(customerId, callback);\nopenpay.customers.transfers.list(customerId, searchParams, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var searchParams = {\n  'limit' : 2\n};\n\nopenpay.customers.transfers.list('ag4nktpdzebjiye1tlze', searchParams, function(error, list) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>[\n   {\n      \"amount\":130.00,\n      \"authorization\":null,\n      \"method\":\"customer\",\n      \"currency\":\"MXN\",\n      \"operation_type\":\"out\",\n      \"transaction_type\":\"transfer\",\n      \"status\":\"completed\",\n      \"id\":\"a74mbe4e2j5gc6gfahzd\",\n      \"creation_date\":\"2013-09-18T00:31:19-06:00\",\n      \"description\":\"Una descripcion\",\n      \"error_message\":null,\n      \"order_id\":\"20131115103317\",\n      \"customer_id\":\"afk4csrazjp1udezj1po\"\n   },\n   {\n      \"amount\":130.00,\n      \"authorization\":null,\n      \"method\":\"customer\",\n      \"currency\":\"MXN\",\n      \"operation_type\":\"in\",\n      \"transaction_type\":\"transfer\",\n      \"status\":\"completed\",\n      \"id\":\"a74mbe4e2j5gc6gfahzd\",\n      \"creation_date\":\"2013-09-18T00:31:19-06:00\",\n      \"description\":\"Una descripcion\",\n      \"error_message\":null,\n      \"order_id\":null,\n      \"customer_id\":\"agdn58ngcnogqmzruz1i\"\n   }\n]\n<\/code><\/pre><p>It allows to consult the entry and output transactions of a customer.<\/p><h3 id=\"petici-n\">Request<\/h3><p>You can search using the following parameters as filters.<\/p><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>creation<\/td><td><strong><em>date<\/em><\/strong> <br \/>Same as creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[gte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>After the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[lte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>Before the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>offset<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of records to skip at the beginning, default 0.<\/td><\/tr><tr><td>limit<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of required records, default 10.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>List of <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction objects<\/a> of the transfers made, each one with the identifier of the customer that made it. The transactions will be listed in descending order by creation date.<\/p><h2 id=\"tarjetas\">Cards<\/h2><p>Within the Openpay platform you can add cards to the customer\u2019s account, delete them, recover some in specific and list them.<\/p><p>You can store multiple debit and \/ or credit cards at Merchant or customer level for making charges later without the need to enter the information again.<\/p><h2 id=\"objeto-tarjeta\">Card Object<\/h2><blockquote><p>Object example<\/p><\/blockquote><pre><code>{\n   \"type\":\"debit\",\n   \"brand\":\"mastercard\",\n   \"address\":{\n      \"line1\":\"Av 5 de Febrero\",\n      \"line2\":\"Roble 207\",\n      \"line3\":\"col carrillo\",\n      \"state\":\"Queretaro\",\n      \"city\":\"Quer\u00e9taro\",\n      \"postal_code\":\"76900\",\n      \"country_code\":\"MX\"\n   },\n   \"id\":\"kgipbqixvjg3gbzowl7l\",\n   \"card_number\":\"1111\",\n   \"holder_name\":\"Juan Perez Ramirez\",\n   \"expiration_year\":\"20\",\n   \"expiration_month\":\"12\",\n   \"allows_charges\":true,\n   \"allows_payouts\":false,\n   \"creation_date\":\"2013-12-12T17:50:00-06:00\",\n   \"bank_name\":\"DESCONOCIDO\",\n   \"bank_code\":\"000\",\n   \"customer_id\":\"a2b79p8xmzeyvmolqfja\",\n   \"points_card\":true\n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Unique identifier of the card.<\/td><\/tr><tr><td>creation_date<\/td><td><strong><em>datetime<\/em><\/strong> <br \/>Date and time when the card was created in ISO 8601 format.<\/td><\/tr><tr><td>holder_name<\/td><td><strong><em>string<\/em><\/strong> <br \/>Name of the cardholder.<\/td><\/tr><tr><td>card_number<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Card Number, it can be 16 or 19 digits.<\/td><\/tr><tr><td>cvv2<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Security code as it appears on the back of the card. Usually 3 digits.<\/td><\/tr><tr><td>expiration_month<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Expiration month as it appears on the card.<\/td><\/tr><tr><td>expiration_year<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Expiration year as it appears on the card.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-direcci-n\">address<\/a><\/td><td><strong><em>object<\/em><\/strong> <br \/>Billing address of cardholder.<\/td><\/tr><tr><td>allows_charges<\/td><td><strong><em>boolean<\/em><\/strong> <br \/>It allows to know if you can make charges to the card.<\/td><\/tr><tr><td>allows_payouts<\/td><td><strong><em>boolean<\/em><\/strong> <br \/>It allows to know if you can send payments to the card.<\/td><\/tr><tr><td>brand<\/td><td><strong><em>string<\/em><\/strong> <br \/>Card brand: visa, mastercard, carnet or american express.<\/td><\/tr><tr><td>type<\/td><td><strong><em>string<\/em><\/strong> <br \/>Card Type: debit, credit, cash, etc.<\/td><\/tr><tr><td>bank_name<\/td><td><strong><em>string<\/em><\/strong> <br \/>Name of the issuing bank.<\/td><\/tr><tr><td>bank_code<\/td><td><strong><em>string<\/em><\/strong> <br \/>Code of the issuing bank.<\/td><\/tr><tr><td>customer_id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Customer identifier to which the card belongs. If the card is at Merchant level this value is null.<\/td><\/tr><tr><td>points_card<\/td><td><strong><em>boolean<\/em><\/strong> <br \/>Indicates whether the card allows the use of reward points.<\/td><\/tr><\/tbody><\/table><h2 id=\"crear-una-tarjeta\">Create a card<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.cards.create(cardRequest, callback);\n\n\/\/ Cliente\nopenpay.customers.cards.create(customerId, cardRequest, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>var cardRequest = {\n   'card_number':'4111111111111111',\n   'holder_name':'Juan Perez Ramirez',\n   'expiration_year':'20',\n   'expiration_month':'12',\n   'cvv2':'110',\n   'device_session_id':'kR1MiQhz2otdIuUlQkbEyitIqVMiI16f'\n};\n\nopenpay.customers.cards.create('a9pvykxz4g5rg0fplze0', cardRequest, function(error, card)  {\n    \/\/ ...    \n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"ktrpvymgatocelsciak7\",\n   \"type\":\"debit\",\n   \"brand\":\"visa\",\n   \"card_number\":\"411111XXXXXX1111\",\n   \"holder_name\":\"Juan Perez Ramirez\",\n   \"expiration_year\":\"20\",\n   \"expiration_month\":\"12\",\n   \"allows_charges\":true,\n   \"allows_payouts\":true,\n   \"creation_date\":\"2014-05-21T17:31:01-05:00\",\n   \"bank_name\":\"Banamex\",\n   \"customer_id\":\"ag4nktpdzebjiye1tlze\",\n   \"bank_code\":\"002\"\n}\n<\/code><\/pre><p>When a card is created the customer must be specified, if the customer is not specified the card will be registered for the Merchant account. Once the card is saved, it can not obtain the number and security code.<\/p><p>When saving a card, an ID will be created which can be used to make card charges, payouts to a card or just for getting the not sensitive card information.<\/p><p>You can use the antifraud system implementation. The <code>device_session_id<\/code> property must be generated using JavaScript API, see <a href=\"https:\/\/github.com\/open-pay\/openpay-js#fraud-detection-using-device-data\">Fraud detection using device data<\/a>.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>holder_name<\/td><td><strong><em>string<\/em><\/strong> (required, length = 80) <br \/>Name of the cardholder.<\/td><\/tr><tr><td>card_number<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Card Number, it can be 16 or 19 digits.<\/td><\/tr><tr><td>cvv2<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Security code as it appears on the back of the card. Usually 3 digits.<\/td><\/tr><tr><td>expiration_month<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Expiration month as it appears on the card.<\/td><\/tr><tr><td>expiration_year<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Expiration year as it appears on the card.<\/td><\/tr><tr><td>device_session_id<\/td><td><strong><em>string<\/em><\/strong> (optional, length = 255) <br \/>Device identifier generated by antifraud tool.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-direcci-n\">address<\/a><\/td><td><strong><em>object<\/em><\/strong> <br \/>Billing address of cardholder.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-tarjeta\">card object<\/a> when it is created correctly or returns an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a> if an error occurred during the creation.<\/p><h2 id=\"crear-una-tarjeta-con-token\">Create a card with token<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.cards.create(cardRequest, callback);\n\n\/\/ Cliente\nopenpay.customers.cards.create(customerId, cardRequest, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>var cardRequest = {\n  'token_id' : 'tokgslwpdcrkhlgxqi9a',\n  'device_session_id' : '8VIoXj0hN5dswYHQ9X1mVCiB72M7FY9o'\n}\n\nopenpay.customers.cards.create('a9pvykxz4g5rg0fplze0', cardRequest, function(error, card)  {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"type\":\"credit\",\n   \"brand\":\"visa\",\n   \"id\":\"kso4st83wxaibffyt6su\",\n   \"card_number\":\"4242\",\n   \"holder_name\":\"Juan Perez Ramirez\",\n   \"expiration_year\":\"15\",\n   \"expiration_month\":\"12\",\n   \"allows_charges\":true,\n   \"allows_payouts\":false,\n   \"creation_date\":\"2014-02-12T10:57:09-06:00\",\n   \"bank_name\":\"BANCOMER\",\n   \"bank_code\":\"012\",\n   \"customer_id\":\"a2b79p8xmzeyvmolqfja\"\n}\n<\/code><\/pre><p>Creates a card from a token obtained from the browser or from the customer\u2019s device. This way prevents the sensitive card information passes through your servers.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>token_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Token identifier generated in the the browser or in the customer\u2019s device.<\/td><\/tr><tr><td>device_session_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 255) <br \/>Identifier of the device generated by the antifraud tool.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-tarjeta\">card object<\/a><\/p><h2 id=\"obtener-una-tarjeta\">Get a card<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.cards.get(cardId, callback);\n\n\/\/ Cliente\nopenpay.customers.cards.get(customerId, cardId, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>openpay.customers.cards.get('a9pvykxz4g5rg0fplze0', 'ktrpvymgatocelsciak7', function(error, card){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"ktrpvymgatocelsciak7\",\n   \"type\":\"debit\",\n   \"brand\":\"visa\",\n   \"card_number\":\"411111XXXXXX1111\",\n   \"holder_name\":\"Juan Perez Ramirez\",\n   \"expiration_year\":\"20\",\n   \"expiration_month\":\"12\",\n   \"allows_charges\":true,\n   \"allows_payouts\":true,\n   \"creation_date\":\"2014-05-21T17:31:01-05:00\",\n   \"bank_name\":\"Banamex\",\n   \"customer_id\":\"ag4nktpdzebjiye1tlze\",\n   \"bank_code\":\"002\"\n}\n<\/code><\/pre><p>It obtains the details of the card by using its id.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Card unique identifier.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-tarjeta\">card object<\/a><\/p><h2 id=\"consulta-de-puntos\">Card points<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.cards.getPoints(cardId, callback);\n\/\/ Cliente\nopenpay.cards.getPoints(customerId, cardId, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>openpay.customers.cards.getPoints('ag4nktpdzebjiye1tlze', 'tnasugabhdgq456wr', function(error, list){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>[\n   {\n      \"points_type\": \"santander\",\n      \"remaining_points\":\"300\",\n      \"remaining_mxn\":\"22.5\"\n   }\n]\n<\/code><\/pre><p>Returns the card point balance. Is applicable only for Santander, Scotiabank and Bancomer points.<\/p><h3 id=\"petici-n\">Request<\/h3><p>You can get the card points of a merchant or customer using the card id.<\/p><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Card unique identifier.<\/td><\/tr><\/tbody><\/table><p>Also you can get the card points of a merchant using the token.<\/p><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Identifier token<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>points_type<\/td><td>Points type accepted by the card (Santander, Scotiabank or Bancomer)<\/td><\/tr><tr><td>remaining_points<\/td><td>Number of remaining points<\/td><\/tr><tr><td>remaining_mxn<\/td><td>Balance remaining points in pesos<\/td><\/tr><\/tbody><\/table><h2 id=\"eliminar-una-tarjeta\">Delete a card<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.cards.delete(cardId, callback);\n\n\/\/ Cliente\nopenpay.customers.cards.delete(customerId, cardId, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>openpay.customers.cards.delete('a9pvykxz4g5rg0fplze0', 'ktrpvymgatocelsciak7', function(error) {\n  \/\/ ...\n});\n<\/code><\/pre><p>Deletes a card of the customer or Merchant. After deleting it won\u2019t be possible to make movements with that card, however, all records of the transactions you have made will be kept and will be available on the dashboard.<\/p><p>To remove it is only necessary to provide the card identifier.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Card unique identifier.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>If the card is removed correctly the answer is empty, if it can not be deleted a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error object<\/a> explaining the reason.<\/p><h2 id=\"listado-de-tarjetas\">List of cards<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ Comercio\nopenpay.cards.list(callback);\nopenpay.cards.list(searchParams, callback);\n\n\/\/ Cliente\nopenpay.cards.list(customerId, callback);\nopenpay.cards.list(customerId, searchParams, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>var searchParams = {\n  'limit' : 2\n};\n\nopenpay.customers.cards.list('ag4nktpdzebjiye1tlze', searchParams, function(error, list){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>[\n   {\n      \"id\":\"kxq1rpdymlcpxekvjsxm\",\n      \"card_number\":\"1118\",\n      \"holder_name\":\"Pedro Paramo\",\n      \"expiration_year\":\"15\",\n      \"expiration_month\":\"12\",\n      \"allows_charges\":true,\n      \"allows_payouts\":true,\n      \"creation_date\":\"2013-11-20T09:22:25-06:00\",\n      \"bank_name\":\"BBVA BANCOMER\",\n      \"bank_code\":\"012\",\n      \"type\":\"debit\",\n      \"brand\":\"mastercard\"\n   },\n   {\n      \"id\":\"kgjy0jiami01kkpdoywr\",\n      \"card_number\":\"1111\",\n      \"holder_name\":\"Pedro Paramo\",\n      \"expiration_year\":\"15\",\n      \"expiration_month\":\"12\",\n      \"allows_charges\":true,\n      \"allows_payouts\":true,\n      \"creation_date\":\"2013-11-19T13:26:12-06:00\",\n      \"bank_name\":\"BBVA BANCOMER\",\n      \"bank_code\":\"012\",\n      \"type\":\"debit\",\n      \"brand\":\"mastercard\"\n   }\n]\n<\/code><\/pre><p>Returns a list of registered Merchant or customer cards, if you want to narrow the result you can use filters.<\/p><h3 id=\"petici-n\">Request<\/h3><p>You can search using the following parameters as filters.<\/p><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>creation<\/td><td><strong><em>date<\/em><\/strong> <br \/>Same as creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[gte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>After the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[lte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>Before the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>offset<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of records to skip at the beginning, default 0.<\/td><\/tr><tr><td>limit<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of required records, default 10.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>List of <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-tarjeta\">card objects<\/a> registered according to the parameters provided, sorted by creation date in descending order.<\/p><h2 id=\"actualizar-tarjeta\">Updating a card<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>Merchant\nPUT https:\/\/sandbox-api.openpay.mx\/v1\/{MERCHANT_ID}\/cards\/{CARD_ID}\n\nCustomer\nPUT https:\/\/sandbox-api.openpay.mx\/v1\/{MERCHANT_ID}\/customers\/{CUSTOMER_ID}\/cards\/{CARD_ID}\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code><\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n}\n<\/code><\/pre><p>Updates the card data from the browser or from the customer\u2019s device. It also allows to send a cvv2 code that will be used in the next transaction done with this card. This prevents sensitive information from passing through your servers.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>holder_name<\/td><td><strong><em>string<\/em><\/strong> (optional) <br \/>Name of the cardholder.<\/td><\/tr><tr><td>cvv2<\/td><td><strong><em>string<\/em><\/strong> (optional) <br \/>Security code as it appears on the back of the card. Usually 3 digits.<\/td><\/tr><tr><td>expiration_month<\/td><td><strong><em>numeric<\/em><\/strong> (optional) <br \/>Expiration month as it appears on the card.<\/td><\/tr><tr><td>expiration_year<\/td><td><strong><em>numeric<\/em><\/strong> (optional) <br \/>Expiration year as it appears on the card.<\/td><\/tr><tr><td>merchant_id<\/td><td><strong><em>string<\/em><\/strong> (conditional) <br \/>Merchant ID to use to validate this card. Required when using a merchant group.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns an empty JSON object. Please consider that this response may be extended in the future.<\/p><h2 id=\"cuentas-bancarias\">Bank Accounts<\/h2><p>You can store multiple bank accounts by Merchant or customer for withdraw funds later.<\/p><h2 id=\"objeto-cuenta-bancaria\">Bank account object<\/h2><blockquote><p>Object example<\/p><\/blockquote><pre><code>{\n   \"id\":\"brppwl9nwmruogk2do0j\",\n   \"clabe\":\"032180000118359719\",\n   \"bank_code\":\"032\",\n   \"bank_name\":\"IXE\",\n   \"alias\":null,\n   \"holder_name\":\"Juan Hern\u00e1ndez S\u00e1nchez\",\n   \"creation_date\":\"2013-11-14T12:29:18-06shell00\"\n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> <br \/>ID of the bank account.<\/td><\/tr><tr><td>holder_name<\/td><td><strong><em>string<\/em><\/strong> <br \/>Holder\u2019s full name.<\/td><\/tr><tr><td>alias<\/td><td><strong><em>string<\/em><\/strong> <br \/>Name by which the bank account is identified.<\/td><\/tr><tr><td>clabe<\/td><td><strong><em>string<\/em><\/strong> <br \/>CLABE number assigned to the account.<\/td><\/tr><tr><td>bank_name<\/td><td><strong><em>string<\/em><\/strong> <br \/>Abbreviated name of the bank where the account resides, based on the following catalog of <a href=\"http:\/\/es.wikipedia.org\/wiki\/CLABE#C.C3.B3digo_de_Banco\">Bank codes<\/a>.<\/td><\/tr><tr><td>bank_code<\/td><td><strong><em>string<\/em><\/strong> <br \/>Bank code where the account resides, based on the following catalog <a href=\"http:\/\/es.wikipedia.org\/wiki\/CLABE#C.C3.B3digo_de_Banco\">Bank codes<\/a>.<\/td><\/tr><tr><td>creation_date\u00a0<\/td><td><strong><em>datetime<\/em><\/strong> <br \/>Date and time when the bank account was created in ISO 8601 format.<\/td><\/tr><\/tbody><\/table><h2 id=\"crear-una-cuenta-bancaria\">Create a bank account<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.bankaccounts.create(customerId, bankaccountRequest, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>var bankaccountRequest = {\n  'clabe' : '032180000118359719',\n  'alias' : 'Cuenta principal',\n  'holder_name' : 'Juan Hern\u00e1ndez S\u00e1nchez'\n};\n\nopenpay.customers.bankaccounts.create('a9pvykxz4g5rg0fplze0', bankaccountRequest, function(error, bankaccount) {\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"buyj4apkwilpp2jfxr9r\",\n   \"clabe\":\"032XXXXXXXXXX59719\",\n   \"bank_code\":\"032\",\n   \"bank_name\":\"IXE\",\n   \"alias\":\"Cuenta principal\",\n   \"holder_name\":\"Juan Hern\u00e1ndez S\u00e1nchez\",\n   \"creation_date\":\"2014-05-22T11:02:10-05:00\"\n}\n<\/code><\/pre><p>Creates and assigns a bank account to a specific customer.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>holder_name<\/td><td><strong><em>string<\/em><\/strong> (required, length = 80) <br \/>Holder\u2019s full name.<\/td><\/tr><tr><td>alias<\/td><td><strong><em>string<\/em><\/strong> (optional, length = 45)<br \/>Name by which the bank account is identified.<\/td><\/tr><tr><td>clabe<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>CLABE number assigned to the account.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-cuenta-bancaria\">bank account object<\/a> or an error when a there is a problem.<\/p><h2 id=\"obtener-una-cuenta-bancaria\">Get a bank account<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.bankaccounts.get(customerId, bankaccountId, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>openpay.customers.bankaccounts.get('a9pvykxz4g5rg0fplze0', 'buyj4apkwilpp2jfxr9r', function(error, bankaccount){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"buyj4apkwilpp2jfxr9r\",\n   \"clabe\":\"032XXXXXXXXXX59719\",\n   \"bank_code\":\"032\",\n   \"bank_name\":\"IXE\",\n   \"alias\":\"Cuenta principal\",\n   \"holder_name\":\"Juan Hern\u00e1ndez S\u00e1nchez\",\n   \"creation_date\":\"2014-05-22T11:02:10-05:00\"\n}\n<\/code><\/pre><p>It obtains the details of the bank account assigned to a customer.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Unique identifier of the bank account.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-cuenta-bancaria\">bank account object<\/a><\/p><h2 id=\"eliminar-una-cuenta-bancaria\">Delete a bank account<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.bankaccounts.delete(customerId,bankaccountId, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>openpay.customers.bankaccounts.delete('a9pvykxz4g5rg0fplze0','buyj4apkwilpp2jfxr9r', function(error){\n  \/\/ ...\n});\n<\/code><\/pre><p>Deletes the bank account associated with the customer. The transactions that are associated with this account are unchanged and will continue for you to consult them.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Unique identifier of the bank account.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>If the bank account is removed correctly the answer is empty, if it can not be deleted a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error object<\/a> explaining the reason.<\/p><h2 id=\"listado-de-cuentas-bancarias\">List of bank accounts<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.bankaccounts.list(customerId, callback);\nopenpay.customers.bankaccounts.list(customerId, searchParams, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>var searchParams = {\n  'limit' : 2\n};\n\nopenpay.customers.bankaccounts.list('ag4nktpdzebjiye1tlze', searchParams, function(error, list){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>[{\n   \"id\":\"brppwl9nwmruogk2do0j\",\n   \"clabe\":\"032180000118359719\",\n   \"bank_code\":\"032\",\n   \"bank_name\":\"IXE\",\n   \"alias\":null,\n   \"holder_name\":\"Juan Hern\u00e1ndez S\u00e1nchez\",\n   \"creation_date\":\"2013-11-14T12:29:18-06:00\"\n},\n{\n   \"id\":\"bb0zt72rxoyiwz9jzzai\",\n   \"clabe\":\"012680012426485980\",\n   \"bank_code\":\"012\",\n   \"bank_name\":\"BANCOMER\",\n   \"alias\":null,\n   \"holder_name\":\"Juan Hern\u00e1ndez S\u00e1nchez\",\n   \"creation_date\":\"2013-11-14T18:07:45-06:00\"\n}]\n<\/code><\/pre><p>Returns the details of all the bank accounts of the customer specified on the request.<\/p><h3 id=\"petici-n\">Request<\/h3><p>You can search using the following parameters as filters.<\/p><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>creation<\/td><td><strong><em>date<\/em><\/strong> <br \/>Same as creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[gte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>After the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[lte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>Before the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>offset<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of records to skip at the beginning, default 0.<\/td><\/tr><tr><td>limit<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of required records, default 10.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>List of <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-cuenta-bancaria\">objetos cuenta bancaria<\/a> registered according to the parameters provided, sorted by creation date in descending order.<\/p><h2 id=\"planes\">Plans<\/h2><p>Plans are an Openpay resource that allows create templates for subscriptions. Using plans you can define the amount and frequency of recurrent charges.<\/p><h2 id=\"objeto-plan\">Plan Object<\/h2><blockquote><p>Object example<\/p><\/blockquote><pre><code>{\n    \"name\": \"Curso de ingles\",\n    \"status\": \"active\",\n    \"amount\": 150,\n    \"currency\": \"MXN\",\n    \"id\": \"patpflacwilazguj6bem\",\n    \"creation_date\": \"2013-12-13T09:43:52-06:00\",\n    \"repeat_every\": 1,\n    \"repeat_unit\": \"month\",\n    \"retry_times\": 2,\n    \"status_after_retry\": \"cancelled\",\n    \"trial_days\": 30\n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Unique plan identifier.<\/td><\/tr><tr><td>creation_date<\/td><td><strong><em>datetime<\/em><\/strong> <br \/>Date and time in which the plan was created in ISO 8601 format.<\/td><\/tr><tr><td>name<\/td><td><strong><em>string<\/em><\/strong> <br \/>Plan name.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Amount that will be applied once the subscription is charged. It has to be more than zero and it can have up to two decimal places.<\/td><\/tr><tr><td>currency<\/td><td><strong><em>string<\/em><\/strong> <br \/>Currency used in the operation, by default is MXN (Mexican pesos).<\/td><\/tr><tr><td>repeat_every<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Time units in which the subscription will be charged. For example, repeat_unit=month and repeat_every=2 indicates that it will be charged every 2 months.<\/td><\/tr><tr><td>repeat_unit<\/td><td><strong><em>string<\/em><\/strong> <br \/>Describes the charge unit frequency. It can be weekly(week), monthly(month) or yearly (year).<\/td><\/tr><tr><td>retry_times<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of attempts to try to charge the subscription. When the attempts have been exhausted, the status field is determined by the field status_after_retry.<\/td><\/tr><tr><td>status<\/td><td><strong><em>string<\/em><\/strong> <br \/>Plan status can be active or deleted. If the plan is in deleted state it doesn\u2019t allow to register new subscriptions under this plan but existing subscriptions will be charged.<\/td><\/tr><tr><td>status_after_retry<\/td><td><strong><em>string<\/em><\/strong> <br \/>This field indicates the status in which the subscription will be set once all the charge attempts have been exhausted. It can be unpaid or cancelled.<\/td><\/tr><tr><td>trial_days<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of trial days this subscription will have by default.<\/td><\/tr><\/tbody><\/table><h2 id=\"crear-un-nuevo-plan\">Create a new Plan<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.plans.create(planRequest, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var planRequest = {\n  'amount': 150.00,\n  'status_after_retry': 'cancelled',\n  'retry_times': 2,\n  'name': 'Curso de ingles',\n  'repeat_unit': 'month',\n  'trial_days': '30',\n  'repeat_every': '1'\n};\n\nopenpay.plans.create(planRequest, function(error, plan){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"p8e6x3hafqqsbmnoevrt\",\n   \"name\":\"Curso de ingles\",\n   \"status\":\"active\",\n   \"amount\":150.00,\n   \"currency\":\"MXN\",\n   \"creation_date\":\"2014-05-22T12:29:31-05:00\",\n   \"repeat_every\":1,\n   \"repeat_unit\":\"month\",\n   \"retry_times\":2,\n   \"status_after_retry\":\"cancelled\",\n   \"trial_days\":30\n}\n<\/code><\/pre><p>Creates a new plan for allowing customers to subscribe.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>name<\/td><td><strong><em>string<\/em><\/strong> (required, length = 255) <br \/>Plan name.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Amount that will be applied once the subscription is charged. It has to be more than zero and it can have up to two decimal places.<\/td><\/tr><tr><td>repeat_every<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Time units in which the subscription will be charged. For example, repeat_unit=month and repeat_every=2 indicates that it will be charged every 2 months.<\/td><\/tr><tr><td>repeat_unit<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Describes the charge unit frequency. It can be weekly(week), monthly(month) or yearly (year).<\/td><\/tr><tr><td>retry_times<\/td><td><strong><em>numeric<\/em><\/strong> (optional) <br \/>Number of attempts to try to charge the subscription. When the attempts have been exhausted, the status field is determined by the field status_after_retry.<\/td><\/tr><tr><td>status_after_retry<\/td><td><strong><em>string<\/em><\/strong> (requerido, valores = \u201cUNPAID\/CANCELLED\u201d) <br \/>This field indicates the status in which the subscription will be set once all the charge attempts have been exhausted. It can be unpaid or cancelled.<\/td><\/tr><tr><td>trial_days<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Number of trial days this subscription will have by default.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-plan\">plan object<\/a> or an error when a there is a problem.<\/p><h2 id=\"actualizar-un-plan-existente\">Update existing plans.<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.plans.update(planId, planRequest, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var planRequest = {\n  'name': 'Curso de aleman',\n  'trial_days': 60\n};\n\nopenpay.plans.update(planId, planRequest, function(error, plan){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"p8e6x3hafqqsbmnoevrt\",\n   \"name\":\"Curso de aleman\",\n   \"status\":\"active\",\n   \"amount\":150.00,\n   \"currency\":\"MXN\",\n   \"creation_date\":\"2014-05-22T12:29:31-05:00\",\n   \"repeat_every\":1,\n   \"repeat_unit\":\"month\",\n   \"retry_times\":2,\n   \"status_after_retry\":\"cancelled\",\n   \"trial_days\":60\n}\n<\/code><\/pre><p>Updates the plan information. It requires a plan id and only certain fields can be updated.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>name<\/td><td><strong><em>string<\/em><\/strong> (optional, length = 80) <br \/>Plan name.<\/td><\/tr><tr><td>trial_days<\/td><td><strong><em>numeric<\/em><\/strong> (optional) <br \/>Number of trial days this subscription will have by default.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-plan\">plan object<\/a> with the updated information or an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a> if a problem happened while updating.<\/p><h2 id=\"obtener-un-plan\">Get a plan<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.plans.get(planId, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>openpay.plans.get('p8e6x3hafqqsbmnoevrt', function(error, plan){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"p8e6x3hafqqsbmnoevrt\",\n   \"name\":\"Curso de aleman\",\n   \"status\":\"active\",\n   \"amount\":150.00,\n   \"currency\":\"MXN\",\n   \"creation_date\":\"2014-05-22T12:29:31-05:00\",\n   \"repeat_every\":1,\n   \"repeat_unit\":\"month\",\n   \"retry_times\":2,\n   \"status_after_retry\":\"cancelled\",\n   \"trial_days\":60\n}\n<\/code><\/pre><p>It gets the plan details.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Plan identifier.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-plan\">plan object<\/a><\/p><h2 id=\"eliminar-un-plan\">Delete a plan<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.plans.delete(planId, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>openpay.plans.delete('p8e6x3hafqqsbmnoevrt', function(error){\n  \/\/ ...\n});\n<\/code><\/pre><p>When a plan is deleted it won\u2019t allow to create more subscriptions associated with it, however the subscriptions already associated will continue to be charged.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Identifier of the plan that will be deleted.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>If the plan is deleted correctly the response will be empty, if it cannot be deleted an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error object<\/a> explaining the reason.<\/p><h2 id=\"listado-de-planes\">Plan list<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.plans.list(callback);\nopenpay.plans.list(searchParams, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var searchParams = {\n  'limit' : 10\n};\n\nopenpay.plans.list(searchParams, function(error, list){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>[\n    {\n        \"name\": \"Curso de aleman\",\n        \"status\": \"active\",\n        \"amount\": 150,\n        \"currency\": \"MXN\",\n        \"id\": \"patpflacwilazguj6bem\",\n        \"creation_date\": \"2013-12-13T09:43:52-06:00\",\n        \"repeat_every\": 1,\n        \"repeat_unit\": \"month\",\n        \"retry_times\": 2,\n        \"status_after_retry\": \"cancelled\",\n        \"trial_days\": 60\n    },\n    {\n        \"name\": \"Curso de ingles\",\n        \"status\": \"active\",\n        \"amount\": 150,\n        \"currency\": \"MXN\",\n        \"id\": \"pjl7wfryrrd1tznr0fnl\",\n        \"creation_date\": \"2013-12-13T11:36:40-06:00\",\n        \"repeat_every\": 1,\n        \"repeat_unit\": \"month\",\n        \"retry_times\": 2,\n        \"status_after_retry\": \"cancelled\",\n        \"trial_days\": 30\n    }\n]\n<\/code><\/pre><p>Returns the details of all active plans.<\/p><h3 id=\"petici-n\">Request<\/h3><p>You can search using the following parameters:<\/p><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>creation<\/td><td><strong><em>date<\/em><\/strong> <br \/>Same as creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[gte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>After the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[lte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>Before the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>offset<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of records to skip at the beginning, default 0.<\/td><\/tr><tr><td>limit<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of required records, default 10.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>List of <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-plan\">plan objects<\/a> registered according to the parameters provided, sorted by creation date in descending order.<\/p><h2 id=\"suscripciones\">Subscriptions<\/h2><p>Subscriptions allow you to associate a customer and a card so that recurring charges can be made.<\/p><p>In order to subscribe a client it is necessary to first <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#crear-una-nuevo-plan\">create a plan<\/a>.<\/p><h2 id=\"objeto-suscripci-n\">Subscription object<\/h2><blockquote><p>Object example<\/p><\/blockquote><pre><code>{\n    \"status\": \"trial\",\n    \"card\": {\n        \"type\": \"debit\",\n        \"brand\": \"mastercard\",\n        \"card_number\": \"1111\",\n        \"holder_name\": \"Juan Perez Ramirez\",\n        \"expiration_year\": \"20\",\n        \"expiration_month\": \"12\",\n        \"allows_charges\": true,\n        \"allows_payouts\": false,\n        \"creation_date\": \"2013-12-13T12:39:46-06:00\",\n        \"bank_name\": \"DESCONOCIDO\",\n        \"customer_id\": null,\n        \"bank_code\": \"000\"\n    },\n    \"id\": \"svxdm1suclzipbi4pavm\",\n    \"cancel_at_period_end\": false,\n    \"charge_date\": \"2014-01-12\",\n    \"creation_date\": \"2013-12-13T12:39:46-06:00\",\n    \"current_period_number\": 0,\n    \"period_end_date\": \"2014-01-11\",\n    \"trial_end_date\": \"2014-01-11\",\n    \"plan_id\": \"pjl7wfryrrd1tznr0fnl\",\n    \"customer_id\": \"a2b79p8xmzeyvmolqfja\"\n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Unique plan identifier.<\/td><\/tr><tr><td>creation_date<\/td><td><strong><em>datetime<\/em><\/strong> <br \/>Date and time in which the subscription was created using ISO 8601 format.<\/td><\/tr><tr><td>cancel_at_period_end<\/td><td><strong><em>string<\/em><\/strong> <br \/>Indicates if the subscription has been canceled at the end of the period.<\/td><\/tr><tr><td>charge_date<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Date in which the subscription will be charged.<\/td><\/tr><tr><td>current_period_number<\/td><td><strong><em>string<\/em><\/strong> <br \/>Indicates the current period to be charged.<\/td><\/tr><tr><td>period_end_date<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Date in which the current period ends, it\u2019s one day before the next charge.<\/td><\/tr><tr><td>trial_end_date<\/td><td><strong><em>string<\/em><\/strong> <br \/>Date in which the trial period ends. One day after this date the first charge is applied.<\/td><\/tr><tr><td>plan_id<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Plan identifier in which this subscription will be created.<\/td><\/tr><tr><td>status<\/td><td><strong><em>string<\/em><\/strong> <br \/>Subscription status, it can be active, trial, past_due, unpaid or cancelled. If the subscription has a trial period, the trial period is applied, if it doesn\u2019t have or when the trial period ends and the first payment is executed it changes to active. When the charge was unable to be completed it changes to past_due. When all the charge tries has been completed according to the plan configuration it can change to unpaid or cancelled. When it\u2019s marked as unpaid and the subscription wants to be reactivated it\u2019s required to update the subscription payment method(card). In any other case, the status is set to cancelled.<\/td><\/tr><tr><td>customer_id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Customer identifier for the subscription owner.<\/td><\/tr><tr><td>card<\/td><td><strong><em>object<\/em><\/strong> <br \/>Payment method for the subscription. See <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-tarjeta\">card object<\/a><\/td><\/tr><\/tbody><\/table><h2 id=\"crear-una-nueva-suscripci-n\">Create a new Subscription<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.subscriptions.create(customerId, subscriptionRequest, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var subscriptionRequest = {\n   'card':{\n      'card_number':'4111111111111111',\n      'holder_name':'Juan Perez Ramirez',\n      'expiration_year':'20',\n      'expiration_month':'12',\n      'cvv2':'110',\n      'device_session_id':'kR1MiQhz2otdIuUlQkbEyitIqVMiI16f'\n   },\n   'plan_id':'pbi4kb8hpb64x0uud2eb'\n};\n\nopenpay.customers.subscriptions.create(customerId, subscriptionRequest, function(error, subscription){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"s0gmyor4yqtyv1miqwr0\",\n   \"status\":\"trial\",\n   \"card\":{\n      \"type\":\"debit\",\n      \"brand\":\"visa\",\n      \"address\":null,\n      \"card_number\":\"411111XXXXXX1111\",\n      \"holder_name\":\"Juan Perez Ramirez\",\n      \"expiration_year\":\"20\",\n      \"expiration_month\":\"12\",\n      \"allows_charges\":true,\n      \"allows_payouts\":true,\n      \"bank_name\":\"Banamex\",\n      \"bank_code\":\"002\"\n   },\n   \"cancel_at_period_end\":false,\n   \"charge_date\":\"2014-06-21\",\n   \"creation_date\":\"2014-05-22T15:56:18-05:00\",\n   \"current_period_number\":0,\n   \"period_end_date\":\"2014-06-20\",\n   \"trial_end_date\":\"2014-06-20\",\n   \"plan_id\":\"pbi4kb8hpb64x0uud2eb\",\n   \"customer_id\":\"ag4nktpdzebjiye1tlze\"\n}\n<\/code><\/pre><p>Create a new subscription for an existing customer. You can use an existing card or you can send the info of the card where the charges will be made, in these you can include the property <code>device_session_id<\/code> to use the antifraud tool, see <a href=\"https:\/\/github.com\/open-pay\/openpay-js#fraud-detection-using-device-data\">Fraud detection using device data<\/a>.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>plan_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Plan identifier in which this subscription will be created.<\/td><\/tr><tr><td>trial_end_date<\/td><td><strong><em>string<\/em><\/strong> (optional, length = 10) <br \/>Indicates the customer trial end date. If it\u2019s not indicated the plan will be used to calculate it. If the date is in the past it will be interpreted as a subscription with no trial. Format: yyyy-mm-dd.<\/td><\/tr><tr><td>source_id<\/td><td><strong><em>string<\/em><\/strong> (required if the card is not sent, length = 45) <br \/>Card token identifier, or the customer registered card which will be used to charge the subscription.<\/td><\/tr><tr><td>card\u00a0<\/td><td><strong><em>object<\/em><\/strong> (required if the source_id is not present) <br \/>Payment method for the subscription. See <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-tarjeta\">card object<\/a><\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns the created <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-suscripci\u00f3n\">subscription object<\/a> or an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a> if an error occurred during the creation.<\/p><h2 id=\"actualizar-una-suscripci-n\">Updating a Subscription<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.subscriptions.update(customerId, subscriptionId, subscriptionRequest, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var subscriptionRequest = {\n'trial_end_date': '2016-01-11',\n  'card': {\n    'card_number': '343434343434343',\n    'holder_name': 'Juan Perez Ramirez',\n    'expiration_year': '20',\n    'expiration_month': '12',\n    'cvv2':'1234'\n  }\n};\n\nopenpay.customers.subscriptions.update('ag4nktpdzebjiye1tlze', 's0gmyor4yqtyv1miqwr0', subscriptionRequest, \n    function(error, subscription){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"s0gmyor4yqtyv1miqwr0\",\n   \"status\":\"trial\",\n   \"card\":{\n      \"type\":\"credit\",\n      \"brand\":\"american_express\",\n      \"address\":null,\n      \"card_number\":\"343434XXXXX4343\",\n      \"holder_name\":\"Juan Perez Ramirez\",\n      \"expiration_year\":\"20\",\n      \"expiration_month\":\"12\",\n      \"allows_charges\":true,\n      \"allows_payouts\":false,\n      \"bank_name\":\"AMERICAN EXPRESS\",\n      \"bank_code\":\"103\"\n   },\n   \"cancel_at_period_end\":false,\n   \"charge_date\":\"2016-01-12\",\n   \"creation_date\":\"2014-05-22T15:56:18-05:00\",\n   \"current_period_number\":0,\n   \"period_end_date\":\"2016-01-11\",\n   \"trial_end_date\":\"2016-01-11\",\n   \"plan_id\":\"pbi4kb8hpb64x0uud2eb\",\n   \"customer_id\":\"ag4nktpdzebjiye1tlze\"\n}\n<\/code><\/pre><p>Updates the information of an active subscription.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>cancel_at_period_end<\/td><td><strong><em>booelan<\/em><\/strong> (optional) <br \/>Indicates if the subscription has been canceled at the end of the period.<\/td><\/tr><tr><td>trial_end_date<\/td><td><strong><em>string<\/em><\/strong> (optional, length = 10) <br \/>Indicates the customer trial end date. If it\u2019s not indicated the plan will be used to calculate it. If the date is in the past it will be interpreted as a subscription with no trial. Format: yyyy-mm-dd.<\/td><\/tr><tr><td>source_id<\/td><td><strong><em>string<\/em><\/strong> (optional, length = 45) <br \/>Card token identifier, or the customer registered card which will be used to charge the subscription.<\/td><\/tr><tr><td>card\u00a0<\/td><td><strong><em>object<\/em><\/strong> (optional) <br \/>Payment method for the subscription. See <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-tarjeta\">card object<\/a><\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns the created <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-suscripci\u00f3n\">subscription object<\/a> actualizado o una <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a> if a problem happened while updating.<\/p><h2 id=\"obtener-un-suscripci-n\">Get a Subscription<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.subscriptions.get(customerId, subscriptionId, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>openpay.customers.subscriptions.get('ag4nktpdzebjiye1tlze', 's0gmyor4yqtyv1miqwr0', function(error, subscription){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"s0gmyor4yqtyv1miqwr0\",\n   \"status\":\"trial\",\n   \"card\":{\n      \"type\":\"credit\",\n      \"brand\":\"american_express\",\n      \"address\":null,\n      \"card_number\":\"343434XXXXX4343\",\n      \"holder_name\":\"Juan Perez Ramirez\",\n      \"expiration_year\":\"20\",\n      \"expiration_month\":\"12\",\n      \"allows_charges\":true,\n      \"allows_payouts\":false,\n      \"bank_name\":\"AMERICAN EXPRESS\",\n      \"bank_code\":\"103\"\n   },\n   \"cancel_at_period_end\":false,\n   \"charge_date\":\"2016-01-12\",\n   \"creation_date\":\"2014-05-22T15:56:18-05:00\",\n   \"current_period_number\":0,\n   \"period_end_date\":\"2016-01-11\",\n   \"trial_end_date\":\"2016-01-11\",\n   \"plan_id\":\"pbi4kb8hpb64x0uud2eb\",\n   \"customer_id\":\"ag4nktpdzebjiye1tlze\"\n}\n<\/code><\/pre><p>Gets the details of a customer subscription.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Subscription identifier.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-suscripci\u00f3n\">subscription object<\/a><\/p><h2 id=\"cancelar-suscripci-n\">Cancel a Subscription<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.subscriptions.delete(customerId, subscriptionId, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>openpay.customers.subscriptions.delete('ag4nktpdzebjiye1tlze', 's0gmyor4yqtyv1miqwr0', function(error){\n  \/\/ ...\n});\n<\/code><\/pre><p>Immediately cancels a customer subscription. No more charges will be made to the card and all pending charges will be cancelled.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Identifier of the plan that will be deleted.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>If the response was successfully cancelled the response will be empty. Otherwise an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error object<\/a> explaining the reason.<\/p><h2 id=\"listado-de-suscripciones\">Subscription list<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.customers.subscriptions.list(customerId, callback);\nopenpay.customers.subscriptions.list(customerId, searchParams, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var searchParams = {\n  'limit' : 2\n};\n\nopenpay.customers.subscriptions.list('ag4nktpdzebjiye1tlze', searchParams, function(error, list){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>[\n   {\n      \"id\":\"s0gmyor4yqtyv1miqwr0\",\n      \"status\":\"trial\",\n      \"card\":{\n         \"type\":\"credit\",\n         \"brand\":\"american_express\",\n         \"address\":null,\n         \"card_number\":\"343434XXXXX4343\",\n         \"holder_name\":\"Juan Perez Ramirez\",\n         \"expiration_year\":\"20\",\n         \"expiration_month\":\"12\",\n         \"allows_charges\":true,\n         \"allows_payouts\":false,\n         \"bank_name\":\"AMERICAN EXPRESS\",\n         \"bank_code\":\"103\"\n      },\n      \"cancel_at_period_end\":false,\n      \"charge_date\":\"2016-01-12\",\n      \"creation_date\":\"2014-05-22T15:56:18-05:00\",\n      \"current_period_number\":0,\n      \"period_end_date\":\"2016-01-11\",\n      \"trial_end_date\":\"2016-01-11\",\n      \"plan_id\":\"pbi4kb8hpb64x0uud2eb\",\n      \"customer_id\":\"ag4nktpdzebjiye1tlze\"\n   }\n]\n<\/code><\/pre><p>Returns all the subscriptions active for an specific customer.<\/p><h3 id=\"petici-n\">Request<\/h3><p>You can search using the following parameters:<\/p><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>creation<\/td><td><strong><em>date<\/em><\/strong> <br \/>Same as creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[gte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>After the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[lte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>Before the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>offset<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of records to skip at the beginning, default 0.<\/td><\/tr><tr><td>limit<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of required records, default 10.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>List of <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-suscripci\u00f3n\">subscription objects<\/a> for a customer. Sort by creation date in descending order.<\/p><h2 id=\"comisiones\">Fees<\/h2><p>If the customer accounts were created to handle their own balance, a fee can be charged which will be shown in the Merchant account.<\/p><h2 id=\"cobrar-comisi-n\">Charging a Fee<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.fees.create(feeRequest, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var feeRequest = {                                            \n     'customer_id' : 'dvocf97jd20es3tw5laz',\n     'amount' : 12.50,          \n     'description' : 'Cobro de Comisi\u00f3n',\n     'order_id' : 'oid-1245'\n};\n\nopenpay.fees.create(feeRequest, function(error, fee){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"amount\":12.50,\n   \"authorization\":null,\n   \"method\":\"customer\",\n   \"operation_type\":\"out\",\n   \"currency\":\"MXN\",\n   \"transaction_type\":\"fee\",\n   \"status\":\"completed\",\n   \"id\":\"th8tafyrkakdbyry3kxi\",\n   \"creation_date\":\"2013-11-18T10:33:03-06:00\",\n   \"description\":\"Cobro de comisi\u00f3n\",\n   \"error_message\":null,\n   \"order_id\":\"oid-1245\",\n   \"customer_id\":\"dvocf97jd20es3tw5laz\"\n}\n<\/code><\/pre><p>Charge a fee to the customer account.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>customer_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>The unique identifier of the customer that you want to charge the fee.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Amount of charge. Must be an amount greater than zero, with up to two decimal digits.<\/td><\/tr><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> (required, length = 250) <br \/>A description associated with the fee charge.<\/td><\/tr><tr><td>order_id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 100) <br \/>Unique fee identifier. It has to be unique among all the transactions.<\/td><\/tr><\/tbody><\/table><h3 id=\"regresa\">Response<\/h3><p>The <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> of the fee including the creation date and id or an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"devolver-comisi-n\">Refund Fee<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.fees.refund(transactionId, feeRequest, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var refundRequest = {                                            \n     'description' : 'Devoluci\u00f3n de Comisi\u00f3n'\n};\n\nopenpay.fees.refund(\"trzjaozcik8msyqshka4\", refundRequest, function(error, refund){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n  \"id\": \"th8tafyrkakdbyry3kxi\",\n  \"authorization\": null,\n  \"method\": \"customer\",\n  \"operation_type\": \"in\",\n  \"transaction_type\": \"refund\",\n  \"status\": \"completed\",\n  \"conciliated\": true,\n  \"creation_date\": \"2016-09-06T11:56:57-05:00\",\n  \"operation_date\": \"2016-09-06T11:56:57-05:00\",\n  \"description\": \"devoluci\u00f3n de comisi\u00f3n merchant03\",\n  \"error_message\": null,\n  \"order_id\": null,\n  \"customer_id\": \"ar2btmquidjhykdaztp6\",\n  \"amount\": 11.11,\n  \"currency\": \"MXN\"\n}\n<\/code><\/pre><p>Refund a fee to the customer account.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> (optional, length = 250) <br \/>A description associated with the fee charge.<\/td><\/tr><\/tbody><\/table><h3 id=\"regresa\">Response<\/h3><p>The <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction object<\/a> of the refund including the creation date and id or an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a>.<\/p><h2 id=\"listado-de-comisiones\">Fee list<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.fees.list(callback);\nopenpay.fees.list(searchParams, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var searchParams = {\n  'limit' : 10\n};\n\nopenpay.fees.list(searchParams, function(error, list){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>[\n   {\n      \"amount\":30.00,\n      \"authorization\":null,\n      \"method\":\"customer\",\n      \"operation_type\":\"out\",\n      \"currency\":\"MXN\",\n      \"transaction_type\":\"fee\",\n      \"status\":\"completed\",\n      \"id\":\"th8tafyrkakdbyry3kxi\",\n      \"creation_date\":\"2013-11-18T10:33:03-06:00\",\n      \"description\":\"Cobro de comisi\u00f3n\",\n      \"error_message\":null,\n      \"order_id\":\"oid-1367\",\n      \"customer_id\":\"dvocf97jd20es3tw5laz\"\n   },\n   {\n      \"amount\":12.00,\n      \"authorization\":null,\n      \"method\":\"customer\",\n      \"operation_type\":\"out\",\n      \"currency\":\"MXN\",\n      \"transaction_type\":\"fee\",\n      \"status\":\"completed\",\n      \"id\":\"tdzottaaohuhosf4cdv9\",\n      \"creation_date\":\"2013-11-17T05:35:00-06:00\",\n      \"description\":\"Cobro de comisi\u00f3n\",\n      \"error_message\":null,\n      \"order_id\":\"oid-1366\",\n      \"customer_id\":\"afk4csrazjp1udezj1po\"\n   }\n]\n<\/code><\/pre><p>Returns the details of every fee charged by the Merchant.<\/p><h3 id=\"petici-n\">Request<\/h3><p>It can be done using the following parameters:<\/p><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>creation<\/td><td><strong><em>date<\/em><\/strong> <br \/>Same as creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[gte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>After the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>creation[lte]<\/td><td><strong><em>date<\/em><\/strong> <br \/>Before the creation date. Format yyyy-mm-dd<\/td><\/tr><tr><td>offset<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of records to skip at the beginning, default 0.<\/td><\/tr><tr><td>limit<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Number of required records, default 10.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns an array of <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-transacci-n\">transaction objects<\/a> for the charged fees in descending order, each one with the identifier of the customer to whom it was made.<\/p><h2 id=\"webhooks\">Webhooks<\/h2><p>Weebhooks allow to notify a Merchant party when an event has occurred in the platform, so the Merchant can take the corresponding actions.<\/p><h2 id=\"objeto-webhook\">Webhook Object<\/h2><blockquote><p>Object example<\/p><\/blockquote><pre><code>  {\n    \"id\" : \"wxvanstudf4ssme8khmc\",\n    \"url\" : \"http:\/\/requestb.in\/11vxrsf1\",\n    \"user\" : \"juanito\",\n    \"password\" : \"passjuanito\",\n    \"event_types\" : [\n      \"charge.refunded\",\n      \"charge.failed\",\n      \"charge.cancelled\",\n      \"charge.created\",\n      \"chargeback.accepted\"\n    ],\n    \"status\":\"verified\"\n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Unique webhook identifier number.<\/td><\/tr><tr><td>url<\/td><td><strong><em>string<\/em><\/strong> <br \/>Webhook<\/td><\/tr><tr><td>user<\/td><td><strong><em>string<\/em><\/strong> <br \/>User name used for webhook\u2019s basic authentication.<\/td><\/tr><tr><td>password<\/td><td><strong><em>string<\/em><\/strong> <br \/>Password for webhook\u2019s basic authentication.<\/td><\/tr><tr><td>event_types<\/td><td><strong><em>array[string]<\/em><\/strong> <br \/>List of events where the webhook will be triggered.<\/td><\/tr><tr><td>status<\/td><td><strong><em>string<\/em><\/strong> <br \/>Webhook status, it indicates if it\u2019s verified or not (unverified).<\/td><\/tr><\/tbody><\/table><table><thead><tr><th>Event<\/th><th>Category<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>charge.refunded<\/td><td>Charges<\/td><td>Reports when there is a charge refund.<\/td><\/tr><tr><td>charge.failed<\/td><td>Charges<\/td><td>Reports when a charge failed and it wasn\u2019t applied.<\/td><\/tr><tr><td>charge.cancelled<\/td><td>Charges<\/td><td>Reports when a charge is cancelled.<\/td><\/tr><tr><td>charge.created<\/td><td>Charges<\/td><td>Reports when a charge is scheduled.<\/td><\/tr><tr><td>charge.succeeded<\/td><td>Charges<\/td><td>Reports when a charge is applied.<\/td><\/tr><tr><td>charge.rescored.to.decline<\/td><td>Charges<\/td><td>Reports when a charge\u2019 score is recalculated and is declined.<\/td><\/tr><tr><td>subscription.charge.failed<\/td><td>Suscripci\u00f3n<\/td><td>Reports when the charge to a subscription fails.<\/td><\/tr><tr><td>payout.created<\/td><td>Payments<\/td><td>Reports when a payout has been scheduled for the next day.<\/td><\/tr><tr><td>payout.succeeded<\/td><td>Payments<\/td><td>Reports when a payout has been applied.<\/td><\/tr><tr><td>payout.failed<\/td><td>Payments<\/td><td>Reports when a payout has failed.<\/td><\/tr><tr><td>transfer.succeeded<\/td><td>Wire transfers<\/td><td>Reports when a transfer has been performed between to Openpay accounts.<\/td><\/tr><tr><td>fee.succeeded<\/td><td>Fees<\/td><td>Reports when a fee is charged successfully to a customer.<\/td><\/tr><tr><td>fee.refund.succeeded<\/td><td>Fees<\/td><td>Reports when a fee has been successfully refunded to a customer.<\/td><\/tr><tr><td>spei.received<\/td><td>SPEI<\/td><td>Reports when a payout has been received by SPEI for adding funds to the account.<\/td><\/tr><tr><td>chargeback.created<\/td><td>Chargebacks<\/td><td>Reports when a chargeback of a transaction was receive and a transaction has been initiated.<\/td><\/tr><tr><td>chargeback.rejected<\/td><td>Chargebacks<\/td><td>Reports when a chargeback has been rejected.<\/td><\/tr><tr><td>chargeback.accepted<\/td><td>Chargebacks<\/td><td>Reports when a chargeback has been accepted.<\/td><\/tr><tr><td>order.created<\/td><td>Order<\/td><td>Reports when an order is created an scheduled.<\/td><\/tr><tr><td>order.activated<\/td><td>Order<\/td><td>Reports when an order is activated.<\/td><\/tr><tr><td>order.payment.received<\/td><td>Order<\/td><td>Reports when an order is received.<\/td><\/tr><tr><td>order.completed<\/td><td>Order<\/td><td>Reports when an order is completed.<\/td><\/tr><tr><td>order.expired<\/td><td>Order<\/td><td>Reports when an order has expired.<\/td><\/tr><tr><td>order.cancelled<\/td><td>Order<\/td><td>Reports when an order is canceled.<\/td><\/tr><tr><td>order.payment.cancelled<\/td><td>Order<\/td><td>Reports when a payment order is canceled.<\/td><\/tr><\/tbody><\/table><h2 id=\"caracter-sticas-de-un-servicio-webhook-v-lido\">Valid Webhook service features<\/h2><ul><li>Endpoint: Domains only (No IPs). example: https:\/\/notifications.merchant.com<\/li><li>Port: 443\/TCP, 1518\/TCP, 1519\/TCP, 8443\/TCP y 10443\/TCP<\/li><li>Protocol: HTTPS\/TLS_1.2<\/li><li>Certificate: Valid (Signed by public CA and match with domain).<\/li><\/ul><h2 id=\"crear-un-webhook\">Webhook Creation<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.webhooks.create(webhook, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>var webhook_params = {                                            \n    'url' : 'http:\/\/requestb.in\/11vxrsf1',\n    'user' : 'juanito',\n    'password' : 'passjuanito',\n    'event_types' : [\n      'charge.refunded',\n      'charge.failed',\n      'charge.cancelled',\n      'charge.created',\n      'chargeback.accepted'\n    ]\n};\n\nopenpay.webhooks.create(webhook_params, function(error, webhook){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n  \"id\" : \"wkn0t30zfxpmhr5usgfa\",\n  \"url\" : \"http:\/\/requestb.in\/qt3bq0qt\",\n  \"user\" : \"juanito\",\n  \"event_types\" : [\n    \"charge.succeeded\",\n    \"charge.created\",\n    \"charge.cancelled\",\n    \"charge.failed\"\n  ],\n  \"status\" : \"verified\"\n}\n<\/code><\/pre><p>When you save webhooks an ID will be generated that can be used to eliminate it or simply get not sensitive webhook information.<\/p><p>At the time of saving the webhook, an id will be generated that can be used to eliminate or simply obtain the non-sensitive information from the webhook.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>url<\/td><td><strong><em>string<\/em><\/strong> <br \/>Webhook<\/td><\/tr><tr><td>user<\/td><td><strong><em>string<\/em><\/strong> <br \/>User name used for webhook\u2019s basic authentication.<\/td><\/tr><tr><td>password<\/td><td><strong><em>string<\/em><\/strong> <br \/>Password for webhook\u2019s basic authentication.<\/td><\/tr><tr><td>event_types<\/td><td><strong><em>array[string]<\/em><\/strong> <br \/>List of events where the webhook will be triggered.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-webhook\">webhook object<\/a> when it was successfully created or an error response if there was an error on creation.<\/p><h2 id=\"obtener-un-webhook\">Get a Webhook<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.webhooks.get(webhookId, callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>openpay.webhooks.get('wxvanstudf4ssme8khmc', function(error, webhook){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>  {\n    \"id\" : \"wxvanstudf4ssme8khmc\",\n    \"url\" : \"http:\/\/requestb.in\/11vxrsf1\",\n    \"user\" : \"juanito\",\n    \"event_types\" : [\n      \"verification\",\n      \"charge.refunded\",\n      \"charge.failed\",\n      \"charge.cancelled\",\n      \"charge.created\",\n      \"charge.succeeded\",\n      \"subscription.charge.failed\",\n      \"payout.created\",\n      \"payout.succeeded\",\n      \"payout.failed\",\n      \"transfer.succeeded\",\n      \"fee.succeeded\",\n      \"spei.received\",\n      \"chargeback.created\",\n      \"chargeback.rejected\",\n      \"chargeback.accepted\"\n    ],\n    \"status\" : \"verified\"\n  }\n<\/code><\/pre><p>Get a list of the webhook details by ID.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Unique webhook identifier<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-webhook\">webhook object<\/a><\/p><h2 id=\"eliminar-un-webhook\">Delete a Webhook<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.webhooks.delete(webhookId, callback);\n<\/code><\/pre><blockquote><p>Customer request example<\/p><\/blockquote><pre><code>openpay.webhooks.delete('wxvanstudf4ssme8khmc', function(error) {\n  \/\/ ...\n});\n<\/code><\/pre><p>Delete a webhook from the merchant.<\/p><p>To delete a webhook you only need to provide the ID.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Unique webhook identifier<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>If the webhook was deleted correctly the response will be empty, if the webhook cannot be deleted an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error object<\/a> explaining the reason.<\/p><h2 id=\"listado-de-webhook\">Webhook list<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.webhooks.list(callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>openpay.webhooks.list(function(error, list){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>[\n  {\n    \"id\" : \"wDashboard185\",\n    \"event_types\" : [\n      \"verification\",\n      \"charge.refunded\",\n      \"charge.failed\",\n      \"charge.cancelled\",\n      \"charge.created\",\n      \"charge.succeeded\",\n      \"subscription.charge.failed\",\n      \"payout.created\",\n      \"payout.succeeded\",\n      \"payout.failed\",\n      \"transfer.succeeded\",\n      \"fee.succeeded\",\n      \"spei.received\",\n      \"chargeback.created\",\n      \"chargeback.rejected\",\n      \"chargeback.accepted\"\n    ],\n    \"url\" : \"http:\/\/requestb.in\/11vxrsf1\",\n    \"status\" : \"verified\"\n  },\n  {\n    \"id\" : \"wDashboard186\",\n    \"event_types\" : [\n      \"verification\",\n      \"charge.refunded\",\n      \"charge.failed\",\n      \"charge.cancelled\",\n      \"charge.created\",\n      \"charge.succeeded\",\n      \"subscription.charge.failed\"\n    ],\n    \"url\" : \"http:\/\/requestb.in\/1fhpiog1\",\n    \"status\" : \"verified\"\n  }\n]\n<\/code><\/pre><p>Returns a list registered by the merchant.<\/p><h3 id=\"petici-n\">Request<\/h3><h3 id=\"respuesta\">Response<\/h3><p>The list of <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-webhook\">webhook object<\/a> registered according to the given parameters.<\/p><h2 id=\"tokens\">Tokens<\/h2><p>The objective is to created tokens from the user browser or device to capture the card information so this doesn\u2019t go through your server and you can avoid or reduce the PCI certification process.<\/p><p>To use this API functionality we recommend using our JavaScript library for your Web application and our Android and iOS SDK for mobile apps.<\/p><p><strong>Features<\/strong><\/p><ul><li>Tokens are created at Merchant level.<\/li><li>Tokens are not link to any customer.<\/li><li>After a token has been created it can only be use once to make a charge.<\/li><\/ul><h2 id=\"objeto-token\">Token Object<\/h2><blockquote><p>Object example<\/p><\/blockquote><pre><code>{\n      \"id\":\"tokfa4swch8gr4icy2ma\",\n      \"card\":{\n         \"card_number\":\"1111\",\n         \"holder_name\":\"Juan Perez Ramirez\",\n         \"expiration_year\":\"20\",\n         \"expiration_month\":\"04\",\n         \"address\":{\n            \"line1\":\"Av 5 de febrero\",\n            \"line2\":\"Roble 207\",\n            \"line3\":\"Queretaro\",\n            \"state\":\"Queretaro\",\n            \"city\":\"Queretaro\",\n            \"postal_code\":\"76900\",\n            \"country_code\":\"MX\"\n         },\n         \"creation_date\":\"2014-01-30T13:53:11-06:00\",\n         \"brand\":\"visa\",\n         \"points_card\":false\n      }\n   }\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Token identifier. This is the ID that you should use to perform operations.<\/td><\/tr><tr><td>card<\/td><td><strong><em>object<\/em><\/strong> <br \/>Card associated with the token. See <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-tarjeta\">card object<\/a><\/td><\/tr><\/tbody><\/table><h2 id=\"crear-un-nuevo-token\">Create a new token<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>POST https:\/\/sandbox-api.openpay.mx\/v1\/{MERCHANT_ID}\/tokens\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"k1n0mscnjwhxqia8q7cm\",\n   \"card\":{\n      \"card_number\":\"411111XXXXXX1111\",\n      \"holder_name\":\"Juan Perez Ramirez\",\n      \"expiration_year\":\"20\",\n      \"expiration_month\":\"12\",\n      \"address\":{\n         \"line1\":\"Av 5 de Febrero\",\n         \"line2\":\"Roble 207\",\n         \"line3\":\"col carrillo\",\n         \"state\":\"Queretaro\",\n         \"city\":\"Quer\u00e9taro\",\n         \"postal_code\":\"76900\",\n         \"country_code\":\"MX\"\n      },\n      \"creation_date\":null,\n      \"brand\":\"visa\"\n   }\n}\n<\/code><\/pre><p>To create a token using Openpay you need to send the object with the info that will be stored. Once the token it\u2019s stored, you can\u2019t get the number and secutirty code because this information is encrypted.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>holder_name<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>Name of the cardholder.<\/td><\/tr><tr><td>card_number<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Card Number, it can be 16 or 19 digits.<\/td><\/tr><tr><td>cvv2<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Security code as it appears on the back of the card. Usually 3 digits.<\/td><\/tr><tr><td>expiration_month<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Expiration month as it appears on the card.<\/td><\/tr><tr><td>expiration_year<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Expiration year as it appears on the card.<\/td><\/tr><tr><td>address<\/td><td><strong><em>object<\/em><\/strong> (optional)<br \/>Billing address of cardholder.<\/td><\/tr><\/tbody><\/table><h3 id=\"repuesta\">Repuesta<\/h3><p>Returns the created <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-token\">token object<\/a> or an <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-error\">error response.<\/a> if an error occurred during the creation.<\/p><h2 id=\"obtener-un-token\">Get a Token<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>GET https:\/\/sandbox-api.openpay.mx\/v1\/{MERCHANT_ID}\/tokens\/{TOKEN_ID}\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"id\":\"k1n0mscnjwhxqia8q7cm\",\n   \"card\":{\n      \"card_number\":\"411111XXXXXX1111\",\n      \"holder_name\":\"Juan Perez Ramirez\",\n      \"expiration_year\":\"20\",\n      \"expiration_month\":\"12\",\n      \"address\":{\n         \"line1\":\"Av 5 de Febrero\",\n         \"line2\":\"Roble 207\",\n         \"line3\":\"col carrillo\",\n         \"state\":\"Queretaro\",\n         \"city\":\"Quer\u00e9taro\",\n         \"postal_code\":\"76900\",\n         \"country_code\":\"MX\"\n      },\n      \"creation_date\":null,\n      \"brand\":\"visa\"\n   }\n}\n<\/code><\/pre><p>Gets the token details. The ID is required.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>Token ID<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>Returns a <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-token\">token object<\/a><\/p><h2 id=\"comercio\">Merchant<\/h2><p>The merchant object allows you to query info related to your account using the API,<\/p><h2 id=\"objeto-comercio\">Merchant Object<\/h2><blockquote><p>Object example:<\/p><\/blockquote><pre><code>{ \n   \"id\": \"m9lrykwsmljagrfb38rs\", \n   \"creationDate\": \"2013-11-13T16:58:40-06:00\", \n   \"name\": \"Promociones en linea\", \n   \"email\": \"contacto@enlinea.com.mx\", \n   \"phone\": \"(321) 222-2222\", \n   \"status\": \"active\", \n   \"balance\": 1000, \n   \"clabe\": \"646180109400000542\" \n} \n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Unique identifier assigned on creation.<\/td><\/tr><tr><td>creation_date<\/td><td><strong><em>datetime<\/em><\/strong> <br \/>Creation date of the transaction in format ISO 8601.<\/td><\/tr><tr><td>name<\/td><td><strong><em>string<\/em><\/strong> <br \/>Registered merchant name.<\/td><\/tr><tr><td>email<\/td><td><strong><em>string<\/em><\/strong> <br \/>Email account registered for the merchant.<\/td><\/tr><tr><td>phone<\/td><td><strong><em>string<\/em><\/strong> <br \/>Phone number registered for the merchant.<\/td><\/tr><tr><td>status<\/td><td><strong><em>string<\/em><\/strong> <br \/>Merchant account status, it can be active or deleted. If the account is in deletate status no transactions are allowed.<\/td><\/tr><tr><td>balance<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Account balance with two decimal digits.<\/td><\/tr><tr><td>clabe<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Linked CLABE account where funds can be received from any bank in Mexico using SPEI.<\/td><\/tr><\/tbody><\/table><h2 id=\"obtener-un-comercio\">Request a Merchant Object<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>openpay.merchant.get(callback);\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><pre><code>openpay.merchant.get(function(error, merchant){\n  \/\/ ...\n});\n<\/code><\/pre><blockquote><p>Response example<\/p><\/blockquote><pre><code>{\n   \"name\":\"Demo Openpay\",\n   \"email\":\"demo@openpay.mx\",\n   \"phone\":\"(442) 258-1039\",\n   \"status\":\"active\",\n   \"balance\":218.73,\n   \"clabe\":\"646180109400135624\",\n   \"id\":\"mzdtln0bmtms6o3kck8f\",\n   \"creation_date\":\"2014-01-23T10:45:53-06:00\"\n}\n<\/code><\/pre><p>Returns the merchant account details. Only the unique merchant identifier is required.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> (required, length = 45) <br \/>unique merchant identifier.<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>If the identifier is correct it will return a merchant object.<\/p><h2 id=\"tiendas\">Stores<\/h2><p>The object represents a convenience store<\/p><h2 id=\"objeto-tienda\">Store object<\/h2><blockquote><p>Object example:<\/p><\/blockquote><pre><code>{\n    \"id_store\": 4913,\n    \"id\": 115,\n    \"name\": \"0503 SAN PABLO -QRO\",\n    \"last_update\": \"2016-02-04T00:52:16-06:00\",\n    \"status\": \"active\",\n    \"geolocation\": {\n      \"lng\": -100.421865,\n      \"lat\": 20.618171,\n      \"place_id\": \"ChIJwSN2wpNa04URsDryLW517lg\"\n    },\n    \"address\": {\n      \"line1\": \"AV. 5 DE FEBRERO KM 7.5 NO 1341\",\n      \"line2\": \"SAN PABLO\",\n      \"line3\": null,\n      \"state\": \"QUERETARO\",\n      \"city\": \"QUERETARO\",\n      \"postal_code\": \"76030\",\n      \"country_code\": \"MX\"\n    },\n    \"paynet_chain\": {\n      \"name\": \"EXTRA\",\n      \"logo\": \"http:\/\/www.openpay.mx\/logotipos\/extra.png\",\n      \"thumb\": \"http:\/\/www.openpay.mx\/thumb\/extra.png\",\n      \"max_amount\": 99999.99\n    }\n  }\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id_store<\/td><td><strong><em>string<\/em><\/strong> <br \/>Unique identifier assigned on creation.<\/td><\/tr><tr><td>id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Unique identifier by chain.<\/td><\/tr><tr><td>name<\/td><td><strong><em>datetime<\/em><\/strong> <br \/>Store name.<\/td><\/tr><tr><td>last_update<\/td><td><strong><em>string<\/em><\/strong> <br \/>Last date of update in format ISO 8601.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-geolocation\">geolocation<\/a><\/td><td><strong><em>object<\/em><\/strong> <br \/>Store geographical representation by coordinates, latitude and longitude.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-direcci-n\">address<\/a><\/td><td><strong><em>object<\/em><\/strong> <br \/>Store address.<\/td><\/tr><tr><td><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-paynetchain\">paynet_chain<\/a><\/td><td><strong><em>object<\/em><\/strong> <br \/>Paynet chain to which it belongs.<\/td><\/tr><\/tbody><\/table><h2 id=\"obtener-lista-de-tiendas-por-ubicaci-n\">Get list of shops by location<\/h2><blockquote><p>Definition<\/p><\/blockquote><pre><code>\/\/ =============================\n\/\/ Funcionalidad no implementada\n\/\/ =============================\n<\/code><\/pre><blockquote><p>Request example<\/p><\/blockquote><blockquote><p>Response example<\/p><\/blockquote><pre><code>[\n  {\n    \"id_store\": 4913,\n    \"id\": 115,\n    \"name\": \"0503 SAN PABLO -QRO\",\n    \"last_update\": \"2016-02-04T00:52:16-06:00\",\n    \"status\": \"active\",\n    \"geolocation\": {\n      \"lng\": -100.421865,\n      \"lat\": 20.618171,\n      \"place_id\": \"ChIJwSN2wpNa04URsDryLW517lg\"\n    },\n    \"address\": {\n      \"line1\": \"AV. 5 DE FEBRERO KM 7.5 NO 1341\",\n      \"line2\": \"SAN PABLO\",\n      \"line3\": null,\n      \"state\": \"QUERETARO\",\n      \"city\": \"QUERETARO\",\n      \"postal_code\": \"76030\",\n      \"country_code\": \"MX\"\n    },\n    \"paynet_chain\": {\n      \"name\": \"EXTRA\",\n      \"logo\": \"http:\/\/www.openpay.mx\/logotipos\/extra.png\",\n      \"thumb\": \"http:\/\/www.openpay.mx\/thumb\/extra.png\",\n      \"max_amount\": 99999.99\n    }\n  },\n  {\n    \"id_store\": 4726,\n    \"id\": 68,\n    \"name\": \"ASTURIANO TECNOLOGICO\",\n    \"last_update\": \"2016-02-04T00:52:16-06:00\",\n    \"status\": \"active\",\n    \"geolocation\": {\n      \"lng\": -100.410136,\n      \"lat\": 20.61632,\n      \"place_id\": \"EktQcm9sIFRlY25vbMOzZ2ljbyBOdGUgOTk5LCBTYW4gUGFibG8sIFNhbnRpYWdvIGRlIFF1ZXLDqXRhcm8sIFFyby4sIE3DqXhpY28\"\n    },\n    \"address\": {\n      \"line1\": \"PROLONGACION TECNOLOGICO NORTE #999\",\n      \"line2\": \"SAN PABLO\",\n      \"line3\": null,\n      \"state\": \"QUERETARO\",\n      \"city\": \"QUERETARO\",\n      \"postal_code\": \"76159\",\n      \"country_code\": \"MX\"\n    },\n    \"paynet_chain\": {\n      \"name\": \"EL ASTURIANO\",\n      \"logo\": \"http:\/\/www.openpay.mx\/logotipos\/asturiano.png\",\n      \"thumb\": \"http:\/\/www.openpay.mx\/thumb\/asturiano.png\",\n      \"max_amount\": 99999.99\n    }\n  }\n]\n<\/code><\/pre><p>Gets the trade account details. Only it required to indicate the unique id of trade to be obtained.<\/p><h3 id=\"petici-n\">Request<\/h3><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>latitud<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Latitude of geographical location Store<\/td><\/tr><tr><td>longitud<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Longitud of geographical location Store<\/td><\/tr><tr><td>kilometers<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Radius distance in kilometers search<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> (required) <br \/>Purchase amount<\/td><\/tr><\/tbody><\/table><h3 id=\"respuesta\">Response<\/h3><p>If there are stores close range a settlement with stores found it is returned.<\/p><h2 id=\"objetos-comunes\">Common Objects<\/h2><p>Information for objects shared in request and response.<\/p><h2 id=\"objeto-transacci-n\">Transaction Object<\/h2><blockquote><p>Object example:<\/p><\/blockquote><pre><code>{\n   \"id\":\"trehwr2zarltvae56vxl\",\n   \"authorization\":null,\n   \"transaction_type\":\"payout\",\n   \"operation_type\":\"out\",\n   \"currency\":\"MXN\",\n   \"method\":\"bank\",\n   \"creation_date\":\"2013-11-14T18:29:35-06:00\",\n   \"order_id\":\"000001\",\n   \"status\":\"in_progress\",\n   \"amount\":500,\n   \"description\":\"Pago de ganancias\",\n   \"error_message\":null,\n   \"customer_id\":\"afk4csrazjp1udezj1po\",\n   \"bank_account\":{\n      \"rfc\":ONE316015PM1,\n      \"mobile\":null,\n      \"alias\":null,\n      \"bank_name\":\"BANCOMER\",\n      \"creation_date\":\"2013-11-14T18:29:34-06:00\",\n      \"clabe\":\"012XXXXXXXXXX24616\",\n      \"holder_name\":\"Juan Tapia Trejo\",\n      \"bank_code\":\"012\"\n   }\n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id<\/td><td><em><strong>string<\/strong><\/em> <br \/>Unique identifier assigned by Openpay at the moment of creation.<\/td><\/tr><tr><td>authorization<\/td><td><strong><em>string<\/em><\/strong> <br \/>Authorization number created by the processor entity.<\/td><\/tr><tr><td>transaction_type<\/td><td><strong><em>string<\/em><\/strong> <br \/>Transaction type: fee, charge, payout, transfer.<\/td><\/tr><tr><td>operation_type<\/td><td><strong><em>string<\/em><\/strong> <br \/>Operation type in the account: in, out.<\/td><\/tr><tr><td>method<\/td><td><strong><em>string<\/em><\/strong> <br \/>Transaction method type: card, bank o customer.<\/td><\/tr><tr><td>creation_date<\/td><td><strong><em>datetime<\/em><\/strong> <br \/>Creation date of the transaction in format ISO 8601.<\/td><\/tr><tr><td>order_id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Unique transaction and reference number.<\/td><\/tr><tr><td>status<\/td><td><strong><em>string<\/em><\/strong> <br \/>Current transaction status. Possible values: completed, in_progress, failed.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Transaction full amount, including two decimal places.<\/td><\/tr><tr><td>description<\/td><td><strong><em>string<\/em><\/strong> <br \/>Transaction description.<\/td><\/tr><tr><td>error_message<\/td><td><strong><em>string<\/em><\/strong> <br \/>If the transaction is in failed status, this field will include the error message.<\/td><\/tr><tr><td>customer_id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Unique identifier for the customer who this transaction belongs. If the value is null the transaction belongs to Merchant account.<\/td><\/tr><tr><td>currency<\/td><td><strong><em>string<\/em><\/strong> <br \/>Currency used in the operation by default is MXN (Mexican pesos).<\/td><\/tr><tr><td>bank_account<\/td><td><strong><em>object<\/em><\/strong> <br \/>Bank account data used for the transaction. See the BankAccount object.<\/td><\/tr><tr><td>card<\/td><td><strong><em>object<\/em><\/strong> <br \/>Credit card data used in the transaction. See the Card object.<\/td><\/tr><tr><td>card_points<\/td><td><strong><em>object<\/em><\/strong> <br \/>Contains information about the reward points used for payment, if they were used. See the <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-cardpoints\">CardPoints object<\/a><\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-direcci-n\">Address Object<\/h2><blockquote><p>Object example:<\/p><\/blockquote><pre><code>{\n   \"line1\":\"Av 5 de Febrero\",\n   \"line2\":\"Roble 207\",\n   \"line3\":\"col carrillo\",\n   \"state\":\"Queretaro\",\n   \"city\":\"Quer\u00e9taro\",\n   \"postal_code\":\"76900\",\n   \"country_code\":\"MX\" \n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>line1<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>The first line is the card owner address. It\u2019s commonly used to indicate street address and number.<\/td><\/tr><tr><td>line2<\/td><td><strong><em>string<\/em><\/strong> <br \/>Second addres line, commonly use to indicate interior number, suite number or county.<\/td><\/tr><tr><td>line3<\/td><td><strong><em>string<\/em><\/strong> <br \/>Third address line, commonly use to to indicate the neighborhood.<\/td><\/tr><tr><td>postal_code<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>Zip code<\/td><\/tr><tr><td>state<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>State<\/td><\/tr><tr><td>city<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>City<\/td><\/tr><tr><td>country_code<\/td><td><strong><em>string<\/em><\/strong> (required) <br \/>Country code, in the two character format: ISO_3166-1.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-store\">Store object<\/h2><blockquote><p>Object example:<\/p><\/blockquote><pre><code>{\n   \"reference\":\"OPENPAY02DQ35YOY7\",\n   \"barcode_url\":\"https:\/\/sandbox-api.openpay.mx\/barcode\/OPENPAY02DQ35YOY7?width=1&amp;height=45&amp;text=false\",\n   \"paybin_reference\":\"0101990000001065\",\n   \"barcode_paybin_url\":\"https:\/\/sandbox-api.openpay.mx\/barcode\/0101990000001065?width=1&amp;height=45&amp;text=false\"\n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>reference<\/td><td><strong><em>string<\/em><\/strong> <br \/>Payment reference to go stores and make deposits to Openpay account<\/td><\/tr><tr><td>barcode_url<\/td><td><strong><em>string<\/em><\/strong> <br \/>It is the url that generates the bar code of reference.<\/td><\/tr><tr><td>paybin_reference<\/td><td><strong><em>string<\/em><\/strong> <br \/>Paybin reference to go store and make deposits to Openpay<\/td><\/tr><tr><td>barcode_paybin_url<\/td><td><strong><em>string<\/em><\/strong> <br \/>It is the url that generates the bar code of paybin reference.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-paymentplan\">PaymentPlan Object<\/h2><blockquote><p>Object example:<\/p><\/blockquote><pre><code>{\n   \"payments\":\"6\"\n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>payments<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Plan data months without interest is desired as use in the charge (3, 6, 9, 12, 18).<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-cardpoints\">Cardpoints Object<\/h2><blockquote><p>Object example:<\/p><\/blockquote><pre><code>{\n    \"used\": 134,\n    \"remaining\": 300,\n    \"caption\": \"TRANSACCION APROBADA. ME OBLIGO EN LOS TERMINOS Y CONDICIONES DEL PROGRAMA RECOMPENSAS SANTANDER. PARA CUALQUIER DUDA O ACLARACION LLAME AL 01800 RECOMPE (73-266-73).\",\n    \"amount\": 10\n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>used<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Amount of points used in the payment.<\/td><\/tr><tr><td>remaining<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Amount of points remaining in the card after the payment.<\/td><\/tr><tr><td>amount<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Transaction amount paid using points.<\/td><\/tr><tr><td>caption<\/td><td><strong><em>string<\/em><\/strong> (optional) <br \/>A message to be shown to the customer in their ticket or receipt.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-geolocation\">Object Geolocation<\/h2><blockquote><p>Object example:<\/p><\/blockquote><pre><code>{\n  \"lng\": -100.421865,\n  \"lat\": 20.618171,\n  \"place_id\": \"ChIJwSN2wpNa04URsDryLW517lg\"\n}\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>lng<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Longitud, geographical coordinate.<\/td><\/tr><tr><td>lat<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Latitud, geographical coordinate.<\/td><\/tr><tr><td>place_id<\/td><td><strong><em>string<\/em><\/strong> <br \/>Unique identifier of google maps<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-paynetchain\">Object PaynetChain<\/h2><blockquote><p>Object example:<\/p><\/blockquote><pre><code>{\n      \"name\": \"EXTRA\",\n      \"logo\": \"http:\/\/www.openpay.mx\/logotipos\/extra.png\",\n      \"thumb\": \"http:\/\/www.openpay.mx\/thumb\/extra.png\",\n      \"max_amount\": 99999.99\n    }\n<\/code><\/pre><table><thead><tr><th>Property<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>name<\/td><td><strong><em>string<\/em><\/strong> <br \/>Chain name.<\/td><\/tr><tr><td>logo<\/td><td><strong><em>string<\/em><\/strong> <br \/>URL logo image chain.<\/td><\/tr><tr><td>thumb<\/td><td><strong><em>string<\/em><\/strong> <br \/>URL thumbnail image chain.<\/td><\/tr><tr><td>max_amount<\/td><td><strong><em>numeric<\/em><\/strong> <br \/>Maximum payment amount that accept chain stores<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-transaction-status\">Object Transaction Status<\/h2><table><thead><tr><th>Value<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>IN_PROGRESS<\/td><td>Transaction is in progress<\/td><\/tr><tr><td>COMPLETED<\/td><td>Transaction was succesfully completed<\/td><\/tr><tr><td>REFUNDED<\/td><td>Transaction that has been refunded<\/td><\/tr><tr><td>CHARGEBACK_PENDING<\/td><td>Transaction that has a pending chargeback<\/td><\/tr><tr><td>CHARGEBACK_ACCEPTED<\/td><td>Transaction that has an accepted chargeback<\/td><\/tr><tr><td>CHARGEBACK_ADJUSTMENT<\/td><td>Transaction that has an ajust for chargeback<\/td><\/tr><tr><td>CHARGE_PENDING<\/td><td>Transaction that is waiting to be paid<\/td><\/tr><tr><td>CANCELLED<\/td><td>Transaction that was not paid and has been cancelled<\/td><\/tr><tr><td>FAILED<\/td><td>Transaction that was paid but ocurred an error<\/td><\/tr><\/tbody><\/table><h2 id=\"facturaci-n-electr-nica\">Electronic Invoice<\/h2><h2 id=\"objeto-generaci-n-de-cfdi\">Generation of CFDI Object<\/h2><table><thead><tr><th>Field<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>openpay_transaction_id<\/td><td>Optional<br \/>Id of the transaction in openpay<\/td><\/tr><tr><td>invoice_id<\/td><td>Required<br \/>Invoice identifier \/ trade purchase order<\/td><\/tr><tr><td>tipo_comprobante<\/td><td>Optional (default (I) income) <br \/><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-tipo-de-comprobante\">Voucher Type Object<\/a>.<\/td><\/tr><tr><td>serie<\/td><td>Optional (1-25 Alphanumeric) <br \/>series invoice in case of handling<\/td><\/tr><tr><td>folio<\/td><td>Optional payment (1-40 Alphanumeric) <br \/>Folio of the invoice in case of handling<\/td><\/tr><tr><td>total<\/td><td>Required (Decimal) <br \/>Total invoice<\/td><\/tr><tr><td>subtotal<\/td><td>Required (Decimal) <br \/>Subtotal of the invoice<\/td><\/tr><tr><td>forma_pago<\/td><td>Required <br \/>Way to pay <br \/>Only the payment code corresponding to the payment method must be sent. <br \/><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-forma-de-pago\">Form of Payment Object<\/a>.<\/td><\/tr><tr><td>metodo_pago<\/td><td>Required <br \/>Payment method <br \/><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-metodo-de-pago\">Payment Method Object<\/a>.<\/td><\/tr><tr><td>lugar_expedicion<\/td><td>Required (5 digits) <br \/>Postal Code of the Place of Expedition<\/td><\/tr><tr><td>descuento<\/td><td>Optional (Decimal) <br \/>Discount amount.<\/td><\/tr><tr><td>observaciones<\/td><td>Opcional (Alfanum\u00e9rico) <br \/>Observations<\/td><\/tr><tr><td>total_trasladados<\/td><td>Optional (Decimal) <br \/>Total taxes transferred if they exist<\/td><\/tr><tr><td>total_retenidos<\/td><td>Optional (Decimal) <br \/>Total taxes withheld if there are<\/td><\/tr><tr><td>moneda<\/td><td>Required (3 Alphanumeric) <br \/>Currency in which the sale was made in case it is different from MXN. (ISO 4217)<\/td><\/tr><tr><td>tipo_de_cambio<\/td><td>Required (Decimal) <br \/>Exchange rate of the currency in which the sale was made. 1.00 in case the currency is MXN.<\/td><\/tr><tr><td>receptor<\/td><td>Required (<a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-receptor\">Receiver Object<\/a>) <br \/>Node that contains the data of the recipient of the invoice<\/td><\/tr><tr><td>conceptos<\/td><td>Required (Arrangement of <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-concepto\">Concept Object<\/a>) <br \/>Arrangement of concepts included in the invoice<\/td><\/tr><tr><td>cfdi_relacionados<\/td><td>Optional (<a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-relacionado\">Objeto Relacionados<\/a>) <br \/>Related invoices<\/td><\/tr><tr><td>complements<\/td><td>Optional (<a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-complementos\">Complements Object<\/a>) <br \/>Complements<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-tipo-de-comprobante\">Voucher Type Object<\/h2><table><thead><tr><th>Tax receipt type<\/th><th>Fiscal Document<\/th><\/tr><\/thead><tbody><tr><td>(I) entry<\/td><td><ul><li>Invoice.<\/li><li>Fee.<\/li><li>Charge note.<\/li><li>Donations.<\/li><li>Lease.<\/li><\/ul><\/td><\/tr><tr><td>(E) egress<\/td><td><ul><li>Credit note.<\/li><li>Note of refund.<\/li><li>paysheet.<\/li><li>Assimilables.<\/li><\/ul><\/td><\/tr><tr><td>(T) transfer<\/td><td><ul><li>Letter porte.<\/li><\/ul><\/td><\/tr><tr><td>(N) paysheet<\/td><td><ul><li>paysheet.<\/li><\/ul><\/td><\/tr><tr><td>(P) Payment<\/td><td><ul><li>Payment.<\/li><\/ul><\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-forma-de-pago\">Form of Payment Object<\/h2><table><thead><tr><th>Key<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>01<\/td><td>Cash.<\/td><\/tr><tr><td>02<\/td><td>Cheque nominative.<\/td><\/tr><tr><td>03<\/td><td>Electronic funds transfer.<\/td><\/tr><tr><td>04<\/td><td>Credit card.<\/td><\/tr><tr><td>05<\/td><td>Electronic Wallet.<\/td><\/tr><tr><td>06<\/td><td>Electronic Money.<\/td><\/tr><tr><td>08<\/td><td>Pantry vouchers.<\/td><\/tr><tr><td>12<\/td><td>Dation in payment.<\/td><\/tr><tr><td>13<\/td><td>Payment by subrogation.<\/td><\/tr><tr><td>14<\/td><td>Payment by consignment.<\/td><\/tr><tr><td>15<\/td><td>Condonation.<\/td><\/tr><tr><td>17<\/td><td>Compensation.<\/td><\/tr><tr><td>23<\/td><td>Novation.<\/td><\/tr><tr><td>24<\/td><td>Confusion.<\/td><\/tr><tr><td>25<\/td><td>Debt remittance.<\/td><\/tr><tr><td>26<\/td><td>Prescription or expiration.<\/td><\/tr><tr><td>27<\/td><td>To the satisfaction of the creditor.<\/td><\/tr><tr><td>28<\/td><td>Debit Card.<\/td><\/tr><tr><td>29<\/td><td>Service Card.<\/td><\/tr><tr><td>30<\/td><td>Application of advances.<\/td><\/tr><tr><td>99<\/td><td>Others.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-metodo-de-pago\">Payment Method Object<\/h2><table><thead><tr><th>Key<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>PUE<\/td><td>Payment only exhibition<\/td><\/tr><tr><td>PPD<\/td><td>Partial or deferred payments<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-doctorelacionado\">DoctoRelacionado Object<\/h2><table><thead><tr><th>Key<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>id_documento<\/td><td>Required (16-36 Alphanumeric) <br \/>Document identifier (uuid).<\/td><\/tr><tr><td>serie<\/td><td>Optional (1-25 Alphanumeric) <br \/>Document series.<\/td><\/tr><tr><td>folio<\/td><td>Optional (1-40 Alphanumeric) <br \/>Folio of the document.<\/td><\/tr><tr><td>moneda_d_r<\/td><td>Required (3 Alphabetical) <br \/>Currency Code (ISO 4217).<\/td><\/tr><tr><td>tipo_cambio_d_r<\/td><td>Optional (Decimal) <br \/>Exchange rate.<\/td><\/tr><tr><td>metodo_de_pago_d_r<\/td><td>Optional <br \/>Payment method.<\/td><\/tr><tr><td>num_parcialidad<\/td><td>Optional <br \/>Partiality number.<\/td><\/tr><tr><td>imp_saldo_ant<\/td><td>Optional (Decimal) <br \/>Amount of the previous balance.<\/td><\/tr><tr><td>imp_pagado<\/td><td>Optional (Decimal) <br \/>Amount paid.<\/td><\/tr><tr><td>imp_saldo_insoluto<\/td><td>Optional (Decimal) <br \/>Amount of the outstanding balance.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-concepto\">Concept Object<\/h2><table><thead><tr><th>Key<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Identificador<\/td><td>Required (1-100 Alphanumeric) <br \/>Concept identifier.<\/td><\/tr><tr><td>cantidad<\/td><td>Required (Decimal) <br \/>Amount of the concept.<\/td><\/tr><tr><td>unidad<\/td><td>Optional (1-20 Alphanumeric) <br \/>Unit of the concept.<\/td><\/tr><tr><td>clave_unidad<\/td><td>Required (Alphanumeric, Key Unit Catalog) <br \/>Unit key.<\/td><\/tr><tr><td>descripcion<\/td><td>Required (1-1000 Alphanumeric) <br \/>Description of the concept.<\/td><\/tr><tr><td>valor_unitario<\/td><td>Required (Decimal) <br \/>Unit value of the concept.<\/td><\/tr><tr><td>importe<\/td><td>Required (Decimal) <br \/>Amount of the transferred tax.<\/td><\/tr><tr><td>clave<\/td><td>Required (1-10 Num\u00e9rico) <br \/>Key of the product.<\/td><\/tr><tr><td>descuento<\/td><td>Optional (Decimal) <br \/>Discount amount.<\/td><\/tr><tr><td>traslados<\/td><td>Optional (Arrangement <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-impuesto\">Tax Object<\/a>) <br \/>Transfer tax list.<\/td><\/tr><tr><td>retenciones<\/td><td>Optional (Arrangement <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-impuesto\">Tax Object<\/a>) <br \/>Retention tax list.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-impuesto\">Tax Object<\/h2><table><thead><tr><th>Key<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>impuesto<\/td><td>Required <br \/>Tax <br \/><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-tipo-de-impuesto\">Tax Type Object<\/a>.<\/td><\/tr><tr><td>tipo_factor<\/td><td><p>Required <br \/>Type of factor <br \/><strong><em>Codes:<\/em><\/strong><\/p><ul><li>Rate<\/li><li>Quota<\/li><li>Excento<\/li><\/ul><\/td><\/tr><tr><td>tasa<\/td><td>Required <br \/>Decimal <br \/>Rate that will be used to calculate the tax<\/td><\/tr><tr><td>importe<\/td><td>Required <br \/>Tax amount calculated<\/td><\/tr><tr><td>base<\/td><td>Optional <br \/>Amount on which the Tax will be applied<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-tipo-de-impuesto\">Tax Type Object<\/h2><table><thead><tr><th>Code<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>001<\/td><td>ISR<\/td><\/tr><tr><td>002<\/td><td>IVA<\/td><\/tr><tr><td>003<\/td><td>IEPS<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-receptor\">Receiver Object<\/h2><table><thead><tr><th>Field<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>nombre<\/td><td>Required (1-254 Alphanumeric) <br \/>Name of the recipient of the invoice.<\/td><\/tr><tr><td>rfc<\/td><td>Required <br \/>RFC of the invoice recipient.<\/td><\/tr><tr><td>email<\/td><td>Optional <br \/>Invoice recipient\u2019s email.<\/td><\/tr><tr><td>residencia_fiscal<\/td><td>Optional <br \/>Postal code of the fiscal residence.<\/td><\/tr><tr><td>uso_cfdi<\/td><td>Required (3 Alphanumeric) <br \/><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-uso-de-cfdi\">Object Use of CFDI<\/a>.<\/td><\/tr><tr><td>pais<\/td><td>Optional (3 Alphanumeric) <br \/>Country code (ISO 3166-1 alpha-3). It should not be sent if the RFC is registered with the SAT or is a national generic RFC.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-uso-de-cfdi\">Object Use of CFDI<\/h2><table><thead><tr><th>Code<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>G01<\/td><td>Acquisition of merchandise.<\/td><\/tr><tr><td>G02<\/td><td>Returns, discounts or bonuses.<\/td><\/tr><tr><td>G03<\/td><td>Expenses in general.<\/td><\/tr><tr><td>I01<\/td><td>Buildings.<\/td><\/tr><tr><td>I02<\/td><td>Office furniture and equipment for investments.<\/td><\/tr><tr><td>I03<\/td><td>Transportation equipment.<\/td><\/tr><tr><td>I04<\/td><td>Computer equipment and accessories.<\/td><\/tr><tr><td>I05<\/td><td>Dices, dies, molds, matrices and tooling.<\/td><\/tr><tr><td>I06<\/td><td>Telephone communications.<\/td><\/tr><tr><td>I07<\/td><td>Satellite communications.<\/td><\/tr><tr><td>I08<\/td><td>Other machinery and equipment.<\/td><\/tr><tr><td>D01<\/td><td>Medical and dental fees and hospital expenses.<\/td><\/tr><tr><td>D02<\/td><td>Medical expenses due to disability or disability.<\/td><\/tr><tr><td>D03<\/td><td>Funeral expenses.<\/td><\/tr><tr><td>D04<\/td><td>Donations.<\/td><\/tr><tr><td>D05<\/td><td>Real interest actually paid for mortgage credits (house room).<\/td><\/tr><tr><td>D06<\/td><td>Voluntary contributions to SAR.<\/td><\/tr><tr><td>D07<\/td><td>Premiums for medical expenses insurance.<\/td><\/tr><tr><td>D08<\/td><td>Mandatory school transportation expenses.<\/td><\/tr><tr><td>D09<\/td><td>Deposits in accounts for savings, premiums based on pension plans.<\/td><\/tr><tr><td>D10<\/td><td>Payments for educational services (tuition fees).<\/td><\/tr><tr><td>P01<\/td><td>To define.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-relacionado\">Related Object<\/h2><table><thead><tr><th>Field<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>tipo_relacion<\/td><td>Required <br \/>Type relationship <br \/><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-tipo-de-relaci-n\">Object Type of Relationship<\/a>.<\/td><\/tr><tr><td>relacionados<\/td><td>Required (Object arrangement CfdiRelacionado) <br \/><a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-cfdi-relacionado\">CFDI Object Related<\/a>.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-tipo-de-relaci-n\">Object Type of Relationship<\/h2><table><thead><tr><th>Code<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>01<\/td><td>Credit note of related documents.<\/td><\/tr><tr><td>02<\/td><td>Debit note of related documents.<\/td><\/tr><tr><td>03<\/td><td>Return of merchandise on previous invoices or transfers.<\/td><\/tr><tr><td>04<\/td><td>Replacement of previous CFDIs.<\/td><\/tr><tr><td>05<\/td><td>Goods transfers previously invoiced.<\/td><\/tr><tr><td>06<\/td><td>Invoice generated by previous transfers.<\/td><\/tr><tr><td>07<\/td><td>CFDI by advance payment.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-cfdi-relacionado\">CFDI Object Related<\/h2><table><thead><tr><th>Field<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>uuid<\/td><td>Required (36 Alphanumeric) <br \/>UUID of the related invoice<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-complementos\">Complements Object<\/h2><table><thead><tr><th>Field<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>aerolineas<\/td><td>Optional (<a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-complemento-aerol-neas\">Complement Airlines Object<\/a>) <br \/>Complement for Airline.<\/td><\/tr><tr><td>payouts<\/td><td>Optional (<a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-complemento-pago\">Complement Payment Object<\/a>) <br \/>Complement of payments.<\/td><\/tr><tr><td>donatarias<\/td><td>Optional (<a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-complemento-donatarias\">Complement Donee Object<\/a>) <br \/>Complement of donee.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-complemento-aerol-neas\">Complement Airlines Object<\/h2><table><thead><tr><th>Field<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>tua<\/td><td>Required (Decimal) <br \/>Airport use fee<\/td><\/tr><tr><td>otrosCargos<\/td><td>Optional (Arrangement <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-aerol-neas-cargo\">Charge Airlines Object<\/a>) <br \/>Complement of payments.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-aerol-neas-cargo\">Charge Airlines Object<\/h2><table><thead><tr><th>Field<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>codigo_cargo<\/td><td>Optional <br \/>Charge code.<\/td><\/tr><tr><td>descripcion_cargo<\/td><td>Optional <br \/>Charge description.<\/td><\/tr><tr><td>importe<\/td><td>Optional (Decimal) <br \/>Charge amount.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-complemento-pago\">Complement Payment Object<\/h2><table><thead><tr><th>Field<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>fecha_pago<\/td><td>Required <br \/>Date of the operation.<\/td><\/tr><tr><td>forma_de_pago<\/td><td>Required <br \/>Way to pay.<\/td><\/tr><tr><td>moneda_p<\/td><td>Required (Decimal) <br \/>Charge amount.<\/td><\/tr><tr><td>tipo_cambio_p<\/td><td>Required (Decimal) <br \/>Exchange rate of the currency in which the sale was made. 1.00 in case the currency is MXN.<\/td><\/tr><tr><td>monto<\/td><td>Required (Decimal) <br \/>Payment amount.<\/td><\/tr><tr><td>num_operacion<\/td><td>Optional (1-100 Alphanumeric) <br \/>Payment number.<\/td><\/tr><tr><td>rfc_emisor_cta_ord<\/td><td>Optional <br \/>RFC of the issuer.<\/td><\/tr><tr><td>nom_banco_ord_ext<\/td><td>Optional (1-300 Alphanumeric) <br \/>Name of the bank.<\/td><\/tr><tr><td>cta_ordenante<\/td><td>Optional (10-50 Alphanumeric) <br \/>Ordering account.<\/td><\/tr><tr><td>rfc_emisor_cta_ben<\/td><td>Beneficiary<\/td><\/tr><tr><td>cta_beneficiario<\/td><td>Optional (10-50 Alphanumeric) <br \/>Beneficiary account.<\/td><\/tr><tr><td>tipo_cad_pago<\/td><td>Optional (\u00fanico valor v\u00e1lido 01) <br \/>Type of payment chain.<\/td><\/tr><tr><td>cert_pago<\/td><td>Optional (byte[]) <br \/>Payment certificate.<\/td><\/tr><tr><td>sello_pago<\/td><td>Optional (byte[]) <br \/>Payment stamp.<\/td><\/tr><tr><td>cad_pago<\/td><td>Optional (1-8192 Alphanumeric) <br \/>Chain.<\/td><\/tr><tr><td>docto_relacionados<\/td><td>Optional (Arrangement <a href=\"about:reader?url=https:\/\/www.openpay.mx\/docs\/api\/?javascript#objeto-doctorelacionado\">DoctoRelacionado Object<\/a>).<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-complemento-donatarias\">Complement Donee Object<\/h2><table><thead><tr><th>Field<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>no_autorizacion<\/td><td>Required <br \/>Authorization number<\/td><\/tr><tr><td>fecha_autorizacion<\/td><td>Required <br \/>Authorization date (YYYY-MM-DD)<\/td><\/tr><tr><td>leyenda<\/td><td>Required <br \/>Caption<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-respuesta-de-solicitud-de-generaci-n\">Request Response Generation Object<\/h2><table><thead><tr><th>Field<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>invoice_id<\/td><td>Identifier of the invoice sent in the request.<\/td><\/tr><tr><td>request_id<\/td><td>Request ID generated by Openpay.<\/td><\/tr><tr><td>date<\/td><td>Date on which the generation was requested<\/td><\/tr><tr><td>status<\/td><td>PENDING, OK, ERROR.<\/td><\/tr><tr><td>fiscal_status<\/td><td>ACTIVE, CANCELLED.<\/td><\/tr><tr><td>message<\/td><td>Status description.<\/td><\/tr><\/tbody><\/table><h2 id=\"objeto-notificaciones\">Notifications Object<\/h2><table><thead><tr><th>Field<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>invoice_id<\/td><td>Identifier of the invoice sent in the request.<\/td><\/tr><tr><td>serie<\/td><td>Invoice series.<\/td><\/tr><tr><td>folio<\/td><td>Folio of the invoice.<\/td><\/tr><tr><td>transaction_id<\/td><td>Openpay transaction identifier linked to the invoice.<\/td><\/tr><tr><td>creation_date<\/td><td>Application date.<\/td><\/tr><tr><td>issue_date<\/td><td>Issue date of the invoice.<\/td><\/tr><tr><td>uuid<\/td><td>UUID of the invoice.<\/td><\/tr><tr><td>receiver_rfc<\/td><td>RFC of the invoice recipient.<\/td><\/tr><tr><td>total<\/td><td>Total invoice<\/td><\/tr><tr><td>subtotal<\/td><td>Subtotal of the invoice<\/td><\/tr><tr><td>status<\/td><td>PENDING, OK, ERROR.<\/td><\/tr><tr><td>fiscal_status<\/td><td>ACTIVE, CANCELLED.<\/td><\/tr><tr><td>cancellation_date<\/td><td>Date of cancellation of the invoice in case it is canceled.<\/td><\/tr><tr><td>public_xml_link<\/td><td>Link to download the XML of the invoice.<\/td><\/tr><tr><td>public_pdf_link<\/td><td>Link to download the PDF of the invoice.<\/td><\/tr><tr><td>link_expiration_date<\/td><td>Expiration of the download leagues, once expired the xml \/ pdf can be downloaded from the dashboard.<\/td><\/tr><tr><td>message<\/td><td>Detail of the status of the invoice.<\/td><\/tr><\/tbody><\/table>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Introducci\u00f3n La API de Openpay est\u00e1 dise\u00f1a sobre REST, por lo tanto encontrar\u00e1s que las URL est\u00e1n orientadas a recursos y se usa c\u00f3digos de respuesta HTTP para indicar los errores en la API. Todas las respuestas de la API est\u00e1n en formato JSON, incluyendo errores. En el caso de usar los clientes existentes del&hellip;&nbsp;<a href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-node-js\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">API Reference | Node.js<\/span><\/a><\/p>","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/template-pagebuilder-full-width.php","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"neve_meta_sidebar":"full-width","neve_meta_container":"","neve_meta_enable_content_width":"on","neve_meta_content_width":100,"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":""},"class_list":["post-3876","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>API Reference | Node.js | Openpay<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-node-js\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"API Reference | Node.js | Openpay\" \/>\n<meta property=\"og:description\" content=\"Introducci\u00f3n La API de Openpay est\u00e1 dise\u00f1a sobre REST, por lo tanto encontrar\u00e1s que las URL est\u00e1n orientadas a recursos y se usa c\u00f3digos de respuesta HTTP para indicar los errores en la API. Todas las respuestas de la API est\u00e1n en formato JSON, incluyendo errores. En el caso de usar los clientes existentes del&hellip;&nbsp;Read More &raquo;API Reference | Node.js\" \/>\n<meta property=\"og:url\" content=\"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-node-js\/\" \/>\n<meta property=\"og:site_name\" content=\"Openpay\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-14T14:22:22+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"72 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/documents-mx-dev.opdevhm.com\/api-reference-node-js\",\"url\":\"https:\/\/documents-mx-dev.opdevhm.com\/api-reference-node-js\",\"name\":\"API Reference | Node.js | Openpay\",\"isPartOf\":{\"@id\":\"https:\/\/documents-mx-dev.opdevhm.com\/#website\"},\"datePublished\":\"2021-03-25T20:36:05+00:00\",\"dateModified\":\"2022-02-14T14:22:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/documents-mx-dev.opdevhm.com\/api-reference-node-js#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/documents-mx-dev.opdevhm.com\/api-reference-node-js\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/documents-mx-dev.opdevhm.com\/api-reference-node-js#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Inicio\",\"item\":\"https:\/\/documents-mx-dev.opdevhm.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API Reference | Node.js\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/documents-mx-dev.opdevhm.com\/#website\",\"url\":\"https:\/\/documents-mx-dev.opdevhm.com\/\",\"name\":\"Openpay\",\"description\":\"Openpay a BBVA Company\",\"publisher\":{\"@id\":\"https:\/\/documents-mx-dev.opdevhm.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/documents-mx-dev.opdevhm.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/documents-mx-dev.opdevhm.com\/#organization\",\"name\":\"Openpay Soporte\",\"url\":\"https:\/\/documents-mx-dev.opdevhm.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/documents-mx-dev.opdevhm.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/documents-mx-dev.opdevhm.com\/wp-content\/uploads\/2020\/05\/logo.png\",\"contentUrl\":\"https:\/\/documents-mx-dev.opdevhm.com\/wp-content\/uploads\/2020\/05\/logo.png\",\"width\":290,\"height\":90,\"caption\":\"Openpay Soporte\"},\"image\":{\"@id\":\"https:\/\/documents-mx-dev.opdevhm.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"API Reference | Node.js | Openpay","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-node-js\/","og_locale":"en_US","og_type":"article","og_title":"API Reference | Node.js | Openpay","og_description":"Introducci\u00f3n La API de Openpay est\u00e1 dise\u00f1a sobre REST, por lo tanto encontrar\u00e1s que las URL est\u00e1n orientadas a recursos y se usa c\u00f3digos de respuesta HTTP para indicar los errores en la API. Todas las respuestas de la API est\u00e1n en formato JSON, incluyendo errores. En el caso de usar los clientes existentes del&hellip;&nbsp;Read More &raquo;API Reference | Node.js","og_url":"https:\/\/documents-mx-dev.opdevhm.com\/en\/api-reference-node-js\/","og_site_name":"Openpay","article_modified_time":"2022-02-14T14:22:22+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"72 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/documents-mx-dev.opdevhm.com\/api-reference-node-js","url":"https:\/\/documents-mx-dev.opdevhm.com\/api-reference-node-js","name":"API Reference | Node.js | Openpay","isPartOf":{"@id":"https:\/\/documents-mx-dev.opdevhm.com\/#website"},"datePublished":"2021-03-25T20:36:05+00:00","dateModified":"2022-02-14T14:22:22+00:00","breadcrumb":{"@id":"https:\/\/documents-mx-dev.opdevhm.com\/api-reference-node-js#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/documents-mx-dev.opdevhm.com\/api-reference-node-js"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/documents-mx-dev.opdevhm.com\/api-reference-node-js#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Inicio","item":"https:\/\/documents-mx-dev.opdevhm.com\/"},{"@type":"ListItem","position":2,"name":"API Reference | Node.js"}]},{"@type":"WebSite","@id":"https:\/\/documents-mx-dev.opdevhm.com\/#website","url":"https:\/\/documents-mx-dev.opdevhm.com\/","name":"Openpay","description":"Openpay a BBVA Company","publisher":{"@id":"https:\/\/documents-mx-dev.opdevhm.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/documents-mx-dev.opdevhm.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/documents-mx-dev.opdevhm.com\/#organization","name":"Openpay Soporte","url":"https:\/\/documents-mx-dev.opdevhm.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/documents-mx-dev.opdevhm.com\/#\/schema\/logo\/image\/","url":"https:\/\/documents-mx-dev.opdevhm.com\/wp-content\/uploads\/2020\/05\/logo.png","contentUrl":"https:\/\/documents-mx-dev.opdevhm.com\/wp-content\/uploads\/2020\/05\/logo.png","width":290,"height":90,"caption":"Openpay Soporte"},"image":{"@id":"https:\/\/documents-mx-dev.opdevhm.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/documents-mx-dev.opdevhm.com\/en\/wp-json\/wp\/v2\/pages\/3876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/documents-mx-dev.opdevhm.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/documents-mx-dev.opdevhm.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/documents-mx-dev.opdevhm.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/documents-mx-dev.opdevhm.com\/en\/wp-json\/wp\/v2\/comments?post=3876"}],"version-history":[{"count":0,"href":"https:\/\/documents-mx-dev.opdevhm.com\/en\/wp-json\/wp\/v2\/pages\/3876\/revisions"}],"wp:attachment":[{"href":"https:\/\/documents-mx-dev.opdevhm.com\/en\/wp-json\/wp\/v2\/media?parent=3876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}