{"id":3824,"date":"2021-03-25T20:13:50","date_gmt":"2021-03-25T20:13:50","guid":{"rendered":"https:\/\/documents.openpay.mx\/?page_id=3824"},"modified":"2024-07-04T15:30:14","modified_gmt":"2024-07-04T15:30:14","slug":"api","status":"publish","type":"page","link":"https:\/\/documents-mx-dev.opdevhm.com\/en\/api","title":{"rendered":"API"},"content":{"rendered":"


\n\"\" <\/a><\/p>\n

Intro<\/h2>\n

The Openpay API is designed on 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>\n

All the API responses are in JSON<\/a>format, including the errors.<\/p>\n

In the case to use the existents Openpay API clients (Java<\/a>, Php<\/a>, C#<\/a>, Python<\/a>, Ruby<\/a>, NodeJS<\/a>), the responses are specifically of type defined in the clients and their respective languajes.<\/p>\n

API Endpoints<\/h2>\n

Available resourcers<\/p><\/blockquote>\n

a) By Merchant<\/p><\/blockquote>\n

\/v1\/{MERCHANT_ID}\/...\r\n\/fees\r\n\/fees\/{FEE_ID}\r\n\/charges\r\n\/charges\/{TRANSACTION_ID}\r\n\/payouts\r\n\/payouts\/{TRANSACTION_ID}\r\n\/cards\r\n\/cards\/{CARD_ID}\r\n\/customers\r\n\/customers\/{CUSTOMER_ID}\r\n\/plans\r\n\/plans\/{PLAN_ID}\r\n\/tokens\r\n\/tokens\/{TOKEN_ID}\r\n<\/code><\/pre>\n

b) By Customer<\/p><\/blockquote>\n

\/v1\/{MERCHANT_ID}\/customers\/{CUSTOMER_ID}\/...\r\n\/cards\r\n\/cards\/{CARD_ID}\r\n\/bankaccounts\r\n\/bankaccounts\/{BANKACCOUNT_ID}\r\n\/charges\r\n\/charges\/{TRANSACTION_ID}\r\n\/payouts\r\n\/payouts\/{TRANSACTION_ID}\r\n\/transfers\r\n\/transfers\/{TRANSACTION_ID}\r\n\/subscriptions\r\n\/subscriptions\/{SUBSCRIPTION_ID}\r\n<\/code><\/pre>\n

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>\n

The following URIs are the basis of the endpoints for the supported environments:<\/p>\n