{"id":3468,"date":"2021-03-09T22:19:52","date_gmt":"2021-03-09T22:19:52","guid":{"rendered":"https:\/\/documents.openpay.mx\/?p=3468"},"modified":"2022-02-18T15:48:55","modified_gmt":"2022-02-18T15:48:55","slug":"partner","status":"publish","type":"post","link":"https:\/\/documents-mx-dev.opdevhm.com\/en\/docs\/partner.html","title":{"rendered":"Partners"},"content":{"rendered":"
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Openpay has a special model for commercial partners, which allows the partner to create transactions on behalf of a merchant, without having the merchant share their Openpay access keys. Under this model, the merchant can decide when to restrict or allow a commercial partner in Openpay.<\/p>

In order for a commercial partner to integrate to the Openpay platform, it is essential to understand the following topics:<\/p>

  1. Charging a card <\/a><\/li>
  2. Openpay API <\/a><\/li>
  3. OAuth 2 Standard <\/a><\/li>
  4. OAuth 2 Clients <\/a><\/li>
  5. Rest\/HTTPS Services <\/a><\/li><\/ol>

    To integrate a commercial parter into the platform, you need to go through the following steps<\/strong><\/p>

    1. Registering the commercial partner.<\/li>
    2. Integrating the OAuth 2.0 protocol in the partner's application.<\/li>
    3. Consuming the Openpay API services using the partner's credentials.<\/li><\/ol>

      1. Registering the commercial partner.<\/h2>

      As the first step, it is necessary to register the commercial partner in the Openpay platform. This process consists of submitting a registration form with information similar to the one required for the merchants. After filling and submitting this form, Openpay staff will validate the information, and if the information is correct a confirmation will be sent to your email, along with your partner identification codes.<\/p>

      To enter the registration form for testing click here <\/a><\/p>

      Once the testing registration form is submitted, the partner account will be automatically activated and an email with the required information for OAuth 2.0 integration will be sent.<\/p>

      The email sent to the partner will contain \"client_id\" and \"client_secret\" codes, which will identify the partner in the Openpay platform.<\/p>

      Note:<\/strong><\/span> After you successfully test your integration with the testing environment, you can register in production by clicking here <\/a><\/em><\/span><\/p>

      2. Integrating the OAuth 2.0 protocol in the partner's application.<\/h2>

      The OAuth flow used by Openpay for the Partner model allows a Merchant to authorize securely a commercial partner to create transactions in Openpay on their behalf, using the partner's own keys.<\/p>

      The partner must implement the OAuth 2.0 standard in their web application in order to integrate their web application with Openpay. The following diagrams shows the two flows allowed by the Openpay model:<\/p>

      Flow 1<\/strong> : When the Merchant already has an Openpay account, the following interactions take place between the Merchant, the Partner, and Openpay.<\/p>

      \"Ejemplo<\/p>

      Flow 2<\/strong>: The following diagram shows the interaction between the Merchant, the Partner, and Openpay when the merchant sill hasn't registered in Openpay.<\/p>

      \"Ejemplo<\/p>

      In both flows there are three different endpoints that should be consumed: One to request the Merchant's authorization, another to retrieve an access token, and a third one to retrieve the Merchant information.<\/p>

      OAuth Endpoints<\/strong><\/p>