openapi: 3.0.0
servers:
  - url: "https://app.payku.cl/"
    description: Default server
  - url: "https://des.payku.cl/"
    description: Sandbox server
info:
  description: |
    Necesitas ver la documentación de los otros países?: <a href="https://docs.payku.com/index-cl-en-v1.html">Chile</a> | Perú | <a href="https://docs.payku.com/index-ve-en-v1.html">Venezuela</a>

    Select the language of the documentation: <a href="https://docs.payku.com/index-pe-es-v1.html">ES</a> | EN

    <div style="
    background: #2F39D1;
    width:100%;
    height:6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    ">
    <strong style="color: #fff">New: You can do live tests of our API</strong>
    <a style="
    margin-top:0.7rem;
    background: #fff;
    border: 1px solid rgb(50, 50, 159);
    color: rgb(50, 50, 159);
    font-weight: normal;
    margin-left: 0.5em;
    width:20%;
    padding: 4px 8px;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    text-align: center"
    href="https://testing-apirest.payku.cl/"
    target="_blanck" rel=”noopener noreferrer”
    onMouseOver="this.style.color='#000', this.style.background='#DBDBDB'"
    onMouseOut="this.style.color='#2F39D1', this.style.background='#fff'"
     >
    Tests
      </a>
    </div>

    # Introduction
    Welcome to the Payku API. You can use our API to access the different
    Payku endpoints, where you can generate and manage payments through different
    methods and get information from them.

    The API is organized around REST. It has predictable URLs and resource-oriented,
    and uses HTTP response codes to indicate the result of the call. All API
    responses return objects JSON, including errors.

    User should look for a 200 result code. If received any result code other
    than 200, the request, or the response is invalid, which means that the fields
    did not pass the checks of validation from payku. We use features included in
    the HTTP protocol, such as authentication, which are supported by the most HTTP
    clients.

    **Important — How to tell if an operation failed**

    Do not rely only on the HTTP status code (for example, 200). In our API, many
    error responses also return HTTP 200. This is intentional and part of how the
    API is designed.

    Always read the JSON response body and check the `status` field:
    - If `status` is `"success"`, the operation completed successfully.
    - If `status` is `"failed"`, there was an error (for example, invalid data or a
      rejected operation). Also check the error message included in the same response.

    # Authentication
    Payku uses Token Based Authentication over HTTPS for authentication. To have
    access to our API, access your account in the section of Integration you will
    find the option of integration and API tokens. The request Unauthenticated or
    incorrect will return an Invalid token response.

    # API Security
    Each request is required to have included in the header:
      - Authorization: Bearer **TOKEN-PÚBLICO**

    # Signature
    In the case of the subscription, nullification and Mall API, an additional layer of security was added
    through of a signature that is sent in the request header, to obtain said signature
    is necessary the following:

    The Request Path must be concatenated in url format along with all the request
    parameters, which must be ordered alphabetically by key, such that key = value.
    Therefore, if the client email value is "example@domain.com" the correct format
    would be "example%40domain.com" and then concatenated with the character '&'.

    Once the character sets are ordered and concatenated, the hash is calculated
    using the HMAC function with encryption type sha256, and the private token.

    **Note:** If an element of the data has as value an object or array, it is excluded from the data. This function is in the PHP and Javascript example.

    ### PHP Example
    API Endpoint:
    ```php
    $request_path = urlencode('/api/suclient');
    ```
    Sorting the parameters:
    ```php
    $data = [
      'email' => 'support@youwebsite.cl',
      'name' => 'Joe Doe',
      'phone' => '923122312',
      'address' => 'Moneda 101',
      'country' => 'Chile',
      'region' => 'Metropolitana',
      'city' => 'Santiago',
      'postal_code' => '850000',
      'additional_parameters' => [
        'parameter_1' => 'example',
        'parameter_2' => 'example 2',
      ]
    ];
    ksort($data);
    ```
    Transformation of the parameters to url format:
    ```php
        $contador = 0;
        $concatenar = null;

        if (!empty($data) && !is_null($data)) {
            foreach ($data as $key => $val) {
                if(gettype($val)!='array' && gettype($val)!='object'){
                    if ($contador>0) {
                        $concatenar .= '&';
                    }
                    $concatenar .= $key . '=' . urlencode($val);
                    $contador++;
                }
            }
        };
    ```
    Concatenation of the parameters in url format with the API endpoint:
    ```php
    $concat = $request_path.'&'.$concatenar;
    ```
    Sign:
    ```php
    $sign = hash_hmac('sha256', $concat, 'fe551abcef62fcf002dc598922e68f0a');
    ```

    ### JavaScript Example
    Import CryptoJS dependency:
    ```javascript
    const CryptoJS = require("crypto-js");
    ```
    API Endpoint:
    ```javascript
    const requestPath = encodeURIComponent('/api/suclient');
    ```
    Sorting the parameters:
    ```javascript
    const data = {
      email: "support@youwebsite.cl",
      name: "Joe Doe",
      phone: "923122312",
      address: "Moneda 101",
      country: "Chile",
      region: "Metropolitana",
      city: "Santiago",
      postal_code: "850000"
    };
    const orderedData = {};
    Object.keys(data).sort().forEach(function(key) {
      orderedData[key] = data[key];
      if (typeof orderedData[key] === 'object') {
            delete orderedData[key];
      }
    });
    ```
    Transformation of the parameters to url format:
    ```javascript
    const arrayConcat = new URLSearchParams(orderedData).toString();
    ```
    Concatenation of the parameters in url format with the API endpoint:
    ```javascript
    const concat = requestPath + "&" + arrayConcat;
    ```
    Sign:
    ```javascript
    const sign = CryptoJS.HmacSHA256(concat, "fe551abcef62fcf002dc598922e68f0a").toString();
    ```

    The result of the signature obtained for both examples is:

    ```javascript
    "d891663698d31aa8b68babe96ac6497f5a0d874024368102998d5b79a4d12c36"
    ```

    # Errors
    Payku uses conventional HTTP responses to indicate the success or failure of a request.
    In general, codes in the 2xx range indicate success, codes in the 4xx range indicate
    an error that failed due to the information provided (ex: a required parameter was
    skipped, a payment failed, etc.), and codes in the 5xx range indicate an error with
    Payku servers (these are rare).

    ## Error codes
    <div class="errorContent">
    <table>
      <tbody>
        <tr>
          <td style="text-align: right"><strong class="errorTitle">400</strong>
            <p class="psmall">Bad Request</p>
          </td>
          <td class="errorDescription">There is a problem with your request</td>
        </tr>
        <tr>
          <td style="text-align: right"><strong class="errorTitle">401</strong>
            <p class="psmall">Unauthorized</p>
          </td>
          <td class="errorDescription">Your token is incorrect or signature is incorrect</td>
        </tr>
        <tr>
          <td style="text-align: right"><strong class="errorTitle">403</strong>
            <p class="psmall">Forbidden</p>
          </td>
          <td class="errorDescription">You do not have permission to view this page</td>
        </tr>
        <tr>
          <td style="text-align: right"><strong class="errorTitle">404</strong>
            <p class="psmall">Not Found</p>
          </td>
          <td class="errorDescription">The specified resource was not found</td>
        </tr>
        <tr>
          <td style="text-align: right"><strong class="errorTitle">405</strong>
            <p class="psmall">Method Not Allowed</p>
          </td>
          <td class="errorDescription">You tried to enter a resource with an invalid method</td>
        </tr>
        <tr>
          <td style="text-align: right"><strong class="errorTitle">406</strong>
            <p class="psmall">Not Acceptable</p>
          </td>
          <td class="errorDescription">You requested a format other than JSON</td>
        </tr>
        <tr>
          <td style="text-align: right"><strong class="errorTitle">410</strong>
            <p class="psmall">Gone</p>
          </td>
          <td class="errorDescription">The requested resource was removed from our servers</td>
        </tr>
        <tr>
          <td style="text-align: right"><strong class="errorTitle">422</strong>
            <p class="psmall">Unprocessable Entity</p>
          </td>
          <td class="errorDescription">We cannot process your request, please review it.</td>
        </tr>
        <tr>
          <td style="text-align: right"><strong class="errorTitle">429</strong>
            <p class="psmall">Too Many Requests</p>
          </td>
          <td class="errorDescription">You are requesting a lot of resources! Stop!</td>
        </tr>
        <tr>
          <td style="text-align: right"><strong class="errorTitle">500</strong>
            <p class="psmall">Internal Server Error</p>
          </td>
          <td class="errorDescription">We had a problem with our server. Please try again later.</td>
        </tr>
        <tr>
          <td style="text-align: right"><strong class="errorTitle">503</strong>
            <p class="psmall">Service Unavailable</p>
          </td>
          <td class="errorDescription">We are offline for maintenance. Please try again later.</td>
        </tr>
      </tbody>
    </table>
    </div>


    # API access
    If you have a payku account, you can access the REST API through the following endpoints:

    <div class="content">
      <table class="center smallTable">
        <thead>
          <tr>
            <th style="text-align:center;"><strong>Site</strong></th>
            <th style="text-align:center;"><strong>BASE URL FOR REST ENDPOINT</strong></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><strong>Production</strong></td>
            <td align="center"><a href="https://app.payku.cl/api">https://app.payku.cl/api</a></td>
          </tr>
          <tr>
            <td><strong>Sandbox</strong></td>
            <td><a href="https://des.payku.cl/api">https://des.payku.cl/api</a></td>
          </tr>
        </tbody>
      </table>
    </div>

    - **Production**: provides direct access to generate actual transactions.
    - **Sandbox**: allows you to test your integration without affecting the actual data.

    When the authentication form with DNI and password appears, DNI 11111111 and password 123 must be used.

  version: "2.1.01"
  title: Payku API
  termsOfService: "https://payku.com/legal/"
  contact:
    email: contacto@payku.com
  license:
    name: Apache 2.0
    url: "http://www.apache.org/licenses/LICENSE-2.0.html"
  x-logo:
    url: "https://records.payku.com/public/img/payku2020_2.svg"
tags:
  - name: Transaction
    description: |
      It allows the creation of transactions and later check their status.
      <br>
      <div class='container'>
        <img src='assets/img/Diagram-Transaction.png' alt='Avatar' class='image' style='width:100%'>
        <div class='middle'>
          <a target='_blank' href='assets/img/Diagram-Transaction.png' class='text'>View</a>
        </div>
      </div>
  - name: Escrow Transaction
    description: This functionality will allow escrow accounts authorized by Payku to settle transactions.
  - name: Nullification
    description: Allows you to request the cancellation of a transaction made through payku.
  - name: Marketplace
    description: |
      It allows the registration of clients, to later carry out the distribution according to the assigned percentage.
      <br>
      <div class='container'>
        <img src='/assets/Diagrama-Marketplace.png' alt='Avatar' class='image' style='width:100%'>
        <div class='middle'>
          <a target='_blank' href='/assets/Diagrama-Marketplace.png' class='text'>View</a>
        </div>
      </div>
  - name: Mall
    description: |
      The product has been specially designed for those integrating companies of different brands with different lines of business which can be grouped while maintaining their diversity in the same virtual space or mall.

      Offering the possibility of grouping the payment of purchases made in multiple virtual stores in a single transaction.
      <br>
      <div class='container'>
        <img src='/assets/Diagrama-Mall.png' alt='Avatar' class='image' style='width:100%'>
        <div class='middle'>
          <a target='_blank' href='/assets/Diagrama-Mall.png' class='text'>View</a>
        </div>
      </div>
  - name: Event
    description: It allows the creation of events and later check their status.
  - name: Subscription
    description: |
      It allows the linking of a plan to Clients, to later make recurring charges automatically, as defined in each plan.
      <br>
      <div class='container'>
        <img src='/assets/Diagrama-Subscription.png' alt='Avatar' class='image' style='width:100%'>
        <div class='middle'>
          <a target='_blank' href='/assets/Diagrama-Subscription.png' class='text'>View</a>
        </div>
      </div>
  - name: Consumption Subscription
    description: |
      It is the set of methods that will allow our users to create clients, plans, subscriptions and carry out consumer plan transactions.

      The main use of these methods is to make one-time charges to a customer for a service or product, such as hiring a delivery service for a product or the purchase of a particular product.
  - name: Wallet
    description: Lets you generate bank transactions from your **payku** virtual wallet.
  - name: Conciliation
    description: Allows to obtain reconciliations in **payku**.
  - name: Banks
    description: |
      Allows you to view the list of partner banks.
  - name: Methods of payment
    description: |
      Allows you to view the list of payment methods used by payku.

x-tagGroups:
  - name: ''
    tags:
      - Transaction
      - Wallet
  - name: Tools
    tags:
      - Banks
      - Methods of payment

