# Additional webhooks

The following are additional webhooks that will provide notifications around authorizations, 

## authorization/update webhook

On every new Authorization or Authorization status change, you will receive a webhook notification to your server.

The body will include the **AuthorizationResult** object:

<table>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Always Available
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `authorizationId`
      </td>

      <td>
        Yes
      </td>

      <td>
        String
      </td>

      <td>
        Unique ID of the Object
      </td>
    </tr>

    <tr>
      <td>
        `authorizationStatus`
      </td>

      <td>
        Yes
      </td>

      <td>
        Enum
      </td>

      <td>
        The status of the Authorization. See below detailed information
      </td>
    </tr>

    <tr>
      <td>
        `currency`
      </td>

      <td>
        Yes
      </td>

      <td>
        String
      </td>

      <td>
        The Currency of the payment
      </td>
    </tr>

    <tr>
      <td>
        `amount`
      </td>

      <td>
        Yes
      </td>

      <td>
        Number
      </td>

      <td>
        The Amount of the payment
      </td>
    </tr>

    <tr>
      <td>
        `orderid`
      </td>

      <td>
        Yes
      </td>

      <td>
        String
      </td>

      <td>
        Unique ID from the merchant system
      </td>
    </tr>

    <tr>
      <td>
        `items`
      </td>

      <td>
        Yes
      </td>

      <td>
        Object
      </td>

      <td>
        The items of the order per item per vendor
      </td>
    </tr>

    <tr>
      <td>
        `transactionId`
      </td>

      <td>
        Yes
      </td>

      <td>
        String
      </td>

      <td>
        The transaction ID of the specific payment operation
      </td>
    </tr>

    <tr>
      <td>
        `paymentMethod`
      </td>

      <td>
        Yes
      </td>

      <td>
        String
      </td>

      <td>
        The method of the payment (creditCard, bankTransfer, directDebit, e.t.c)
      </td>
    </tr>

    <tr>
      <td>
        `checkoutId`
      </td>

      <td>
        Yes
      </td>

      <td>
        String
      </td>

      <td>
        Unique ID of the checkout that has been paid
      </td>
    </tr>

    <tr>
      <td>
        `checkoutStatus`
      </td>

      <td>
        Yes
      </td>

      <td>
        String
      </td>

      <td>
        Current status of the Checkout
      </td>
    </tr>

    <tr>
      <td>
        `vendorId`
      </td>

      <td>
        Yes
      </td>

      <td>
        String
      </td>

      <td>
        Unique ID of the vendor
      </td>
    </tr>

    <tr>
      <td>
           `paymentOption`
      </td>

      <td>
        Yes
      </td>

      <td>
        Object
      </td>

      <td>
        Payment Option object that could represent card payment:\
        ```
        {
           cardAccount: {
                          brand: "VISA"
                          bin: "476134"
                          last4Digits: "1390",
                          issuerCountry: "GB"
                        }
        }
        ```  

        or bank transfer payment:\
        ```
        {
           bankAccount: {
                          brand: "Mock Bank"
                        }
        }
        ```
      </td>
    </tr>

    <tr>
      <td>
        `planId`
      </td>

      <td>
        No
      </td>

      <td>
        String
      </td>

      <td>
        Unique ID of the recurring payment plan
      </td>
    </tr>

    <tr>
      <td>
        `subscriptionId`
      </td>

      <td>
        No
      </td>

      <td>
        String
      </td>

      <td>
        Unique ID of the recurring subscription
      </td>
    </tr>

    <tr>
      <td>
        `declinedReason`
      </td>

      <td>
        No
      </td>

      <td>
        String
      </td>

      <td>
        The reason why payment has been declined
      </td>
    </tr>

    <tr>
      <td>
        `description`
      </td>

      <td>
        No
      </td>

      <td>
        String
      </td>

      <td>
        Description of payment\
        In most cases value is taken from checkout creation
      </td>
    </tr>

    <tr>
      <td>
        `metadata`
      </td>

      <td>
        No
      </td>

      <td>
        Object
      </td>

      <td>
        The custom data that was used during checkout creation (this field can be used to pass some internal data through payment process)
      </td>
    </tr>

    <tr>
      <td>
        `consumerEmail`
      </td>

      <td>
        No
      </td>

      <td>
        String
      </td>

      <td>
        The email of buyer that made a payment
      </td>
    </tr>

    <tr>
      <td>
        `consumerId`
      </td>

      <td>
        No
      </td>

      <td>
        String
      </td>

      <td>
        Unique ID of the buyer
      </td>
    </tr>

    <tr>
      <td>
        `reference`
      </td>

      <td>
        Yes
      </td>

      <td>
        String
      </td>

      <td>
        Unique ID from the merchant system
      </td>
    </tr>
  </tbody>
</table>

## payout/update webhook

Payout notifications notify you of every newly created payout and any change in the status of a payout. The webhook notification gets sent to your server. 

The body will include the **PayoutResult** object:

| Parameter           | Always Available | Type   | Description |
| :------------------ | :--------------- | :----- | :---------- |
| `payoutId`          | yes              | string |             |
| `status`            | yes              | Enum   |             |
| `amount`            | yes              | number |             |
| `currency`          | yes              | string |             |
| `createdDate`       | yes              | date   |             |
| `updatedDate`       | yes              | date   |             |
| `targetReferenceId` | no               | string |             |
| reconciled          | yes              | string |             |

## ewallet/create webhook

Account notifications are created to notify you when your vendor receives money for the first time - creating an automatic account in the accepted currency. Each time an account balance is created or disabled, you'll get a webhook notification to your server, indicating its current status.

The body will include the following object:

<table>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Always Available
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `eWalletId`
      </td>

      <td>
        yes
      </td>

      <td>
        string
      </td>

      <td>
        Account unique identifier
      </td>
    </tr>

    <tr>
      <td>
        `vendorId`
      </td>

      <td>
        no
      </td>

      <td>
        string
      </td>

      <td>
        The unique ID of the vendor's Account.\
        If the Account belongs to the platform, it will return null
      </td>
    </tr>

    <tr>
      <td>
        `platformId`
      </td>

      <td>
        yes
      </td>

      <td>
        string
      </td>

      <td>
        Unique ID of the platform
      </td>
    </tr>

    <tr>
      <td>
        `currency`
      </td>

      <td>
        yes
      </td>

      <td>
        enum
      </td>

      <td>
        USD, GBP, EUR
      </td>
    </tr>

    <tr>
      <td>
        `status`
      </td>

      <td>
        yes
      </td>

      <td>
        string
      </td>

      <td>
        Ewallet Status ("created")
      </td>
    </tr>
  </tbody>
</table>