paths:
  /api/banks?currency=pen:
    get:
      tags:
        - Banks
      summary: "Get list of banks by currency type"
      description: |
        This method provides a list of partner banks filtered by currency.
        To filter by currency, you have to add the query params currency with the currency value.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BanksCurrencyResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorBanks400get"

      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE-URL/api/banks?currency=pen  \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/banks?currency=pen', [
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/banks?currency=pen', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json'
                },
              });
              const result = await response.json();
              console.log(result)
            }
            request();

  /api/paymentmethods:
    get:
      tags:
        - Methods of payment
      summary: "Get list of payment methods on payku"
      description: |
        This method allows you to obtain a list of payment methods on payku.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MethodsPaymentResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorBanks400get"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE-URL/api/paymentmethods  \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/paymentmethods', [
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/paymentmethods', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request();

  /api/paymentmethods?currency=pen:
    get:
      tags:
        - Methods of payment
      summary: "Get list of payment methods by currency type"
      description: |
        This method allows you to get a list of payment methods in payku.
        To filter by currency, you have to add the query params currency with the currency value.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MethodsPaymentCurrencyResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorBanks400get"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE-URL/api/paymentmethods?currency=pen  \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/paymentmethods?currency=pen', [
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/paymentmethods?currency=pen', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json'
                },
              });
              const result = await response.json();
              console.log(result)
            }
            request();

  /api/conciliation:
    post:
      tags:
        - Conciliation
      summary: Get conciliations.
      description: Allows you to obtain bank reconciliations of the money generated by your account and deposited by **payku** in the days corresponding to your payment.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResponseConciliation"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "cURL"
          source: |
            curl -X POST \
            https://BASE-URL/api/conciliation \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer PUBLIC-TOKEN' \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL' \
            -d '{
                "date_init": "2022-10-20",
                "date_end": "2022-10-21"
              }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/conciliation', [
                'json' => [
                    'date_init' => '2022-10-20',
                    'date_end' => '2022-10-21'
                  ],
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN',
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/conciliation', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              "date_init": "2022-10-20",
              "date_end": "2022-10-21"
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                date_init:
                  description: |
                    **Start date range:**
                      - Cannot be greater than the current date.
                      - It cannot be greater than the end date.
                      - The range of the start date and end date must not be greater than 30 days.
                  type: string
                  example: "2022-10-20"
                date_end:
                  description: |
                    **End date range:**
                      - Cannot be greater than the current date.
                      - Cannot be less than the start date.
                      - The range of the start date and end date must not be greater than 30 days.
                  type: string
                  example: "2022-10-21"
              required:
                - date_init
                - date_end

  /api/wallet/payout:
    post:
      tags:
        - Wallet
      summary: Make payments to third parties from my wallet
      description: |
        This method allows you to create a payment order to a third party using the funds in your wallet virtual **payku**.

        **Note:** For testing purposes (Development environment only), specific amounts will be processed automatically:
        <br>
        &bull;  Amounts 1000, 2000, 3000: Will be marked as **approved** automatically.
        <br>
        &bull;  Amounts 1500, 2500, 3500: Will be marked as **rejected** automatically.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WalletResponseThird"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "cURL"
          source: |
            curl -X POST \
            https://BASE-URL/api/wallet/payout \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer PUBLIC-TOKEN' \
            -H 'Sign: SIGN'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL' \
            -d '{
                  "email": "johndoe@example.com",
                  "phone": "51906310864",
                  "subject": "test Gmoney peru",
                  "currency": "PEN",
                  "order": "0011010101777",
                  "amount": 1,
                  "accountbank_name": "PAYKU PERU SAC",
                  "accountbank_rut": "47566578",
                  "accountbank_sbif": "011",
                  "accountbank_type": "1",
                  "accountbank_num": "01128901338000251968",
                  "url_notify": "https://www.youwebsite.com/urlnotify?orderClient=98745",
                  "additional_parameters":
                  {
                    "parameter_1": "keyValue",
                    "parameter_2": "keyValue",
                    "order_ext": "fff-777"
                  }
                }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/wallet/payout', [
                'json' => [
                        "email" => "johndoe@example.com",
                        "phone" => "51906310864",
                        "subject" => "test Gmoney peru",
                        "currency" => "PEN",
                        "order" => "0011010101777",
                        "amount" => 1,
                        "accountbank_name" => "PAYKU PERU SAC",
                        "accountbank_rut" => "47566578",
                        "accountbank_sbif" => "011",
                        "accountbank_type" => "1",
                        "accountbank_num" => "01128901338000251968",
                        "url_notify" => "https://www.youwebsite.com/urlnotify?orderClient=98745",
                        "additional_parameters" => [
                            "parameter_1" => "keyValue",
                            "parameter_2" => "keyValue",
                            "order_ext" => "fff-777"
                        ]
                    ],
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN',
                  'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/wallet/payout', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
                  "email": "johndoe@example.com",
                  "phone": "51906310864",
                  "subject": "test Gmoney peru",
                  "currency": "PEN",
                  "order": "0011010101777",
                  "amount": 1,
                  "accountbank_name": "PAYKU PERU SAC",
                  "accountbank_rut": "47566578",
                  "accountbank_sbif": "011",
                  "accountbank_type": "1",
                  "accountbank_num": "01128901338000251968",
                  "url_notify": "https://www.youwebsite.com/urlnotify?orderClient=98745",
                  "additional_parameters":
                  {
                    "parameter_1": "keyValue",
                    "parameter_2": "keyValue",
                    "order_ext": "fff-777"
                  }
                };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  pattern: " maximum 50 characters"
                  description: Client email
                  type: string
                  format: email
                  example: "support@youwebsite.cl"
                phone:
                  pattern: "  maximum 20 characters"
                  description: Client phone. **Format:** 519YYYYYYYY
                  type: string
                  example: "51906310864"
                subject:
                  pattern: " maximum 200 characters"
                  description: Order Description
                  type: string
                  example: test Gmoney peru
                currency:
                  pattern: " maximum 6 characters"
                  description: Currency description (ISO format)
                  type: string
                  example: "PEN"
                order:
                  pattern: " maximum 80 characters"
                  description: E-commerce order
                  type: string
                  example: "0011010101777"
                amount:
                  pattern: " maximum 14 digits"
                  description: |
                    Order amount.

                    **Note:** the minimum amount is 5 soles (PEN) and the maximum amount is 30000 soles (PEN).
                  type: integer
                  example: 1
                accountbank_name:
                  pattern: "  maximum 180 characters"
                  description: Name of the destination account holder
                  type: string
                  example: "PAYKU PERU SAC"
                accountbank_rut:
                  pattern: "  between 7 to 12 characters"
                  description: |
                    Identity document of the destination account holder in Peru:
                    DNI, Cédula de Extranjería (CE) or passport.
                    The field name is kept for backwards compatibility.
                    Example (DNI): 47566578
                  type: string
                  example: 47566578
                accountbank_sbif:
                  pattern: "  maximum 4 characters"
                  description: |
                    Code of the bank to which the bank account belongs.
                  type: string
                  example: "001"
                accountbank_type:
                  pattern: "  maximum 1 character"
                  description: |
                    Account type.
                    - 1 Checking account
                    - 3 Saving account
                  type: string
                  example: "1"
                accountbank_num:
                  pattern: " maximum 20 characters"
                  description: |
                    Customer's CCI (Interbank Account Code) number.

                    **Note: The interbank CCI is a number composed of 20 digits. Only for YAPE, you may provide the associated phone number.**

                    **Format:** 519YYYYYYYY
                  type: string
                  example: "01128901338000251968"
                url_notify:
                  pattern: " maximum 600 characters"
                  description: |
                    url where the result of the payment will be notified.
                    - Note: After making the payment to third parties, payku will automatically respond to the endpoint entered in urlnotify the result of the operation.
                      - **Approved Example:**
                      - {
                          - "id": "mpexxzxxxx",
                          - "identifier_payout": "mpexxzxxxx",
                          - "order" : "367734544",
                          - "status" : "success",
                          - "update_at" : "2023-08-24 12:29:35",
                          - "customer" : {
                            - "name" : "Jhon Doe",
                            - "phone" : "987654321",
                            - "document" : "87654321",
                            - "number" : "987654321"
                      - }
                      - **Rejected Example:**
                      - {
                          - "id": "mpexxzxxxx",
                          - "identifier_payout": "mpexxzxxxx",
                          - "order" : "367734544",
                          - "status" : "banking_error",
                          - "update_at" : "2023-08-24 12:29:35",
                          - "customer" : {
                            - "name" : "Jhon Doe",
                            - "phone" : "987654321",
                            - "document" : "87654321",
                      - }
                  type: string
                  example: "https://youwebsite.com/urlnotify?orderClient=98745"
                additional_parameters:
                  pattern: " maximum 4000 characters"
                  description: Client additional parameters
                  type: object
                  properties:
                    parameter_1:
                      description: Parameter name given by user payku
                      type: string
                      example: "keyValue"
                    parameter_2:
                      description: Parameter name given by user payku
                      type: string
                      example: "keyValue2"
                    order_ext:
                      description: Name of the external order given by the user payku (Optional)
                      type: string
                      example: "fff-777"
              required:
                - email
                - subject
                - currency
                - order
                - amount
                - accountbank_name
                - accountbank_rut
                - accountbank_sbif
                - accountbank_type
                - accountbank_num
  /api/payoutv3/{identificadorPayout}:
    get:
      tags:
        - Wallet
      summary: "Get payout V3"
      description: |
        This method allows you to obtain a movement of payments to third parties from your **payku** virtual wallet using an identifier:

        To perform the query it is necessary to add the following at the end of the endpoint /{identificadorPayout} for example: **api/payoutv3/mpe33e36b01e8a11b9ee**.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PayoutResponseGetv3"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400get"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
        "404":
          description: Identifier does not exist.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error404"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE-URL/api/payoutv3/{identificadorPayout}  \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer PUBLIC-TOKEN' \
            -H 'Sign: SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/payoutv3/{identificadorPayout}', [
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN',
                  'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/payoutv3/{identificadorPayout}', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request();

  /api/escrow:
    post:
      tags:
        - Escrow Transaction
      summary: Authorize settlement
      description:
        This method allows authorizing the settlement of one or more transactions using their identifier, so that they can be deposited in the client's wallet or bank account.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EscrowResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "cURL"
          source: |
            curl -X POST \
            https://BASE-URL/api/escrow \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer PUBLIC-TOKEN' \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL' \
            -d '{
              "transactions": ['trx3b4d77b43acd9a720','trx3b4d77b43acd9a385']
            }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/escrow', [
                'json' => [
                  'transactions' => ['trx3b4d77b43acd9a720','trx3b4d77b43acd9a385'],
                  ],
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/escrow', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              transactions: ['trx3b4d77b43acd9a720','trx3b4d77b43acd9a385'],
            };

            request(data);

      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                transactions:
                  pattern: " maximum 30 characters"
                  description: Arrangement containing the identifier of each of the transactions to be authorized for settlement.
                  type: array
                  example: ['trx3b4d77b43acd9a720','trx3b4d77b43acd9a385']

  /api/nullification:
    post:
      tags:
      - Nullification
      summary: Create nullification
      description: This method allows you to create a reversal of a transaction.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/nullificationResponse"
        "400":
          description: Error in the request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "cURL"
          source: |
            curl -X POST \
            https://BASE-URL/api/nullification \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer PUBLIC-TOKEN' \
            -H 'Sign: f96ddc14a73a4dd6e009db2514108a3f44832795cd5ac50e6a80fd0b0ae92112' \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL' \
            -d '{
              'id': 'trxpr2a45s1dytg1',
              'amount': 25000,
              'subject': 'nullable request'
            }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/nullification', [
                'json' => [
                  'id' => 'trxpr2a45s1dytg1',
                  'amount' => 25000,
                  'subject' => "transaction annulment"
                  ],
                'headers' => [
                  'Sign' => 'f96ddc14a73a4dd6e009db2514108a3f44832795cd5ac50e6a80fd0b0ae92112',
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/nullification', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'f96ddc14a73a4dd6e009db2514108a3f44832795cd5ac50e6a80fd0b0ae92112',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              'id': 'trxpr2a45s1dytg1',
              'amount': 25000,
              'subject': 'transaction annulment'
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  pattern: " maximum 40 characters"
                  description: Identifier of the transaction which you want to cancel.
                  type: string
                  example: "trxpr2a45s1dytg1"
                amount:
                  pattern: " maximum 14 digits"
                  description: Transaction amount.
                  type: int
                  example: 25000
                subject:
                  pattern: " maximum 200 characters"
                  description: description of the cancellation request.
                  type: string
                  example: "transaction annulment"

  /api/nullification/{identifier}:
    get:
      tags:
        - Nullification
      summary: get nullification
      description: |
            This method allows you to obtain nullification requests made to payku by means of an identifier:

            To perform the query it is necessary to add the following at the end of the endpoint /{identifier} for example: **api/nullification/trxpr2a45s1dytg1**.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/nullificationResponseGet"
        "400":
          description: Error in the request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400get"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
        "404":
          description: identifier does not exist.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error404"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE-URL/api/nullification/{identifier}  \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer PUBLIC-TOKEN' \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/nullification/{identifier}', [
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/nullification/{identifier}', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request();

  callback:
    post:
      tags:
        - Nullification
      summary: Generate callback.
      description: |
        From the payku application, you can generate the notification **url** from the configuration section.

        <br>
        <div class='container'>
          <img src='/assets/Muestra-Url-Notificaciones.png' alt='Avatar' class='image' style='width:100%'>
          <div class='middle'>
            <a target='_blank' href='/assets/Muestra-Url-Notificaciones.png' class='text'>See example</a>
          </div>
        </div>

            Example of callback response:
              {
                  "id": "mpexxzxxxx",
                  "id_transaction": "mpexxzxxxx",
                  "ordencompra": "367734544",
                  "fecha": "24-08-2023 12:29:35",
                  "monto": 7000,
                  "status": "complete"
              }

  /api/suclient/:
    post:
      tags:
        - Consumption Subscription
      summary: Insert data to a Client
      description: This method allows the insertion of Client data.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdminClientResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X POST \
            https://BASE_URL/api/suclient \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
            -d {
                "email": "joedoe@gmail.com",
                "name": "Joe Doe",
                "rut": "111111111",
                "phone": "923122312",
                "address": "Moneda 101",
                "country": "Chile",
                "region": "Metropolitana",
                "city": "Santiago",
                "postal_code": "850000,
                "additional_parameters":{
                  "parameter_1": "example 1",
                  "parameter_2": "example 2",
                }
              }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/suclient', [
                'json' => [
                  'email' => 'joedoe@gmail.cl',
                  'name' => 'Joe Doe',
                  'rut' => '111111111',
                  'phone' => '923122312',
                  'address' => 'Moneda 101',
                  'country' => 'Chile',
                  'region' => 'Metropolitana',
                  'city' => 'Santiago',
                  'postal_code' => '850000',
                  'additional_parameters' => [
                      'parameter_1' => 'example',
                      'parameter_2' => 'example 2'
                    ]
                  ],
                'headers' => [
                  'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/suclient', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              email: "joedoe@gmail.com",
              name: "Joe Doe",
              rut: "111111111",
              phone: "923122312",
              address: "Moneda 101",
              country: "Chile",
              region: "Metropolitana",
              city: "Santiago",
              postal_code: "850000",
              additional_parameters:{
                parameter_1: "example",
                parameter_2: "example 2",
              }
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  pattern: " maximum 50 characters"
                  description: Client email.
                  type: string
                  format: email
                  example: joedoe@gmail.com
                name:
                  pattern: " maximum 80 characters"
                  description: Client name
                  type: string
                  example: "Joe Doe"
                rut:
                  pattern: " 12 characters required"
                  description: Single Tax Registry of the client, the entry of this data with or without a hyphen will be allowed.
                  type: string
                  example: "11111111"
                phone:
                  pattern: " 20 characters required"
                  description: Client phone.
                  type: string
                  example: "923122312"
                address:
                  pattern: " maximum 200 characters"
                  description: Client address.
                  type: string
                  example: "Moneda 101"
                country:
                  pattern: " maximum 40 characters"
                  description: Client country.
                  type: string
                  example: "Chile"
                region:
                  pattern: " maximum 120 characters"
                  description: Client region.
                  type: string
                  example: "Metropolitana"
                city:
                  pattern: " maximum 40 characters"
                  description: Client city.
                  type: string
                  example: "Santiago"
                postal_code:
                  pattern: " maximum 10 characters"
                  description: Client Zip Code.
                  type: string
                  example: "850000"
                additional_parameters:
                  pattern: " maximum 4000 characters"
                  description: Client additional parameters
                  type: object
                  properties:
                    parameter_1:
                      description: Client additional parameter
                      type: string
                      example: "example"
                    parameter_2:
                      description: Client additional parameter
                      type: string
                      example: "example"
              required:
                - email
                - name
                - phone

  /api/suplan/:
    post:
      tags:
        - Consumption Subscription
      summary: Insert the data of a plan.
      description: This method allows the insertion of data for the creation of a plan.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PlanResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X POST \
            https://BASE_URL/api/suplan \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
            -d {
                "name": "Test plan",
                "description": "Test Plan"
              }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/suplan', [
                'json' => [
                  'name' => 'Test plan',
                  'description' => 'Test Plan'
                  ],
                  'headers' => [
                    'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                    'Authorization' => 'Bearer PUBLIC-TOKEN'              ]
                  ])->getBody();
                $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/suplan', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              name: "Test plan",
              description: "Test Plan"
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  pattern: " maximum 20 characters"
                  description: Plan name.
                  type: string
                  example: Test plan
                description:
                  pattern: " maximum 1000 characters"
                  description: Plan description.
                  type: string
                  example: Test Plan
                url_notify_suscription:
                  pattern: " maximum 240 characters"
                  description: URL where the subscription status will be notified.
                  type: string
                  example: "https://youwebsite.com/urlnotifysuscription"
                  format: url
                url_notify_payment:
                  pattern: " maximum 240 characters"
                  description: URL where the payment status will be notified.
                  type: string
                  example: "https://youwebsite.com/urlnotifypayment"
                  format: url
                url_success_payment:
                  pattern: " maximum 240 characters"
                  description: URL where the user will be redirected if the payment is successful.
                  type: string
                  example: "https://youwebsite.com/urlsuccesspayment"
                  format: url
                url_failed_payment:
                  pattern: " maximum 240 characters"
                  description: URL where the user will be redirected if the payment is unsuccessful.
                  type: string
                  example: "https://youwebsite.com/urlfailedpayment"
                  format: url
              required:
                - name

  /api/sususcription/:
    post:
      tags:
        - Consumption Subscription
      summary: Insert data for subscription
      description: This method allows the user of a Payku account to create a subscription to a fixed-amount subscription plan, a consumer plan subscription and a variable-amount subscription to one of its clients, for this last type of subscription it is necessary to send the amount that will be charged in the subscription, it is important to note that when making this request for the first time there will be a charge of $ 50 that allows verifying that the card is active and valid, in the case of a fixed subscription plan the service charge will be automatic From the month following the subscription date and in the event that the subscription is to a consumer plan, it will be necessary to use the api / sutransaction endpoint to generate the transaction.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateSuscriptionResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X POST \
            https://BASE_URL/api/sususcription \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
            -d {
                "plan": "pl9697fb170834ad42dd00",
                "client": "cl9b1e1dd988694f30fa30"
              }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/sususcription, [
                'json' => [
                  'plan' => 'pl9697fb170834ad42dd00',
                  'client' => 'cl9b1e1dd988694f30fa30',
                  ],
                  'headers' => [
                    'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                    'Authorization' => 'Bearer PUBLIC-TOKEN'
                  ]
                ])->getBody();
              $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/sususcription', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              plan: "pl9697fb170834ad42dd00",
              client: "cl9b1e1dd988694f30fa30"
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                plan:
                  pattern: " maximum 70 characters"
                  description: Plan id.
                  type: string
                  example: pl9697fb170834ad42dd00
                client:
                  pattern: " maximum 20 characters"
                  description: Client id.
                  type: string
                  example: cl9b1e1dd988694f30fa30
              required:
                - plan
                - client

  /api/sutransaction/:
    post:
      tags:
        - Consumption Subscription
      summary: Insert data for the transaction
      description: This method allows the user of a Payku account to generate a unique transaction to one of his clients who are subscribed to a consumption plan.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateSuTransactionResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X POST \
            https://BASE_URL/api/sutransaction \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
            -d {
                "suscription": "sucaab7865dceaff49d8b3",
                "amount": "10000",
                "order": "001",
                "description": "Description"
              }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/sutransaction, [
                'json' => [
                  'suscription' => sucaab7865dceaff49d8b3,
                  'order' => '001',
                  'monto' => '10000',
                  'description' => 'Description'
                  ],
                  'headers' => [
                    'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                    'Authorization' => 'Bearer PUBLIC-TOKEN'
                  ]
                ])->getBody();
              $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/sutransaction', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              suscription: "sucaab7865dceaff49d8b3",
              amount: "10000",
              order: "001",
              description: "Description"
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                suscription:
                  pattern: " maximum 60 characters"
                  description: Unique subscription identifier for payku.
                  type: string
                  example: sucaab7865dceaff49d8b3
                amount:
                  pattern: " maximum 14 digits"
                  description: Amount.
                  type: string
                  example: "10000"
                order:
                  pattern: " maximum 40 characters"
                  description: Order.
                  type: string
                  example: "001"
                description:
                  pattern: " maximum 1000 characters"
                  description: Description.
                  type: string
                  example: Description
                card:
                  pattern: " maximum 28 characters"
                  description: With the identifier you can indicate which of the active cards will be charged (OPTIONAL).
                  type: string
                  example: "surea041d8a4413949425fec"
              required:
                - suscription

  /api/suscriptionsdeletecards/:
      post:
        tags:
          - Consumption Subscription
        summary: Remove card
        description: |
          This method allows you to delete a card associated with the subscription.
        responses:
          "200":
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/CardDeleteSuscriptionResponse"
          "400":
            description: Request failed.
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Error400CardDelete"
          "401":
            description: Incorrect public token.
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Error401"
        x-codeSamples:
          - lang: "CURL"
            source: |
              curl -X POST \
              https://BASE_URL/api/suinscriptionscards \
              -H 'Accept: application/json, text/plain, */*' \
              -H 'Sign: SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN'  \
              -H 'Authorization: Bearer PUBLIC_TOKEN'  \
              -H 'Content-Type: application/json' \
              -H 'Host: BASE_URL' \
              -d {
                  "card": "surec804a8ed60c0a8cb8839"
                }'
          - lang: "PHP"
            source: |
              $client = new \GuzzleHttp\Client();
                $body = $client->request('POST', 'https://BASE_URL/api/suinscriptionscards', [
                  'json' => [
                    'card' => surec804a8ed60c0a8cb8839,
                    ],
                    'headers' => [
                      'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                      'Authorization' => 'Bearer PUBLIC_TOKEN'              ]
                    ])->getBody();
                  $response = json_decode($body);
          - lang: "JS"
            source: |
              const request = async (data) => {
                const response = await fetch('https://BASE_URL/api/suinscriptionscards', {
                  method: 'POST',
                  headers: {
                    'Content-Type': 'application/json',
                    'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                    'Authorization': 'Bearer PUBLIC_TOKEN'
                  },
                  body: JSON.stringify(data)
                });
                const result = await response.json();
                console.log(result)
              }

              let data = {
                card: "surec804a8ed60c0a8cb8839"
              };

              request(data);
        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  suscription:
                    pattern: " maximum 60 characters"
                    description: ID of the associated card.
                    type: string
                    example: surec804a8ed60c0a8cb8839
                required:
                  - suscription

  /api/suclient:
    post:
      tags:
        - Subscription
      summary: Insert data to a Client
      description: This method allows the insertion of Client data.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdminClientResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X POST \
            https://BASE_URL/api/suclient \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
            -d {
                "email": "joedoe@gmail.com",
                "name": "Joe Doe",
                "rut": "111111111",
                "phone": "923122312",
                "address": "Moneda 101",
                "country": "Chile",
                "region": "Metropolitana",
                "city": "Santiago",
                "postal_code": "850000,
                "additional_parameters":{
                  "parameter_1": "example",
                  "parameter_2": "example 2",
                }
              }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/suclient', [
                'json' => [
                  'email' => 'joedoe@gmail.cl',
                  'name' => 'Joe Doe',
                  'rut' => '111111111',
                  'phone' => '923122312',
                  'address' => 'Moneda 101',
                  'country' => 'Chile',
                  'region' => 'Metropolitana',
                  'city' => 'Santiago',
                  'postal_code' => '850000',
                  'additional_parameters' => [
                      'parameter_1' => 'example',
                      'parameter_2' => 'example 2'
                    ]
                  ],
                'headers' => [
                  'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/suclient', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              email: "joedoe@gmail.com",
              name: "Joe Doe",
              rut: "111111111",
              phone: "923122312",
              address: "Moneda 101",
              country: "Chile",
              region: "Metropolitana",
              city: "Santiago",
              postal_code: "850000",
              additional_parameters:{
                parameter_1: "example",
                parameter_2: "example 2",
              }
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  pattern: " maximum 50 characters"
                  description: Client email.
                  type: string
                  format: email
                  example: joedoe@gmail.com
                name:
                  pattern: " maximum 80 characters"
                  description: Client name
                  type: string
                  example: "Joe Doe"
                rut:
                  pattern: " 12 characters required"
                  description: Single Tax Registry of the client, the entry of this data with or without a hyphen will be allowed.
                  type: string
                  example: "11111111"
                phone:
                  pattern: " 20 characters required"
                  description: Client phone.
                  type: string
                  example: "923122312"
                address:
                  pattern: " maximum 200 characters"
                  description: Client address.
                  type: string
                  example: "Moneda 101"
                country:
                  pattern: "  maximum 40 characters"
                  description: Client country.
                  type: string
                  example: "Chile"
                region:
                  pattern: "  maximum 120 characters"
                  description: Client region.
                  type: string
                  example: "Metropolitana"
                city:
                  pattern: "  maximum 40 characters"
                  description: Client city.
                  type: string
                  example: "Santiago"
                postal_code:
                  pattern: "  maximum 10 characters"
                  description: Client Zip Code.
                  type: string
                  example: "850000"
                additional_parameters:
                  pattern: " maximum 4000 characters"
                  description: Client additional parameters
                  type: object
                  properties:
                    parameter_1:
                      description: Client additional parameter
                      type: string
                      example: "example"
                    parameter_2:
                      description: Client additional parameter
                      type: string
                      example: "example"
              required:
                - email
                - name
                - phone

  /api/suclient/{idClient} or {emailClient}:
    get:
      tags:
        - Subscription
      summary: Query Client data
      description: This method allows obtaining the details of a client or the client's email.
      operationId: getClientById
      parameters:
        - name: id
          in: path
          description: Unique transaction identifier per payku.
          required: true
          schema:
            type: string
            pattern: " maximum 20 characters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ClientIdResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400Event"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE_URL/api/suclient/id \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/suclient/cla90927fa9b30e1dfffa0', [
                'headers' => [
                  'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/suclient/cla90927fa9b30e1dfffa0', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request(data);

    put:
      tags:
        - Subscription
      summary: Update Client data
      description: This method allows updating a Client's data.
      operationId: putSuscriptionById
      parameters:
        - name: id
          in: path
          description: Unique transaction identifier per payku.
          required: true
          schema:
            type: string
            pattern: " maximum 20 characters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ModifyClientResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X PUT \
            https://BASE_URL/api/suclient/id \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
            -d {
                "email": "joedoe@gmail.com",
                "name": "Joe Doe Doe",
                "phone": "923122312",
                "address": "Moneda 121",
                "country": "Chile",
                "region": "Metropolitana",
                "city": "Santiago",
                "postal_code": "750000",
                "additional_parameters":{
                  "parameter_1": "example",
                  "parameter_2": "example 2",
                }
              }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('PUT', 'https://BASE_URL//api/suclient/cla90927fa9b30e1dfffa0', [
                'json' => [
                  'email' => 'joedoe@gmail.com',
                  'name' => 'Joe Doe Doe',
                  'phone' => '923122312',
                  'address' => 'Moneda 121',
                  'country' => 'Chile',
                  'region'  => 'Metropolitana',
                  'city'    => 'Santiago',
                  'postal_code' => '750000',
                  'additional_parameters' => [
                    'parameter_1' => 'example',
                    'parameter_2' => 'example 2'
                  ]
                ],
              ],
              'headers' => [
                'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                'Authorization' => 'Bearer PUBLIC-TOKEN'
              ]
            ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/suclient', {
                method: 'PUT',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              email: "joedoe@gmail.com",
              name: "Joe Doe Doe",
              phone: "923122312",
              address: "Moneda 121",
              country: "Chile",
              region: "Metropolitana",
              city: "Santiago",
              postal_code: "750000",
              additional_parameters:{
                parameter_1: "example",
                parameter_2: "example 2",
              }
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  pattern: " maximum 50 characters"
                  description: Client email.
                  type: string
                  format: email
                  example: joedoe@gmail.com
                name:
                  pattern: " maximum 80 characters"
                  description: Client name
                  type: string
                  example: "Joe Doe Doe"
                phone:
                  pattern: " maximum 20 characters"
                  description: Client phone.
                  type: string
                  example: "923122312"
                address:
                  pattern: " maximum 200 characters"
                  description: Client address.
                  type: string
                  example: "Moneda 121"
                country:
                  pattern: " maximum 40 characters"
                  description: Client country.
                  type: string
                  example: "Chile"
                region:
                  pattern: " maximum 120 characters"
                  description: Client region.
                  type: string
                  example: "Metropolitana"
                city:
                  pattern: " maximum 40 characters"
                  description: Client city.
                  type: string
                  example: "Santiago"
                postal_code:
                  pattern: " maximum 10 characters"
                  description: Client Zip Code.
                  type: string
                  example: "750000"
                additional_parameters:
                  pattern: " maximum 4000 characters"
                  description: Client additional parameters
                  type: object
                  properties:
                    parameter_1:
                      description: Client additional parameter
                      type: string
                      example: "example"
                    parameter_2:
                      description: Client additional parameter
                      type: string
                      example: "example"

    delete:
      tags:
        - Subscription
      summary: Delete Client
      description: This method allows the elimination of a client associated with a user id.
      operationId: deleteClientById
      parameters:
        - name: id
          in: path
          description: Unique transaction identifier per payku.
          required: true
          schema:
            type: string
            pattern: " maximum 20 characters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteClientResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X DELETE \
            https://BASE_URL/api/suclient/id \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('DELETE', 'https://BASE_URL/api/suclient/cla90927fa9b30e1dfffa0', [
                  'headers' => [
                    'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                    'Authorization' => 'Bearer PUBLIC-TOKEN'              ]
                  ])->getBody();
                $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/suclient/cla90927fa9b30e1dfffa0', {
                method: 'DELETE',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request(data);

  /api/suclient/customers:
    get:
      tags:
        - Subscription
      summary: Get all Clients
      description: This method allows to obtain all Clients.
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/AllClientResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE_URL/api/suclient/customers \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/suclient/customers', [
                'headers' => [
                  'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/suclient/customers', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request(data);

  /api/sususcription:
    post:
      tags:
        - Subscription
      summary: Insert data for subscription
      description: This method allows the user of a Payku account to create a subscription to a fixed-amount subscription plan, a consumer plan subscription and a variable-amount subscription to one of its clients, for this last type of subscription it is necessary to send the amount that will be charged in the subscription, it is important to note that when making this request for the first time there will be a charge of $ 50 that allows verifying that the card is active and valid, in the case of a fixed subscription plan the service charge will be automatic From the month following the subscription date and in the event that the subscription is to a consumer plan, it will be necessary to use the api / sutransaction endpoint to generate the transaction.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateSuscriptionResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X POST \
            https://BASE_URL/api/sususcription \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
            -d {
                "plan": "pl9697fb170834ad42dd00",
                "client": "cl9b1e1dd988694f30fa30"
              }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/sususcription, [
                'json' => [
                  'plan' => 'pl9697fb170834ad42dd00',
                  'client' => 'cl9b1e1dd988694f30fa30',
                  ],
                  'headers' => [
                    'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                    'Authorization' => 'Bearer PUBLIC-TOKEN'
                  ]
                ])->getBody();
              $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/sususcription', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              plan: "pl9697fb170834ad42dd00",
              client: "cl9b1e1dd988694f30fa30",
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                plan:
                  pattern: " maximum 70 characters"
                  description: Plan id.
                  type: string
                  example: pl9697fb170834ad42dd00
                client:
                  pattern: " maximum 20 characters"
                  description: Client id.
                  type: string
                  example: cl9b1e1dd988694f30fa30
              required:
                - plan
                - client
              oneOf:
                - properties:
                    amount:
                      pattern: " maximum 14 digits"
                      description: This field will only be used in the case of variable amount subscription plans, it is important to note that the currency to be used in this type of plan is PEN.
                      type: string
                  required:
                    - amount
                - properties:
                    coupon:
                      pattern: " maximum 50 characters"
                      type: string
                      description: Coupon code
                  required:
                    - coupon

    get:
      tags:
        - Subscription
      summary: Get all subscriptions
      description: This method allows obtaining all the subscriptions associated with a user ID, this method allows a pagination with a maximum of 100 records per page, in addition, it has a date filter, if this parameter is not entered, the current date will be taken, for the pagination, it is necessary to add the following at the end of the endpoint? page = 1 & per_page = 100, the first parameter being the number of the page and the second the number of records per page.
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/SuscriptionAllResponse"
        "400":
          description: Error en la solicitud.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE_URL/api/suclient/customers \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/suclient/customers', [
                'headers' => [
                  'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/suclient/customers', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request(data);

  /api/sutransaction:
    post:
      tags:
        - Subscription
      summary: Insert data for the transaction
      description: |
        This method allows the user of a Payku account to generate a unique transaction to one of his clients who are subscribed to a consumption plan.
        <br>
        <div class='container'>
          <img src='/assets/Diagrama-sutransaction.png' alt='Avatar' class='image' style='width:100%'>
          <div class='middle'>
            <a target='_blank' href='/assets/Diagrama-sutransaction.png' class='text'>View</a>
          </div>
        </div>
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateSuTransactionResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X POST \
            https://BASE_URL/api/sutransaction \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
            -d {
                "suscription": "sucaab7865dceaff49d8b3",
                "amount": "10000",
                "order": "001",
                "description": "Description"
              }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/sutransaction, [
                'json' => [
                  'suscription' => sucaab7865dceaff49d8b3,
                  'order' => '001',
                  'amount' => '10000',
                  'description' => 'descripcion'
                  ],
                  'headers' => [
                    'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                    'Authorization' => 'Bearer PUBLIC-TOKEN'
                  ]
                ])->getBody();
              $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/sutransaction', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              suscription: "sucaab7865dceaff49d8b3",
              amount: "10000",
              order: "001",
              description: "Description"
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                suscription:
                  pattern: " maximum 60 characters"
                  description: Unique subscription identifier for payku.
                  type: string
                  example: sucaab7865dceaff49d8b3
                amount:
                  pattern: " maximum 14 digits"
                  description: Amount.
                  type: string
                  example: "10000"
                order:
                  pattern: " maximum 40 characters"
                  description: Order.
                  type: string
                  example: "001"
                description:
                  pattern: " maximum 1000 characters"
                  description: Description.
                  type: string
                  example: Description
              required:
                - suscription

  /api/sususcription/{idSuscription}:
    get:
      tags:
        - Subscription
      summary: Check subscription data
      description: This method allows you to get the details of a subscription.
      operationId: getSuscriptionById
      parameters:
        - name: id
          in: path
          description: Unique transaction identifier per payku.
          required: true
          schema:
            type: string
            pattern: " maximum 20 characters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SuscriptionIdResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400Event"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE_URL/api/sususcription/id \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/sususcription/sucaab7865dceaff49d8b', [
                'headers' => [
                  'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/sususcription/sucaab7865dceaff49d8b', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request(data);
    delete:
      tags:
        - Subscription
      summary: Remove subscription
      description: This method allows the removal of a subscription associated with a subscription id.
      operationId: deleteSuscriptionById
      parameters:
        - name: id
          in: path
          description: Unique transaction identifier per payku.
          required: true
          schema:
            type: string
            pattern: " maximum 20 characters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteSuscriptionResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X DELETE \
            https://BASE_URL/api/sususcription/id \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('DELETE', 'https://BASE_URL/api/sususcription/sucaab7865dceaff49d8b3, [
                  'headers' => [
                    'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                    'Authorization' => 'Bearer PUBLIC-TOKEN'              ]
                  ])->getBody();
                $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/sususcription/sucaab7865dceaff49d8b', {
                method: 'DELETE',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request(data);

  /api/suinscriptionscards:
    post:
      tags:
        - Subscription
      summary: Afiliate card to subscription
      description: |
        This method allows the insertion of the data of a subscription card.

        **Important**

        In case you need to renew your client's card. this method will allow you to add a new card to the subscription.

        **Immediately upon updating the card associated with the subscription, the system will be able to make the corresponding late charges according to the configuration of the subscribed plan!**,
        That is, if the subscription is in a suspended status due to maximum collection attempts made, and the customer registers a new card, the system will be able to review pending payments, make the corresponding charge, and automatically activate the subscription.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CardSuscriptionResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X POST \
            https://BASE_URL/api/suinscriptionscards \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer PUBLIC_TOKEN'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
            -d {
                "suscription": "sucaab7865dceaff49d8b3"
              }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/suinscriptionscards', [
                'json' => [
                  'suscription' => sucaab7865dceaff49d8b3,
                  ],
                  'headers' => [
                    'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                    'Authorization' => 'Bearer PUBLIC-TOKEN'              ]
                  ])->getBody();
                $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/suinscriptionscards', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              suscription: "sucaab7865dceaff49d8b3"
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                suscription:
                  pattern: " maximum 60 characters"
                  description: Subscription ID.
                  type: string
                  example: sucaab7865dceaff49d8b3
              required:
                - suscription

  /api/suscriptionsdeletecards:
      post:
        tags:
          - Subscription
        summary: Remove card
        description: |
          This method allows you to delete a card associated with the subscription.
        responses:
          "200":
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/CardDeleteSuscriptionResponse"
          "400":
            description: Request failed.
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Error400CardDelete"
          "401":
            description: Incorrect public token.
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Error401"
        x-codeSamples:
          - lang: "CURL"
            source: |
              curl -X POST \
              https://BASE_URL/api/suinscriptionscards \
              -H 'Accept: application/json, text/plain, */*' \
              -H 'Sign: SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN'  \
              -H 'Authorization: Bearer PUBLIC_TOKEN'  \
              -H 'Content-Type: application/json' \
              -H 'Host: BASE_URL' \
              -d {
                  "card": "surec804a8ed60c0a8cb8839"
                }'
          - lang: "PHP"
            source: |
              $client = new \GuzzleHttp\Client();
                $body = $client->request('POST', 'https://BASE_URL/api/suinscriptionscards', [
                  'json' => [
                    'card' => surec804a8ed60c0a8cb8839,
                    ],
                    'headers' => [
                      'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                      'Authorization' => 'Bearer PUBLIC_TOKEN'              ]
                    ])->getBody();
                  $response = json_decode($body);
          - lang: "JS"
            source: |
              const request = async (data) => {
                const response = await fetch('https://BASE_URL/api/suinscriptionscards', {
                  method: 'POST',
                  headers: {
                    'Content-Type': 'application/json',
                    'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                    'Authorization': 'Bearer PUBLIC_TOKEN'
                  },
                  body: JSON.stringify(data)
                });
                const result = await response.json();
                console.log(result)
              }

              let data = {
                card: "surec804a8ed60c0a8cb8839"
              };

              request(data);
        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  suscription:
                    pattern: " maximum 60 characters"
                    description: ID of the associated card.
                    type: string
                    example: surec804a8ed60c0a8cb8839
                required:
                  - suscription

  /api/suplan/{idPlan}:
    get:
      tags:
        - Subscription
      summary: Check plan data
      description: This method allows to obtain the details of a plan.
      operationId: getPlanById
      parameters:
        - name: id
          in: path
          description: Unique plan identifier per payku.
          required: true
          schema:
            type: string
            pattern: " maximum 20 characters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PlanIdResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400Event"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE_URL/api/suplan/id \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/suplan/pl29f6ad69fbd594148c39', [
                'headers' => [
                  'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/suplan/pl29f6ad69fbd594148c39', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request(data);

  /api/suplan/plans:
    get:
      tags:
        - Subscription
      summary: Check data from all plans
      description: This method allows to obtain the details of all the plans.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PlanAllResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400Event"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE_URL/api/suplan/plans \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/suplan/plans', [
                'headers' => [
                  'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/suplan/plans', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request(data);

  /urlnotifysuscription:
    post:
      tags:
        - Subscription
      summary: "url Callback subscription notification"
      description: |
        After activating the subscription by the user, payku will notify the merchant, the result of the operation (status), making a post request to the subscription notification url previously provided in the creation of the subscription and in turn deliver a series of data for internal validations by the merchant application, the subscription id which corresponds to the unique identifier in payku. This data will allow the merchant to know the status of their subscriptions and back them up in their database.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotifySuscriptionResponse"

  /urlnotifypayment:
    post:
      tags:
        - Subscription
      summary: "url Callback payment notification"
      description: |
        After charging the subscription automatically, payku will notify the merchant, the result of the operation (status), making a post request to the payment notification url previously provided in the creation of the subscription and in turn deliver a data series for internal validations by the merchant application, the transactionn_id which corresponds to the unique identifier in payku and a verification_key, which corresponds to a unique validation hash per transaction. These data will allow the merchant to know the status of their transactions and back them up in their database.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotifyPaymentResponse"

  /api/transaction:
    post:
      tags:
        - Transaction
      summary: Generate a transaction
      description: |
        This method allows to create a payment order to **Payku** and receives as a response the **URL** to redirect the payer's browser and the **token** that identifies the transaction.
        Once the payer makes the successful payment, **Payku** will notify the result to the page of the business that was sent in the **urlnotify** parameter.

        **additional_parameters** = allows sending additional information to be registered in payku associated with the transaction **order_ext** within additional_parameters, it is a reserved word, and it is useful to associate the transaction to a unique merchant identifier
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TransactionRegisterResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "cURL"
          source: |
            curl -X POST \
            https://BASE-URL/api/transaction \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer PUBLIC-TOKEN' \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL' \
            -d '{
              "email": "johndoe@example.com",
              "order": "987450011",
              "subject": "Test subject",
              "amount": "150.50",
              "currency": "PEN",
              "payment": 21,
              "expired": "2023-10-19 13:05:10",
              "urlreturn": "https://youwebsite.com/urlreturn?orderClient=98745",
              "urlnotify": "https://www.youwebsite.com/urlnotify?orderClient=98745",
              "additional_parameters": {
                "parameters1": "keyValue",
                "parameters2": "keyValue",
                "order_ext": "fff-777"
              }
            }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/transaction', [
                'json' => [
                  'email' => 'johndoe@example.com',
                  'order' => "987450011",
                  'subject' => 'Test subject',
                  'amount' => '150.50',
                  'currency'=> "PEN",
                  'payment' => 21,
                  'expired' => '2022-10-19 13:05:10',
                  'urlreturn' => 'https://youwebsite.com/urlreturn?orderClient=123',
                  'urlnotify' => 'https://youwebsite.com/urlnotify?orderClient=123',
                    'additional_parameters' => [
                      'parameters1'=>'keyValue',
                      'parameters2'=>'keyValue2',
                      'order_ext'=>'fff-777'
                    ]
                  ],
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/transaction', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              email: "johndoe@example.com",
              order: "987450011",
              subject: "Test subject",
              amount: "150.50",
              currency: "PEN",
              payment: 21,
              expired: "2022-10-19 13:05:10",
              urlreturn: "https://youwebsite.com/urlreturn?orderClient=123",
              urlnotify: "https://youwebsite.com/urlnotify?orderClient=123",
              additional_parameters: {
                parameters1:"keyValue",
                parameters2:"keyValue2",
                order_ext:"fff-777"
              }
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  pattern: " maximum 100 characters"
                  description: Client email.
                  type: string
                  format: email
                  example: joedoe@gmail.com
                order:
                  pattern: " maximum 40 characters"
                  description: Trade order.
                  type: string
                  example: "987450011"
                subject:
                  pattern: " maximum 2000 characters"
                  description: Description of the order.
                  type: string
                  example: "Test subject"
                amount:
                  pattern: " maximum 14 digits"
                  description: |
                    Order amount.

                    **Important:** if the amount includes decimals, it must be sent as a quoted string (for example, "150.50" instead of 150.50).
                  type: float
                  example: "150.50"
                currency:
                  pattern: " maximum 6 characters"
                  description: Currency.
                  type: string
                  example: "PEN"
                payment:
                  pattern: " maximum 2 characters"
                  description: |
                    Identifier of the payment method. If the identifier is sent, the payer will be redirected directly to the indicated means of payment.
                    - 21 QR Interoperable (Yape, Plin and Others; PEN Currency)
                    - 25 Débito, Crédito, Mastercard, Visa y Diners Club
                  type: integer
                  example: 21
                expired:
                  description: |
                    Date on which the transaction expires

                    **This field is not required.**

                    Allowed format (year-month-day hour:minute:second) Example: 2022-10-18 23:59:59

                    In case of being sent, it must comply with the following rules:
                      <ul>
                        <li>
                          - It must be greater than 5 minutes from the current date (Santiago time).
                        </li>
                        <li>
                          - urlreturn is required, it will be attached as parameters GET /?message_error=expired&id=trx60dc327d9e4c094
                        </li>
                      </ul>

                  type: string
                  example: "2022-10-19 13:05:10"
                urlreturn:
                  pattern: " maximum 200 characters"
                  description: return url of the merchant where payku will redirect the payer after 3 seconds of obtaining the result of the transaction.
                  type: string
                  format: url
                  example: https://youwebsite.com/urlreturn?orderClient=123
                urlnotify:
                  pattern: " maximum 600 characters"
                  description: |
                    Callback url of the business where payku will notify the payment.
                    - Note: After the client completes the payment process at their bank, payku will automatically respond to the endpoint entered in urlnotify the result of the banking operation.
                      - **Approved Example:**
                      - {
                          - "transaction_id": "9916587765599311",
                          - "payment_key" : "trx32cb779c0a777fc68",
                          - "transaction_key" : "9916581777599311",
                          - "verification_key": "8b3e2202fb086a7de93777ae34d5e18c",
                          - "order": "199",
                          - "status": "success"
                      - }
                      - **Rejected Example:**
                      - {
                          - "transaction_id": "9916587765599311",
                          - "payment_key" : "trx32cb779c0a777fc68",
                          - "transaction_key" : "9916581777599311",
                          - "verification_key": "8b3e2202fb086a7de93777ae34d5e18c",
                          - "order": "199",
                          - "status": "failed"
                      - }
                  type: string
                  format: url
                  example: https://youwebsite.com/urlnotify?orderClient=123
                additional_parameters:
                  pattern: " maximum 4000 characters"
                  description: |
                    Additional client parameters (Optional).
                  type: object
                  properties:
                    # gateway:
                    #   description: Bank code to be used in VES
                    #   type: string
                    #   example: "UNIOVECAP2C"
                    parameters1:
                      description: Name of the parameter given by the user payku
                      type: string
                      example: "keyValue"
                    parameters2:
                      description: Name of the parameter given by the user payku
                      type: string
                      example: "keyValue2"
                    order_ext:
                      description: Unique identifier provided by the merchant, which allows the transaction to be associated with an external identifier
                      type: string
                      example: "fff-777"
              required:
                - email
                - order
                - subject
                - amount

    get:
      tags:
        - Transaction
      summary: "Get the status of multiple payments"
      description: |
        you can filter the search for transactions depending on their status. for example. /api/transaction?success=true or to fetch multiple status /api/transaction?pending=true&rejected=true.
          - date_init: indicates the date from which you want to start the transaction search, if this parameter is not sent the search will start with the current date.
          - date_end: indicates the date where you want the transaction search to end, if this parameter is not sent, the search will have the current date as the end date.
          - estatus: you can filter the search for transactions depending on their status. for example: /api/transaction?success=true or to bring multiple statuses /api/transaction?pending=true&rejected=true.

        For pagination it is necessary to add the following at the end of the endpoint ?page=1&per_page=100 the first parameter being the page number and the second the number of records per page. In case you want to search for the transactions between the dates 01-09-2021 y 15-09-2021, also that they are only success status transactions, the url to use would be the following:  https://[URL_BASE]/api/transaction?date_init=2021-09-01&date_end=2021-09-15&success=true.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdentifierAllResponse"
        "400":
          description: Request error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400get"
        "401":
          description: Wrong Public Token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
        "404":
          description: Identifier does not exist.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error404"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE-URL/api/transaction  \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer PUBLIC-TOKEN' \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/transaction', [
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/transaction', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request();

  /api/transaction/{idTransaction}:
    get:
      tags:
        - Transaction
      summary: "Get status of a payment"
      description: "This method allows you to obtain the information of a payment made in **Payku**"
      operationId: getTransactionById
      parameters:
        - name: id
          in: path
          description: id of the transaction to request
          required: true
          schema:
            type: string
            pattern: " maximum 30 characters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdentifierResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400get"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
        "404":
          description: Identifier does not exist.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error404"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE-URL/api/transaction/ID-IDENTIFICADOR  \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer PUBLIC-TOKEN' \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/transaction/10ac494c1d8da71d98ea', [
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/transaction/10ac494c1d8da71d98ea', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request();

  # /api/verificar      <-DEPRECATED->:
  #   post:
  #     tags:
  #       - Transaction
  #     summary: "url Callback Transaction"
  #     description: |
  #       After the payment has been made by the user, payku will notify the merchant, the result of the operation (status), invoking the urlnotify previously provided in the creation of the payment and in turn will deliver a series of data for internal validations by the application of the trade, such as the order for the transaction to be identified in your system, the transaction_id which corresponds to the unique identifier in payku and a verification_key, which corresponds to a unique validation hash per transaction.
  #     responses:
  #       "200":
  #         content:
  #           application/json:
  #             schema:
  #               $ref: "#/components/schemas/NotifyPaymentResponse"
  #       "400":
  #         description: Request failed.
  #         content:
  #           application/json:
  #             schema:
  #               $ref: "#/components/schemas/Error400"
  #       "401":
  #         description: Incorrect public token.
  #         content:
  #           application/json:
  #             schema:
  #               $ref: "#/components/schemas/Error401"

  /api/event:
    post:
      tags:
        - Event
      summary: Create an event
      description: This method allows you to create an event and receive the event details as a response.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EventCreateResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400Event"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X POST \
              https://BASE_URL/api/event \
              -H 'Accept: application/json, text/plain, */*' \
              -H 'Authorization: Bearer TOKEN_PUBLICO'  \
              -H 'Content-Type: application/json' \
              -H 'Host: BASE_URL' \
              -d {
                "name": "Event",
                "event": "98374",
                "date_event": "2020-12-20",
                "date_payment": "2020-12-22",
                "date_closing_sales": "2020-12-19 23:59:00",
                "url_logo": "https://example.cl/logo_event1.png",
                "url_event": "https://example.cl/event1",
                "service_sale": 10,
                "affiliation": [
                  ["afiliate1@gmail.com",  50],
                  ["afiliate2@gmail.com",  50]
                ]
              }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/event', [
                'json' => [
                    'name' => 'Event',
                    'event' => '98374',
                    'date_event' => '2020-12-20',
                    'date_payment' => '2020-12-22',
                    'date_closing_sales' => '2020-12-19 23:59:00',
                    'url_logo' => 'https://example.cl/logo_event1.png',
                    'url_event' => 'https://example.cl/event1',
                    'service_sale' => 10,
                    'affiliation' => [
                      ['afiliate1@gmail.com',  50],
                      ['afiliate2@gmail.com',  50]
                    ]
                  ],
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/event', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              name: "Event",
              event: "98374",
              date_event: "2020-12-20",
              date_payment: "2020-12-22",
              date_closing_sales: "2020-12-19 23:59:00",
              url_logo: "https://example.cl/logo_event1.png",
              url_event: "https://example.cl/event1",
              service_sale: 10,
              affiliation: [
                ["afiliate1@gmail.com",  50],
                ["afiliate2@gmail.com",  50]
              ]
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                event:
                  pattern: " maximum 40 characters"
                  description: Event id.
                  type: string
                  example: "98374"
                name:
                  pattern: " maximum 400 characters"
                  description: Event name.
                  type: string
                  example: "Event"
                date_event:
                  description: Date on which the event will take place.
                  type: datetime
                  example: "2020-12-20"
                date_closing_sales:
                  description: Sales closing date, must be less than or equal to date_event.
                  type: datetime
                  example: "2020-12-19 23:59:00"
                date_payment:
                  description: Payment date of the event, must be greater than the date_event date.
                  type: datetime
                  example: "2020-12-20"
                url_event:
                  pattern: " maximum 240 characters"
                  description: url where the event is published.
                  type: string
                  format: url
                  example: https://example.cl/event1
                url_logo:
                  pattern: " maximum 240 characters"
                  description: url of the logo that identifies the event.
                  type: string
                  format: url
                  example: https://example.cl/logo_event1.png
                service_sale:
                  pattern: " maximum 7 characters"
                  description: Amount of the sales service, belongs to the amount that the owner of the account will receive per transaction.
                  type: integer
                  example: 10
                affiliation:
                  type: array
                  description: Distribution of beneficiaries.
                  items:
                    type: object
                    description: Collection object for a collection batch.
                    properties:
                      email:
                        pattern: " maximum 50 characters"
                        type: string
                        description: Beneficiary email.
                        example: "afiliate1@domain.com"
                      percent:
                        pattern: " maximum 6 characters"
                        type: number
                        description: Percentage which corresponds to the beneficiary.
                        example: "100"
              required:
                - event
                - name
                - date_event
                - date_closing_sales
                - date_payment

  /api/event/{idEvent}:
    get:
      tags:
        - Event
      summary: Get event details
      description: This method allows obtaining the details of an event.
      operationId: getEventById
      parameters:
        - name: id
          in: path
          description: id of the event to request
          required: true
          schema:
            type: string
            pattern: " maximum 40 characters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EventIdResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400Event"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
              https://BASE_URL/api/event \
              -H 'Accept: application/json, text/plain, */*' \
              -H 'Authorization: Bearer TOKEN_PUBLICO'  \
              -H 'Content-Type: application/json' \
              -H 'Host: BASE_URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/event/98374', [
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/event/98374', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request(data);

  /api/maclient:
    post:
      tags:
        - Marketplace
      summary: Inserting a client
      description: This method allows the insertion of client data.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdminClientMarketResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X POST \
            https://BASE_URL/api/maclient \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
            -d {
                "email": "joedoe@gmail.com",
                "name": "Joe Doe",
                "phone": "923122312",
                "bank": {
                  "sbif": "1234",
                  "type": "1",
                  "num": "12312313121",
                  "rut": "111111111"
                }
              }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/maclient', [
                'json' => [
                  'email' => 'joedoe@gmail.com',
                  'name' => 'Joe Doe',
                  'phone' => '923122312',
                  'bank' => [
                    "sbif" => "0001 ",
                    "type" => "1",
                    "num" => "1231123567",
                    "rut" => "111111111",
                  ]
                ],
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/maclient', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              email: "joedoe@gmail.com",
              name: "Joe Doe",
              phone: "923122312",
              bank: {
                sbif: "1234",
                type: "1",
                num: "12312313121",
                rut: "111111111"
              }
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  pattern: " maximum 50 characters"
                  description: Client email.
                  type: string
                  format: email
                  example: joedoe@gmail.com
                name:
                  pattern: " maximum 150 characters"
                  description: Client name
                  type: string
                  example: "Joe Doe"
                phone:
                  pattern: " maximum 12 characters"
                  description: Client phone.
                  type: string
                  example: "923122312"
                bank:
                  pattern: " maximum 58 characters"
                  type: object
                  properties:
                    sbif:
                      pattern: " maximum 5 characters"
                      description: |
                        Bank code to which the bank account belongs.
                      type: string
                      example: "0001"
                    type:
                      pattern: " maximum 1 character"
                      description: |
                        Account type.
                        - 1 Checking account
                        - 2 Vista
                        - 3 Saving account
                      type: string
                      example: "1"
                    num:
                      pattern: " maximum 40 characters"
                      description: Client's account number.
                      type: string
                      example: "12312313121"
                    rut:
                      pattern: " 12 characters required"
                      description: Single Tax Registry.
                      type: string
                      example: "111111111"
                  required:
                    - sbif
                    - type
                    - num
                    - rut
              required:
                - email
                - name
                - phone
                - bank

  /api/maclient/{idClient}:
    get:
      tags:
        - Marketplace
      summary: Query client data
      description: This method allows obtaining the details of a client.
      operationId: getClientMarketById
      parameters:
        - name: id
          in: path
          description: Unique identifier per payku.
          required: true
          schema:
            type: string
            pattern: " maximum 20 characters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdminClientMarketResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400Event"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE_URL/api/maclient/id \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/maclient/madb93fc00a2cf6f4449', [
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/maclient/madb93fc00a2cf6f4449', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request();

    put:
      tags:
        - Marketplace
      summary: update client
      description: This method allows updating the data of a client.
      # operationId: putSuscriptionById
      parameters:
        - name: id
          in: path
          description: Unique marketplace identifier.
          required: true
          schema:
            type: string
            pattern: " maximum 20 characters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateClientResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X PUT \
            https://BASE_URL/api/maclient/id \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN'  \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
            -d {
                "name":"Joe Doe",
                "phone":"923122312",
                "bank": {
                  "sbif": "0001",
                  "type": "3",
                  "num": "9999999",
                  "rut": "261009617"
                  }
                }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('PUT', 'https://BASE_URL/api/maclient/madb93fc00a2cf6f4449', [
                'json' => [
                  'name' => 'Joe Doe',
                  'phone' => '923122312',
                  'bank' => [
                      'num' => '9999999',
                      'rut' => '261009617'
                    ]
                  ],
                ],
              ],
              'headers' => [
                'Sign' => 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                'Authorization' => 'Bearer PUBLIC-TOKEN'
              ]
            ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/maclient/madb93fc00a2cf6f4449', {
                method: 'PUT',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'SHA256-REQUEST-PATH-VALUE-PRIVATE-TOKEN',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
            name:"Joe Doe",
            phone:"923122312",
            bank: {
              sbif: "0001",
              type: "3",
              num: "9999999",
              rut: "261009617"
              }
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  pattern: " maximum 50 characters"
                  description: Client name
                  type: string
                  example: "Joe Doe Doe"
                phone:
                  pattern: " maximum 50 characters"
                  description: Client phone
                  type: string
                  example: "923122312"
                bank:
                  pattern: " maximum 58 characters"
                  description: Client bank details
                  type: object
                  properties:
                    sbif:
                      pattern: " maximum 5 characters"
                      description: |
                          Code of the bank to which the bank account belongs.
                      type: string
                      example: "0001"
                    type:
                      pattern: " maximum 1 character"
                      description:  |
                          Account type.
                          - 1 Checking account
                          - 2 Vista
                          - 3 Saving account
                      type: int
                      example: 3
                    num:
                      pattern: " maximum 40 characters"
                      description: Client's account number.
                      type: string
                      example: "9999999"
                    rut:
                      pattern: " 12 characters required"
                      description: Single Tax Registry.
                      type: string
                      example: "111111111"

    delete:
      tags:
        - Marketplace
      summary: Delete client
      description: This method allows the removal of a client associated with an id.
      operationId: getClientDeleteById
      parameters:
        - name: id
          in: path
          description: Unique customer identifier per payku.
          required: true
          schema:
            type: string
            pattern: " maximum 20 characters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteClientMarketResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X DELETE \
            https://BASE_URL/api/maclient/id \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('DELETE', 'https://BASE_URL/api/maclient/madb93fc00a2cf6f4449', [
                  'headers' => [
                    'Authorization' => 'Bearer PUBLIC-TOKEN'              ]
                  ])->getBody();
                $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/maclient/madb93fc00a2cf6f4449', {
                method: 'DELETE',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request();

  /api/maaffiliation:
    post:
      tags:
        - Marketplace
      summary: Manage Memberships
      description: This method allows you to register the data for membership.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdminAffiliationResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X POST \
            https://BASE_URL/api/maaffiliation \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
            -d {
                "name": "name",
                "percentage": "20",
                "affiliation": [
                  ["ma9fd16221a9645b0036","80"]
                ]
              }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/maclient', [
                'json' => [
                  'name' => 'name',
                  'percentage' => '20',
                  'affiliation' => [
                    [ma9fd16221a9645b0036,80]
                  ]
                ],
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/maaffiliation', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              name: "name",
              percentage: "20",
              affiliation: [
                ["ma9fd16221a9645b0036","80"]
              ]
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  pattern: " maximum 80 characters"
                  description: Membership name.
                  type: string
                  example: name
                percentage:
                  pattern: " maximum 2 characters"
                  description: Percentage corresponding to the payku user.
                  type: string
                  example: "20"
                affiliation:
                  pattern: " maximum 25 characters"
                  type: array
                  description: Array containing customers, each customer is an array containing a customer identifier created by payku and the percentage that it will get.
                  example:
                    - ["madb93fc00a2cf6f4449", "80"]
              required:
                - name
                - percentage
                - affiliation

  /api/maaffiliation/{idClient}:
    get:
      tags:
        - Marketplace
      summary: Check membership data
      description: This method allows you to obtain the details of an membership.
      operationId: getAffiliationById
      parameters:
        - name: id
          in: path
          description: Unique membership identifier for payku.
          required: true
          schema:
            type: string
            pattern: " maximum 20 characters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdminAffiliationResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400Event"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X GET \
            https://BASE_URL/api/maaffiliation/id \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/maaffiliation/sucaab7865dceaff49d8b3', [
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/maaffiliation/sucaab7865dceaff49d8b3', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request();

    delete:
      tags:
        - Marketplace
      summary: Remove membership
      description: This method allows the removal of an membership associated with an id.
      operationId: getAffiliationDeleteById
      parameters:
        - name: id
          in: path
          description: Unique client identifier per payku.
          required: true
          schema:
            type: string
            pattern: " maximum 20 characters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteAffiliationResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "CURL"
          source: |
            curl -X DELETE \
            https://BASE_URL/api/maaffiliation/id \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer TOKEN_PUBLICO'  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('DELETE', 'https://BASE_URL/api/maclient/madb93fc00a2cf6f4449', [
                  'headers' => [
                    'Authorization' => 'Bearer PUBLIC-TOKEN'              ]
                  ])->getBody();
                $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/maaffiliation/sucaab7865dceaff49d8b3', {
                method: 'DELETE',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }

            request();

  /api/transaction/:
    post:
      tags:
        - Marketplace
      summary: Generate a Marketplace transaction
      description:
        This method allows to create a payment order to **Payku** and receives as a response the **URL** to redirect the payer's browser and the **token** that identifies the transaction.
        Once the payer makes the successful payment, **Payku** will notify the result to the page of the business that was sent in the **urlnotify** parameter.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TransactionResponse"
        "400":
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error400"
        "401":
          description: Incorrect public token.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error401"
      x-codeSamples:
        - lang: "cURL"
          source: |
            curl -X POST \
            https://BASE-URL/api/transaction \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer PUBLIC-TOKEN' \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL' \
            -d '{
              "email": "test@domain.com",
              "order": "5696"
              "subject": "Cliente Test",
              "amount": 25000,
              "payment": 21,
              "urlreturn": "https://youwebsite.com/urlreturn?orderClient=123",
              "urlnotify": "https://youwebsite.com/urlnotify?orderClient=123",
              "marketplace": "c1c879f4862d393ea6b326a313022dd98f0baa2869d3e9095c124199c9941030"
            }'
        - lang: "PHP"
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/transaction', [
                'json' => [
                  'email' => 'joedoe@gmail.cl',
                  'order' => "98745",
                  'subject' => 'Client Test',
                  'amount' => 25000,
                  'payment' => 21,
                  'urlreturn' => 'https://youwebsite.com/urlreturn?orderClient=123',
                  'urlnotify' => 'https://youwebsite.com/urlnotify?orderClient=123',
                  'marketplace' => 'c1c879f4862d393ea6b326a313022dd98f0baa2869d3e9095c124199c9941030'
                  ],
                'headers' => [
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: "JS"
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/transaction', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }

            let data = {
              email: "joedoe@gmail.com",
              order: "98745",
              subject: "test subject",
              amount: 25000,
              payment: 1,
              urlreturn: "https://youwebsite.com/urlreturn?orderClient=123",
              urlnotify: "https://youwebsite.com/urlnotify?orderClient=123",
              marketplace: c1c879f4862d393ea6b326a313022dd98f0baa2869d3e9095c124199c9941030
            };

            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  pattern: " maximum 50 characters"
                  description: Client email.
                  type: string
                  format: email
                  example: joedoe@gmail.com
                order:
                  pattern: " maximum 40 characters"
                  description: Trade order.
                  type: string
                  example: "98745"
                subject:
                  pattern: " maximum 2000 characters"
                  description: Description of the order.
                  type: string
                  example: test subject
                amount:
                  pattern: " maximum 14 digits"
                  description: Order amount.
                  type: integer
                  example: 25000
                payment:
                  pattern: " maximum 2 characters"
                  description: |
                    Identifier of the payment method. If the identifier is sent, the payer will be redirected directly to the indicated means of payment.
                    - 1 Webpay
                    - 4 Etpay
                    - 6 Pago46
                    - 9 Mach
                    - 11 Khipu
                    - 99 All
                  type: integer
                  example: 1
                urlreturn:
                  pattern: " maximum 200 characters"
                  description: return url of the trade where payku will redirect the payer.
                  type: string
                  format: url
                  example: https://youwebsite.com/urlreturn?orderClient=123
                urlnotify:
                  pattern: " maximum 600 characters"
                  description: Callback url of the business where payku will notify the payment.
                  type: string
                  format: url
                  example: https://youwebsite.com/urlnotify?orderClient=123
                marketplace:
                  pattern: " maximum 70 characters"
                  description: Mandatory attribute to make transactions to Marketplace affiliation, this consists of the token of the marketplace affiliation to which you want to carry out the transaction.
                  type: string
                  example: c1c879f4862d393ea6b326a313022dd98f0baa2869d3e9095c124199c9941030
              required:
                - email
                - order
                - subject
                - amount

  /api/mall:
    post:
      tags:
        - Mall
      summary: Create Mall transaction
      description: This method allows the insertion of data from a transaction.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/mallPostResponse'
        '400':
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Wrong Public Token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
      x-codeSamples:
        - lang: 'CURL'
          source: |
            curl -X POST \
            https://BASE_URL/api/mall \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Sign: SIGN  \
            -H 'Authorization: Bearer TOKEN_PUBLICO  \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE_URL' \
            -d {
                "email": "joedoe@gmail.com",
                "payment": 21,
                "merchant": [
                  ["81b6179e4feeef2b50af71d660f830de", "30000", "item1", null, "4545"],
                  ["bcf6c06c523d9394be41bc0174c43d1476f274abb342955aac93cc8014737b3b","25000","item2", null, "4546"],
                  ["PUBLIC-TOKEN","15000","item3", null, "4547"]
                ],
                "order": 123,
                "urlreturn": "https://youwebsite.cl/urlreturn",
                "urlnotify": "https://youwebsite.cl/urlnotify"
              }'
        - lang: 'PHP'
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('POST', 'https://BASE_URL/api/mall', [
                'json' => [
                  'email'         => 'joedoe@gmail.com',
                  'payment'       => 1,
                  'merchant'      => [
                    ['81b6179e4feeef2b50af71d660f830de', '30000', 'item1', null, '4545'],
                    ['bcf6c06c523d9394be41bc0174c43d1476f274abb342955aac93cc8014737b3b','25000','item2', null, '4546'],
                    ['PUBLIC-TOKEN','15000','item3', null, '4547']
                  ],
                  'order'         => 123,
                  'urlreturn'     => 'https://youwebsite.cl/urlreturn',
                  'urlnotify'     => 'https://youwebsite.cl/urlnotify'
                  ],
                'headers' => [
                  'Sign' => 'f96ddc14a73a4dd6e009db2514108a3f44832795cd5ac50e6a80fd0b0ae92112',
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: 'JS'
          source: |
            const request = async (data) => {
              const response = await fetch('https://BASE_URL/api/mall', {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign': 'f96ddc14a73a4dd6e009db2514108a3f44832795cd5ac50e6a80fd0b0ae92112',
                  'Authorization': 'Bearer PUBLIC-TOKEN'
                },
                body: JSON.stringify(data)
              });
              const result = await response.json();
              console.log(result)
            }
            let data = {
              email: "joedoe@gmail.com",
              payment: 1,
              merchant: [
                ["81b6179e4feeef2b50af71d660f830de", "30000", "item1", null, "4545"],
                ["bcf6c06c523d9394be41bc0174c43d1476f274abb342955aac93cc8014737b3b","25000","item2", null, "4546"],
                ["PUBLIC-TOKEN","15000","item3", null, "4547"]
              ],
              order: 123,
              urlreturn: "https://youwebsite.cl/urlreturn",
              urlnotify: "https://youwebsite.cl/urlnotify"
            };
            request(data);
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  pattern: " maximum 50 characters"
                  description: Customer email.
                  type: string
                  format: email
                  example: joedoe@gmail.com
                payment:
                  pattern: " maximum 2 characters"
                  description: |
                    Identifier of the payment method. If the identifier is sent, the payer will be redirected directly to the indicated means of payment.
                    - 1 Webpay
                    - 4 Etpay
                    - 6 Pago46
                    - 9 Mach
                    - 11 Khipu
                    - 99 All
                  type: integer
                  example: 1
                merchant:
                  pattern: " maximum 200 characters"
                  type: array of arrays
                  description: Array containing the clients, each client is an array containing its public token or marketplace affiliation id, transaction value, description, id of the specific event which if not owned must pass null and individual order number.
                  example:
                    - [81b6179e4feeef2b50af71d660f830de, 30000, item1,
                        null,
                        "4545"]
                    - [
                        bcf6c06c523d9394be41bc0174c43d1476f274abb342955aac93cc8014737b3b,
                        25000,
                        "item2",
                        null,
                        "4546"
                      ]
                    - [81b6179e4fffff2b50af71d66f7830de, 15000, item3,
                        null,
                        "4547"]
                order:
                  pattern: " maximum 40 characters"
                  description: Trade order, this must be unique.
                  type: integer
                  example: 123
                urlreturn:
                  pattern: " maximum 200 characters"
                  description: return url of the trade where payku will redirect the payer.
                  type: string
                  format: url
                  example: https://youwebsite.cl/urlreturn
                urlnotify:
                  pattern: " maximum 600 characters"
                  description: callback url of the business where payku will notify the payment.
                  type: string
                  format: url
                  example: https://youwebsite.cl/urlnotify
              required:
                - email
                - merchant
                - payment
                - order
                - urlreturn

  /api/mall/{identificadorTrasaccion}:
    get:
      tags:
        - Mall
      summary: 'Get Mall transaction'
      description: 'This method allows you to obtain the information of a payment made in **Payku**'
      operationId: getMallTransactionById
      parameters:
        - name: id
          in: path
          description: id of the transaction to request
          required: true
          schema:
            type: string
            pattern: " maximum 30 characters"
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdentifierMallResponse'
        '400':
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400get'
        '401':
          description: Wrong Public Token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Identifier does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
      x-codeSamples:
        - lang: 'CURL'
          source: |
            curl -X GET \
            https://BASE-URL/api/mall/ID-IDENTIFICADOR  \
            -H 'Accept: application/json, text/plain, */*' \
            -H 'Authorization: Bearer PUBLIC-TOKEN' \
            -H 'Content-Type: application/json' \
            -H 'Host: BASE-URL ' \
        - lang: 'PHP'
          source: |
            $client = new \GuzzleHttp\Client();
              $body = $client->request('GET', 'https://BASE_URL/api/mall/malld200058ab44739ddee2adcd2f5', [
                'headers' => [
                  'Sign' => 'f96ddc14a73a4dd6e009db2514108a3f44832795cd5ac50e6a80fd0b0ae92112',
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                ]
              ])->getBody();
            $response = json_decode($body);
        - lang: 'JS'
          source: |
            const request = async () => {
              const response = await fetch('https://BASE_URL/api/mall/malld200058ab44739ddee2adcd2f5', {
                method: 'GET',
                headers: {
                  'Content-Type': 'application/json',
                  'Sign' => 'f96ddc14a73a4dd6e009db2514108a3f44832795cd5ac50e6a80fd0b0ae92112',
                  'Authorization' => 'Bearer PUBLIC-TOKEN'
                },
              });
              const result = await response.json();
              console.log(result)
            }
            request();

components:
  schemas:
    BanksResponse:
      description: "Return data from the creation of a transaction"
      type: object
      properties:
        status:
          type: string
          description: |
            Status of the endpoint. The possible statuses that can be obtained are the following:
            - success
          example: "success"
        banks:
          type: array
          items:
            description: "Transaction status return data"
            type: object
            properties:
              code:
                type: string
                description: |
                  Code of the bank to which the bank account belongs.
                example: Banco de Chile
              name:
                type: string
                description: Name of bank.
                example: Banco de Chile
              currency:
                type: string
                description: Currency
                Example: PEN
          example:
            - {
                code: "007",
                name: "Citibank Perú S.A.",
                currency: "PEN"
              }

    BanksCurrencyResponse:
      description: "Code of the bank to which the bank account belongs in PEN"
      type: object
      properties:
        status:
          type: string
          description: |
            Status of the endpoint. The possible statuses that can be obtained are the following:
            - success
          example: "success"
        banks:
          type: array
          items:
            description: "Bank list return data"
            type: object
            properties:
              code:
                type: string
                description: |
                  Bank code of the bank to which the bank account belongs.
                example: Citibank Perú S.A.
              name:
                type: string
                description: Name of bank.
                example: Citibank Perú S.A.
              currency:
                type: string
                description: Currency
                Example: PEN
          example:
            - {
                code: "007",
                name: "Citibank Perú S.A.",
                currency: "PEN"
              }


    MethodsPaymentResponse:
      description: "Return data from the creation of the payment method list"
      type: object
      properties:
        status:
          type: string
          description: |
            Status of the endpoint. The possible statuses that can be obtained are the following:
            - success
          example: "success"
        payment_methods:
          type: array
          items:
            description: "Return data of the list of payment methods"
            type: object
            properties:
              description:
                type: string
                description: |
                  Brief description of payment method.
                example: Use your bank, simplify your transfers.
              payment:
                type: number
                description: |
                  Code belonging to the payment method.
                example: 17
              name:
                type: string
                description: Name of payment method.
                example: Vepuy
              currency:
                type: string
                description: Currency
                Example: PEN
          example:
            - {
                currency: "PEN",
                payment: 21,
                name: "QR Interoperable",
                description: ""
              }

    MethodsPaymentCurrencyResponse:
      description: "Return data from the creation of the payment method list"
      type: object
      properties:
        status:
          type: string
          description: |
            Status of the endpoint. The possible statuses that can be obtained are the following:
            - success
          example: "success"
        payment_methods:
          type: array
          items:
            description: "Payment method list status return data"
            type: object
            properties:
              description:
                type: string
                description: |
                  Brief description of payment method.
              payment:
                type: number
                description: |
                  Code belonging to the payment method.
                example: 21
              name:
                type: string
                description: Name of payment method.
                example: QR Interoperable
              currency:
                type: string
                description: Currency
                example: PEN
          example:
            - {
                currency: "PEN",
                payment: 21,
                name: "QR Interoperable",
                description: ""
              }

    AdminClientResponse:
      description: "Return data from a client insert"
      type: object
      properties:
        status:
          description: Client status.
          type: string
          example: "active"
        id:
          type: string
          description: Identifier of the transaction created by payku.
          example: "cl0be4c8e623c167bc8b29"
        rut:
          description: Single Tax Registry of the client.
          type: string
          example: "11111111"
        name:
          type: string
          description: Client name.
          example: "Joe Doe"
        phone:
          type: string
          description: Client phone.
          example: "923122312"
        email:
          type: string
          description: Client email.
          example: "joedoe@gmail.com"
        address:
          description: Client address.
          type: string
          example: "Moneda 101"
        country:
          description: Client country.
          type: string
          example: "Chile"
        region:
          description: Client region.
          type: string
          example: "Metropolitana"
        city:
          description: Client city.
          type: string
          example: "Santiago"
        postal_code:
          description: Client Zip Code.
          type: string
          example: "850000"
        create_at:
          description: Registration date.
          type: string
          example: "2020-09-29"
          format: datetime
        update_at:
          description: Update date.
          type: string
          example: null
          format: datetime
        subcriptions:
          description: Client subscriptions.
          type: object
          example: null
        additional_parameters:
          description: Client additional parameters
          type: object
          properties:
            parameter_1:
              description: Client additional parameter
              type: string
              example: "example"
            parameter_2:
              description: Client additional parameter
              type: string
              example: "example"

    ClientIdResponse:
      description: "Return data from a client insert"
      type: object
      properties:
        status:
          description: Client status.
          type: string
          example: "active"
        id:
          type: string
          description: Identifier of the transaction created by payku.
          example: "cl0be4c8e623c167bc8b29"
        rut:
          description: Single Tax Registry of the client.
          type: string
          example: "11111111"
        name:
          type: string
          description: Client name.
          example: "Joe Doe"
        phone:
          type: string
          description: Client phone.
          example: "923122312"
        email:
          type: string
          description: Client email.
          example: "joedoe@gmail.com"
        address:
          description: Client address.
          type: string
          example: "Moneda 101"
        city:
          description: Client city.
          type: string
          example: "Santiago"
        region:
          description: Client region.
          type: string
          example: "Metropolitana"
        country:
          description: Client country.
          type: string
          example: "Chile"
        postal_code:
          description: Client Zip Code.
          type: string
          example: "850000"
        create_at:
          description: Registration date.
          type: string
          example: "2020-09-29"
          format: datetime
        update_at:
          description: Update date.
          type: string
          example: null
          format: datetime
        active_cards:
          type: array
          items:
            type: object
            properties:
              last_4_digits:
                description: Last 4 digits of the affiliated carda.
                type: string
                example: "XXXXXXXXXXXX6622"
              identifier:
                description: id card.
                type: string
                example: "surec804a8ed60c747cb8839"
              card_type:
                description: card type.
                type: string
                example: "Visa"
              register:
                description: Register date.
                type: string
                example: "2022-07-26 08:00:19"
          example:
            - last_4_digits: "XXXXXXXXXXXX6622"
              identifier: "surec804a8ed60c747cb8839"
              card_type: "Visa"
              register: "2022-07-26 08:00:19"
            - last_4_digits: "XXXXXXXXXXXX1234"
              identifier: "surec804a8ed60c747cb8843"
              card_type: "MasterCard"
              register: "2023-01-01 12:00:00"
        additional_parameters:
          description: Client additional parameters
          type: object
          properties:
            parameter_1:
              description: Client additional parameter
              type: string
              example: "example"
            parameter_2:
              description: Client additional parameter
              type: string
              example: "example"
        subcriptions:
          type: object
          properties:
            id:
              description: Subscription identifier created by payku.
              type: string
              example: "su867f07772aa5f5175527"
            created_at:
              description: Registration date.
              type: string
              example: "2020-09-29 19:58:35"
              format: datetime
            status:
              description: |
                Subscription status. The possible statuses you can get are the following:
                - register
                - active
                - finish
                - delete
                - cancel
                - suspended
              type: string
              example: "active"
            amount:
              description: Subscription amount.
              type: string
              example: "15000"
            plan:
              type: array
              items:
                type: object
                properties:
                  id:
                    description: Identifier of the plan created by payku.
                    type: string
                    example: "pl9697fb170834ad42dd00"
                  name:
                    description: Plan name.
                    type: string
                    example: "test plan"
                  currency:
                    description: Currency.
                    type: string
                    example: "PEN"
            cards:
              type: array
              items:
                type: object
                properties:
                  last_4_digits:
                    description: Last 4 digits of the affiliated card.
                    type: string
                    example: "6622"
                  card_type:
                    description: Card type.
                    type: string
                    example: "Visa"
            transactions:
              type: array
              items:
                type: object
                properties:
                  created_at:
                    description: Transaction creation date.
                    type: string
                    example: "2020-09-30 19:58:35"
                  date_payment:
                    description: Date the transaction was made.
                    type: string
                    example: "2020-09-30"
                  amount:
                    description: Transaction amount.
                    type: string
                    example: "10000"
                  transaction:
                    description: Transaction number.
                    type: string
                    example: "204444"
                  authorization_code:
                    description: Authorization code.
                    type: string
                    example: "1234"
                  order:
                    description: Number of order.
                    type: string
                    example: "001"
                  description:
                    description: Description.
                    type: string
                    example: "description"
                  status:
                    description: |
                      Transaction status The possible statuses you can get are the following:
                      - pending
                      - success
                      - retry
                      - canceled by customer
                      - canceled by paymaster
                      - canceled by payku
                      - maximum attempt limit
                      - first payment rejected
                      - payment consumes failed
                    type: string
                    example: "success"

    ModifyClientResponse:
      description: "Return data from the modification of a client"
      type: object
      properties:
        status:
          description: Client status.
          type: string
          example: "active"
        id:
          type: string
          description: Transaction identifier created by payku.
          example: "cl0be4c8e623c167bc8b29"
        name:
          type: string
          description: Client name.
          example: "Joe Doe Doe"
        phone:
          type: string
          description: Client phone.
          example: "923122312"
        email:
          type: string
          description: Client email.
          example: "joedoe@gmail.com"
        address:
          description: Client address.
          type: string
          example: "Moneda 121"
        city:
          description: Client city.
          type: string
          example: "Santiago"
        region:
          description: Client region.
          type: string
          example: "Metropolitana"
        country:
          description: Client country.
          type: string
          example: "Chile"
        postal_code:
          description: Client Zip Code.
          type: string
          example: "750000"
        create_at:
          description: Registration date.
          type: string
          example: "2020-09-29"
          format: datetime
        update_at:
          description: Update date.
          type: string
          example: "2020-10-2 08:32:52"
          format: datetime
        additional_parameters:
          description: Client additional parameters
          type: object
          properties:
            parameter_1:
              description: Client additional parameter
              type: string
              example: "example"
            parameter_2:
              description: Client additional parameter
              type: string
              example: "example"
        subcriptions:
          type: object
          properties:
            id:
              description: Subscription identifier created by payku.
              type: string
              example: "su867f07772aa5f5175527"
            created_at:
              description: Registration date.
              type: string
              example: "2020-09-29 19:58:35"
              format: datetime
            status:
              description: |
                Subscription status. The possible statuses you can get are the following:
                - register
                - active
                - finish
                - delete
                - cancel
                - suspended
              type: string
              example: "active"
            amount:
              description: Subscription amount.
              type: string
              example: "15000"
            plan:
              type: array
              items:
                type: object
                properties:
                  id:
                    description: Identifier of the plan created by payku.
                    type: string
                    example: "pl9697fb170834ad42dd00"
                  name:
                    description: Plan name.
                    type: string
                    example: "test plan"
                  currency:
                    description: currency.
                    type: string
                    example: "PEN"
            cards:
              type: array
              items:
                type: object
                properties:
                  last_4_digits:
                    description: Last 4 digits of the affiliated card.
                    type: string
                    example: "6622"
                  card_type:
                    description: Card type.
                    type: string
                    example: "Visa"
            transactions:
              type: array
              items:
                type: object
                properties:
                  created_at:
                    description: Transaction creation date.
                    type: string
                    example: "2020-09-30 19:58:35"
                  date_payment:
                    description: Date the transaction was made.
                    type: string
                    example: "2020-09-30"
                  amount:
                    description: Transaction amount.
                    type: string
                    example: "10000"
                  transaction:
                    description: Transaction number.
                    type: string
                    example: "204444"
                  authorization_code:
                    description: Authorization code.
                    type: string
                    example: "1234"
                  order:
                    description: Number of order.
                    type: string
                    example: "001"
                  description:
                    description: Description.
                    type: string
                    example: "description"
                  status:
                    description: |
                      Transaction status The possible statuses you can get are the following:
                      - pending
                      - success
                      - retry
                      - canceled by customer
                      - canceled by paymaster
                      - canceled by payku
                      - maximum attempt limit
                      - first payment rejected
                      - payment consumes failed
                    type: string
                    example: "success"

    AllClientResponse:
      description: "Return data from the modification of a client"
      type: object
      properties:
        Customers:
          type: array
          description: "Arreglo que contiene a los clientes"
          items:
            type: object
            properties:
              status:
                description: Client status.
                type: string
                example: "active"
              id:
                type: string
                description: Identifier of the transaction created by payku.
                example: "cl0be4c8e623c167bc8b29"
              rut:
                description: Single Tax Registry of the client.
                type: string
                example: "11111111"
              name:
                type: string
                description: Client name.
                example: "Joe Doe"
              phone:
                type: string
                description: Client phone.
                example: "923122312"
              email:
                type: string
                description: Client email.
                example: "joedoe@gmail.com"
              address:
                description: Client address.
                type: string
                example: "Moneda 101"
              city:
                description: Client city.
                type: string
                example: "Santiago"
              region:
                description: Client region.
                type: string
                example: "Metropolitana"
              country:
                description: Client country.
                type: string
                example: "Chile"
              postal_code:
                description: Client Zip Code.
                type: string
                example: "850000"
              create_at:
                description: Registration date.
                type: string
                example: "2020-09-29"
                format: datetime
              update_at:
                description: Update date.
                type: string
                example: null
                format: datetime
              active_cards:
                type: array
                items:
                  type: object
                  properties:
                    last_4_digits:
                      description: Last 4 digits of the affiliated carda.
                      type: string
                      example: "XXXXXXXXXXXX6622"
                    identifier:
                      description: id card.
                      type: string
                      example: "surec804a8ed60c747cb8839"
                    card_type:
                      description: card type.
                      type: string
                      example: "Visa"
                    register:
                      description: Register date.
                      type: string
                      example: "2022-07-26 08:00:19"
                example:
                  - last_4_digits: "XXXXXXXXXXXX6622"
                    identifier: "surec804a8ed60c747cb8839"
                    card_type: "Visa"
                    register: "2022-07-26 08:00:19"
                  - last_4_digits: "XXXXXXXXXXXX1234"
                    identifier: "surec804a8ed60c747cb8843"
                    card_type: "MasterCard"
                    register: "2023-01-01 12:00:00"
              subcriptions:
                type: object
                properties:
                  id:
                    description: Subscription identifier created by payku.
                    type: string
                    example: "su867f07772aa5f5175527"
                  created_at:
                    description: Registration date.
                    type: string
                    example: "2020-09-29 19:58:35"
                    format: datetime
                  status:
                    description: |
                      Subscription status. The possible statuses you can get are the following:
                      - register
                      - active
                      - finish
                      - delete
                      - cancel
                      - suspended
                    type: string
                    example: "active"
                  amount:
                    description: Subscription amount.
                    type: string
                    example: "15000"
                  plan:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: Identifier of the plan created by payku.
                          type: string
                          example: "pl9697fb170834ad42dd00"
                        name:
                          description: Plan name.
                          type: string
                          example: "test plan"
                        currency:
                          description: Currency.
                          type: string
                          example: "PEN"
                  cards:
                    type: array
                    items:
                      type: object
                      properties:
                        last_4_digits:
                          description: Last 4 digits of the affiliated card.
                          type: string
                          example: "6622"
                        card_type:
                          description: Card type.
                          type: string
                          example: "Visa"
                  transactions:
                    type: array
                    items:
                      type: object
                      properties:
                        created_at:
                          description: Transaction creation date.
                          type: string
                          example: "2020-09-30 19:58:35"
                        date_payment:
                          description: Date the transaction was made.
                          type: string
                          example: "2020-09-30"
                        amount:
                          description: Transaction amount.
                          type: string
                          example: "10000"
                        transaction:
                          description: Transaction number.
                          type: string
                          example: "204444"
                        authorization_code:
                          description: Authorization code.
                          type: string
                          example: "1234"
                        order:
                          description: Number of order.
                          type: string
                          example: "001"
                        description:
                          description: Description.
                          type: string
                          example: "description"
                        status:
                          description: |
                            Transaction status The possible statuses you can get are the following:
                            - pending
                            - success
                            - retry
                            - canceled by customer
                            - canceled by paymaster
                            - canceled by payku
                            - maximum attempt limit
                            - first payment rejected
                            - payment consumes failed
                          type: string
                          example: "success"

    DeleteClientResponse:
      description: "Return data deleting a client"
      type: object
      properties:
        status:
          type: string
          description: Client status.
          example: "success"
        id:
          type: string
          description: Transaction identifier created by payku.
          example: "cl0be4c8e623c167bc8b29"

    DeleteClientMarketResponse:
      description: "Return data deleting a client"
      type: object
      properties:
        status:
          type: string
          description: Client status.
          example: "suspended"
        id:
          type: string
          description: Transaction identifier created by payku.
          example: "madb93fc00a2cf6f4449"

    DeleteAffiliationResponse:
      description: "Return data deleting a membership"
      type: object
      properties:
        status:
          type: string
          description: Membership status.
          example: "suspended"
        id:
          type: string
          description: Transaction identifier created by payku.
          example: "eecd92fdbb8bf615e821"

    PlanResponse:
      description: "Return data from inserting a plan"
      type: object
      properties:
        status:
          type: string
          description: Status.
          example: "success"
        id:
          type: string
          description: Unique plan identifier per payku.
          example: "pl4293e97a87195bb9edcd"

    DeleteSuscriptionResponse:
      description: "Return data from the deletion of a subscription"
      type: object
      properties:
        id:
          type: string
          description: Transaction identifier created by payku.
          example: "sucaab7865dceaff49d8b3"
        status:
          type: string
          description: Status.
          example: "success"

    CreateSuscriptionResponse:
      description: "Return data from the insertion of data from a subscription"
      type: object
      properties:
        status:
          type: string
          description: Status.
          example: "register"
        id:
          type: string
          description: Unique subscription identifier for payku.
          example: "sucaab7865dceaff49d8b3"
        url:
          type: string
          description: Url payment and subscription activation.
          example: "http://app.payku.cl/gateway/registrosuscripcion?tipoplan=2&plan=true&token=219&validacion=e6c50ba0e0"

    PlanIdResponse:
      description: "Plan query return data by id"
      type: object
      properties:
        status:
          type: string
          description: Status.
          example: "success"
        plans:
          type: object
          properties:
            id:
              description: Unique plan identifier per payku.
              type: string
              example: "pl4293e97a87195bb9edcd"
            status:
              description: Plan status.
              type: string
              example: "active"
            name:
              description: Plan name.
              type: string
              example: "Test plan"
            code:
              description: Plan code.
              type: string
              example: "001"
            description:
              description: Plan description.
              type: string
              example: "Test Plan"
            url_notify_payment:
              description:
              type: string
              example: ""
              format: url
            url_notify_suscription:
              description:
              type: string
              example: ""
              format: url
            total_suscription:
              description: Total subscriptions.
              type: integer
              example: 0
            total_suscription_active:
              description: Total active subscriptions.
              type: integer
              example: 0

    PlanAllResponse:
      description: "Plan query return data by id"
      type: object
      properties:
        status:
          type: string
          description: Status.
          example: "success"
        plans:
          type: array
          items:
            type: object
            properties:
              id:
                description: Unique plan identifier per payku.
                type: string
                example: "pl4293e97a87195bb9edcd"
              status:
                description: Plan status.
                type: string
                example: "active"
              name:
                description: Plan name.
                type: string
                example: "Test plan"
              code:
                description: Plan code.
                type: string
                example: "001"
              description:
                description: Plan description.
                type: string
                example: "Test Plan"
              url_notify_payment:
                description:
                type: string
                example: ""
                format: url
              url_notify_suscription:
                description:
                type: string
                example: ""
                format: url
              total_suscription:
                description: Total subscriptions.
                type: integer
                example: 0
              total_suscription_active:
                description: Total active subscriptions.
                type: integer
                example: 0

    CreateSuTransactionResponse:
      description: "Return data from the insertion of data from a subscription"
      type: object
      properties:
        status:
          description: |
            Transaction status. The possible statuses you can get are the following:
            - pending
            - success
            - rejected
            - refunded partial
            - refunded
          type: string
          example: success
        order:
          description: Order.
          type: string
          example: "001"
        amount:
          description: Amount.
          type: string
          example: "10000"
        transaction_id:
          description: Transaction number.
          type: string
          example: "204444"
        verification_key:
          description:
          type: string
          example: "025dcad37e071daa8bfc2df35189009db65692a4ff766856108be1675e870839"

    CardSuscriptionResponse:
      description: "Return data from data insertion of a card"
      type: object
      properties:
        status:
          description: Status.
          type: string
          example: success
        id:
          description: Unique subscription identifier for payku.
          type: string
          example: sucaab7865dceaff49d8b3
        url:
          description: URL paid and subscription activation.
          type: string
          example: https://BASE_URL/gateway/registrosuscripcion?plan=true&token=246&validacion=d6b32

    CardDeleteSuscriptionResponse:
      description: "Datos de retorno de la tarjeta eliminada"
      type: object
      properties:
        status:
          description: Status.
          type: string
          example: Delete
        card:
          description: Identificador único de La tarjeta asociada a la suscripción.
          type: string
          example: surec804a8ed60c0a8cb8839

    SuscriptionIdResponse:
      description: "Return data from the query of a subscription"
      type: object
      properties:
        id:
          type: string
          description: Subscription identifier created by payku.
          example: "sucaab7865dceaff49d8b7"
        status:
          type: string
          description: |
            Subscription status. The possible statuses you can get are the following:
             - register
             - active
             - finish
             - delete
             - cancel
             - suspended
          example: "active"
        start:
          type: string
          description: Subscription start date.
          example: "2019-07-22 18:34:49"
        end:
          type: string
          description: Subscription termination date.
          example: "2020-06-12 00:00:00"
        client:
          type: object
          properties:
            id:
              description: Client identifier created by payku.
              type: string
              example: "su7e5e1c0b1bd2e37ec557"
            name:
              description: Client name.
              type: string
              example: "name"
            email:
              description: Client email.
              type: string
              example: "example@domain.com"
            rut:
              description: Unique Roll Tributary.
              type: string
              example: "1.111.111-1"
            phone:
              description: Client phone.
              type: string
              example: "example@domain.com"
            parametros:
              description:
              type: array
            additional_parameters:
              type: array
              description: Additional parameters that Payku can send.
              example: ""
        plan:
          type: object
          properties:
            id:
              description: Identifier of the plan created by payku.
              type: string
              example: "pl9697fb170834ad42dd00"
            name:
              description: Plan name.
              type: string
              example: "test plan"
            currency:
              description: Currency.
              type: string
              example: "PEN"
        cards:
          type: object
          properties:
            last_4_digits:
              description: Last 4 digits of the affiliated card.
              type: string
              example: "6622"
            card_type:
              description: Card type.
              type: string
              example: "Visa"
        active_cards:
          type: array
          items:
            type: object
            properties:
              last_4_digits:
                description: Last 4 digits of the affiliated carda.
                type: string
                example: "XXXXXXXXXXXX6622"
              identifier:
                description: id card.
                type: string
                example: "surec804a8ed60c747cb8839"
              card_type:
                description: card type.
                type: string
                example: "Visa"
              register:
                description: Register date.
                type: string
                example: "2022-07-26 08:00:19"
          example:
            - last_4_digits: "XXXXXXXXXXXX6622"
              identifier: "surec804a8ed60c747cb8839"
              card_type: "Visa"
              register: "2022-07-26 08:00:19"
            - last_4_digits: "XXXXXXXXXXXX1234"
              identifier: "surec804a8ed60c747cb8843"
              card_type: "MasterCard"
              register: "2023-01-01 12:00:00"
        transactions:
          type: array
          items:
            type: object
            properties:
              created_at:
                description: Transaction creation date.
                type: string
                example: "2020-09-30 19:58:35"
              amount:
                description: Transaction amount.
                type: string
                example: "10000"
              transaction:
                description: Transaction number.
                type: string
                example: "204444"
              authorization_code:
                description: Authorization code.
                type: string
                example: "1234"
              order:
                description: Number of order.
                type: string
                example: "001"
              description:
                description: Description.
                type: string
                example: "description"
              status:
                description: |
                  Transaction status The possible statuses you can get are the following:
                  - pending
                  - success
                  - rejected
                  - refunded partial
                  - refunded
                type: string
                example: "success"
        logs:
          description: Object with information records about subscriptions
          type: object
          properties:
            status:
              description: Array containing the status changes that were made on the subscription
              type: array
              items:
                type: object
                properties:
                  change_date:
                    description: Date the change was made
                    type: string
                    example: "2021-02-17 16:11:53"
                  initial_status:
                    description: Initial subscription status
                    type: string
                    example: "register"
                  final_status:
                    description: Final subscription status
                    type: string
                    example: "active"

    SuscriptionAllResponse:
      type: object
      properties:
        subscriptions:
          type: array
          items:
            description: "Return data from the query of all subscriptions"
            type: object
            properties:
              id:
                type: string
                description: Subscription identifier created by payku.
                example: "sucaab7865dceaff49d8b7"
              status:
                type: string
                description: |
                  Subscription status. The possible statuses you can get are the following:
                  - register
                  - active
                  - finish
                  - delete
                  - cancel
                  - suspended
                example: "active"
              last_status_current_payment:
                type: string
                description: |
                  Last status of the current subscription.
                example: "pending"
              start:
                type: string
                description: Subscription start date.
                example: "2019-07-22 18:34:49"
              end:
                type: string
                description: Subscription termination date.
                example: "2020-06-12 00:00:00"
              client:
                type: object
                properties:
                  id:
                    description: Customer identifier created by payku.
                    type: string
                    example: "su7e5e1c0b1bd2e37ec557"
                  name:
                    description: Customer name.
                    type: string
                    example: "name"
                  email:
                    description: Customer email.
                    type: string
                    example: "example@domain.com"
                  rut:
                    description: Unique Roll Tributary.
                    type: string
                    example: "1.111.111-1"
                  phone:
                    description: Customer phone.
                    type: string
                    example: "56928265454"
                  parametros:
                    description:
                    type: array
                  additional_parameters:
                    type: array
                    description: Additional parameters that Payku can send.
                    example: ""
              plan:
                type: object
                properties:
                  id:
                    description: Identifier of the plan created by payku.
                    type: string
                    example: "pl9697fb170834ad42dd00"
                  name:
                    description: Plan name.
                    type: string
                    example: "test plan"
                  currency:
                    description: Currency.
                    type: string
                    example: "PEN"
              cards:
                type: object
                properties:
                  last_4_digits:
                    description: Last 4 digits of the affiliated card.
                    type: string
                    example: "6622"
                  card_type:
                    description: Card type.
                    type: string
                    example: "Visa"
              transactions:
                type: array
                items:
                  type: object
                  properties:
                    created_at:
                      description: Transaction creation date.
                      type: string
                      example: "2020-09-30 19:58:35"
                    amount:
                      description: Transaction amount.
                      type: string
                      example: "10000"
                    transaction:
                      description: Transaction number.
                      type: string
                      example: "204444"
                    authorization_code:
                      description: Authorization code.
                      type: string
                      example: "1234"
                    order:
                      description: Number of order.
                      type: string
                      example: "001"
                    description:
                      description: Description.
                      type: string
                      example: "description"
                    status:
                      description: |
                        Transaction status The possible statuses you can get are the following:
                        - pending
                        - success
                        - rejected
                        - refunded partial
                        - refunded
                      type: string
                      example: "success"
              logs:
                description: Object with information records about subscriptions
                type: object
                properties:
                  status:
                    description: Array containing the status changes that were made on the subscription
                    type: array
                    items:
                      type: object
                      properties:
                        change_date:
                          description: Date the change was made
                          type: string
                          example: "2021-02-17 16:11:53"
                        initial_status:
                          description: Initial subscription status
                          type: string
                          example: "register"
                        final_status:
                          description: Final subscription status
                          type: string
                          example: "active"

    TransactionResponse:
      description: "Return data from the creation of a transaction"
      type: object
      properties:
        status:
          type: string
          description: |
            Transaction status The possible statuses you can get are the following:
            - pending
            - success
            - rejected
            - refunded partial
            - refunded
          example: "pending"
        id:
          type: string
          description: Transaction identifier created by payku.
          example: "ma32cb779c0a777fc68"
        url:
          type: string
          description: URL to redirect the user.
          example: "https://BASE-URL/payment_url"

    TransactionRegisterResponse:
      description: "Return data from the creation of a transaction"
      type: object
      properties:
        status:
          type: string
          description: |
            Transaction status. The possible statuses you can get are the following:
            - register
            - pending
            - success
            - rejected
            - refunded partial
            - refunded
          example: "pending"
        id:
          type: string
          description: Transaction identifier created by payku.
          example: "trx32cb779c0a777fc68"
        url:
          type: string
          description: URL to redirect the user.
          example: "https://BASE-URL/payment_url"
        hash:
          type: string
          description: Hash of the transaction to generate the QR.
          example: "00020000000000000111111222233339030226304E245"
        qr_image:
          type: string
          description: QR image.
          example: "data:image/png;base64,......"

    IdentifierResponse:
      description: "Status return data of a transaction"
      type: object
      properties:
        status:
          type: string
          description: |
            Transaction status The possible statuses you can get are the following:
            - register
            - pending
            - success
            - rejected
          example: "success"
        id:
          type: string
          description: Transaction identifier created by Payku.
          example: "10ac494c1d8da71d98ea"
        created_at:
          type: string
          description: Registration date.
          example: "2019-10-25 14:10:03"
        order:
          type: string
          description: Number of order.
          example: "1572023402"
        email:
          type: string
          description: Client email.
          example: "support@youwebsite.cl"
        subject:
          type: string
          description: Description of the purchase order.
          example: "1572023402"
        amount:
          type: string
          description: Amount.
          example: "98745"
        payment:
          type: object
          properties:
            start:
              type: string
              description: Start of the transaction.
              example: "2020-12-16 15:10:33"
            end:
              type: string
              description: End of transaction.
              example: "2020-12-16 15:10:36"
            media:
              type: string
              description: Payment method, used by the user.
              example: "QR Interoperable"
            transaction_id:
              type: string
              description: Identifier of the transaction created by payku.
              example: "107999"
            transaction_key:
              type: string
              description: Transaction identifier created by Payku.
              example: null
            deposit_date:
              type: string
              description: Date on which the deposit will be made to the client.
              example: "2022-10-05"
            verification_key:
              type: string
              description: Verification code created by Payku.
              example: "6669cbd982ef54c28f2f15fb9dc5262d"
            authorization_code:
              type: string
              description: Authorization code.
              example: "107742"
            last_4_digits:
              type: string
              description: Last 4 digits of the affiliated card.
              example: "1233"
            installments:
              type: int
              description: installments.
              example: 0
            card_type:
              type: string
              description: Card type.
              example: ""
            additional_parameters:
              type: object
              description: |
                **Example** of additional parameters that Payku can send.
              properties:
                identificador:
                  type: string
                  description: |
                    **Example** of transaction identifier:
                  example: "11.111.111-1"
                banco:
                  type: string
                  description: |
                    **Example** of bank where the transaction was made:
                  example: "Banco Estado"
                numero_cuenta:
                  type: string
                  description: |
                    **Example** of account number in which the transaction was made:
                  example: "00126544977"
                network:
                  type: object
                  description: |
                    User network data:
                  properties:
                    ip_address:
                      type: string
                      description: |
                        **Example** of IP Address of the user:
                      example: "192.0.2.123"
            currency:
              type: string
              description: Currency.
              example: "PEN"
        nullify:
          description: "Objeto que contiene información de la respuesta de la anulación"
          type: object
          properties:
            status:
              type: string
              description: |
                Estatus de anulación. Los posibles estados que puede obtener son los siguientes:
                - pending
                - awaiting_funds
                - waiting_bank_details
                - complete
                - reverse_deleted
                - reverse_completed
              example: "complete"
        gateway_response:
          description: "Object containing transaction response information"
          type: object
          properties:
            status:
              type: string
              description: |
                Transaction status The possible statuses you can get are the following:
                - pending
                - success
                - rejected
                - refunded partial
                - refunded
              example: "success"
            message:
              type: string
              description: |
                Message describing the status.
                  - successful transaction
                  - Transaction rejected.
                  - Transaction must be retried.
                  - Error transaction.
                  - Rate Error Rejection.
                  - Exceeds maximum monthly quota.
                  - Exceeds daily limit per transaction.
                  - unauthorized item.
              example: "successful transaction"

    IdentifierAllResponse:
      type: object
      properties:
        transaction:
          type: array
          items:
            description: "Status return data of a transaction"
            type: object
            properties:
              id:
                type: string
                description: Identifier of the transaction created by Payku.
                example: "10ac494c1d8da71d98ea"
              status:
                type: string
                description: |
                  Transaction status The possible statuses you can get are the following:
                  - register
                  - pending
                  - success
                  - rejected
                example: "success"
              created_at:
                type: string
                description: Registration date.
                example: "2019-10-25 14:10:03"
              email:
                type: string
                description: User email.
                example: "alex@onequark.com"
              amount:
                type: string
                description: Amount.
                example: "98745"
              order:
                type: string
                description: Order number.
                example: "1572023402"
              subject:
                type: string
                description: Description of the purchase order.
                example: "1572023402"
              payment:
                type: object
                properties:
                  start:
                    type: string
                    description: Start transaction.
                    example: "2020-12-16 15:10:33"
                  end:
                    type: string
                    description: End transaction.
                    example: "2020-12-16 15:10:36"
                  media:
                    type: string
                    description: Payment method, used by the user.
                    example: "QR Interoperable"
                  transaction_id:
                    type: string
                    description: Identifier of the transaction created by payku.
                    example: "107999"
                  transaction_key:
                    type: string
                    description: Transaction identifier created by Payku.
                    example: null
                  deposit_date:
                    type: string
                    description: Date on which the deposit will be made to the client.
                    example: "2022-10-05"
                  verification_key:
                    type: string
                    description: Verification code created by Payku.
                    example: "6669cbd982ef54c28f2f15fb9dc5262d"
                  authorization_code:
                    type: string
                    description: Authorization code.
                    example: "107742"
                  last_4_digits:
                    type: string
                    description: Last 4 digits of the affiliated card.
                    example: "1233"
                  installments:
                    type: int
                    description: installments.
                    example: 0
                  card_type:
                    type: string
                    description: Card type.
                    example: ""
                  additional_parameters:
                    type: object
                    description: |
                      **Example** of additional parameters that Payku can send.
                    properties:
                      identificador:
                        type: string
                        description: |
                          **Example** of transaction identifier:
                        example: "11.111.111-1"
                      banco:
                        type: string
                        description: |
                          **Example** of bank where the transaction was made:
                        example: "Banco Estado"
                      numero_cuenta:
                        type: string
                        description: |
                          **Example** of account number in which the transaction was made:
                        example: "00126544977"
                  currency:
                    type: string
                    description: Currency.
                    example: "PEN"
              nullify:
                description: "Object containing abort response information"
                type: object
                properties:
                  status:
                    type: string
                    description: |
                      Cancellation status. The possible statuses you can get are as follows:
                      - pending
                      - awaiting_funds
                      - waiting_bank_details
                      - complete
                      - reverse_deleted
                      - reverse_completed
                      - reverse_deleted
                    example: "complete"
              gateway_response:
                description: "Object containing transaction response information"
                type: object
                properties:
                  status:
                    type: string
                    description: |
                      Transaction status The possible statuses you can get are the following:
                      - pending
                      - success
                      - rejected
                      - refunded partial
                      - refunded
                    example: "success"
                  message:
                    type: string
                    description: |
                      Message describing the status.
                        - successful transaction
                        - Transaction rejected.
                        - Transaction must be retried.
                        - Error transaction.
                        - Rate Error Rejection.
                        - Exceeds maximum monthly quota.
                        - Exceeds daily limit per transaction.
                        - unauthorized item.
                    example: "successful transaction"

    IdentifierMallResponse:
      description: "Status return data of a transaction"
      type: object
      properties:
        status:
          type: string
          description: |
            Transaction status The possible statuses you can get are the following:
            - pending
            - success
            - rejected
            - refunded partial
            - refunded
          example: "success"
        id:
          type: string
          description: Identifier of the transaction created by Payku.
          example: "10ac494c1d8da71d98ea"
        created_at:
          type: string
          description: Registration date.
          example: "2019-10-25 14:10:03"
        amount:
          type: string
          description: Amount.
          example: "98745"
        payment:
          type: object
          properties:
            media:
              type: string
              description: Payment method, used by the user.
              example: "Webpay"
            verification_key:
              type: string
              description: Verification code created by Payku.
              example: "6669cbd982ef54c28f2f15fb9dc5262d"
            authorization_code:
              type: string
              description: Authorization code.
              example: "107742"
            last_4_digits:
              type: string
              description: Last 4 digits of the affiliated card.
              example: "1233"
            card_type:
              type: string
              description: Card type.
              example: ""
            currency:
              type: string
              description: Currency.
              example: "PEN"
        merchant:
          type: array
          description: Arrangement containing beneficiary information.
          items:
            type: object
            properties:
              name:
                type: string
                description: Name of the beneficiary.
              amount:
                type: string
                description: Amount of the product or service.
              subject:
                type: string
                description: Description of the product or service.
          example:
            - {name: John Doe, amount: 30000,subject: item1}
            - {name: Jane Doe, amount: 25000,subject: item2}
            - {name: Enteprise, amount: 15000,subject: item3}

    VerificationResponse:
      description: "Return data from the creation of a transaction"
      type: object
      properties:
        order:
          type: string
          description: Transaction identifier created by payku.
          example: "9123123"
        status:
          type: string
          description:
            Successful validation = You will receive the string 'VALID'.
            Validation rejected = You will receive different than 'INVALID'.
          example: "VALID"

    NotifySuscriptionResponse:
      description: "Return data from the activation of a subscription"
      type: object
      properties:
        id:
          type: string
          description: Subscription identifier created by Payku.
          example: "su74866857980c7d2b4306"
        status:
          type: string
          description: |
            Subscription status. The possible statuses you can get are the following:
            - register
            - active
            - finish
            - delete
            - cancel
            - suspended
          example: "active"

    NotifyPaymentResponse:
      description: "Return data from the payment of a subscription"
      type: object
      properties:
        transaction_id:
          description: Unique transaction identifier by Payku.
          type: number
          example: 9123123
        verification_key:
          description: Unique transaction hash.
          type: string
          example: 2ba83615f863e72sdca5dfd0a6df2782
        order:
          description: Unique transaction identifier sent by the merchant.
          type: string
          example: 1568041684
        status:
          type: string
          description: |
            Transaction status The possible statuses you can get are the following:
            - pending
            - success
            - rejected
            - refunded partial
            - refunded
          example: "success"

    NotifyPaymentSuscriptionResponse:
      description: "Return data from the payment of a subscription"
      type: object
      properties:
        transaction_id:
          description: Unique identifier of transaction by Payku.
          type: number
          example: 9123123
        verification_key:
          description: Unique transaction hash.
          type: string
          example: 2ba83615f863e72sdca5dfd0a6df2782
        order:
          description: Unique identifier of the transaction sent by the merchant.
          type: string
          example: 1568041684
        status:
          type: string
          description: |
            Transaction status The possible statuses you can get are the following:
            - pending
            - success
            - rejected
            - refunded partial
            - refunded
          example: "success"
        subscriptions:
          type: object
          description: "Contains the subscription id and the subscribed customer"
          properties:
            id:
              type: string
              description: Unique subscription identifier for Payku.
              example: "su3ce571420e90b600eafb"
            client:
              type: string
              description: Unique identifier of the customer by Payku
              example: "cl795704ece0a3690baaf"

    EventCreateResponse:
      description: "Return data from creating an event"
      type: object
      properties:
        status:
          type: string
          description: Request status.
          example: "success"
        id:
          type: string
          description: Event id.
          example: "98374"
        event:
          type: string
          description: Event name.
          example: "Event"
        date_event:
          type: datetime
          description: Date on which the event will take place.
          example: "2020-12-20"
        date_payment:
          type: datetime
          description: Payment date of the event, must be greater than the date_event date.
          example: "2020-12-22"
        date_closing_sales:
          type: datetime
          description: Sales closing date, must be less than or equal to date_event.
          example: "2020-12-19 23:59:00"
        url_logo:
          type: string
          description: url that belongs to the event.
          format: url
          example: "https://example.cl/logo_event1.png"
        url_event:
          type: string
          description: url where the event is published.
          format: url
          example: "https://example.cl/event1"
        distribution:
          type: object
          description: Distribution of transactions.
          properties:
            affiliate:
              type: string
              description: Amount to distribute to beneficiaries.
              example: "100.00"
            service_sale:
              type: string
              description: Amount to distribute in the sales service.
              example: "10.00"
        affiliation:
          type: object
          description: Affiliate information.
          properties:
            id:
              type: string
              description: Beneficiary identifier.
              example: "b99dfd8193ebfd37d4b9"
            email:
              type: string
              description: Beneficiary email.
              example: "afiliate1@domain.com"
            percent:
              type: string
              description: Percentage which corresponds to the beneficiary.
              example: "100.00"
            status:
              type: string
              description: Beneficiary status.
              example: "pending"
        paymentData:
          type: object
          description: Distribution of beneficiaries.
          properties:
            count:
              type: number
              description: Sales quantity.
              example: 0
            amount_general:
              type: number
              description: General amount of all transactions.
              example: 0
            amount_affiliate:
              type: number
              description: Amount to distribute to beneficiaries.
              example: 0
            fee:
              type: number
              description: Fee.
              example: 0
            balance:
              type: number
              description: Amount to deposit.
              example: 0

    EventIdResponse:
      description: "Return data from creating an event"
      type: object
      properties:
        id:
          type: string
          description: Event identifier.
          example: "98374"
        event:
          type: string
          description: Event name.
          example: "Event"
        date_event:
          type: datetime
          description: Date on which the event will take place.
          example: "2020-12-20"
        date_payment:
          type: datetime
          description: Payment date of the event, must be greater than the date_event date.
          example: "2020-12-22"
        date_closing_sales:
          type: datetime
          description: Sales closing date, must be less than or equal to date_event.
          example: "2020-12-19 23:59:00"
        url_logo:
          type: string
          description: url logo that belongs to the event.
          format: url
          example: "https://example.cl/logo_event1.png"
        url_event:
          type: string
          description: url that belongs to the event.
          format: url
          example: "https://example.cl/event1"
        distribution:
          type: object
          description: Distribution of transactions.
          properties:
            affiliate:
              type: string
              description: Amount to distribute to beneficiaries.
              example: "100.00"
            service_sale:
              type: string
              description: Amount to distribute in the sales service.
              example: "10.00"
        affiliation:
          type: object
          description: Affiliate information.
          properties:
            id:
              type: string
              description: Beneficiary identifier.
              example: "b99dfd8193ebfd37d4b9"
            email:
              type: string
              description: Beneficiary email.
              example: "afiliate1@domain.com"
            percent:
              type: string
              description: Percentage which corresponds to the beneficiary.
              example: "100.00"
            status:
              type: string
              description: Beneficiary status.
              example: "pending"
        paymentData:
          type: object
          description: Distribution of beneficiaries.
          properties:
            count:
              type: number
              description: Sales quantity.
              example: 0
            amount_general:
              type: number
              description: General amount of all transactions.
              example: 0
            amount_affiliate:
              type: number
              description: Amount to distribute to beneficiaries.
              example: 0
            fee:
              type: number
              description: Fee.
              example: 0
            balance:
              type: number
              description: Amount to deposit.
              example: 0

    AdminClientMarketResponse:
      description: "Return data from a client insert"
      type: object
      properties:
        id:
          description: Identifier created by payku.
          type: string
          example: "madb93fc00a2cf6f4449"
        status:
          description: Client status.
          type: string
          example: "register"
        name:
          description: Client name.
          type: string
          example: "Joe Doe"
        phone:
          description: Client phone.
          type: string
          example: "923122312"
        email:
          description: Client email.
          type: string
          format: email
          example: joedoe@gmail.com
        bank:
          type: object
          properties:
            sbif:
              description: Bank code.
              type: string
              example: "1234"
            type:
              description: |
                Account type.
                - 1 Checking account
                - 2 Vista
                - 3 Saving account
              type: string
              example: "1"
            num:
              description: Client's account number.
              type: string
              example: "12312313121"
            rut:
              description: Single Tax Registry.
              type: string
              example: "111111111"
        affiliations:
          description: Number of affiliations.
          type: integer
          example: 0
        created_at:
          description: Registration date.
          type: string
          example: "2020-09-28 20:42:59"
          format: datetime
        update_at:
          description: Update date.
          type: string
          example: "null"
          format: datetime

    UpdateClientResponse:
      description: "Return data from a client update"
      type: object
      properties:
        id:
          type: string
          description: Marketplace identifier.
          example: "cl0be4c8e623c167bc8b777"
        status:
          description: Client status.
          type: string
          example: "register"
        name:
          type: string
          description: Client name.
          example: "Joe Doe"
        phone:
          type: string
          description: Client phone.
          example: "923122312"
        email:
          type: string
          description: Client email.
          example: "923122312"
        bank:
          description: Client bank details.
          type: object
          properties:
            sbif:
              description: |
                  Code of the bank to which the bank account belongs.
              type: string
              example: "0001"
            type:
              description: Client account type.
              type: string
              example: "3"
            num:
              description: Client bank account.
              type: string
              example: "9999999"
            rut:
              description: Client rut
              type: string
              example: "261009617"
        affiliations:
          type: number
          description: Number of affiliations.
          example: 2
        affiliations_details:
          type: array
          items:
            description: Details of affiliations.
            type: object
            properties:
              id:
                type: string
                description: Afiliation identifier.
              status:
                type: string
                description: |
                    Afiliation status:
                      - not found
                      - pending
                      - liquidate
                      - pending for deposit
                      - paid
              token:
                type: string
                description: Afiliation Token.
              name:
                type: string
                description: Afiliation name.
              percentage_affiliation:
                type: string
                description: Afiliation porcentage.
              percentage_client:
                type: string
                description: Cliente porcentage.
            example:
            - {
                id: "s6df85b41df65b21se685",
                status: "register",
                token: "sgh65g1ns6fg5n1sfg2sr6j5nfg65shr6gh5s4r6h5fg6",
                name: "market1",
                percentage_affiliation: 1,
                percentage_client: 99
              }
            - {
                id: "s6df85b41df65b21se685",
                status: "register",
                token: "sgh65g1ns6fg5n1sfg2sr6j5nfg65shr6gh5s4r6h5fg6",
                name: "market2",
                percentage_affiliation: 1,
                percentage_client: 99
              }

    AdminAffiliationResponse:
      description: "Return data from the insertion of an affiliate"
      type: object
      properties:
        id:
          description: Unique subscription identifier for payku.
          type: string
          example: "sucaab7865dceaff49d8b3"
        status:
          description: Status.
          type: string
          example: "register"
        name:
          description: Membership name.
          type: string
          example: "name"
        token:
          description: Affiliate Token that is entered into the merchant.
          type: string
          example: "eecd92fdbb8bf615e8215d6fbb30bb6ae6f82c9e1810f85b65bbeb472794c4a4"
        percentage:
          description: Payku user affiliation percentage.
          type: string
          example: "20.00"
        affiliations:
          type: array
          items:
            type: object
            properties:
              id:
                description: Identifier.
                type: string
                example: "ma9fd16221a9645b0036"
              name:
                description: Affiliate name.
                type: string
                example: "name"
              percentage:
                description: Percentage corresponding to each affiliate.
                type: string
                example: "80.00"

    mallPostResponse:
      description: "Return data from the creation of a Mall transaction"
      type: object
      properties:
        status:
          type: string
          description: |
            Transaction status The possible statuses you can get are the following:
            - pending
            - success
            - rejected
            - refunded partial
            - refunded
          example: "success"
        individual_orders:
          type: array
          description: Arrangement containing beneficiary information.
          items:
            type: object
            properties:
              merchant:
                type: string
                description: Beneficiary's name.
              amount:
                type: string
                description: Amount of the product or service.
              detail:
                type: string
                description: Description of the transaction.
              event:
                type: string
                description: ID of the event, if it does not have event it must pass null.
              identificador:
                type: string
                description: Transaction identifier.
                example: "9917068816213146"
              individual_order:
                type: string
                description: Individual transaction identifier.
                example: "4546"
          example:
            - { merchant: 81b6179e4feeef2b50af71d660f830de, amount: 30000, subject: item1, event: null, identificador: "9917068816213146", individual_order: "9654" }
            - { merchant: 81b6179e4feeef2b50af71d66f7830de, amount: 25000, subject: item2, event: null, identificador: "9917068816213146", individual_order: "9654" }
            - { merchant: 81b6179e4fffff2b50af71d66f7830de, amount: 15000, subject: item3, event: null, identificador: "9917068816213146", individual_order: "9654" }
        url:
          type: string
          description: URL has redirect user.
          example: "https://BASE_URL/gateway/mall/malld200058ab44739ddee2adcd2f5"

    customerPostResponse:
      description: "Return data from the creation of a Customer transaction"
      type: object
      properties:
        status:
          type: string
          description: Status of the request.
          example: "success"
        usuario:
          type: string
          description: User identifier.
          example: "us500f77e28752dc937e7d"
        cuenta:
          type: string
          description: Account identifier.
          example: "cu245a17e00f7ce3715f5a"

    nullificationResponse:
      description: "Return data from the creation of a cancellation request"
      type: object
      properties:
        status:
          type: string
          description: "Registration status"
          example: "success"
        nullify:
          type: object
          description: ""
          properties:
            id:
              type: string
              description: "Identifier of the transaction which you want to cancel."
              example: "trxpr2a45s1dytg1"
            amount:
              type: number
              description: "Transaction amount"
              example: 25000
            currency:
              type: string
              description: "Currency"
              example: "PEN"
            type:
              type: string
              description: |
                NotificationTypes of registration:
                  - **total** ( Money available, annulment was executed successfully )
                  - **partial** ( The total of the funds is not available, it is pending )
              example: "total"
            status_nullify:
              type: string
              description: |
                Annulement status:
                  - **pending** ( Registered pending old--> (register) )
                  - **awaiting_funds** ( In process (Missing of funds) (partial) )
                  - **waiting_bank_details** ( Approved (Waiting for customer bank details) Only Debit and other means of payment (waiting_bank_details) )
                  - **complete** ( Approved (Bank details entered) Only Debit and other means of payment (complete) )
                  - **complete** ( (Money collected) (complete) )
                  - **reverse_deleted** ( Request deleted by system (request_deleted) )
                  - **reverse_completed** ( Annulment made (request_made) )
                  - **reverse_deleted** ( Disabled (request_deleted) )
              example: "complete"
            payment:
              type: object
              properties:
                gateway:
                  type: string
                  description: "Payment method"
                  example: "webpay"
                payment_type:
                  type: string
                  description: "Payment type"
                  example: "VC"
            created_at:
              type: string
              description: "Cancellation request creation date"
              example: "2017-05-17T19:12:57.189Z"
            updated_at:
              type: string
              description: "Cancellation request update date"
              example: "2017-05-17T19:12:57.189Z"
        gateway_response:
          type: object
          description: "Response to the cancellation request"
          properties:
            status:
              type: string
              description: "Status of registration of the request for annulment"
              example: "No availability in the wallet"
            message:
              type: string
              description: "Application process message"
              example: "The cancellation will be executed after the amount requested is deducted from your next settlement"
            nptify:
              type: string
              description: "Notification on the status of the cancellation request"
              example: "No availability in the wallet"

    nullificationResponseGet:
      description: "Return data from the creation of a cancellation request"
      type: object
      properties:
        nullify:
          type: object
          description: "Return data from the creation of a cancellation request"
          properties:
            id:
              type: string
              description: "Identifier of the transfer for which cancellation is to be requested."
              example: "trxpr2a45s1dytg1"
            amount:
              type: number
              description: "Transaction amount"
              example: 25000
            currency:
              type: string
              description: "Currency"
              example: "PEN"
            type:
              type: string
              description: |
                NotificationTypes of registration:
                  - total
                  - partial
              example: "total"
            status_nullify:
              type: string
              description: |
                Annulement status:
                  - pending **( Registered pending old--> (register) )**
                  - awaiting_funds **( In process (Missing of funds) (partial) )**
                  - waiting_bank_details **( Approved (Waiting for customer bank details) Only Debit and other means of payment (waiting_bank_details) )**
                  - complete **( Approved (Bank details entered) Only Debit and other means of payment (complete) )**
                  - complete **( (Money collected) (complete) )**
                  - reverse_deleted **( Request deleted by system (request_deleted) )**
                  - reverse_completed **( Annulment made (request_made) )**
                  - reverse_deleted **( Disabled (request_deleted) )**
              example: "complete"
            payment:
              type: object
              properties:
                gateway:
                  type: string
                  description: "Payment method"
                  example: "webpay"
                payment_type:
                  type: string
                  description: "Payment type"
                  example: "VC"
            created_at:
              type: string
              description: "Cancellation request creation date"
              example: "2017-05-17T19:12:57.189Z"
            updated_at:
              type: string
              description: "Cancellation request update date"
              example: "2017-05-17T19:12:57.189Z"

    EscrowResponse:
      description: "Return data from the creation of a cancellation request"
      type: object
      properties:
        transactions:
          type: array
          items:
            description: "Status of a transaction"
            type: object
            properties:
              status:
                type: string
                description: |
                  Transaction status:
                  - not found
                  - pending
                  - liquidate
                  - pending for deposit
                  - paid
              transaction_id:
                type: string
                description: Transaction identifier created by Payku.
              amount:
                type: integer
                description: Total amount of traction.
              availability_date:
                type: string
                description: Date of availability to authorize the settlement.
              deposit_date:
                type: string
                description: Payment date of the settlement.
          example:
            - {status: liquidate, transaction_id: trx3b4d77b43acd9a720, amount: 15000, availability_date: "2021-07-01", deposit_date: "2021-07-06"}
            - {status: pending, transaction_id: trx3b4d77b43bdd9a540, amount: 20000, availability_date: "2021-07-25", deposit_date: "N/D"}

    Error:
      type: object
      properties:
        status:
          type: string
          description: Request status.
          example: failed
        type:
          type: string
          description: Type of error.
          example: Unprocessable Entity
        message_error:
          type: string
          description: Error message.
          example: subject:invalid,amount:is empty,email:is empty,order:invalid

    Error400:
      type: object
      properties:
        status:
          type: string
          description: Request status.
          example: failed
        type:
          type: string
          description: Type of error.
          example: Unprocessable Entity
        message_error:
          type: string
          description: Error message.
          example: subject:invalid,amount:is empty,email:is empty,order:invalid

    Error400CardDelete:
      type: object
      properties:
        status:
          type: string
          description: Request status.
          example: failed
        type:
          type: string
          description: Type of error.
          example: card
        message_error:
          type: string
          description: Mensaje de error
          example: is not valid

    Error400Event:
      type: object
      properties:
        status:
          type: string
          description: Request status.
          example: failed
        type:
          type: string
          description: Type of error.
          example: Unprocessable Entity
        message_error:
          type: string
          description: Error message.
          example: subject:invalid,amount:is empty,email:is empty,order:invalid

    Error400get:
      type: object
      properties:
        status:
          type: string
          description: Request status.
          example: failed
        type:
          type: string
          description: Type of error.
          example: Unprocessable Entity
        message_error:
          type: string
          description: Error message.
          example: subject:invalid,amount:is empty,email:is empty,order:invalid

    ErrorBanks400get:
      type: object
      properties:
        status:
          type: string
          description: Request status.
          example: failed
        type:
          type: string
          description: Type of error.
          example: Unprocessable Entity
        message_error:
          type: string
          description: Error message
          example: ""

    Error401:
      type: object
      properties:
        type:
          type: string
          description: Request status.
          example: Unauthorized
        message_error:
          type: object
          properties:
            error:
              type: string
              description: Error message.
              example: waiting token public

    Error404:
      type: object
      properties:
        status:
          type: string
          description: Request status.
          example: failed
        type:
          type: string
          description: Type of error.
          example: Not Found
        id:
          type: string
          description: Id information
          example: is not valid

    WalletResponseThird:
      description: "Return data of the load to the wallet"
      type: object
      properties:
        status:
          type: string
          description: |
            Status of the load to the wallet. The possible statuses that can be obtained are the following:
            - success
            - failed
          example: "success"
        identifier_wallet:
          type: string
          description: payku virtual wallet movement identifier.
          example: "wab5f7232dafff18f9"
        identifier_payout:
          type: string
          description: Third party payment identifier.
          example: "mpe33e36b01e8a11b9ee"

    WalletResponse:
      description: "Return data of the load to the wallet"
      type: object
      properties:
        status:
          type: string
          description: |
            Status of the load to the wallet. The possible statuses that can be obtained are the following:
            - success
          example: "Success"
        identifier_wallet:
          type: string
          description: payku virtual wallet movement identifier.
          example: "wab5f7232dafff18f9"

    WalletResponseGet:
      description: "Return data of the load to the wallet"
      type: object
      properties:
        status:
          type: string
          description: |
          Status of the load to the wallet. The possible statuses that can be obtained are the following:
            - success
          example: "success"
        current_id:
          type: string
          description: Payku virtual wallet identifier "last movements".
          example: "wa8a6171ab83323c37"
        amount_available:
          type: integer
          description: Amount available in Payku's virtual wallet.
          example: 1766
        currency:
          type: string
          description: Currency.
          example: "PEN"
        filter:
          type: object
          description: Specific data to filter the data.
          properties:
            page:
              type: integer
              description: Actual page.
              example: 1
            per_page:
              type: integer
              description: Number of moves per page.
              example: 1000
            currency:
              type: string
              description: Currency.
              example: "PEN"
            id:
              type: string
              description: Wallet account identifier.
              example: "wa8a6171ab83323c37"
        wallet_movements:
          type: array
          items:
            type: object
            description: Collection object for a collection batch.
            properties:
              id:
                type: string
                description: Virtual wallet identifier.
                example: "wa8a6171ab83323c37"
              order:
                type: string
                description: Order identifier.
                example: "tme5"
              subject:
                type: string
                description: Description of the movement.
                example: "tme5 asunto"
              created_at:
                type: string
                description: Movement execution date.
                example: "2022-06-09 20:07:02"
              income_expense:
                type: string
                description: Payment to a third party or withdrawal to your account.
                example: "expense"
              status:
                type: string
                description: Movement status.
                example: "current"
              amount:
                type: string
                description: Movement amount.
                example: "3680"
              actual_amount:
                type: string
                description: Current Balance Amount.
                example: "1766"
              origin_liquidation:
                type: string
                description: Origin of settlement.
                example: null
              currency:
                type: string
                description: Currency.
                example: "PEN"
              payout:
                type: object
                description: Destination account data.
                properties:
                  id:
                    type: string
                    description: Destination account identifier.
                    example: "war3999847529816f2"
                  phone:
                    type: string
                    description: Telephone of the destination account holder.
                    example: "111111111"
                  email:
                    type: string
                    description: Destination account holder's email.
                    example: "test@test.cl"
                  subject:
                    type: string
                    description: Application Status.
                    example: "subject order"
                  amount:
                    type: string
                    description: Amount to be deposited in the destination account.
                    example: "3680"
                  accountbank_rut:
                    type: string
                    description: "Identity document of the destination account holder: DNI, Cédula de Extranjería (CE) or passport."
                    example: "111111111111"
                  accountbank_name:
                    type: string
                    description: Name of the destination account holder.
                    example: "test"
                  accountbank_type:
                    type: integer
                    description: Type of account of the destination bank.
                    example: 1
                  accountbank_num:
                    type: integer
                    description: Destination bank's CCI (Interbank Account Code) number or in case of YAPE, the beneficiary's mobile phone number.
                    example: 123123123
                  accountbank_sbif:
                    type: string
                    description: Code of the bank to which the bank account belongs.
                    example: "0001"
                  status:
                    type: string
                    description: Movement status.
                    example: "pending"
                  update_at:
                    type: string
                    description: Date the request was made.
                    example: "2022-06-09 21:10:46"

    PayoutResponseGet:
      description: "Return data of the load to the payout"
      type: object
      properties:
        payout:
          type: object
          description: Destination account identifier.
          properties:
            id:
              type: string
              description: Destination account identifier.
              example: "war3999847529816f2"
            phone:
              type: string
              description: Telephone of the destination account holder.
              example: "111111111"
            email:
              type: string
              description: Destination account holder's email.
              example: "test@test.cl"
            subject:
              type: string
              description: Application Status.
              example: "subject order"
            amount:
              type: string
              description: Amount to be deposited in the destination account.
              example: "3680"
            accountbank_rut:
              type: string
              description: "Identity document of the destination account holder: DNI, Cédula de Extranjería (CE) or passport."
              example: "111111111111"
            accountbank_name:
              type: string
              description: Name of the destination account holder.
              example: "test"
            accountbank_type:
              type: integer
              description: Type of account of the destination bank.
              example: 1
            accountbank_num:
              type: integer
              description: Destination bank's CCI (Interbank Account Code) number or in case of YAPE, the beneficiary's mobile phone number.
              example: "00328901338000251968"
            accountbank_sbif:
              type: string
              description: Code of the bank to which the bank account belongs.
              example: "0001"
            status:
              type: string
              description: |
                Movement status.
                - pending  ("payout registered")
                - processing  ("payout in payment process")
                - success  ("payout successfully deposited")
                - banking_error  ("payout rejected by the bank")
                - fraud_prevention  ("payout rejected by compliance")
              example: "pending"
            update_at:
              type: string
              description: Date the request was made.
              example: "2022-06-09 21:10:46"
            origin_wallet:
              type: string
              description: Id de la wallet origen.
              example: "wa1933f37cdaf7d1c6"

    PayoutResponseGetv3:
      description: "Return data of the load to the payout"
      type: object
      properties:
        payout:
          type: object
          description: Destination account identifier.
          properties:
            id:
              type: string
              description: Destination account identifier.
              example: "war3999847529816f2"
            phone:
              type: string
              description: Telephone of the destination account holder.
              example: "111111111"
            email:
              type: string
              description: Destination account holder's email.
              example: "test@test.cl"
            subject:
              type: string
              description: Application Status.
              example: "subject order"
            amount:
              type: string
              description: Amount to be deposited in the destination account.
              example: "3680"
            accountbank_rut:
              type: string
              description: "Identity document of the destination account holder: DNI, Cédula de Extranjería (CE) or passport."
              example: "111111111111"
            accountbank_name:
              type: string
              description: Name of the destination account holder.
              example: "test"
            accountbank_type:
              type: integer
              description: Type of account of the destination bank.
              example: 1
            accountbank_num:
              type: integer
              description: Destination bank's CCI (Interbank Account Code) number or in case of YAPE, the beneficiary's mobile phone number.
              example: "00328901338000251968"
            accountbank_sbif:
              type: string
              description: Code of the bank to which the bank account belongs.
              example: "0001"
            status:
              type: string
              description: |
                Movement status.
                - pending  ("payout registered")
                - processing  ("payout in payment process")
                - success  ("payout successfully deposited")
                - banking_error  ("payout rejected by the bank")
                - fraud_prevention  ("payout rejected by compliance")
              example: "pending"
            update_at:
              type: string
              description: Date the request was made.
              example: "2022-06-09 21:10:46"
            origin_wallet:
              type: string
              description: Id de la wallet origen.
              example: "wa1933f37cdaf7d1c6"
            reason_rejection:
              type: string
              description: Reason for rejection.
              example: " Error CCA 51. Cuenta Beneficiario no Existe, error_creditor_account_not_found"

    ResponseConciliation:
      description: "Conciliation return data"
      type: object
      properties:
        conciliation:
          type: array
          items:
            description: "Status return data of a transaction"
            type: object
            properties:
              id:
                type: string
                description: Conciliation identifier created by Payku.
                example: "107999"
              created_at:
                type: string
                description: Registration date.
                example: "2019-10-25 14:10:03"
              amount_available:
                type: int
                description: Amount available.
                example: 98745
              amount_deposit:
                type: int
                description: Amount deposited.
                example: 0
              status:
                type: string
                description: |
                  Conciliation status. The possible statuses you can get are as follows:
                  - pending
                  - paid_out
                  - deteined
                  - returned
                example: "pending"
              destiny:
                type: string
                description: Destination of the liquidation.
                example: "wallet"
              currency:
                type: string
                description: Currency.
                example: "PEN"
              wallet:
                type: string
                description: Digital wallet **payku**.
                example: null
              transaction:
                type: array
                items:
                  description: "Status return data of a transaction"
                  type: object
                  properties:
                    transaction_id:
                      type: string
                      description: Transaction identifier created by **Payku**.
                      example: "rsyt68j4dhg6k8j54ut698dt6hj84"
                    payment_key:
                      type: string
                      description: Identifier of payment created by **Payku**.
                      example: "pra934939d607922f9e"
                    order:
                      type: string
                      description: Order identifier.
                      example: "6544"
                    start:
                      type: string
                      description: Start of the transaction.
                      example: "2020-12-16 15:10:33"
                    end:
                      type: string
                      description: End of transaction.
                      example: "2020-12-16 15:10:36"
                    deposit_date:
                      type: string
                      description: Date on which the deposit will be made to the client.
                      example: "2022-10-05"
                    amount:
                      type: string
                      description: Monto de la transacción.
                      example: 250000
                    fee:
                      type: string
                      description: Comisión general.
                      example: 15000
                    amount_deposit:
                      type: int
                      description: Customer deposit amount.
                      example: 235000
                    media:
                      type: string
                      description: payment method, used by the user.
                      example: "Webpay"