openapi: 3.0.0
info:
  contact:
    email: support@trustap.com
  description: >
    The Trustap API is a REST-based API for managing user data and

    transactions for Trustap users.


    Note that, like Stripe, all API `price` and `charge` fields expect

    amounts to be provided in a currency's smallest unit. See [the Stripe

    documentation](https://stripe.com/docs/currencies#zero-decimal) for more

    details.


    API Keys

    --------


    Some endpoints such as `/charge` endpoints can be accessed directly

    using an API key. API keys are provided as the "username" portion of a

    basic auth authentication. For example, the Trustap fee for a new online

    transaction can be determined using the following cURL request with an

    API key:


    ``` bash

    curl -u '<api_key>':
    'https://dev.stage.trustap.com/api/v1/charge?currency=eur&price=1234'

    ```


    Deprecation

    -----------


    Deprecated endpoints are tagged with the word `DEPRECATED` at the start

    of their description. The deprecation message will describe what

    endpoints/approach should be used instead.


    Note that deprecated endpoints will not be removed from the current

    version of the API, but their use is discouraged. Furthermore, migrating

    to later major versions of the API will be made easier by avoiding

    deprecated endpoints.


    Production

    ----------


    This documentation references the staging environment of the Trustap

    API, which is available at `https://dev.stage.trustap.com` and uses the

    `trustap-stage` realm during authentication. This environment can be

    used for implementing and testing features using test credit cards, bank

    accounts, etc.


    When all features using Trustap have been implemented and tested

    sufficiently, the production environment of the Trustap API can be used

    to process actual currency. This environment is available at

    `https://dev.trustap.com` and uses the `trustap` realm during

    authentication.


    Note that only your client ID will be the same in the staging and

    production Trustap API environments; your client secret and API key will

    be different in the two environments.
  title: Trustap API
  version: 0.1.0
paths:
  /batch/transactions:
    get:
      description: >
        This endpoint takes a required `ids` parameter that contains a

        comma-separated list of transaction IDs, and returns the

        transactions corresponding to those IDs. A maximum of 50 IDs may

        be provided, results are returned in the order specified in

        `ids`, and duplicates are preserved. Transactions that couldn't

        be found will be returned as `null` values in the result array.

        The following example request results in the `200 OK` response

        described below, assuming that the transaction with ID `1990`

        couldn't be found:


        ``` http

        https://dev.stage.trustap.com/api/v1/batch/transactions?ids=1309,609,1990,609

        ```
      operationId: basic.getTransactionsByIds
      parameters:
        - description: |
            A comma-separated list of transaction IDs
          in: query
          name: ids
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/basic.Transaction'
                type: array
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `ids_missing`
              * `invalid_id`
              * `too_many_ids`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get multiple online transactions by their IDs
      tags:
        - Online Transactions
  /charge:
    get:
      description: |
        This returns the Trustap fee, in the `currency`'s smallest unit,
        for a transaction involving goods with the supplied `price`. See
        [the Stripe
        documentation](https://stripe.com/docs/currencies#zero-decimal)
        for more details.
      operationId: basic.getCharge
      parameters:
        - description: |
            The currency that the `price` is specified in.
          in: query
          name: currency
          required: true
          schema:
            type: string
        - description: |
            The price of the goods being sold in this transaction, in
            the `currency`'s smallest unit. For example, if a trading
            card is being sold for $12.34 (with `currency` as `usd`),
            then the request for the charge for this transaction would
            be `/charge?price=1234&currency=usd`.
          in: query
          name: price
          required: true
          schema:
            type: integer
            format: int64
        - description: |
            When creating transactions from a multi-use listing, the
            `quantity` parameter can be provided in order to generate a
            charge for the given price multiplied by the given quantity.
            See `/multi_use_listings/{listingId}/create_transaction`
            for more details.
          in: query
          name: quantity
          required: false
          schema:
            type: integer
            format: int64
        - description: |
            The payment method that will be used to pay for the
            transaction. This is necessary because different payment
            methods may result in different fees.

            The default value is `card`.
          in: query
          name: payment_method
          required: false
          schema:
            type: string
        - in: query
          name: use_hr_post
          required: false
          schema:
            type: boolean
        - description: The custom `postage_fee` for the transaction.
          in: query
          name: postage_fee
          required: false
          schema:
            type: integer
            format: int64
        - description: |
            The charge config for which the charge amount is computed.
          in: query
          name: charge_config
          required: false
          schema:
            type: integer
            format: int64
            default: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Charge'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `currency_missing`
              * `invalid_price`
              * `negative_price`
              * `price_too_low`
              * `unsupported_currency`
              * `invalid_charge_config`
              * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: []
        - APIKey: []
      summary: Get the Trustap fee for an online transaction
      tags:
        - Online Payment
  /client/supported_registration_countries:
    get:
      operationId: client.getSupportedRegistrationCountries
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  type: string
                type: array
      summary: Get supported registration countries for the current client
      tags:
        - Clients
  /guest_users:
    post:
      description: >
        This endpoint creates guest user which can be used as the buyer or the
        seller.

        If guest user is used as the seller in a transaction, they need to be
        created with

        `country_code` parameter correctly set. This is important because of
        currencies

        they can use in their transactions.

        `tos_acceptance` is the parameter which is important for
        disputes/chargeback and 

        represent the timestamp when Trustap ToS were accepted
        https://www.trustap.com/terms.
      operationId: users.createGuestUser
      requestBody:
        content:
          application/json:
            schema:
              example:
                country_code: IE
                email: guest@test.com
                first_name: Test
                last_name: User
                tos_acceptance:
                  ip: 192.168.1.2
                  unix_timestamp: 1672531200
              properties:
                country_code:
                  type: string
                email:
                  minLength: 1
                  type: string
                first_name:
                  minLength: 1
                  type: string
                last_name:
                  minLength: 1
                  type: string
                tos_acceptance:
                  $ref: '#/components/schemas/users.TosAcceptance'
              required:
                - email
                - first_name
                - last_name
                - tos_acceptance
              type: object
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/users.GuestUser'
        '400':
          description: |
            Bad Request
              `code` can be one of the following:
                * `email_missing`
                * `first_name_missing`
                * `last_name_missing`
                * `tos_acceptance_ip_missing`
                * `invalid_country_code`
                * `invalid_email`
                * `invalid_tos_acceptance_date`
      summary: Create a new guest user
      tags:
        - Buyers and Sellers
  /me/account_session:
    get:
      operationId: personal.getAccountSession
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                example:
                  client_secret: accs_secret__***********************************************
                properties:
                  client_secret:
                    type: string
                required:
                  - client_secret
                type: object
      summary: Create an account session and retrieve the client secret for it
      tags:
        - Personal
  /me/balances:
    get:
      operationId: users.getBalances
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/users.Balances'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get the balance for the current user in each currency
      tags:
        - Buyers and Sellers
  /me/carriers/{carrier_id}/facilities:
    get:
      operationId: basic.getCarrierFacilityOptions
      parameters:
        - in: path
          name: carrier_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              example:
                country: HR
                delivery_type: parcel_locker
                search_text: Zagreb
              properties:
                country_code:
                  description: |
                    ISO 3166-1 alpha-2 country code.
                  type: string
                delivery_type:
                  description: >
                    The type of delivery or collection method we want to get
                    options from.

                    `delivery_type` can be one of the following:

                    * `parcel_locker`

                    * `post_office`
                  type: string
                search_text:
                  description: >
                    Filter text that is used to search available facilities.

                    It can include `City`, `Postal Code` or a string contained
                    within Facility name.
                  type: string
              required:
                - country_code
                - search_text
                - delivery_type
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                example:
                  address: 123 Street 1 Zabreb, Croatia
                  city: Zagreb
                  facility_type: post_office
                  name: Zagreb Main Office
                  postal_code: 123456HR
                items:
                  $ref: '#/components/schemas/basic.CarrierFacility'
                type: array
        '400':
          description: |
            Bad Request

            `code` can be one of the following:
              * `invalid_carrier`
              * `invalid_delivery_type`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get the list of facilities for a given carrier
      tags:
        - Online Shipping
  /me/debit_account:
    get:
      operationId: personal.getDebitAccount
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/personal.DebitAccount'
      summary: Get debit account details
      tags:
        - Personal
    post:
      operationId: personal.setDebitAccount
      requestBody:
        content:
          application/json:
            schema:
              properties:
                bank_details:
                  $ref: '#/components/schemas/personal.BankDetails'
                bank_token:
                  type: string
                card_details:
                  type: string
                type:
                  enum:
                    - bank
                    - bank_token
                    - card
                  type: string
              required:
                - type
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/personal.DebitAccount'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `routing_number_invalid`: The routing number is invalid.
              * `account_number_invalid`: The account number is invalid.
              * `parameter_missing`: Parameter is missing.
              * `invalid_account_type`: The given debit account type is invalid.
              * `bank_account_unusable`: The bank account is unusable.
              * `bank_details_missing`: The bank details are missing.
              * `bank_token_missing`: The bank token is missing.
              * `card_details_missing`: The card details are missing.
      summary: Set debit account details
      tags:
        - Personal
  /me/features:
    get:
      operationId: users.getUserFeatures
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/users.Features'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get the status enabled/disabled of user's features
      tags:
        - Buyers and Sellers
  /me/features/instant_payouts:
    post:
      operationId: users.setInstantPayouts
      requestBody:
        content:
          application/json:
            schema:
              properties:
                enabled:
                  type: boolean
              required:
                - enabled
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/users.Features'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Allow users to turn instant payouts feature on/off
      tags:
        - Buyers and Sellers
  /me/instant_payout_balance:
    get:
      operationId: personal.getInstantPayoutBalance
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/personal.InstantPayoutBalance'
      summary: Get instant payout balance
      tags:
        - Personal
  /me/multi_use_listings/create:
    post:
      deprecated: true
      description: |
        Multi-use listings are disabled once payment has been submitted
        for a transaction created from it.
        Offline access is allowed for this endpoint when the user has
        granted the `basic_ls:offline_create` scope to the client
        that is performing the request.
      operationId: basic.createMultiUseListing
      requestBody:
        $ref: >-
          #/components/requestBodies/basic.createMultiUseListingCreateMultiUseListingBody
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.MultiUseListing'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_role`: '' is not a valid role
              * `incorrect_charge`
              * `incorrect_charge_seller`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create a new multi-use listing for the logged-in user
      tags:
        - Online Multi-use Listings
  /me/notifications:
    get:
      operationId: app_notifs.getNotifications
      parameters:
        - description: |
            Only return transactions that were created chronologically
            before the transaction with this ID
          in: query
          name: before_id
          schema:
            type: integer
            format: int64
            minimum: 0
        - description: |
            Only return notifications that were created chronologically
            after the notification with this ID (i.e. with smaller IDs)
          in: query
          name: after_id
          schema:
            type: integer
            format: int64
            minimum: 0
        - description: |
            The maximum number of notifications to return
          in: query
          name: limit
          schema:
            type: integer
            format: int64
            minimum: 1
            maximum: 50
            default: 25
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/app_notifs.Notification'
                type: array
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_before_id`
              * `invalid_after_id`
              * `invalid_limit`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get the notifications for the logged-in user
      tags:
        - Notifications
  /me/payout_attempts:
    get:
      description: |
        Payout attempts are returned in reverse chronological order -
        the first attempt in the returned array will be the most recent
        payout attempt.
      operationId: personal.getPayoutAttempts
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/personal.PayoutAttempt'
                type: array
      summary: Get the payout attempts that have occurred for this account
      tags:
        - Personal
  /me/personal/additional_identity_document/verification_status:
    get:
      operationId: getAdditionalIdentityDocumentVerificationStatus
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentVerification'
      summary: >-
        Get the verification status for the front side of the secondary identity
        document
      tags:
        - Personal
  /me/personal/additional_identity_document_back/verification_status:
    get:
      operationId: getAdditionalIdentityDocumentBackVerificationStatus
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentVerification'
      summary: >-
        Get the verification status for the back side of the secondary identity
        document
      tags:
        - Personal
  /me/personal/details:
    get:
      operationId: personal.getDetails
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/personal.Details'
      summary: Get personal details for the local user
      tags:
        - Personal
    patch:
      operationId: personal.setDetails
      requestBody:
        content:
          application/json:
            schema:
              properties:
                address_city:
                  type: string
                address_line1:
                  type: string
                address_line2:
                  type: string
                address_postal_code:
                  type: string
                address_state:
                  type: string
                dob:
                  properties:
                    day:
                      type: integer
                    month:
                      type: integer
                    year:
                      type: integer
                  required:
                    - day
                    - month
                    - year
                  type: object
                id_number:
                  description: The full ID number for this user.
                  type: string
                  nullable: true
                name_first:
                  type: string
                name_last:
                  type: string
                phone:
                  properties:
                    dial_code:
                      type: string
                    dial_code_country:
                      description: >-
                        This field is mostly non-functional, but is instead used
                        to render the dial code for the user. This field is
                        necessary because different countries may use the same
                        dial code (for example, the US and Canada).
                      type: string
                    number:
                      type: string
                  required:
                    - dial_code_country
                    - dial_code
                    - number
                  type: object
                  nullable: true
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/personal.Details'
      summary: Set personal details for the local user
      tags:
        - Personal
  /me/personal/identity_document/verification_status:
    get:
      operationId: getIdentityDocumentVerificationStatus
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentVerification'
      summary: >-
        Get the verification status for the front side of the primary identity
        document
      tags:
        - Personal
  /me/personal/identity_document_back/verification_status:
    get:
      operationId: getIdentityDocumentBackVerificationStatus
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentVerification'
      summary: >-
        Get the verification status for the back side of the primary identity
        document
      tags:
        - Personal
  /me/personal/stripe_publishable_key:
    get:
      description: |
        Returns the Publishable Key for the Stripe Platform
        which the user is linked to.
      operationId: getStripePublishableKeyForUser
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                example:
                  publishable_key: pk_xXxXxXxXxXx
                properties:
                  publishable_key:
                    type: string
                type: object
      summary: |
        Get the details for the Stripe publishable key the user is linked to
      tags:
        - Personal
  /me/profile/payout_status:
    get:
      description: >
        This endpoint requires

        the user identified by the `Trustap-User` header to have granted the
        `profile`

        scope to the client that is performing the request. Offline access is
        allowed for this endpoint when the user has

        granted the `profile` scope to the client

        that is performing the request.
      operationId: getProfilePayoutStatus
      parameters:
        - description: >-
            Required in client flows, where you make API calls on behalf of
            another Trustap user.
          in: header
          name: Trustap-User
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfilePayoutStatus'
      security:
        - APIKey: []
        - OAuth2: []
      summary: |
        Get the status of a user's ability to accept payouts
      tags:
        - Personal
  /me/single_use_listings/create:
    post:
      deprecated: true
      description: |
        Single-use listings are disabled once payment has been submitted
        for a transaction created from it.
        Offline access is allowed for this endpoint when the user has
        granted the `basic_ls:offline_create` scope to the client
        that is performing the request.
      operationId: basic.createSingleUseListing
      requestBody:
        $ref: >-
          #/components/requestBodies/basic.createMultiUseListingCreateMultiUseListingBody
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.SingleUseListing'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_role`: '' is not a valid role
              * `incorrect_charge`
              * `incorrect_charge_seller`
      summary: Create a new single-use listing for the logged-in user
      tags:
        - Online Single-use Listings
  /me/stripe_financial_connections/add_account:
    post:
      operationId: personal.addStripeFinancialConnectionsAccount
      requestBody:
        content:
          application/json:
            schema:
              properties:
                payment_method_id:
                  type: string
              required:
                - payment_method_id
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/personal.DebitAccount'
      summary: Add a new payout method to the current account using a payment method ID
      tags:
        - Personal
  /me/stripe_financial_connections/ownership:
    get:
      operationId: personal.getStripeFinancialConnectionsOwnership
      parameters:
        - in: query
          name: setup_intent_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  email:
                    type: string
                  name:
                    type: string
                  raw_address:
                    type: string
                  raw_phone:
                    type: string
                required:
                  - name
                  - email
                  - raw_phone
                  - raw_address
                type: object
        '409':
          description: |
            Conflict

            `code` can be one of the following:

              * `unconfirmed_setup_intent`: The given SetupIntent has not
                been confirmed
      summary: >-
        Get the ownership details from the given SetupIntent using Stripe
        Financial Connections
      tags:
        - Personal
  /me/stripe_financial_connections/prepare_account:
    post:
      operationId: personal.prepareStripeFinancialConnectionsAccount
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  setup_intent_client_secret:
                    type: string
                  setup_intent_id:
                    type: string
                required:
                  - setup_intent_id
                  - setup_intent_client_secret
                type: object
      summary: |
        Get a SetupIntent ID and secret for starting a Stripe Financial
        Connections session
      tags:
        - Personal
  /me/transactions:
    get:
      description: |
        Transactions are currently sorted by ID.
      operationId: basic.getTransactions
      parameters:
        - description: |
            Only return transactions that were created chronologically
            before the transaction with this ID
          in: query
          name: before_id
          schema:
            type: integer
            format: int64
            minimum: 0
        - description: |
            Only return transactions that were created chronologically
            after the transaction with this ID (i.e. with smaller IDs)
          in: query
          name: after_id
          schema:
            type: integer
            format: int64
            minimum: 0
        - description: |
            The maximum number of transactions to return
          in: query
          name: limit
          schema:
            type: integer
            format: int64
            minimum: 1
            maximum: 50
            default: 25
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                example:
                  - charge: 78
                    charge_seller: 0
                    created: '2019-12-25T09:00:00Z'
                    currency: eur
                    description: Soccer ticket
                    id: 1309
                    join_code: 54c5bb89-a5ea-4be7-ad7a-e740c2eebab4
                    price: 1234
                    seller_id: ad5bb99f-85bf-47e1-be0d-15e7541c6ad7
                    status: created
                  - buyer_id: ad5bb99f-85bf-47e1-be0d-15e7541c6ad7
                    charge: 78
                    charge_seller: 0
                    created: '2018-12-25T09:00:00Z'
                    currency: eur
                    description: Soccer ticket
                    id: 609
                    join_code: c9cd6a9d-1096-4d38-b4aa-2c354beac845
                    price: 1234
                    status: created
                items:
                  $ref: '#/components/schemas/basic.Transaction'
                type: array
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_before_id`
              * `invalid_after_id`
              * `invalid_limit`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get online transactions for the logged-in user
      tags:
        - Online Transactions
    post:
      description: |
        A request to this endpoint must be preceded by a call to
        `/charge` with the price of the goods specified in `price`.
      operationId: basic.createTransaction
      requestBody:
        content:
          application/json:
            schema:
              example:
                charge: 78
                charge_seller: 0
                client_id: test-auth
                created: '2025-08-28T11:47:44.134539654Z'
                currency: eur
                description: Little Fish
                id: 1
                is_payment_in_progress: false
                join_code: 02e591b3-e80d-4ed8-927e-743df1a0cc22
                price: 1234
                quantity: 1
                seller_id: 45e2537a-a9f4-4b4e-9f90-3761cfd4f35b
                status: created
              properties:
                charge:
                  description: |
                    The `charge` value returned from a request to
                    `/charge`.
                  format: int64
                  type: integer
                charge_calculator_version:
                  description: >-
                    The `charge_calculator_version` value returned from a
                    request to `/charge`.
                  format: int64
                  type: integer
                charge_config:
                  description: |
                    The charge config for which the charge amount is computed.
                  format: int64
                  type: integer
                charge_seller:
                  description: |
                    The seller `charge` value returned from a
                    request to `/charge`.
                  format: int64
                  type: integer
                client_id:
                  type: string
                currency:
                  description: |
                    The currency that the `price` is specified in.
                  type: string
                description:
                  description: |
                    A description of the goods being sold.
                  type: string
                features:
                  description: |
                    `features` contains flags that modify the
                    transaction flow.
                  items:
                    $ref: '#/components/schemas/basic.Feature'
                  type: array
                payment_method:
                  description: |
                    The payment method to use for the transaction.
                  type: string
                price:
                  description: |
                    The price of the goods being sold, in the
                    `currency`'s smallest unit.  The `charge` value
                    should correspond to the Trustap charge created
                    with this price, otherwise this request will
                    fail with a `400` error.
                  format: int64
                  type: integer
                role:
                  $ref: '#/components/schemas/basic.Role'
              required:
                - role
                - currency
                - price
                - description
                - charge
                - charge_calculator_version
              type: object
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `incorrect_calc_version`
              * `incorrect_charge`
              * `incorrect_charge_seller`
              * `invalid_calc_version`
              * `negative_price`
              * `price_too_low`
              * `invalid_charge_config`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create a new online transaction
      tags:
        - Online Transactions
  /me/transactions/create_and_join:
    post:
      description: |
        This endpoint is an optimised call that allows a transaction to
        be created and joined in a single request. It requires the user
        identified by `join_user_id` to have granted the
        `basic_tx:offline_create_join` scope to the client that is
        performing the request.
      operationId: basic.createAndJoinTransaction
      requestBody:
        content:
          application/json:
            schema:
              example:
                charge: 78
                charge_calculator_version: 5
                charge_config: 1
                creator_role: seller
                currency: eur
                description: Soccer ticket
                join_user_id: feb33a87-3917-4538-9260-127c8a6b5232
                payment_method: bank_transfer
                price: 1234
                role: seller
              properties:
                charge:
                  description: |
                    The `charge` value returned from a request to
                    `/charge`.
                  format: int64
                  type: integer
                charge_calculator_version:
                  description: >-
                    The `charge_calculator_version` value returned from a
                    request to `/charge`.
                  format: int64
                  type: integer
                charge_config:
                  default: 1
                  description: |
                    The charge config for which the charge amount is computed.
                  format: int64
                  type: integer
                charge_seller:
                  description: |
                    The seller `charge` value returned from a request to
                    `/charge`.
                  format: int64
                  type: integer
                client_id:
                  type: string
                creator_role:
                  $ref: '#/components/schemas/basic.Role'
                currency:
                  description: |
                    The currency that the `price` is specified in.
                  type: string
                description:
                  description: |
                    A description of the goods being sold.
                  type: string
                features:
                  description: |
                    `features` contains flags that modify the
                    transaction flow.
                  items:
                    $ref: '#/components/schemas/basic.Feature'
                  type: array
                join_user_id:
                  description: |
                    The user that will be joined to the new
                    transaction when it is created. It cannot be the
                    ID of the user making the request.
                  type: string
                payment_method:
                  description: |
                    The payment method to use for the transaction.
                  type: string
                postage_fee:
                  description: The custom `postage_fee` for the transaction.
                  format: int64
                  type: integer
                price:
                  description: |
                    The price of the goods being sold, in the
                    `currency`'s smallest unit.  The `charge` value
                    should correspond to the Trustap charge created
                    with this price, otherwise this request will
                    fail with a `400` error.
                  format: int64
                  type: integer
              required:
                - join_user_id
                - creator_role
                - currency
                - price
                - description
                - charge
                - charge_calculator_version
              type: object
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_join_user_id`
              * `duplicate_user_id`: The user specified by
                `join_user_id` is the user making the request.
              * `incorrect_calc_version`
              * `incorrect_charge`
              * `incorrect_charge_seller`
              * `unsupported_currency`
              * `user_not_owned_by_client`
              * `invalid_calc_version`
              * `negative_price`
              * `price_too_low`
              * `user_already_joined`
              * `already_cancelled`
              * `feature_not_found`
              * `invalid_charge_config`
              * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create a new online transaction with both users
      tags:
        - Online Transactions
  /me/transactions/create_with_guest_user:
    post:
      description: >
        This endpoint is an optimised call that allows a transaction to

        be created and joined in a single request. It requires the

        online user to have granted the `basic_tx:offline_create_join` scope

        to the client that is performing the request.

        This endpoint allows creating a transaction with both buyer and seller

        as guest or full users, or one party to be guest user and the other full
        user.
      operationId: basic.createTransactionWithGuestUser
      requestBody:
        content:
          application/json:
            schema:
              example:
                - buyer_id: 1-bd5bb99j-95bf-87e2-ce0d-95e7541c6ad5
                  charge: 78
                  charge_calculator_version: 5
                  charge_config: 1
                  charge_seller: 0
                  creator_role: seller
                  currency: eur
                  description: Soccer ticket
                  payment_method: bank_transfer
                  price: 1234
                  seller_id: ad5bb99f-85bf-47e1-be0d-15e7541c6ad7
              properties:
                buyer_id:
                  description: |
                    The id of the buyer for this transaction
                    (it can be full user id or guest user id).
                  type: string
                charge:
                  description: |
                    The `charge` value returned from a request to
                    `/charge`.
                  format: int64
                  type: integer
                charge_calculator_version:
                  description: >-
                    The `charge_calculator_version` value returned from a
                    request to `/charge`.
                  format: int64
                  type: integer
                charge_config:
                  default: 1
                  description: |
                    The charge config for which the charge amount is computed.
                  format: int64
                  type: integer
                charge_seller:
                  description: |
                    The seller `charge` value returned from a
                    request to `/charge`.
                  format: int64
                  type: integer
                client_id:
                  type: string
                creator_role:
                  $ref: '#/components/schemas/basic.Role'
                currency:
                  $ref: '#/components/schemas/Currency'
                description:
                  description: |
                    A description of the goods being sold.
                  type: string
                features:
                  description: |
                    `features` contains flags that modify the
                    transaction flow.
                  items:
                    $ref: '#/components/schemas/basic.Feature'
                  type: array
                image_url:
                  description: >
                    URL of the image displayed on the Trustap payment page to
                    show the buyer

                    the item they are paying for.

                    Supports jpg, png, gif, bmp, webp and svg files. Images
                    displayed as a

                    squares. Non-square images are cropped.
                  format: absolute_url
                  maxLength: 2047
                  type: string
                payment_method:
                  description: |
                    The payment method to use for the transaction.
                  type: string
                postage_fee:
                  description: |
                    The custom `postage fee`, this fee only applies in the case
                    `postage fee feature flag` is enabled.
                  format: int64
                  type: integer
                price:
                  description: |
                    The price of the goods being sold, in the
                    `currency`'s smallest unit.  The `charge` value
                    should correspond to the Trustap charge created
                    with this price, otherwise this request will
                    fail with a `400` error.
                  format: int64
                  type: integer
                seller_id:
                  description: |
                    The id of the seller for this transaction
                    (it can be full user id or guest user id).
                  type: string
              required:
                - buyer_id
                - seller_id
                - creator_role
                - currency
                - price
                - description
                - charge
                - charge_calculator_version
              type: object
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:
              * `incorrect_calc_version`
              * `incorrect_charge`
              * `incorrect_charge_seller`
              * `invalid_calc_version`
              * `negative_price`
              * `price_too_low`
              * `incompatible_countries`
              * `unsupported_currency`
              * `invalid_role`
              * `no_guest_user`
              * `invalid_charge_config`
              * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.
              * `invalid_image_url`
              * `image_url_too_long`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create a new online transaction with both users
      tags:
        - Online Transactions
  /me/verification_method:
    get:
      operationId: personal.getVerificationMethod
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                example:
                  message: not_available
                  verification_method: stripe_identity
                properties:
                  message:
                    type: string
                  verification_method:
                    type: string
                required:
                  - verification_method
                  - message
                type: object
        '409':
          description: |
            Conflict

            `code` can be one of the following:

              * `user_is_company`: Verification sessions aren't yet supported
                for users with a `business_type` of `company`.
      summary: |
        Create verification method and message if not available
      tags:
        - Personal
  /me/verification_session:
    get:
      description: >-
        Offline access is allowed for this endpoint when the user has granted
        the `profile` scope to the client that is performing the request.
      operationId: personal.getVerificationSession
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                example:
                  verification_session_client_secret: >-
                    vs_1P**********************_******_****_********************************************************************************0PVs
                properties:
                  verification_session_client_secret:
                    type: string
                required:
                  - verification_session_client_secret
                type: object
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `stripe_identity_not_available`: stripe identity is currently not available for this account.
        '409':
          description: |
            Conflict

            `code` can be one of the following:

              * `user_is_company`: Verification sessions aren't yet supported
                for users with a `business_type` of `company`.
      summary: |
        Create verification session and retrieve client secret for it
      tags:
        - Personal
  /me/verification_session_native:
    get:
      description: >
        Creates verification session for native apps that use Stripe native
        SDK, 

        and returns it's `Verification Session ID` with appropriate `Ephemeral
        Key`.

        Offline access is allowed for this endpoint when the user has

        granted the `profile` scope to the client that is performing the
        request.
      operationId: personal.getVerificationSessionNative
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  ephemeral_key:
                    type: string
                  verification_session_id:
                    type: string
                required:
                  - verification_session_id
                  - ephemeral_key
                type: object
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `stripe_identity_not_available`: stripe identity is currently not available for this account.
        '409':
          description: |
            Conflict

            `code` can be one of the following:

              * `user_is_company`: Verification sessions aren't yet supported
                for users with a `business_type` of `company`.
      summary: Create verification session for native apps that use Stripe native SDK
      tags:
        - Personal
  /me/verification_status:
    get:
      description: >-
        Offline access is allowed for this endpoint when the user has granted
        the `profile` scope to the client that is performing the request.
      operationId: personal.getVerificationStatus
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                example:
                  verification_session_id: vs_1PH0bmDnTEntFpTD2xDXZy9t
                  verification_session_status: created
                properties:
                  verification_session_id:
                    type: string
                  verification_session_last_error:
                    $ref: '#/components/schemas/personal.VerificationSessionLastError'
                  verification_session_status:
                    type: string
                required:
                  - verification_session_id
                  - verification_session_status
                type: object
      summary: |
        Get verification status of the user
      tags:
        - Personal
  /multi_use_listings/{listing_id}:
    delete:
      deprecated: true
      operationId: basic.deleteMultiUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
      summary: Delete this listing
      tags:
        - Online Multi-use Listings
    get:
      deprecated: true
      operationId: basic.getMultiUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.MultiUseListing'
        '404':
          description: Not Found
      summary: Get a listing by its ID
      tags:
        - Online Multi-use Listings
    patch:
      deprecated: true
      operationId: basic.updateMultiUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/basic.updateMultiUseListingPatchListingBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.MultiUseListing'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `empty_body`: The request body is empty.
              * `partial_pricing`: When updating a pricing field, all 3 of
                `currency`, `price` and `charge` must be supplied.
        '404':
          description: Not Found
      summary: Patch listing properties
      tags:
        - Online Multi-use Listings
  /multi_use_listings/{listing_id}/create_transaction:
    post:
      deprecated: true
      description: |
        Calling `/create_transaction` with no parameters will create a
        new transaction with the details provided by the listing.

        The optional `quantity` parameter can be passed to create a
        transaction for a multiple of the original listing. In this
        case, the `price` and `charge` for the new transaction will also
        need to be passed.

        As an example, consider a listing for a chair with a price of
        `1234` `EUR`. If a user wants to buy 10 of these in a single
        transaction then the charge for the total can be retrieved using
        `GET /charge?price=1234&currency=usd&quantity=10` (note the
        addition of the optional quantity parameter at the end). This
        will return a `price` of `12340` and an associated `charge`.
        These new values must then be passed to `/create_transaction`
        with `quantity=10`, which will create a new transaction with the
        new pricing information. The new transaction will also include a
        `quantity` field, which doesn't have a functional effect on the
        transaction, but is included for informational purposes.

        Note that this functionality is not available for single-use
        listings, from which only singular transactions may be created.
      operationId: basic.createTransactionFromMultiUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
        - in: query
          name: quantity
          required: false
          schema:
            type: integer
            format: int64
        - in: query
          name: price
          required: false
          schema:
            type: integer
            format: int64
        - in: query
          name: charge
          required: false
          schema:
            type: integer
            format: int64
        - in: query
          name: payment_method
          required: false
          schema:
            type: string
        - in: query
          name: charge_config
          required: false
          schema:
            type: integer
            format: int64
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `listing_is_disabled`
              * `no_listing_currency`: The source listing doesn't
                have a currency.
              * `no_listing_price`: The source listing doesn't
                have pricing.
              * `no_listing_descr`: The source listing doesn't have
                a description.
              * `is_listing_creator`: The current user created this
                listing.
              * `invalid_charge_config`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Create a transaction from this listing
      tags:
        - Online Multi-use Listings
  /multi_use_listings/{listing_id}/create_transaction_with_guest_buyer:
    post:
      deprecated: true
      operationId: basic.createTransactionWithGuestBuyerFromMultiUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `listing_is_disabled`
              * `no_listing_currency`: The source listing doesn't
                have a currency.
              * `no_listing_price`: The source listing doesn't
                have pricing.
              * `no_listing_descr`: The source listing doesn't have
                a description.
              * `is_listing_creator`: The current user created this
                listing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Create a transaction from this listing
      tags:
        - Online Multi-use Listings
  /multi_use_listings/{listing_id}/disable:
    post:
      deprecated: true
      description: |
        Calling `/create_transaction` on a disabled listing will return
        a `400` response.
      operationId: basic.disableMultiUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.MultiUseListing'
        '404':
          description: Not found
      summary: Disable this listing
      tags:
        - Online Multi-use Listings
  /multi_use_listings/{listing_id}/enable:
    post:
      deprecated: true
      operationId: basic.enableMultiUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.MultiUseListing'
        '404':
          description: Not found
      summary: Enable this listing
      tags:
        - Online Multi-use Listings
  /multi_use_listings/{listing_id}/set_description:
    post:
      deprecated: true
      operationId: basic.setMultiUseListingDescription
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      requestBody:
        $ref: >-
          #/components/requestBodies/basic.setMultiUseListingDescriptionDescriptionBody
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.MultiUseListing'
        '404':
          description: Not Found
      summary: Set description for this listing
      tags:
        - Online Multi-use Listings
  /multi_use_listings/{listing_id}/set_pricing:
    post:
      deprecated: true
      operationId: basic.setMultiUseListingPricing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      requestBody:
        $ref: >-
          #/components/requestBodies/basic.setMultiUseListingPricingCreatePricingBody
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.MultiUseListing'
        '404':
          description: Not Found
      summary: Set pricing for this listing
      tags:
        - Online Multi-use Listings
  /notifications/{notification_id}:
    get:
      operationId: app_notifs.getNotification
      parameters:
        - in: path
          name: notification_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/app_notifs.Notification'
        '404':
          description: Not Found
      summary: Get a notification by its ID
      tags:
        - Notifications
  /notifications/{notification_id}/mark_as_read:
    post:
      operationId: app_notifs.markNotificationAsRead
      parameters:
        - in: path
          name: notification_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/app_notifs.Notification'
        '404':
          description: Not Found
      summary: Mark this notification as read
      tags:
        - Notifications
  /p2p/batch/transactions:
    get:
      description: >
        This endpoint takes a required `ids` parameter that contains a

        comma-separated list of transaction IDs, and returns the

        transactions corresponding to those IDs. A maximum of 50 IDs may

        be provided, and results are returned in the order specified in

        `ids`, and duplicates are preserved. Transactions that couldn't

        be found will be returned as `null` values in the result array.

        The following example request results in the `200 OK` response

        described below, assuming that the transaction with ID `1990`

        couldn't be found:



        ``` http

        https://dev.stage.trustap.com/api/v1/p2p/batch/transactions?ids=1309,609,1990,609

        ```
      operationId: getP2pTransactionsByIds
      parameters:
        - description: |
            A comma-separated list of transaction IDs
          in: query
          name: ids
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/p2p.Transaction'
                type: array
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `ids_missing`
              * `invalid_id`
              * `too_many_ids`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get multiple face-to-face transactions by their IDs
      tags:
        - F2F Transactions
  /p2p/charge:
    get:
      description: |
        This returns the Trustap fee, in the `currency`'s smallest unit,
        for a transaction involving goods with the supplied `price`. See
        [the Stripe
        documentation](https://stripe.com/docs/currencies#zero-decimal)
        for more details.
      operationId: p2p.getCharge
      parameters:
        - description: |
            The currency that the `price` is specified in.
          in: query
          name: currency
          required: true
          schema:
            type: string
        - description: |
            The price of the goods being sold in this transaction, in
            the `currency`'s smallest unit. For example, if a trading
            card is being sold for $12.34 (with `currency` as `usd`),
            then the request for the charge for this transaction would
            be `/p2p/charge?price=1234&currency=usd`.
          in: query
          name: price
          required: true
          schema:
            type: integer
            format: int64
        - description: >
            The `fee_multiplier` parameter is used to apply a higher percentage

            fee based on the total price of the transaction. The percentage fee

            is calculated multiplying the `percentage fee` by the
            `fee_multiplier`.
          in: query
          name: fee_multiplier
          required: false
          schema:
            type: number
            format: double
        - description: |
            When creating transactions from a multi-use listing, the
            `quantity` parameter can be provided in order to generate a
            charge for the given price multiplied by the given quantity.
            See `/p2p/multi_use_listings/{listingId}/create_transaction`
            for more details.
          in: query
          name: quantity
          required: false
          schema:
            type: integer
            format: int64
        - description: |
            The payment method that will be used to pay for the
            transaction. This is necessary because different payment
            methods may result in different fees.

            The default value is `card`.
          in: query
          name: payment_method
          required: false
          schema:
            type: string
        - description: |
            The charge config for which the charge amount is computed.
          in: query
          name: charge_config
          required: false
          schema:
            type: integer
            format: int64
            default: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Charge'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `currency_missing`
              * `invalid_price`
              * `negative_price`
              * `price_too_low`
              * `unsupported_currency`
              * `invalid_charge_config`
              * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: []
        - APIKey: []
      summary: Get the Trustap fee for a face-to-face transaction
      tags:
        - F2F Payment
  /p2p/listings/create_with_seller:
    post:
      operationId: p2p.createWithSeller
      requestBody:
        content:
          application/json:
            schema:
              properties:
                ad_id:
                  description: >
                    Unique ID for the product or service.

                    Not used by Trustap internally, but returned in webhook
                    events.
                  type: string
                currency:
                  $ref: '#/components/schemas/p2p.Currency'
                description:
                  description: |
                    Description of the product or service.
                    This description is shown in all emails and payment screens.
                  type: string
                image_url:
                  description: >
                    URL of the image displayed on the Trustap payment page to
                    show the buyer

                    the item they are paying for.

                    Supports jpg, png, gif, bmp, webp and svg files. Images
                    displayed as a

                    squares. Non-square images are cropped.
                  format: absolute_url
                  maxLength: 2047
                  type: string
                seller_country_code:
                  description: >
                    ISO 4217 three-character currency code representing the
                    currency of the transaction.
                  type: string
                seller_email:
                  description: >
                    Valid email address of your seller.

                    Ensure this email is correct as Trustap will send all
                    transaction correspondence to this email.
                  type: string
                seller_phone_number:
                  description: |
                    Phone number of seller.
                  type: string
                value:
                  description: |
                    The price of the product or service.
                    This value must be provided in a currency's smallest unit.
                  format: int64
                  type: integer
              required:
                - seller_email
                - currency
                - description
                - value
                - ad_id
                - seller_country_code
              type: object
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.ActionsUrl'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

                * `invalid_role`: '' is not a valid role
                * `invalid_image_url`: '' is not a valid image url
                * `image_url_too_long`
      summary: |
        Creates a transaction with guest seller and returns actions
        page url
      tags:
        - Trustap Lite
  /p2p/me/multi_use_listings/create:
    post:
      deprecated: true
      description: |
        Multi-use listings can be used to create transactions.
        Offline access is allowed for this endpoint when the user has
        granted the `p2p_ls:offline_create` scope to the client
        that is performing the request.
      operationId: createP2PMultiUseListingWithDetails
      requestBody:
        content:
          application/json:
            schema:
              example:
                charge_calculator_version: 5
                currency: eur
                deposit_charge: 78
                deposit_price: 1234
                description: Soccer ticket
                role: seller
              properties:
                charge_calculator_version:
                  description: >-
                    The `charge_calculator_version` value returned from a
                    request to `/p2p/charge`.
                  format: int64
                  type: integer
                charge_seller:
                  description: |
                    The `charge_seller` value returned from a request to
                    `/p2p/charge`.
                  format: int64
                  type: integer
                currency:
                  $ref: '#/components/schemas/Currency'
                deposit_charge:
                  description: |
                    The `charge` value returned from a request to
                    `/p2p/charge`.
                  format: int64
                  type: integer
                deposit_price:
                  description: |
                    The price of the goods being sold, in the
                    `currency`'s smallest unit.  The `charge` value
                    should correspond to the Trustap charge created
                    with this price, otherwise this request will
                    fail with a `400` error.
                  format: int64
                  type: integer
                description:
                  description: |
                    A description of the goods being sold.
                  type: string
                role:
                  $ref: '#/components/schemas/basic.Role'
                skip_remainder:
                  description: |
                    If `skip_remainder` is `true` then the
                    transaction will move to the "confirm handover"
                    step after the deposit has been accepted.
                  type: boolean
              required:
                - role
                - description
                - currency
                - deposit_price
                - deposit_charge
                - charge_calculator_version
              type: object
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PMultiUseListing'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

                * `invalid_role`: '' is not a valid role
      summary: |
        Create a new multi-use, face-to-face listing for the logged-in
        user
      tags:
        - F2F Multi-use Listings
  /p2p/me/single_use_listings/create:
    post:
      deprecated: true
      description: |
        Single-use listings are disabled once the remainder has been
        paid for a transaction created from it.
        Offline access is allowed for this endpoint when the user has
        granted the `p2p_ls:offline_create` scope to the client
        that is performing the request.
      operationId: createP2PSingleUseListingWithDetails
      requestBody:
        content:
          application/json:
            schema:
              example:
                charge_calculator_version: 5
                currency: eur
                deposit_charge: 78
                deposit_price: 1234
                description: Soccer ticket
                role: seller
              properties:
                charge_calculator_version:
                  description: >-
                    The `charge_calculator_version` value returned from a
                    request to `/p2p/charge`.
                  format: int64
                  type: integer
                charge_seller:
                  description: |
                    The `charge_seller` value returned from a request to
                    `/p2p/charge`.
                  format: int64
                  type: integer
                currency:
                  $ref: '#/components/schemas/Currency'
                deposit_charge:
                  description: |
                    The `charge` value returned from a request to
                    `/p2p/charge`.
                  format: int64
                  type: integer
                deposit_price:
                  description: |
                    The deposit price of the goods being sold, in
                    the `currency`'s smallest unit.  The `charge`
                    value should correspond to the Trustap charge
                    created with this price, otherwise this request
                    will fail with a `400` error.
                  format: int64
                  type: integer
                description:
                  description: |
                    A description of the goods being sold.
                  type: string
                role:
                  $ref: '#/components/schemas/basic.Role'
                skip_remainder:
                  description: |
                    If `skip_remainder` is `true` then the
                    transaction will move to the "confirm handover"
                    step after the deposit has been accepted.
                  type: boolean
              required:
                - role
                - description
                - currency
                - deposit_price
                - deposit_charge
                - charge_calculator_version
              type: object
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PSingleUseListing'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

                * `invalid_role`: '' is not a valid role
      summary: |
        Create a new single-use, face-to-face listing for the logged-in
        user
      tags:
        - F2F Single-use Listings
  /p2p/me/transactions:
    get:
      description: |
        Transactions are currently sorted by ID.
      operationId: p2p.getTransactions
      parameters:
        - description: |
            Only return transactions that were created chronologically
            before the transaction with this ID
          in: query
          name: before_id
          schema:
            type: integer
            format: int64
            minimum: 0
        - description: |
            Only return transactions that were created chronologically
            after the transaction with this ID (i.e. with smaller IDs)
          in: query
          name: after_id
          schema:
            type: integer
            format: int64
            minimum: 0
        - description: |
            The maximum number of transactions to return
          in: query
          name: limit
          schema:
            type: integer
            format: int64
            minimum: 1
            maximum: 50
            default: 25
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                example:
                  - client_id: test-auth
                    created: '2025-11-03T09:37:47Z'
                    currency: eur
                    deposit_pricing:
                      charge: 118
                      charge_seller: 0
                      price: 1234
                    description: Little Fish
                    id: 156
                    is_deposit_payment_in_progress: false
                    is_remainder_payment_in_progress: false
                    quantity: 1
                    seller_id: 1d9a9af7-b57b-4c48-a56f-86fe328f9682
                    seller_is_guest: false
                    skip_remainder: false
                    status: created
                  - client_id: test-auth
                    created: '2025-11-03T09:37:47Z'
                    currency: eur
                    deposit_pricing:
                      charge: 118
                      charge_seller: 0
                      price: 1234
                    description: Little Fish
                    id: 155
                    is_deposit_payment_in_progress: false
                    is_remainder_payment_in_progress: false
                    quantity: 1
                    seller_id: 1d9a9af7-b57b-4c48-a56f-86fe328f9682
                    seller_is_guest: false
                    skip_remainder: false
                    status: created
                items:
                  $ref: '#/components/schemas/p2p.Transaction'
                type: array
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_before_id`
              * `invalid_after_id`
              * `invalid_limit`
              * `excessive_limit`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get face-to-face transactions for the logged-in user
      tags:
        - F2F Transactions
    post:
      description: |
        Note that this endpoint is similar to `POST /me/transactions`
        but takes `deposit_price` and `deposit_charge` fields instead of
        the `price` and `charge` fields.
        Offline access is allowed for this endpoint when the user has
        granted the `p2p_tx:offline_create_join` scope to the client
        that is performing the request.
      operationId: p2p.createTransaction
      requestBody:
        content:
          application/json:
            schema:
              example:
                charge_calculator_version: 2
                currency: eur
                deposit_charge: 78
                deposit_charge_config: 1
                deposit_payment_method: bank_transfer
                deposit_price: 1234
                description: Soccer ticket
                role: seller
              properties:
                charge_calculator_version:
                  format: int64
                  type: integer
                client_id:
                  type: string
                currency:
                  $ref: '#/components/schemas/Currency'
                deposit_charge:
                  format: int64
                  type: integer
                deposit_charge_config:
                  description: |
                    The charge config for which the charge amount is computed.
                  format: int64
                  type: integer
                deposit_charge_seller:
                  format: int64
                  type: integer
                deposit_payment_method:
                  description: |
                    The payment method to use for the transaction.
                  type: string
                deposit_price:
                  format: int64
                  type: integer
                description:
                  description: |
                    A description of the goods being sold.
                  type: string
                role:
                  $ref: '#/components/schemas/basic.Role'
                skip_remainder:
                  description: |
                    If `skip_remainder` is `true` then this
                    transaction will move to the "confirm handover"
                    step after the deposit has been accepted.
                  type: boolean
              required:
                - role
                - currency
                - description
                - deposit_price
                - deposit_charge
                - charge_calculator_version
              type: object
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `incorrect_calc_version`
              * `incorrect_charge`
              * `incorrect_charge_seller`
              * `invalid_calc_version`
              * `negative_price`
              * `price_too_low`
              * `invalid_charge_config`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create a new face-to-face transaction
      tags:
        - F2F Transactions
  /p2p/me/transactions/create_and_join:
    post:
      description: |
        This endpoint is an optimised call that allows a transaction to
        be created and joined in a single request. It requires the user
        identified by `join_user_id` to have granted the
        `p2p_tx:offline_create_join` scope to the client that is
        performing the request.

        Note that this endpoint is similar to `POST /me/transactions`
        but takes `deposit_price` and `deposit_charge` fields instead of
        the `price` and `charge` fields.
      operationId: p2p.createAndJoinTransaction
      requestBody:
        content:
          application/json:
            schema:
              example:
                charge_calculator_version: 5
                client_id: test-auth
                creator_role: seller
                currency: eur
                deposit_charge: 118
                deposit_charge_config: 1
                deposit_charge_seller: 0
                deposit_payment_method: bank_transfer
                deposit_price: 1234
                description: Little Fish
                join_user_id: 2-8ab12191-7508-4efe-b65e-51d1bc440ed9
              properties:
                charge_calculator_version:
                  format: int64
                  type: integer
                creator_role:
                  $ref: '#/components/schemas/p2p.Role'
                currency:
                  $ref: '#/components/schemas/Currency'
                deposit_charge:
                  format: int64
                  type: integer
                deposit_charge_config:
                  description: |
                    The charge config for which the charge amount is computed.
                  format: int64
                  type: integer
                deposit_charge_seller:
                  format: int64
                  type: integer
                deposit_fee_multiplier:
                  description: >
                    The `fee_multiplier` parameter is used to apply a higher
                    percentage

                    fee based on the total price of the transaction. The
                    percentage fee

                    is calculated multiplying the `percentage fee` by the
                    `fee_multiplier`.
                  format: double
                  type: number
                deposit_payment_method:
                  description: |
                    The payment method to use for the transaction.
                  type: string
                deposit_price:
                  format: int64
                  type: integer
                description:
                  description: |
                    A description of the goods being sold.
                  type: string
                join_user_id:
                  description: |
                    The user that will be joined to the new
                    transaction when it is created. It cannot be the
                    ID of the user making the request.
                  type: string
                skip_remainder:
                  description: |
                    If `skip_remainder` is `true` then the
                    transaction will move to the "confirm handover"
                    step after the deposit has been accepted.
                  type: boolean
              required:
                - join_user_id
                - creator_role
                - currency
                - description
                - deposit_price
                - deposit_charge
                - deposit_charge_seller
                - charge_calculator_version
              type: object
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_join_user_id`
              * `unsupported_currency`
              * `user_not_owned_by_client`
              * `duplicate_user_id`: The user specified by
              * `join_user_id` is the user making the request.
              * `incorrect_charge`
              * `incorrect_charge_seller`
              * `second_party_already_joined`
              * `duplicate_user_id`
              * `incompatible_countries`
              * `incompatible_users`
              * `negative_price`
              * `price_too_low`
              * `invalid_charge_config`
              * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create a new face-to-face transaction with both users
      tags:
        - F2F Transactions
  /p2p/me/transactions/create_with_guest_user:
    post:
      description: |
        This endpoint is an optimised call that allows a transaction to
        be created and joined in a single request. It requires the
        online user to have granted the `p2p_tx:offline_create_join` scope
        to the client that is performing the request.
        This endpoint allows creating a transaction with both buyer and seller
        as guest users, or one party to be guest user and the other full user.
      operationId: p2p.createTransactionWithGuestUser
      requestBody:
        content:
          application/json:
            schema:
              example:
                buyer_id: 1-ef9664e4-921a-4696-8eaa-d8b2593d9ff9
                charge_calculator_version: 3
                creator_role: seller
                currency: eur
                deposit_charge: 118
                deposit_charge_config: 1
                deposit_charge_seller: 0
                deposit_payment_method: bank_transfer
                deposit_price: 1234
                description: Little Fish
                seller_id: 1-f40b6944-3c54-405e-9ae3-3fa9d2be9f91
                skip_remainder: true
              properties:
                buyer_id:
                  description: |
                    The id of the buyer for this transaction
                    (it can be full user id or guest user id).
                  type: string
                charge_calculator_version:
                  format: int64
                  type: integer
                creator_role:
                  $ref: '#/components/schemas/p2p.Role'
                currency:
                  $ref: '#/components/schemas/p2p.Currency'
                deposit_charge:
                  format: int64
                  type: integer
                deposit_charge_config:
                  description: |
                    The charge config for which the charge amount is computed.
                  format: int64
                  type: integer
                deposit_charge_seller:
                  format: int64
                  type: integer
                deposit_fee_multiplier:
                  description: >
                    The `fee_multiplier` parameter is used to apply a higher
                    percentage

                    fee based on the total price of the transaction. The
                    percentage fee

                    is calculated multiplying the `percentage fee` by the
                    `fee_multiplier`.
                  format: double
                  type: number
                deposit_payment_method:
                  description: |
                    The payment method to use for the transaction.
                  type: string
                deposit_price:
                  format: int64
                  type: integer
                description:
                  description: |
                    A description of the goods being sold.
                  type: string
                image_url:
                  description: >
                    URL of the image displayed on the Trustap payment page to
                    show the buyer

                    the item they are paying for.

                    Supports jpg, png, gif, bmp, webp and svg files. Images
                    displayed as a

                    squares. Non-square images are cropped.
                  format: absolute_url
                  maxLength: 2047
                  type: string
                seller_id:
                  description: |
                    The id of the seller for this transaction
                    (it can be full user id or guest user id).
                  type: string
                skip_remainder:
                  description: |
                    If `skip_remainder` is `true` then the
                    transaction will move to the "confirm handover"
                    step after the deposit has been accepted.
                  type: boolean
              required:
                - buyer_id
                - seller_id
                - creator_role
                - currency
                - description
                - deposit_price
                - deposit_charge
                - charge_calculator_version
              type: object
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:
              * `incompatible_platforms`
              * `no_guest_user`
              * `invalid_role`
              * `incorrect_charge`
              * `unsupported_currency`
              * `fee_multiplier_too_low`
              * `negative_price`
              * `price_too_low`
              * `invalid_charge_config`
              * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.
              * `invalid_image_url`
              * `image_url_too_long`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Create a new face-to-face transaction with both users
      tags:
        - F2F Transactions
  /p2p/multi_use_listings/{listingId}:
    delete:
      deprecated: true
      operationId: deleteP2PMultiUseListing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '204':
          description: OK
        '404':
          description: Not Found
      summary: Delete this listing
      tags:
        - F2F Multi-use Listings
    get:
      deprecated: true
      operationId: getP2PMultiUseListing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PMultiUseListing'
        '404':
          description: Not Found
      summary: Get a listing by its ID
      tags:
        - F2F Multi-use Listings
    patch:
      deprecated: true
      operationId: patchP2PMultiUseListing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        $ref: '#/components/requestBodies/patchP2PMultiUseListingPatchListingBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PMultiUseListing'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `empty_body`: The request body is empty.
        '404':
          description: Not Found
      summary: Patch listing properties
      tags:
        - F2F Multi-use Listings
  /p2p/multi_use_listings/{listingId}/create_transaction:
    post:
      deprecated: true
      description: |
        Calling `/create_transaction` with no parameters will create a
        new transaction with the details provided by the listing.

        The optional `quantity` parameter can be passed to create a
        transaction for a multiple of the original listing. In this
        case, the `price` and `charge` for the new transaction will also
        need to be passed.

        As an example, consider a listing for a chair with a price of
        `1234` `EUR`. If a user wants to buy 10 of these in a single
        transaction then the charge for the total can be retrieved using
        `GET /p2p/charge?price=1234&currency=usd&quantity=10` (note the
        addition of the optional quantity parameter at the end). This
        will return a `price` of `12340` and an associated `charge`.
        These new values must then be passed to `/create_transaction`
        with `quantity=10`, which will create a new transaction with the
        new pricing information. The new transaction will also include a
        `quantity` field, which doesn't have a functional effect on the
        transaction, but is included for informational purposes.

        Note that this functionality is not available for single-use
        listings, from which only singular transactions may be created.

        Offline access is allowed for this endpoint when the user has
        granted the `p2p_tx:offline_create_join` scope to the client
        that is performing the request.
      operationId: createTransactionFromP2PMultiUseListing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
        - in: query
          name: quantity
          required: false
          schema:
            type: integer
            format: int64
        - in: query
          name: price
          required: false
          schema:
            type: integer
            format: int64
        - in: query
          name: charge
          required: false
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `listing_is_disabled`
              * `is_listing_creator`: The current user created this
                listing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Create a transaction from this listing
      tags:
        - F2F Multi-use Listings
  /p2p/multi_use_listings/{listingId}/disable:
    post:
      deprecated: true
      description: |
        Calling `/create_transaction` on a disabled listing will return
        a `400` response.
        Offline access is allowed for this endpoint when the user has
        granted the `p2p_ls:offline_update` scope to the client
        that is performing the request.
      operationId: disableP2PMultiUseListing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PMultiUseListing'
        '404':
          description: Not Found
      summary: Disable this listing
      tags:
        - F2F Multi-use Listings
  /p2p/multi_use_listings/{listingId}/enable:
    post:
      deprecated: true
      description: >-
        Offline access is allowed for this endpoint when the user has granted
        the `p2p_ls:offline_update` scope to the client that is performing the
        request.
      operationId: enableP2PMultiUseListing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PMultiUseListing'
        '404':
          description: Not Found
      summary: Enable this listing
      tags:
        - F2F Multi-use Listings
  /p2p/multi_use_listings/{listingId}/set_deposit_pricing:
    post:
      deprecated: true
      description: >-
        Offline access is allowed for this endpoint when the user has granted
        the `p2p_ls:offline_update` scope to the client that is performing the
        request.
      operationId: setP2PMultiUseListingPricing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        $ref: >-
          #/components/requestBodies/setP2PMultiUseListingPricingCreatePricingBody
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PMultiUseListing'
        '404':
          description: Not Found
      summary: Set pricing for this listing
      tags:
        - F2F Multi-use Listings
  /p2p/multi_use_listings/{listingId}/set_description:
    post:
      deprecated: true
      description: >-
        Offline access is allowed for this endpoint when the user has granted
        the `p2p_ls:offline_update` scope to the client that is performing the
        request.
      operationId: setP2PMultiUseListingDescription
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        $ref: >-
          #/components/requestBodies/basic.setMultiUseListingDescriptionDescriptionBody
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PMultiUseListing'
        '404':
          description: Not Found
      summary: Set the description for this listing
      tags:
        - F2F Multi-use Listings
  /p2p/multi_use_listings/{listingId}/set_skip_remainder:
    post:
      deprecated: true
      description: >-
        Offline access is allowed for this endpoint when the user has granted
        the `p2p_ls:offline_update` scope to the client that is performing the
        request.
      operationId: setP2PMultiUseListingSkipRemainder
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              properties:
                skip_remainder:
                  type: boolean
              required:
                - skip_remainder
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PMultiUseListing'
        '404':
          description: Not Found
      summary: Set skip remainder for this listing
      tags:
        - F2F Multi-use Listings
  /p2p/single_use_listings/{listingId}:
    delete:
      deprecated: true
      operationId: deleteP2PSingleUseListing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '204':
          description: OK
        '404':
          description: Not Found
      summary: Delete this listing
      tags:
        - F2F Single-use Listings
    get:
      deprecated: true
      operationId: getP2PSingleUseListing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PSingleUseListing'
        '404':
          description: Not Found
      summary: Get a listing by its ID
      tags:
        - F2F Single-use Listings
    patch:
      deprecated: true
      operationId: patchP2PSingleUseListing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        $ref: '#/components/requestBodies/patchP2PMultiUseListingPatchListingBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PSingleUseListing'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `empty_body`: The request body is empty.
        '404':
          description: Not Found
      summary: Patch listing properties
      tags:
        - F2F Single-use Listings
  /p2p/single_use_listings/{listingId}/create_transaction:
    post:
      deprecated: true
      description: >-
        Offline access is allowed for this endpoint when the user has granted
        the `p2p_tx:offline_create_join` scope to the client that is performing
        the request.
      operationId: createTransactionFromP2PSingleUseListing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `listing_is_disabled`
              * `is_listing_creator`: The current user created this
                listing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Create a transaction from this listing
      tags:
        - F2F Single-use Listings
  /p2p/single_use_listings/{listingId}/disable:
    post:
      deprecated: true
      description: |
        Calling `/create_transaction` on a disabled listing will return
        a `400` response.
        Offline access is allowed for this endpoint when the user has
        granted the `p2p_ls:offline_update` scope to the client
        that is performing the request.
      operationId: disableP2PSingleUseListing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PSingleUseListing'
        '404':
          description: Not Found
      summary: Disable this listing
      tags:
        - F2F Single-use Listings
  /p2p/single_use_listings/{listingId}/enable:
    post:
      deprecated: true
      description: >-
        Offline access is allowed for this endpoint when the user has granted
        the `p2p_ls:offline_update` scope to the client that is performing the
        request.
      operationId: enableP2PSingleUseListing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PSingleUseListing'
        '404':
          description: Not Found
      summary: Enable this listing
      tags:
        - F2F Single-use Listings
  /p2p/single_use_listings/{listingId}/set_deposit_pricing:
    post:
      deprecated: true
      description: >-
        Offline access is allowed for this endpoint when the user has granted
        the `p2p_ls:offline_update` scope to the client that is performing the
        request.
      operationId: setP2PSingleUseListingPricing
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        $ref: >-
          #/components/requestBodies/setP2PMultiUseListingPricingCreatePricingBody
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PSingleUseListing'
        '404':
          description: Not Found
      summary: Set pricing for this listing
      tags:
        - F2F Single-use Listings
  /p2p/single_use_listings/{listingId}/set_description:
    post:
      deprecated: true
      description: >-
        Offline access is allowed for this endpoint when the user has granted
        the `p2p_ls:offline_update` scope to the client that is performing the
        request.
      operationId: setP2PSingleUseListingDescription
      parameters:
        - in: path
          name: listingId
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        $ref: >-
          #/components/requestBodies/basic.setMultiUseListingDescriptionDescriptionBody
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PSingleUseListing'
        '404':
          description: Not Found
      summary: Set the description for this listing
      tags:
        - F2F Single-use Listings
  /p2p/transactions/{transaction_id}:
    get:
      operationId: p2p.getTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
      summary: Get a face-to-face transaction by its ID
      tags:
        - F2F Transactions
    patch:
      operationId: updateF2fTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              example:
                currency: eur
                deposit_charge: 78
                deposit_price: 1234
                description: Soccer ticket
              properties:
                currency:
                  $ref: '#/components/schemas/Currency'
                deposit_charge:
                  format: int64
                  type: integer
                deposit_price:
                  format: int64
                  type: integer
                description:
                  description: |
                    A description of the goods being sold.
                  type: string
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_id`
              * `second_party_already_joined`
              * `values_not_changed`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
        '404':
          description: Not Found
      summary: >-
        Update the description, currency, price and/or charge of this
        face-to-face transaction
      tags:
        - F2F Payment
  /p2p/transactions/{transaction_id}/accept_complaint:
    post:
      operationId: p2p.acceptComplaint
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `funds_already_released`
              * `deposit_not_paid`
              * `deposit_already_refunded`
              * `not_complained`
        '404':
          description: Not Found
      summary: Accept a complaint for this face-to-face transaction
      tags:
        - F2F Complaint
  /p2p/transactions/{transaction_id}/accept_deposit:
    post:
      description: >-
        Offline access is allowed for this endpoint when the user has granted
        the `p2p_tx:offline_accept_deposit` scope to the client that is
        performing the request.
      operationId: p2p.acceptDeposit
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `deposit_not_paid`
              * `deposit_payment_in_review`
              * `deposit_already_accepted`
              * `already_cancelled`
              * `deposit_already_captured`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_seller`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Accept the deposit for this face-to-face transaction
      tags:
        - F2F Payment
  /p2p/transactions/{transaction_id}/accept_deposit_with_guest_seller:
    post:
      operationId: p2p.acceptDepositWithGuestSeller
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_seller`
              * `subject_is_not_guest_user`
              * `deposit_not_paid`
              * `deposit_already_accepted`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Accept the deposit for this face-to-face transaction as a guest seller
      tags:
        - F2F Payment
  /p2p/transactions/{transaction_id}/bank_transfer_details:
    get:
      operationId: p2p.getBankTransferDetails
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.BankTransferDetails'
        '400':
          description: |
            Bad Request
            `code` can be one of the following:
              * `payment_method_not_bank_transfer`
      summary: >
        Get the bank transfer details for a face-to-face transaction which
        payment method is `bank_transfer`
      tags:
        - F2F Payment
  /p2p/transactions/{transaction_id}/billing_details:
    get:
      operationId: p2p.getBillingDetails
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.BillingDetails'
        '404':
          description: Not Found
      summary: Get billing details from this p2p transaction
      tags:
        - F2F Buyer/Seller Details
  /p2p/transactions/{transaction_id}/cancel_with_description:
    post:
      description: |
        If a transaction is cancelled after the deposit has been paid
        then the deposit (excluding the Trustap fee) will be returned to
        the buyer.
        Offline access is allowed for this endpoint when the user has
        granted the `p2p_tx:offline_cancel` scope to the client
        that is performing the request.
      operationId: p2p.cancelWithDescription
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
        - description: >-
            Required in client flows, where you make API calls on behalf of
            another Trustap user.
          in: header
          name: Trustap-User
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              example:
                description: Found another buyer
              properties:
                description:
                  type: string
              required:
                - description
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `second_party_not_joined`
              * `already_cancelled`
              * `remainder_already_paid`
              * `handover_already_confirmed`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      security:
        - APIKey: []
      summary: Cancel this face-to-face transaction with a description
      tags:
        - F2F Cancel
  /p2p/transactions/{transaction_id}/cancel_with_description_with_guest_user:
    post:
      description: |
        If a transaction is cancelled after the deposit has been paid
        then the deposit (excluding the Trustap fee) will be returned to
        the buyer.
      operationId: p2p.cancelP2PTransactionWithDescriptionAsGuest
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
        - description: >-
            Required in client flows, where you make API calls on behalf of
            another Trustap user.
          in: header
          name: Trustap-User
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              example:
                description: Found another buyer
              properties:
                description:
                  minLength: 1
                  type: string
              required:
                - description
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `missing_description`
              * `empty_description`
              * `already_cancelled`
              * `remainder_already_paid`
              * `handover_already_confirmed`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      security:
        - APIKey: []
      summary: Cancel this face-to-face transaction with a description with guest user
      tags:
        - F2F Cancel
  /p2p/transactions/{transaction_id}/claim_for_buyer:
    post:
      description: >
        This endpoint enables a client to claim a face-to-face transaction on
        behalf of a buyer.

        This endpoint is only accessible for a client.
      operationId: p2p.claimForBuyer
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `already_claimed`
              * `cannot_claim_own_transaction`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Claim a F2F transaction on behalf of the buyer
      tags:
        - F2F Transactions
  /p2p/transactions/{transaction_id}/claim_for_seller:
    post:
      description: >
        This endpoint enables a client to claim a face-to-face transaction on
        behalf of a seller.

        This endpoint is only accessible for a client.
      operationId: p2p.claimTransactionForSeller
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `already_claimed`
              * `cannot_claim_own_transaction`
              * `invalid_user_platform`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Claim a F2F transaction on behalf of the seller
      tags:
        - F2F Transactions
  /p2p/transactions/{transaction_id}/complain:
    post:
      description: >-
        Offline access is allowed for this endpoint when the user has granted
        the `p2p_tx:offline_complain` scope to the client that is performing the
        request.
      operationId: p2p.submitComplaint
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        $ref: '#/components/requestBodies/p2p.submitComplaintSubmitComplaintBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `remainder_required`
              * `already_complained`
              * `funds_already_released`
              * `complaint_period_expired`
        '404':
          description: Not Found
      summary: Submit a complaint for this face-to-face transaction
      tags:
        - F2F Complaint
  /p2p/transactions/{transaction_id}/complain_with_guest_buyer:
    post:
      operationId: p2p.submitComplaintWithGuestBuyer
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        $ref: '#/components/requestBodies/p2p.submitComplaintSubmitComplaintBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `remainder_required`
              * `already_complained`
              * `funds_already_released`
              * `complaint_period_expired`
        '404':
          description: Not Found
      summary: Submit a complaint for this face-to-face transaction with a guest buyer
      tags:
        - F2F Complaint
  /p2p/transactions/{transaction_id}/confirm_handover:
    post:
      description: |
        Both parties should confirm the handover for a face-to-face
        transaction. The complaints period begins when the seller
        confirms the handover.
        Offline access is allowed for this endpoint when the user has
        granted the `p2p_tx:offline_confirm_handover` scope to the client
        that is performing the request.
      operationId: p2p.confirmHandover
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `remainder_required`
              * `already_complained`
              * `seller_handover_already_confirmed`
              * `buyer_handover_already_confirmed`
              * `remainder_payment_in_review`
              * `already_cancelled`
        '404':
          description: Not Found
      summary: Confirm the handover for this face-to-face transaction
      tags:
        - F2F Handover
  /p2p/transactions/{transaction_id}/end_complaint_period_with_guest_buyer:
    post:
      operationId: p2p.endComplaintPeriodWithGuestBuyer
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `complaint_period_expired`
              * `already_complained`
              * `handover_not_confirmed`
              * `funds_already_released`
        '404':
          description: Not Found
      summary: >-
        End the complaint period for this face-to-face transaction with a guest
        buyer
      tags:
        - F2F Complaint
  /p2p/transactions/{transaction_id}/join_with_guest:
    post:
      operationId: p2p.joinWithGuest
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `cannot_join_own_transaction`
              * `already_cancelled``
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Join the face-to-face transaction as guest user
      tags:
        - F2F Transactions
  /p2p/transactions/{transaction_id}/metadata:
    get:
      operationId: p2p.getTransactionMetadata
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '404':
          description: Not Found
      summary: Get metadata for a face-to-face transaction
      tags:
        - F2F Transactions
    post:
      operationId: p2p.setTransactionMetadata
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: true
              type: object
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `too_many_metadata_fields`
              * `value_too_long`
              * `field_name_too_long`
              * `empty_json`
              * `json_type_not_allowed``
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Set metadata for a face-to-face transaction
      tags:
        - F2F Transactions
  /p2p/transactions/{transaction_id}/remainder_stripe_client_secret:
    get:
      description: >
        This endpoint is used for the asynchronous payment flow using

        Stripe. The `client_secret` returned from this endpoint should

        be passed to

        [stripe.confirmCardPayment](https://stripe.com/docs/stripe-js/reference#stripe-confirm-card-payment)

        to start the payment process.
      operationId: p2p.getRemainderStripeClientSecretForTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                example:
                  client_secret: '***'
                properties:
                  client_secret:
                    type: string
                required:
                  - client_secret
                type: object
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `missing_pricing`: Pricing details have not yet been
                added to this transaction.
              * `no_client_secret`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_buyer`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: |
        Get the Stripe client secret for this face-to-face transaction
      tags:
        - F2F Buyer/Seller Details
  /p2p/transactions/{transaction_id}/set_deposit_payment_method:
    post:
      description: >
        Set deposit payment method for face-to-face transaction. Values can be
        `card`,

        `bank_transfer`, `p24`, and `fpx`.
      operationId: p2p.setDepositPaymentMethod
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/p2p.DepositPaymentMethod'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_payment_method`
              * `deposit_already_paid`
              * `payment_method_already_set`: The specified payment method and charge configuration are already set.
              * `invalid_charge_config`: Charge configuration must be an integer greater than or equal to 1.
              * `unsupported_currency`
              * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.
              * `currency_missing`
              * `incorrect_charge`: Specified charge doesn't match expected charge.
              * `incorrect_charge_seller`: Specified seller charge doesn't match expected seller charge.
              * `incorrect_price`: Specified price doesn't match expected price.
              * `incorrect_currency`: Specified currency doesn't match expected currency.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Set deposit payment method for this face-to-face transaction
      tags:
        - F2F Payment
  /p2p/transactions/{transaction_id}/stripe_publishable_key:
    get:
      description: |
        Returns the Publishable Key for the Stripe Platform
        which is hosting this transaction.
      operationId: p2p.getStripePublishableKeyForTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                example:
                  publishable_key: pk_xXxXxXxXxXx
                properties:
                  publishable_key:
                    type: string
                required:
                  - publishable_key
                type: object
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_id`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_buyer`
              * `not_seller`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: >
        Get the details for the Stripe publishable key that is in use for this
        face-to-face transaction
      tags:
        - F2F Buyer/Seller Details
  /p2p/transactions/{transactionId}/buyer_details:
    get:
      operationId: getBuyerDetailsFromP2PTransaction
      parameters:
        - in: path
          name: transactionId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDetails'
        '404':
          description: Not Found
      summary: Get the details of the buyer from this face-to-face transaction
      tags:
        - F2F Buyer/Seller Details
  /p2p/transactions/{transactionId}/confirm_handover_with_guest_user:
    post:
      description: |
        Both parties should confirm the handover for a face-to-face
        transaction. Full users don't have access to this endpoint.
      operationId: confirmHandoverForP2PTransactionWithGuestUser
      parameters:
        - in: path
          name: transactionId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `remainder_required`
              * `already_complained`
              * `seller_handover_already_confirmed`
              * `buyer_handover_already_confirmed`
        '404':
          description: Not Found
      summary: Confirm the handover for this face-to-face transaction with a guest user
      tags:
        - F2F Handover
  /p2p/transactions/{transactionId}/deposit_stripe_client_secret:
    get:
      description: >
        This endpoint is used for the asynchronous payment flow using

        Stripe. The `client_secret` returned from this endpoint should

        be passed to

        [stripe.confirmCardPayment](https://stripe.com/docs/stripe-js/reference#stripe-confirm-card-payment)

        to start the payment process.
      operationId: getDepositStripeClientSecretForP2PTransaction
      parameters:
        - in: path
          name: transactionId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                example:
                  client_secret: '***'
                properties:
                  client_secret:
                    type: string
                required:
                  - client_secret
                type: object
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `deposit_already_paid`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_buyer`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: |
        Get the Stripe client secret for this face-to-face transaction
      tags:
        - F2F Buyer/Seller Details
  /p2p/transactions/{transactionId}/seller_details:
    get:
      operationId: getSellerDetailsFromP2PTransaction
      parameters:
        - in: path
          name: transactionId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDetails'
        '404':
          description: Not Found
      summary: Get the details of the seller from this face-to-face transaction
      tags:
        - F2F Buyer/Seller Details
  /p2p/transactions/{transactionId}/set_price:
    post:
      description: |
        `price` is the total price of the item, and thus includes the
        price already paid for the deposit.

        Note that this endpoint will return a `remainder_too_low`
        response if the difference between the total price and the
        deposit price is too low.
        Offline access is allowed for this endpoint when the user has
        granted the `p2p_tx:offline_set_price` scope to the client
        that is performing the request.
      operationId: setPriceForP2PTransaction
      parameters:
        - in: path
          name: transactionId
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              example:
                charge: 190
                charge_calculator_version: 2
                currency: eur
                price: 5000
              properties:
                charge:
                  description: |
                    The `charge` value returned from a request to
                    `/p2p/charge`.
                  format: int64
                  type: integer
                charge_calculator_version:
                  description: >-
                    The `charge_calculator_version` value returned from a
                    request to `/p2p/charge`.
                  format: int64
                  type: integer
                currency:
                  $ref: '#/components/schemas/Currency'
                price:
                  description: |
                    The price of the goods being sold, in the
                    `currency`'s smallest unit.  The `charge` value
                    should correspond to the Trustap charge created
                    with this price, otherwise this request will
                    fail with a `400` error.
                  format: int64
                  type: integer
              required:
                - currency
                - price
                - charge
                - charge_calculator_version
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `currency_mismatch`: Pricing currency is different
                to the transaction's currency.
              * `remainder_already_skipped`
              * `remainder_too_low`: The difference between the
                total price of this transaction isn't larger than
                the deposit price.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_seller`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Set the total price for this face-to-face transaction
      tags:
        - F2F Payment
  /p2p/transactions/{transactionId}/skip_remainder:
    post:
      description: |
        This will skip the remainder payment of this transaction, and
        the total price of the transaction will not need to be set. Note
        that this must be done before the total price of the transaction
        is set using `/set_price`.
      operationId: skipRemainderForP2PTransaction
      parameters:
        - in: path
          name: transactionId
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `price_already_set`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_seller`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Skip the remainder for this face-to-face transaction
      tags:
        - F2F Payment
  /p2p/transactions_by_claim_secret/{secret}/claim_as_buyer:
    post:
      description: |
        This endpoint allows a full user to claim a transaction
        as buyer given a claim secret.
      operationId: p2p.claimAsBuyer
      parameters:
        - in: path
          name: secret
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `already_claimed`
              * `cannot_claim_own_transaction`
              * `missing_secret`
              * `invalid_user_platform`
        '404':
          description: Not Found
      summary: Claim F2F transaction as buyer given a claim secret
      tags:
        - F2F Transactions
  /p2p/transactions_by_claim_secret/{secret}/claim_as_seller:
    post:
      description: |
        This endpoint allows a full user to claim a transaction
        as seller given a claim secret.
      operationId: p2p.claimTransactionAsSeller
      parameters:
        - in: path
          name: secret
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `missing_secret`
              * `already_claimed`
              * `cannot_claim_own_transaction`
              * `invalid_user_platform`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Claim a F2F transaction as the seller
      tags:
        - F2F Transactions
  /p2p/transactions_by_join_code/{join_code}/join:
    post:
      description: >-
        This endpoint allows a user to join a transaction provided a join code.
        Offline access is allowed for this endpoint when the user has granted
        the `p2p_tx:offline_create_join` scope to the client that is performing
        the request.
      operationId: p2p.joinTransactionByJoinCode
      parameters:
        - in: path
          name: join_code
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `cannot_join_own_transaction`
              * `already_cancelled`
              * `unsupported_currency`
              * `invalid_payment_method`
              * `invalid_user_id`
              * `incompatible_users`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Join a face-to-face transaction by its join code
      tags:
        - F2F Transactions
  /p2p/transactions_by_join_code/{join_code}/reject:
    post:
      operationId: p2p.rejectTransactionByJoinCode
      parameters:
        - in: path
          name: join_code
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `cannot_reject_own_transaction`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Reject a face-to-face transaction by its join code
      tags:
        - F2F Transactions
  /p2p/transactions_by_join_code/{joinCode}:
    get:
      operationId: getP2PTransactionByJoinCode
      parameters:
        - in: path
          name: joinCode
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/p2p.Transaction'
        '404':
          description: Not Found
      summary: Get a face-to-face transaction by its join code
      tags:
        - F2F Transactions
  /shippo_shipping_rates:
    post:
      description: |
        This returns the list of Shippo shipping rates available
        for the addreses provided i.e sender's address and recipient's
        address.
      operationId: basic.getShippoShippingRates
      requestBody:
        content:
          application/json:
            schema:
              example:
                currency: EUR
                customs_certify: true
                customs_certify_signer: Joe Doe
                customs_description: T-Shirt
                customs_incoterm: DDU
                customs_mass_unit: lb
                customs_net_weight: 5
                customs_non_delivery_option: return
                customs_origin_country: US
                customs_quantity: 20
                customs_value_amount: '200'
                customs_value_currency: USD
                parcel_distance_unit: cm
                parcel_height: 10
                parcel_length: 10
                parcel_mass_unit: lb
                parcel_weight: 10
                parcel_width: 10
                recipient_city: New York
                recipient_country: us
                recipient_full_name: Ivan Horvat
                recipient_phone: '123456789'
                recipient_state: New York
                recipient_street_1: 21-27 Marshall Court
                recipient_zip_code: '90218'
                sender_city: Altona
                sender_country: au
                sender_full_name: Ana Potter
                sender_phone: '123456789'
                sender_state: Victoria
                sender_street_1: 21-27 Marshall Court
              properties:
                currency:
                  type: string
                customs_certify:
                  type: boolean
                customs_certify_signer:
                  type: string
                customs_description:
                  type: string
                customs_eel_pfc:
                  type: string
                customs_incoterm:
                  type: string
                customs_mass_unit:
                  type: string
                customs_net_weight:
                  format: double
                  type: number
                customs_non_delivery_option:
                  enum:
                    - return
                    - abandon
                  type: string
                customs_origin_country:
                  type: string
                customs_quantity:
                  format: int64
                  type: integer
                customs_value_amount:
                  type: string
                customs_value_currency:
                  type: string
                parcel_distance_unit:
                  $ref: '#/components/schemas/basic.DistanceUnit'
                parcel_height:
                  format: double
                  type: number
                parcel_length:
                  format: double
                  type: number
                parcel_mass_unit:
                  $ref: '#/components/schemas/basic.MassUnit'
                parcel_weight:
                  format: double
                  type: number
                parcel_width:
                  format: double
                  type: number
                recipient_city:
                  type: string
                recipient_country:
                  type: string
                recipient_full_name:
                  type: string
                recipient_phone:
                  type: string
                recipient_state:
                  type: string
                recipient_street_1:
                  type: string
                recipient_street_2:
                  type: string
                recipient_zip_code:
                  type: string
                sender_city:
                  type: string
                sender_country:
                  type: string
                sender_full_name:
                  type: string
                sender_phone:
                  type: string
                sender_state:
                  type: string
                sender_street_1:
                  type: string
                sender_street_2:
                  type: string
                sender_zip_code:
                  type: string
              required:
                - sender_full_name
                - sender_street_1
                - sender_zip_code
                - sender_city
                - sender_state
                - sender_country
                - sender_phone
                - recipient_full_name
                - recipient_street_1
                - recipient_zip_code
                - recipient_city
                - recipient_state
                - recipient_country
                - recipient_phone
                - parcel_height
                - parcel_length
                - parcel_width
                - parcel_distance_unit
                - parcel_weight
                - parcel_mass_unit
                - currency
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.ShippoShippingRatesResponse'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:
              * `missing_shipment_details`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: []
        - APIKey: []
      summary: Get the list of Shippo shipping rates available
      tags:
        - Online Shipping
  /single_use_listings/{listing_id}:
    delete:
      deprecated: true
      operationId: basic.deleteSingleUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
      summary: Delete this listing
      tags:
        - Online Single-use Listings
    get:
      deprecated: true
      operationId: basic.getSingleUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.SingleUseListing'
        '404':
          description: Not Found
      summary: Get a listing by its ID
      tags:
        - Online Single-use Listings
    patch:
      deprecated: true
      operationId: basic.updateSingleUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/basic.updateMultiUseListingPatchListingBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.SingleUseListing'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `empty_body`: The request body is empty.
              * `partial_pricing`: When updating a pricing field, all 3 of
                `currency`, `price` and `charge` must be supplied.
        '404':
          description: Not Found
      summary: Patch listing properties
      tags:
        - Online Single-use Listings
  /single_use_listings/{listing_id}/create_transaction:
    post:
      deprecated: true
      operationId: basic.createTransactionFromSingleUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `listing_is_disabled`
              * `no_listing_currency`: The source listing doesn't
                have a currency.
              * `no_listing_price`: The source listing doesn't
                have pricing.
              * `no_listing_descr`: The source listing doesn't have
                a description.
              * `is_listing_creator`: The current user created this
                listing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Create a transaction from this listing
      tags:
        - Online Single-use Listings
  /single_use_listings/{listing_id}/create_transaction_with_guest_buyer:
    post:
      deprecated: true
      operationId: basic.createTransactionWithGuestBuyerFromSingleUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `listing_is_disabled`
              * `no_listing_currency`: The source listing doesn't
                have a currency.
              * `no_listing_price`: The source listing doesn't
                have pricing.
              * `no_listing_descr`: The source listing doesn't have
                a description.
              * `is_listing_creator`: The current user created this
                listing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Create a transaction from this listing
      tags:
        - Online Single-use Listings
  /single_use_listings/{listing_id}/disable:
    post:
      deprecated: true
      description: |
        Calling `/create_transaction` on a disabled listing will return
        a `400` response.
      operationId: basic.disableSingleUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.SingleUseListing'
        '404':
          description: Not found
      summary: Disable this listing
      tags:
        - Online Single-use Listings
  /single_use_listings/{listing_id}/enable:
    post:
      deprecated: true
      operationId: basic.enableSingleUseListing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.SingleUseListing'
        '404':
          description: Not found
      summary: Enable this listing
      tags:
        - Online Single-use Listings
  /single_use_listings/{listing_id}/set_description:
    post:
      deprecated: true
      operationId: basic.setSingleUseListingDescription
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      requestBody:
        $ref: >-
          #/components/requestBodies/basic.setMultiUseListingDescriptionDescriptionBody
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.SingleUseListing'
        '404':
          description: Not Found
      summary: Set description for this listing
      tags:
        - Online Single-use Listings
  /single_use_listings/{listing_id}/set_pricing:
    post:
      deprecated: true
      operationId: basic.setSingleUseListingPricing
      parameters:
        - in: path
          name: listing_id
          required: true
          schema:
            type: string
      requestBody:
        $ref: >-
          #/components/requestBodies/basic.setMultiUseListingPricingCreatePricingBody
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.SingleUseListing'
        '404':
          description: Not Found
      summary: Set pricing for this listing
      tags:
        - Online Single-use Listings
  /supported_carriers:
    get:
      description: |
        This returns the carriers that are currently supported for
        automated tracking in the online model. The carrier `name`
        should be shown to users but the `code` should be submitted to
        the `/track` endpoint when submitting tracking details.
        Likewise, when showing a transaction to the user, the `carrier`
        field stored with the transaction should be used to index these
        carriers and show the human-readable name of the carrier to the
        user, if this index is found.
      operationId: getSupportedCarriers
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                example:
                  - code: an-post
                    name: An Post
                  - code: fedex
                    name: FedEx
                  - code: ups
                    name: UPS
                  - code: usps
                    name: USPS
                items:
                  $ref: '#/components/schemas/Carrier'
                type: array
      security:
        - OAuth2: []
        - APIKey: []
      summary: Get the supported carriers
      tags:
        - Online Shipping
  /transactions:
    get:
      operationId: basic.getTransactionByJoinCode
      parameters:
        - in: query
          name: join_code
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `join_code_missing`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Get an online transaction using a join code
      tags:
        - Online Transactions
    put:
      description: |
        A transaction can't be joined using its ID, because only the
        buyer and seller of a transaction can access a transaction using
        its ID.
      operationId: basic.joinTransaction
      parameters:
        - in: query
          name: join_code
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `join_code_missing`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Join an online transaction using a join code
      tags:
        - Online Transactions
  /transactions-by-join-code/{join_code}/reject:
    post:
      description: |
        A transaction can't be rejected using its ID, because only the
        buyer and seller of a transaction can access a transaction using
        its ID.
      operationId: basic.rejectTransactionByJoinCode
      parameters:
        - in: path
          name: join_code
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Reject an online transaction by its join code
      tags:
        - Online Transactions
  /transactions/{transaction_id}:
    get:
      operationId: basic.getTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_id`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Get an online transaction by its ID
      tags:
        - Online Transactions
    patch:
      operationId: updateTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              example:
                charge: 78
                currency: eur
                description: Soccer ticket
                price: 1234
              properties:
                charge:
                  description: |
                    The `charge` value returned from a request to
                    `/charge`.
                  format: int64
                  type: integer
                charge_seller:
                  description: |
                    The `charge_seller` value returned from a
                    request to `/charge`.
                  format: int64
                  type: integer
                currency:
                  type: string
                description:
                  description: |
                    A description of the goods being sold.
                  type: string
                price:
                  description: |
                    The price of the goods being sold, in the
                    `currency`'s smallest unit.  The `charge` value
                    should correspond to the Trustap charge created
                    with this price, otherwise this request will
                    fail with a `400` error.
                  format: int64
                  type: integer
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_id`
              * `second_party_already_joined`
              * `values_not_changed`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
        '404':
          description: Not Found
      summary: >-
        Update the description, currency, price and/or charge of an online
        transaction
      tags:
        - Online Payment
  /transactions/{transaction_id}/accept_complaint:
    post:
      operationId: basic.acceptComplaint
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `funds_already_released`
              * `not_paid`
              * `not_complained`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_seller`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Accept complaint for this online transaction
      tags:
        - Online Complaint
  /transactions/{transaction_id}/accept_listing_transaction:
    post:
      description: |
        "Listing transactions" are transactions created from listings
        (using the `/create_transaction` endpoints for listings).
        Listings transactions for online transactions must be accepted
        by the creator of the listing using
        `/accept_listing_transaction` in order to proceed.
        Offline access is allowed for this endpoint when the user has
        granted the `basic_ls:offline_accept_listing` scope to the client
        that is performing the request.
      operationId: basic.acceptListingTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `no_listing`: This transaction wasn't created from a
                listing
              * `already_accepted`
              * `already_rejected`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_creator`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: |
        Allow this listing-based transaction to proceed
      tags:
        - Online Transactions
  /transactions/{transaction_id}/accept_payment:
    post:
      description: >
        This endpoint lets the seller accept payment and is accessible only if
        the seller

        has granted a feature `require_seller_acceptance`.

        Offline access is allowed for this endpoint when the user has

        granted the `basic_tx:offline_accept_payment` scope to the client

        that is performing the request.
      operationId: basic.acceptPayment
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `missing_required_feature`
              * `payment_already_accepted`
              * `transaction_not_paid_yet`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Enable the seller to accept payment for an online transaction
      tags:
        - Online Payment
  /transactions/{transaction_id}/accept_payment_with_guest_seller:
    post:
      description: |
        This endpoint allows payment acceptance for the seller specified in the
        header as `Trustap-User`.
      operationId: basic.acceptPaymentWithGuestSeller
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
        - description: >-
            Required in client flows, where you make API calls on behalf of
            another Trustap user.
          in: header
          name: Trustap-User
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `missing_required_feature`
              * `payment_already_accepted`
              * `missing_shippo_shipping_rate_id`
              * `transaction_not_paid_yet`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: >-
        Enable payment acceptance for the seller using `Trustap-User` for an
        online transaction
      tags:
        - Online Payment
  /transactions/{transaction_id}/bank_transfer_details:
    get:
      operationId: basic.getBankTransferDetails
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.BankTransferDetails'
        '400':
          description: |
            Bad Request
            `code` can be one of the following:
              * `payment_method_not_bank_transfer`
      summary: >
        Get bank transfer details for an online transaction which payment method
        is `bank_transfer`
      tags:
        - Online Payment
  /transactions/{transaction_id}/billing_details:
    get:
      operationId: basic.getBillingDetails
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.BillingDetails'
        '404':
          description: Not Found
      summary: Get billing details from this online transaction
      tags:
        - Online Buyer/Seller Details
  /transactions/{transaction_id}/buyer_details:
    get:
      operationId: basic.getBuyerDetails
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDetails'
        '404':
          description: Not Found
      summary: Get details of the buyer from this online transaction
      tags:
        - Online Buyer/Seller Details
  /transactions/{transaction_id}/cancel:
    post:
      description: |
        Transaction can be cancelled until it's paid or if the feature
        `RequireSellerAcceptance` is present, it can be cancelled
        until it's tracked.
        Offline access is allowed for this endpoint when the user has
        granted the `basic_tx:offline_cancel` scope to the client
        that is performing the request.
      operationId: basic.cancelTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_id`
              * `already_paid`
              * `already_cancelled`
              * `tracking_already_added`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
        '404':
          description: Not Found
      summary: Cancel this online transaction
      tags:
        - Online Cancel
  /transactions/{transaction_id}/cancel_with_guest_user:
    post:
      description: >
        This endpoint cancels a transaction for the user specified in the header

        as `Trustap-User`.

        Transaction can be cancelled until it's paid or if the feature

        `RequireSellerAcceptance` is present, it can be cancelled until it's
        tracked.
      operationId: basic.cancelTransactionWithGuestUser
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
        - description: >-
            Required in client flows, where you make API calls on behalf of
            another Trustap user.
          in: header
          name: Trustap-User
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_id`
              * `already_paid`
              * `already_cancelled`
              * `tracking_already_added`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
        '404':
          description: Not Found
      summary: Cancel this online transaction with a guest user
      tags:
        - Online Cancel
  /transactions/{transaction_id}/charge:
    get:
      description: |
        This returns the Trustap fee, in the `currency`'s smallest unit,
        for a transaction involving goods with the supplied `price`. See
        [the Stripe
        documentation](https://stripe.com/docs/currencies#zero-decimal)
        for more details.
      operationId: basic.getChargeForTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
        - description: |
            The price of the goods being sold in this transaction, in
            the `currency`'s smallest unit. For example, if a trading
            card is being sold for $12.34 (with `currency` as `usd`),
            then the request for the charge for this transaction would
            be `/charge?price=1234&currency=usd`.
          in: query
          name: price
          required: true
          schema:
            type: integer
            format: int64
        - description: |
            When creating transactions from a multi-use listing, the
            `quantity` parameter can be provided in order to generate a
            charge for the given price multiplied by the given quantity.
            See `/multi_use_listings/{listingId}/create_transaction`
            for more details.
          in: query
          name: quantity
          required: false
          schema:
            type: integer
            format: int64
        - description: |
            The payment method that will be used to pay for the
            transaction. This is necessary because different payment
            methods may result in different fees.

            The default value is `card`.
          in: query
          name: payment_method
          required: false
          schema:
            type: string
        - description: |
            The charge config for which the charge amount is computed.
          in: query
          name: charge_config
          required: false
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Charge'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_payment_method`
              * `unsupported_currency`
              * `currency_missing`
              * `invalid_price`
              * `negative_price`
              * `price_too_low`
              * `invalid_charge_config`
              * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: []
        - APIKey: []
      summary: Get the Trustap fee for an online transaction
      tags:
        - Online Payment
  /transactions/{transaction_id}/claim_for_buyer:
    post:
      description: >
        This endpoint enables a client to claim an online transaction on behalf
        of a buyer.

        This endpoint is only accessible for a client.
      operationId: basic.claimTransactionForBuyer
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `already_claimed`
              * `cannot_claim_own_transaction`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Claim online transaction on behalf of the buyer
      tags:
        - Online Transactions
  /transactions/{transaction_id}/claim_for_seller:
    post:
      description: >
        This endpoint enables a client to claim an online transaction on behalf
        of a seller.

        This endpoint is only accessible for a client.
      operationId: basic.claimTransactionForSeller
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `already_claimed`
              * `cannot_claim_own_transaction`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Claim online transactions on behalf of the seller
      tags:
        - Online Transactions
  /transactions/{transaction_id}/complain_with_description:
    post:
      operationId: basic.submitComplaintWithDescription
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        $ref: '#/components/requestBodies/p2p.submitComplaintSubmitComplaintBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `empty_complaint_description`
              * `already_complained`
              * `unconfirmed_delivery`: The complaint period for
                this transaction has not yet started.
              * `complaint_period_ended_prematurely`: The buyer has
                already ended the complaint period.
              * `complaint_period_expired`
              * `funds_already_released`
              * `invalid_id`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_buyer`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Submit a detailed complaint for this online transaction
      tags:
        - Online Complaint
  /transactions/{transaction_id}/complain_with_guest_buyer:
    post:
      operationId: basic.submitComplaintWithGuestBuyer
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
        - description: >-
            Required in client flows, where you make API calls on behalf of
            another Trustap user.
          in: header
          name: Trustap-User
          required: false
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/p2p.submitComplaintSubmitComplaintBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `empty_complaint_description`
              * `already_complained`
              * `unconfirmed_delivery`: The complaint period for
                this transaction has not yet started.
              * `complaint_period_ended_prematurely`: The buyer has
                already ended the complaint period.
              * `complaint_period_expired`
              * `funds_already_released`
              * `invalid_id`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_buyer`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: >-
        Submit a detailed complaint for this online transaction for the guest
        buyer using `Trustap-User`
      tags:
        - Online Complaint
  /transactions/{transaction_id}/confirm_delivery:
    post:
      description: |
        This endpoint allows the buyer to manually confirm the delivery of the
        item in the case that the state of the transaction was not updated
        asynchronously by Trustap.
      operationId: basic.confirmDelivery
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `tracking_not_added`
              * `delivery_already_set`
              * `invalid_id`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_buyer`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Confirm delivery for this online transaction
      tags:
        - Online Shipping
  /transactions/{transaction_id}/confirm_delivery_with_guest_buyer:
    post:
      description: |
        This endpoint allows the client to manually confirm the delivery
        on behalf of the guest buyer specified in the header as `Trustap-User`.
      operationId: basic.confirmDeliveryWithGuestBuyer
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
        - description: >-
            Required in client flows, where you make API calls on behalf of
            another Trustap user.
          in: header
          name: Trustap-User
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `tracking_not_added`
              * `delivery_already_set`
              * `invalid_id`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_buyer`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Confirm delivery for this online transaction
      tags:
        - Online Shipping
  /transactions/{transaction_id}/delivery_point:
    post:
      operationId: basic.setDeliveryPoint
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              example:
                carrier: posta_hr
                city: Zagreb
                delivery_center_code: 321ha32
                delivery_type: parcel_locker
                email: ivan.horvat@email.com
                full_name: Ivan Horvat
                house_number: 147
                house_number_suffix: A
                phone: 997896541
                postal_code: 10000
                street: Ilica
              properties:
                carrier:
                  type: string
                city:
                  type: string
                delivery_center_code:
                  type: string
                delivery_type:
                  enum:
                    - parcel_locker
                    - postal_office
                  type: string
                email:
                  type: string
                full_name:
                  type: string
                house_number:
                  type: string
                house_number_suffix:
                  type: string
                phone:
                  type: string
                postal_code:
                  type: string
                street:
                  type: string
              required:
                - full_name
                - phone
                - email
                - street
                - house_number
                - postal_code
                - city
                - carrier
                - delivery_center_code
                - delivery_type
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.DeliveryDetails'
        '400':
          description: |
            Bad Request
            `code` can be one of the following:
              * `empty_join_code`
              * `empty_name`
              * `empty_phone`
              * `empty_email`
              * `empty_street`
              * `empty_house_number`
              * `empty_postal_code`
              * `empty_city`
              * `empty_delivery_center_code`
              * `empty_delivery_type`
              * `empty_carrier`
              * `unsupported_carrier`
              * `unsupported_delivery_type`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Set a delivery point for HR posta
      tags:
        - Online Shipping
  /transactions/{transaction_id}/end_complaint_period:
    post:
      operationId: basic.endComplaintPeriod
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `complaint_period_expired`
              * `already_complained`
              * `complaint_period_ended_prematurely`
              * `invalid_id`
              * `unconfirmed_delivery`: The complaint period for
                this transaction has not yet started.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_buyer`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: End the complaint period for this online transaction
      tags:
        - Online Complaint
  /transactions/{transaction_id}/extend_tracking_deadline:
    post:
      description: |
        This endpoint allows the buyer to extend the tracking details
        submission deadline for the seller.
      operationId: basic.extendTrackingDeadlineForTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_id`
              * `tracking_already_added`
              * `payment_details_not_added`
              * `tracking_submission_window_not_started`
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_buyer`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Extend tracking details submission deadline for this online transaction
      tags:
        - Online Shipping
  /transactions/{transaction_id}/generate_shipment_label:
    post:
      description: |
        This endpoint returns a PDF containing the label for the
        transaction's parcel. Both sender and recipient details
        have to be submitted before making a call to this endpoint.
      operationId: basic.generateShipmentLabel
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
        - in: query
          name: carrier
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.ShipmentLabel'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `pick_up_details_missing`
              * `drop_off_details_missing`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_seller`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Generate a shipment label for this online transaction's parcel
      tags:
        - Online Shipping
  /transactions/{transaction_id}/pick_up_point:
    post:
      operationId: basic.setPickUpPoint
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              example:
                carrier: posta_hr
                city: Zagreb
                delivery_type: parcel_locker
                email: ivan.horvat@email.com
                full_name: Ivan Horvat
                house_number: 147
                house_number_suffix: A
                phone: 997896541
                pick_up_center_code: 321ha32
                postal_code: 10000
                street: Ilica
              properties:
                carrier:
                  type: string
                city:
                  type: string
                delivery_type:
                  enum:
                    - parcel_locker
                    - postal_office
                  type: string
                email:
                  type: string
                full_name:
                  type: string
                house_number:
                  type: string
                house_number_suffix:
                  type: string
                phone:
                  type: string
                pick_up_center_code:
                  type: string
                postal_code:
                  type: string
                street:
                  type: string
              required:
                - full_name
                - phone
                - email
                - street
                - house_number
                - postal_code
                - city
                - carrier
                - pick_up_center_code
                - delivery_type
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.PickUpDetails'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `empty_join_code`
              * `empty_full_name`
              * `empty_phone`
              * `empty_email`
              * `empty_street`
              * `empty_house_number`
              * `empty_postal_code`
              * `empty_city`
              * `empty_pick_up_center_code`
              * `empty_delivery_type`
              * `empty_carrier`
              * `unsupported_carrier`
              * `unsupported_delivery_type`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Set a pick up point for carrier (i.e HR posta)
      tags:
        - Online Shipping
  /transactions/{transaction_id}/reject_listing_transaction:
    post:
      description: |
        "Listing transactions" are transactions created from listings
        (using the `/create_transaction` endpoints for listings).
        Listings transactions for online transactions must be accepted
        by the creator of the listing using
        `/accept_listing_transaction` in order to proceed. This endpoint
        instead rejects the listing transaction.
      operationId: basic.rejectListingTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `no_listing`: This transaction wasn't created from a
                listing
              * `already_accepted`
              * `already_rejected`
              * `second_party_not_joined`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_creator`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: |
        Cancel this listing-based transaction
      tags:
        - Online Cancel
  /transactions/{transaction_id}/seller_details:
    get:
      operationId: basic.getSellerDetails
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserDetails'
        '404':
          description: Not Found
      summary: Get details of the seller from this online transaction
      tags:
        - Online Buyer/Seller Details
  /transactions/{transaction_id}/set_payment_method:
    post:
      description: |
        Different payment methods incur different rates, so the payment
        method to be used for a transaction must be set before the
        payment is made. This requires retrieving the charge associated
        with the payment method using
        `GET /transactions/{transaction_id}/charge`, and passing the
        generated charge as a parameter to this endpoint.
      operationId: basic.setPaymentMethodForTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              properties:
                charge:
                  description: |
                    The `charge` value returned from a request to
                    `/charge`.
                  format: int64
                  type: integer
                charge_config:
                  description: |
                    The charge config for which the charge amount is computed.
                  format: int64
                  type: integer
                charge_seller:
                  description: |
                    The `charge_seller` value returned from a request to
                    `/charge`.
                  format: int64
                  type: integer
                currency:
                  type: string
                payment_method:
                  type: string
                price:
                  description: |
                    The price of the goods being sold, in the
                    `currency`'s smallest unit.  The `charge` value
                    should correspond to the Trustap charge created
                    with this price, otherwise this request will
                    fail with a `400` error.
                  format: int64
                  type: integer
              required:
                - currency
                - price
                - charge
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_payment_method`
              * `unsupported_currency`
              * `currency_missing`
              * `incorrect_charge`
              * `incorrect_charge_seller`
              * `incorrect_price`
              * `incorrect_currency`
              * `invalid_charge_config`
              * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.
              * `payment_method_already_set`: The specified payment method and charge configuration are already set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_buyer`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: |
        Set the payment method to be used for this online transaction
      tags:
        - Online Payment
  /transactions/{transaction_id}/shipping_details:
    get:
      operationId: basic.getShippingDetailsFromTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShippingDetails'
        '404':
          description: Not Found
      summary: Get the shipping details of the buyer from this online transaction
      tags:
        - Online Shipping
    post:
      operationId: basic.setShippingDetails
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              example:
                address_line_1: 3672 Massillon Rd
                address_line_2: 3672 Massillon Rd
                city: Green
                country: us
                name: John Doe
                phone: 330-896-9303
                postal_code: 44685
                state: Ohio
              properties:
                address_line_1:
                  type: string
                address_line_2:
                  type: string
                city:
                  type: string
                country:
                  minLength: 1
                  type: string
                name:
                  minLength: 1
                  type: string
                phone:
                  type: string
                postal_code:
                  type: string
                state:
                  type: string
              required:
                - name
                - country
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShippingDetails'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `empty_name`
              * `empty_country`
        '404':
          description: Not Found
      summary: Post the shipping details of the buyer from this online transaction
      tags:
        - Online Shipping
  /transactions/{transaction_id}/shippo_address:
    post:
      operationId: basic.setShippoAddress
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              example:
                city: Altona
                country: au
                full_name: Ivan Horvat
                phone: 4215559099
                postal_code: 10000
                state: Victoria
                street_1: 21-27 Marshall Court
              properties:
                city:
                  type: string
                country:
                  type: string
                email:
                  type: string
                full_name:
                  type: string
                is_sender_address:
                  type: boolean
                phone:
                  type: string
                state:
                  type: string
                street_1:
                  type: string
                street_2:
                  type: string
                zip_code:
                  type: string
              required:
                - is_sender_address
                - full_name
                - street_1
                - zip_code
                - city
                - state
                - country
                - phone
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.ShippoAddress'
        '400':
          description: |
            Bad Request
            `code` can be one of the following:
              * `missing_tx_feature`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Set the sender's or recipient's address for Shippo shipment
      tags:
        - Online Shipping
  /transactions/{transaction_id}/shippo_customs_declaration:
    post:
      operationId: basic.setShippoCustomsDeclaration
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              example:
                certify: true
                certify_signer: Joe Doe
                description: T-Shirt
                incoterm: DDU
                mass_unit: lb
                net_weight: 5
                non_delivery_option: return
                origin_country: US
                quantity: 20
                value_amount: 200
                value_currency: USD
              properties:
                certify:
                  type: boolean
                certify_signer:
                  type: string
                description:
                  type: string
                eel_pfc:
                  type: string
                incoterm:
                  type: string
                mass_unit:
                  type: string
                net_weight:
                  format: double
                  type: number
                non_delivery_option:
                  enum:
                    - return
                    - abandon
                  type: string
                origin_country:
                  type: string
                quantity:
                  format: int64
                  type: integer
                value_amount:
                  type: string
                value_currency:
                  type: string
              required:
                - certify
                - certify_signer
                - non_delivery_option
                - description
                - mass_unit
                - net_weight
                - origin_country
                - quantity
                - value_amount
                - value_currency
              type: object
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: |
            Bad Request
            `code` can be one of the following:
              * `missing_tx_feature`
              * `customs_declaration_already_submitted`
              * `nothing_to_declare`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Send a customs declaration for this online transaction's shipment
      tags:
        - Online Shipping
  /transactions/{transaction_id}/shippo_parcel_details:
    post:
      operationId: basic.setShippoParcelDetails
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              example:
                distance_unit: cm
                height: 10
                lenght: 10
                mass_unit: lb
                weight: 10
                width: 10
              properties:
                distance_unit:
                  $ref: '#/components/schemas/basic.DistanceUnit'
                height:
                  format: double
                  type: number
                length:
                  format: double
                  type: number
                mass_unit:
                  $ref: '#/components/schemas/basic.DistanceUnit'
                shipment_date:
                  description: |
                    Date the shipment will be tendered to the carrier.
                    Must be in the format 2014-01-18T00:35:03.463Z
                  type: string
                weight:
                  format: double
                  type: number
                width:
                  format: double
                  type: number
              required:
                - height
                - length
                - width
                - distance_unit
                - weight
                - mass_unit
                - shipment_date
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.ShippoParcel'
        '400':
          description: |
            Bad Request
            `code` can be one of the following:
              * `missing_tx_feature`
              * `wrong_shipment_date_format`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Set Shippo parcel details for this online transaction
      tags:
        - Online Shipping
  /transactions/{transaction_id}/shippo_shipping_label:
    get:
      operationId: basic.getShippoShippingLabel
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShippoLabelDetails'
        '400':
          description: |
            Bad Request
            `code` can be one of the following:
              * `transaction_not_tracked`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Get Shippo generated label details for this online transaction
      tags:
        - Online Shipping
  /transactions/{transaction_id}/shippo_shipping_rate:
    post:
      description: >
        Set Shippo shipping rate for the transaction.

        This rate will be used to purchase the Shippo label once the

        transaction is paid. Shipment ID can be provided as an optional
        parameter,

        depending on the flow which is used to obtain it.
      operationId: basic.setShippoShippingRate
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              example:
                rate_id: d755e91036a84c15bd5318f4b67c7707
              properties:
                rate_id:
                  type: string
                shipment_id:
                  type: string
              required:
                - rate_id
              type: object
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: |
            Bad Request
            `code` can be one of the following:
              * `missing_tx_feature`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: Set Shippo shipping rate for this online transaction
      tags:
        - Online Shipping
  /transactions/{transaction_id}/shippo_shipping_rates:
    get:
      operationId: basic.getShippoShippingRatesForTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/basic.ShippoRate'
                type: array
        '400':
          description: |
            Bad Request
            `code` can be one of the following:
              * `missing_tx_feature`
              * `missing_shipment_details`
              * `customs_declaration_required`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      summary: >-
        Get Shippo shipping rates based on the sender's and recipient's address
        and parcel details
      tags:
        - Online Shipping
  /transactions/{transaction_id}/stripe_client_secret:
    get:
      description: >
        This endpoint is used for the asynchronous payment flow using

        Stripe. The `client_secret` returned from this endpoint should

        be passed to

        [stripe.confirmCardPayment](https://stripe.com/docs/stripe-js/reference#stripe-confirm-card-payment)

        to start the payment process.
      operationId: getStripeClientSecretForTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  client_secret:
                    type: string
                required:
                  - client_secret
                type: object
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `already_paid`
              * `invalid_id`
              * `not_accepted`: This transaction was created from a
                listing but the listing's creator has not yet
                accepted this transaction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_buyer`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: |
        Get the Stripe client secret for this online transaction
      tags:
        - Online Buyer/Seller Details
  /transactions/{transaction_id}/stripe_publishable_key:
    get:
      description: |
        Returns the Publishable Key for the Stripe Platform
        which is hosting this transaction.
      operationId: basic.getStripePublishableKeyForTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                example:
                  publishable_key: pk_xXxXxXxXxXx
                properties:
                  publishable_key:
                    type: string
                required:
                  - publishable_key
                type: object
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_id`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_buyer`
              * `not_seller`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: >
        Get the details for the Stripe publishable key that is in use for this
        online transaction
      tags:
        - Online Buyer/Seller Details
  /transactions/{transaction_id}/submit_order_issue:
    post:
      operationId: basic.submitOrderIssue
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              example:
                description: Delivery is delayed
              properties:
                description:
                  type: string
              required:
                - description
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `delivery_already_set`
              * `tracking_not_added`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_buyer`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Submit a detailed order issue for this online transaction
      tags:
        - Online Transactions
  /transactions/{transaction_id}/track:
    post:
      description: |
        After the tracking information has been submitted then the state
        of the transaction will be updated asynchronously by Trustap
        once the delivery of the item has been confirmed, at which point
        the `delivered` field of the transaction will be set.
        Offline access is allowed for this endpoint when the user has
        granted the `basic_tx:offline_track` scope to the client
        that is performing the request.
      operationId: basic.trackTransaction
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        $ref: '#/components/requestBodies/basic.trackTransactionTrackTransactionBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_id`
              * `empty_carrier`
              * `empty_tracking_code`
              * `tracking_already_added`
              * `payment_details_not_added`
              * `tracking_details_deadline_expired`
              * `already_cancelled`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_seller`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Set postal tracking details for this online transaction
      tags:
        - Online Shipping
  /transactions/{transaction_id}/track_with_guest_seller:
    post:
      description: |
        Add tracking details for the guest seller specified
        in the header as `Trustap-User`.
      operationId: basic.trackTransactionWithGuestSeller
      parameters:
        - in: path
          name: transaction_id
          required: true
          schema:
            type: integer
            format: int64
        - description: >-
            Required in client flows, where you make API calls on behalf of
            another Trustap user.
          in: header
          name: Trustap-User
          required: false
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/basic.trackTransactionTrackTransactionBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `invalid_id`
              * `empty_carrier`
              * `empty_tracking_code`
              * `tracking_already_added`
              * `payment_details_not_added`
              * `tracking_details_deadline_expired`
              * `already_cancelled`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Forbidden

            `code` can be one of the following:

              * `not_seller`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Set postal tracking details for this online transaction
      tags:
        - Online Shipping
  /transactions_by_claim_secret/{secret}/claim_as_buyer:
    post:
      description: |
        This endpoint allows a full user to claim for a transaction
        as buyer given a claim secret.
      operationId: basic.claimAsBuyer
      parameters:
        - in: path
          name: secret
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `already_claimed`
              * `cannot_claim_own_transaction`
              * `missing_secret`
        '404':
          description: Not Found
      summary: Claim for an online transaction as buyer given a claim secret
      tags:
        - Online Transactions
  /transactions_by_claim_secret/{secret}/claim_as_seller:
    post:
      description: |
        This endpoint allows a full user to claim a transaction
        as seller given a claim secret.
      operationId: basic.claimTransactionAsSeller
      parameters:
        - in: path
          name: secret
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/basic.Transaction'
        '400':
          description: |
            Bad Request

            `code` can be one of the following:

              * `missing_secret`
              * `already_claimed`
              * `cannot_claim_own_transaction`
              * `invalid_user_platform`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
      summary: Claim an Online transaction as the seller
      tags:
        - Online Transactions
security:
  - OAuth2: []
tags:
  - description: |
      Online transactions are used when the goods are delivered using registered
      mail.
    name: Online Transactions
  - description: |
      Clients represent partner applications.
    name: Clients
  - description: |
      Users represent users of the platform.
    name: Buyers and Sellers
  - description: |
      Personal endpoints are used for managing personal details for users, for
      "Know Your Customer" requirements.
    name: Personal
  - description: |
      Notifications log updates for users.
    name: Notifications
  - description: |
      F2F2 transactions are used when the goods are delivered in person.
    name: F2F Transactions
  - description: |
      Payment endpoints for face-to-face transactions.
    name: F2F Payment
  - description: |
      Handover endpoints for face-to-face transactions.
    name: F2F Handover
  - description: |
      Complaint endpoints for face-to-face transactions.
    name: F2F Complaint
  - description: |
      Cancel endpoints for face-to-face transactions.
    name: F2F Cancel
  - description: |
      User details endpoints for face-to-face transactions.
    name: F2F Buyer/Seller Details
  - description: |
      Subscriptions are used for recurring payments.
    name: Subscriptions
  - description: |
      These endpoints are no longer supported. We do not recommend using these
      endpoints.
    name: F2F Multi-use Listings
  - description: |
      These endpoints are no longer supported. We do not recommend using these
      endpoints.
    name: F2F Single-use Listings
  - description: |
      These endpoints are no longer supported. We do not recommend using these
      endpoints.
    name: Online Multi-use Listings
  - description: |
      These endpoints are no longer supported. We do not recommend using these
      endpoints.
    name: Online Single-use Listings
  - description: |
      Endpoints for Trustap lite
    name: Trustap lite
x-tagGroups:
  - name: Users
    tags:
      - Buyers and Sellers
      - Clients
      - Personal
  - name: Online transactions
    tags:
      - Online Transactions
      - Online Payment
      - Online Shipping
      - Online Complaint
      - Online Cancel
      - Online Buyer/Seller Details
  - name: Face-to-face transactions
    tags:
      - F2F Transactions
      - F2F Payment
      - F2F Handover
      - F2F Complaint
      - F2F Cancel
      - F2F Buyer/Seller Details
  - name: Trustap lite
    tags:
      - Trustap Lite
  - name: Notifications
    tags:
      - Notifications
  - name: Deprecated endpoints
    tags:
      - Online Multi-use Listings
      - Online Single-use Listings
      - F2F Multi-use Listings
      - F2F Single-use Listings
servers:
  - url: https://dev.stage.trustap.com/api/v1
components:
  requestBodies:
    patchP2PMultiUseListingPatchListingBody:
      content:
        application/json:
          schema:
            example:
              charge_calculator_version: 5
              currency: eur
              deposit_charge: 78
              deposit_price: 1234
              description: Soccer ticket
              skip_remainder: false
            properties:
              charge_calculator_version:
                description: >-
                  The `charge_calculator_version` value returned from a request
                  to `/p2p/charge`.
                format: int64
                type: integer
              currency:
                $ref: '#/components/schemas/Currency'
              deposit_charge:
                description: |
                  The `charge` value returned from a request to
                  `/p2p/charge`.
                format: int64
                type: integer
              deposit_price:
                description: |
                  The deposit price of the goods being sold, in
                  the `currency`'s smallest unit.  The `charge`
                  value should correspond to the Trustap charge
                  created with this price, otherwise this request
                  will fail with a `400` error.
                format: int64
                type: integer
              description:
                type: string
              skip_remainder:
                type: boolean
            type: object
      required: true
    setP2PMultiUseListingPricingCreatePricingBody:
      content:
        application/json:
          schema:
            example:
              charge_calculator_version: 5
              currency: eur
              deposit_charge: 78
              deposit_price: 1234
            properties:
              charge_calculator_version:
                description: >-
                  The `charge_calculator_version` value returned from a request
                  to `/p2p/charge`.
                format: int64
                type: integer
              currency:
                $ref: '#/components/schemas/Currency'
              deposit_charge:
                description: |
                  The `charge` value returned from a request to
                  `/p2p/charge`.
                format: int64
                type: integer
              deposit_price:
                description: |
                  The deposit price of the goods being sold, in
                  the `currency`'s smallest unit.  The `charge`
                  value should correspond to the Trustap charge
                  created with this price, otherwise this request
                  will fail with a `400` error.
                format: int64
                type: integer
            required:
              - currency
              - deposit_price
              - deposit_charge
              - charge_calculator_version
            type: object
      required: true
    basic.createMultiUseListingCreateMultiUseListingBody:
      content:
        application/json:
          schema:
            example:
              charge: 78
              charge_calculator_version: 5
              currency: eur
              description: Soccer ticket
              price: 1234
              role: seller
            properties:
              charge:
                description: |
                  The `charge` value returned from a request to
                  `/charge`.
                format: int64
                type: integer
              charge_calculator_version:
                description: >-
                  The `charge_calculator_version` value returned from a request
                  to `/charge`.
                format: int64
                type: integer
              charge_seller:
                description: |
                  The `charge_seller` value returned from a request to
                  `/charge`.
                format: int64
                type: integer
              currency:
                $ref: '#/components/schemas/Currency'
              description:
                description: |
                  A description of the goods being sold.
                type: string
              price:
                description: |
                  The price of the goods being sold, in the
                  `currency`'s smallest unit.  The `charge` value
                  should correspond to the Trustap charge created
                  with this price, otherwise this request will
                  fail with a `400` error.
                format: int64
                type: integer
              role:
                $ref: '#/components/schemas/basic.Role'
            required:
              - role
              - currency
              - price
              - description
              - charge
              - charge_calculator_version
            type: object
      required: true
    basic.updateMultiUseListingPatchListingBody:
      content:
        application/json:
          schema:
            example:
              charge: 78
              charge_calculator_version: 5
              currency: eur
              description: Soccer ticket
              price: 1234
            properties:
              charge:
                description: |
                  The `charge` value returned from a request to
                  `/charge`.
                format: int64
                type: integer
              charge_calculator_version:
                description: >-
                  The `charge_calculator_version` value returned from a request
                  to `/charge`.
                format: int64
                type: integer
              charge_seller:
                description: |
                  The `charge_seller` value returned from a request to
                  `/charge`.
                format: int64
                type: integer
              currency:
                $ref: '#/components/schemas/Currency'
              description:
                type: string
              price:
                description: |
                  The price of the goods being sold, in the
                  `currency`'s smallest unit.  The `charge` value
                  should correspond to the Trustap charge created
                  with this price, otherwise this request will
                  fail with a `400` error.
                format: int64
                type: integer
            type: object
      required: true
    basic.setMultiUseListingDescriptionDescriptionBody:
      content:
        application/json:
          schema:
            example:
              description: Soccer ticket
            properties:
              description:
                type: string
            required:
              - description
            type: object
      required: true
    basic.setMultiUseListingPricingCreatePricingBody:
      content:
        application/json:
          schema:
            example:
              charge: 78
              charge_calculator_version: 5
              currency: eur
              price: 1234
            properties:
              charge:
                description: |
                  The `charge` value returned from a request to
                  `/charge`.
                format: int64
                type: integer
              charge_calculator_version:
                description: >-
                  The `charge_calculator_version` value returned from a request
                  to `/charge`.
                format: int64
                type: integer
              charge_seller:
                description: |
                  The `charge_seller` value returned from a
                  request to `/charge`.
                format: int64
                type: integer
              currency:
                $ref: '#/components/schemas/Currency'
              price:
                description: |
                  The price of the goods being sold, in the
                  `currency`'s smallest unit.  The `charge` value
                  should correspond to the Trustap charge created
                  with this price, otherwise this request will
                  fail with a `400` error.
                format: int64
                type: integer
            required:
              - currency
              - price
              - charge
              - charge_calculator_version
            type: object
      required: true
    p2p.submitComplaintSubmitComplaintBody:
      content:
        application/json:
          schema:
            example:
              description: Item was fake
            properties:
              description:
                type: string
            required:
              - description
            type: object
      required: true
    basic.trackTransactionTrackTransactionBody:
      content:
        application/json:
          schema:
            example:
              carrier: ups
              tracking_code: '***'
            properties:
              carrier:
                minLength: 1
                type: string
              tracking_code:
                minLength: 1
                type: string
            required:
              - carrier
              - tracking_code
            type: object
      required: true
  securitySchemes:
    APIKey:
      type: http
      scheme: basic
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: >-
            https://sso.trustap.com/auth/realms/trustap-stage/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso.trustap.com/auth/realms/trustap-stage/protocol/openid-connect/token
          scopes:
            basic_ls:offline_accept_listing: |
              This client may accept Online listings on the user's behalf
              while the user is offline.
            basic_ls:offline_create: |
              This client may create Online listings for the user while the
              user is offline.
            basic_tx:offline_accept_payment: |
              This client may accept payments for Online transactions on the
              user's behalf while the user is offline.
            basic_tx:offline_cancel: |
              This client may cancel Online transactions on the user's behalf
              while the user is offline.
            basic_tx:offline_claim: |
              This client may claim Online transactions on the user's behalf
              while the user is offline.
            basic_tx:offline_complain: |
              This client may submit complaints for Online transactions on the
              user's behalf while the user is offline.
            basic_tx:offline_create_join: |
              This client may create and join Online transactions on the
              user's behalf while the user is offline.
            basic_tx:offline_track: |
              This client may submit tracking information for Online
              transactions on the user's behalf while the user is offline.
            openid: |
              This client is making an OpenID Connect request.
            p2p_ls:offline_create: |
              This client may create F2F listings for the user while the user
              is offline.
            p2p_ls:offline_update: |
              This client may update F2F listings on the user's behalf while
              the user is offline.
            p2p_tx:offline_accept_deposit: |
              This client may accept deposits for F2F transactions on the
              user's behalf while the user is offline.
            p2p_tx:offline_cancel: |
              This client may cancel F2F transactions on the user's behalf
              while the user is offline.
            p2p_tx:offline_claim: |
              This client may claim F2F transactions on the user's behalf
              while the user is offline.
            p2p_tx:offline_complain: |
              This client may submit complaints for F2F transactions on the
              user's behalf while the user is offline.
            p2p_tx:offline_confirm_handover: |
              This client may confirm handovers for F2F transactions on the
              user's behalf while the user is offline.
            p2p_tx:offline_create_join: |
              This client may create and join F2F transactions on the user's
              behalf while the user is offline.
            p2p_tx:offline_set_price: |
              This client may set the price for F2F transactions on the user's
              behalf while the user is offline.
            profile: |
              This client may access the user's default profile claims: `name`,
              `family_name`, `given_name`, `middle_name`, `nickname`,
              `preferred_username`, `profile`, `picture`, `website`, `gender`,
              `birthdate`, `zoneinfo`, `locale`, and `updated_at`.
  schemas:
    Carrier:
      properties:
        code:
          type: string
        name:
          type: string
      required:
        - code
        - name
      type: object
    CarrierName:
      enum:
        - fedex
        - ups
        - usps
        - posta_hr
      example: fedex
      type: string
    Complaint:
      example:
        description: Item was fake
      properties:
        description:
          type: string
      required:
        - description
      type: object
    Currency:
      enum:
        - aud
        - eur
        - gbp
        - myr
        - pln
        - sek
        - usd
        - huf
      example: eur
      type: string
    DocumentVerification:
      example:
        previously_submitted: true
        status: verifying
      properties:
        previously_submitted:
          type: boolean
        status:
          description: |
            Verification status of the document could be one of the following:
            `due`, `not_due`, `verifying`, `verified`
          type: string
      required:
        - status
        - previously_submitted
      type: object
    Error:
      example:
        code: negative_price
        error: '`price` cannot be negative'
      properties:
        code:
          type: string
        error:
          description: |
            A contextual description of the error that occurred. When
            handling errors the `code` field should be used to determine
            the type of error that occurred, as the text in the `error`
            field may change unexpectedly.
          type: string
      required:
        - code
        - error
      type: object
    ListingType:
      enum:
        - single_use
        - multi_use
      example: single_use
      type: string
    OrderIssue:
      example:
        description: Delivery delayed
      properties:
        description:
          type: string
      required:
        - description
      type: object
    P2PMultiUseListing:
      example:
        allows_multi_use: true
        created: '2019-12-25T09:00:00Z'
        creator_id: ad5bb99f-85bf-47e1-be0d-15e7541c6ad7
        deposit_pricing:
          charge: 150
          price: 5000
        description: ''
        id: 77f36253-7a43-4d47-897d-f73dd208e17a
        skip_remainder: false
      properties:
        allows_multi_use:
          type: boolean
        created:
          type: string
        creator_id:
          type: string
        creator_role:
          type: string
        currency:
          type: string
        deposit_pricing:
          $ref: '#/components/schemas/basic.Pricing'
        description:
          type: string
        id:
          format: int64
          type: integer
        skip_remainder:
          type: boolean
      required:
        - id
      type: object
    P2PSingleUseListing:
      example:
        allows_multi_use: false
        created: '2019-12-25T09:00:00Z'
        creator_id: ad5bb99f-85bf-47e1-be0d-15e7541c6ad7
        deposit_pricing:
          charge: 150
          price: 5000
        description: ''
        id: 77f36253-7a43-4d47-897d-f73dd208e17a
        skip_remainder: false
      properties:
        allows_multi_use:
          type: boolean
        created:
          type: string
        creator_id:
          type: string
        creator_role:
          type: string
        currency:
          type: string
        deposit_pricing:
          $ref: '#/components/schemas/basic.Pricing'
        description:
          type: string
        disabled:
          type: string
        id:
          format: int64
          type: integer
        skip_remainder:
          type: boolean
      required:
        - id
      type: object
    PostaHrTracking:
      example:
        barcode: ABC123456
        barcode_generated: '2019-12-26T14:00:00Z'
      properties:
        barcode:
          type: string
        barcode_generated:
          format: date-time
          type: string
      required:
        - barcode
        - barcode_generated
      type: object
    ProfilePayoutStatus:
      example:
        status: verifying
      properties:
        status:
          description: >
            Payout status will be one of the following:

            - `complete`: The user has completed their profile and payment
            information,

            and can accept payouts.

            - `verifying`: The user has submitted profile and payment
            information, which

            is currently being verified.

            - `due`: The user has not adequately filled out their payment
            information,

            or may need to update or ammend the provided information before they
            can

            accept payouts.
          enum:
            - complete
            - verifying
            - due
          type: string
      required:
        - status
      type: object
    ShippingDetails:
      properties:
        address:
          $ref: '#/components/schemas/ShippingDetailsAddress'
        name:
          type: string
        phone:
          type: string
      required:
        - address
        - name
        - phone
      type: object
    ShippingDetailsAddress:
      properties:
        city:
          type: string
        country:
          type: string
        line1:
          type: string
        line2:
          type: string
        postal_code:
          type: string
        state:
          type: string
      required:
        - city
        - country
        - line1
        - line2
        - state
        - postal_code
      type: object
    ShippoLabelDetails:
      properties:
        label_url:
          type: string
        qr_code_url:
          format: uri
          type: string
        tracking_code:
          type: string
        tracking_url:
          type: string
      required:
        - label_url
        - tracking_url
        - tracking_code
      type: object
    Tracking:
      example:
        carrier: ups
        tracking_code: '***'
      properties:
        carrier:
          type: string
        tracking_code:
          type: string
      required:
        - carrier
        - tracking_code
      type: object
    UserDetails:
      properties:
        email:
          type: string
        name:
          $ref: '#/components/schemas/basic.UserDetailsName'
        phone:
          type: string
      required:
        - email
      type: object
    app_notifs.Notification:
      example:
        created: '2019-12-25T10:00:00Z'
        description: Buyer has joined transaction for 'Soccer ticket'
        id: 1990
        target: basic/1309
        user_id: ad5bb99f-85bf-47e1-be0d-15e7541c6ad7
      properties:
        created:
          format: date-time
          type: string
        description:
          type: string
        id:
          format: int64
          type: integer
        read:
          format: date-time
          type: string
        target:
          type: string
        user_id:
          type: string
      required:
        - id
        - created
        - user_id
        - description
        - target
      type: object
    basic.Aba:
      properties:
        account_number:
          type: string
        bank_name:
          type: string
        routing_number:
          type: string
      required:
        - account_number
        - bank_name
        - routing_number
      type: object
    basic.BankTransferDetails:
      properties:
        amount:
          format: int64
          type: integer
        currency:
          type: string
        financial_address:
          $ref: '#/components/schemas/basic.FinancialAddress'
        hosted_instructions_url:
          type: string
        reference:
          type: string
      required:
        - amount
        - currency
        - hosted_instructions_url
        - reference
        - financial_address
      type: object
    basic.BillingDetails:
      properties:
        email:
          type: string
        name:
          type: string
        phone:
          type: string
      required:
        - email
      type: object
    basic.CarrierFacility:
      properties:
        address:
          type: string
        city:
          type: string
        code:
          type: string
        delivery_type:
          type: string
        name:
          type: string
        postal_code:
          type: string
      required:
        - delivery_type
        - name
        - postal_code
        - address
        - city
      type: object
    basic.Charge:
      example:
        charge: 340
        charge_calculator_version: 5
        charge_config: 1
        charge_postage_buyer: 1000
        charge_seller: 0
        currency: eur
        payment_method: card
        price: 10000
      properties:
        charge:
          description: |
            The Trustap fee that the buyer will pay, in the `currency`'s
            smallest unit, for a queried amount. See [the Stripe
            documentation](https://stripe.com/docs/currencies#zero-decimal)
            for more details.
          format: int64
          type: integer
        charge_calculator_version:
          description: |
            The version of the Trustap charge calculator that was used
            to calculate this charge.

            This property is present for error-handling purposes. The
            Trustap API allows apps and users to query how much Trustap
            will charge for a transaction before creating a transaction.
            Trustap then requires the queried charge to be provided when
            creating a transaction or listing. At this point the charge
            is calculated again and checked against the provided charge,
            to ensure that the charge calculated for the new resource is
            the same as the one shown to the user. In the unlikely event
            that the Trustap charge calculator used to calculate the
            charge has been updated, then the
            `charge_calculator_version` property will be used to return
            an `incorrect_calc_version` to the API client, which will
            indicate that the `/charge` endpoint should be queried again
            to get the newest charge value.
          format: int64
          type: integer
        charge_config:
          default: 1
          description: |
            The config for which the charge amount is computed.
          format: int64
          type: integer
        charge_postage_buyer:
          description: |
            When the transaction handles the generation of postage
            labels, then `charge_postage_buyer` will be added to cover this
            fee together with `charge_postage_client`
          format: int64
          type: integer
        charge_postage_client:
          format: int64
          type: integer
        charge_seller:
          description: |
            The Trustap fee that the seller will pay, in the
            `currency`'s smallest unit, for a queried amount. See [the
            Stripe
            documentation](https://stripe.com/docs/currencies#zero-decimal)
            for more details.
          format: int64
          type: integer
        currency:
          type: string
        payment_method:
          type: string
        price:
          format: int64
          type: integer
      required:
        - currency
        - charge
        - charge_seller
        - charge_calculator_version
        - price
      type: object
    basic.DeliveryDetails:
      properties:
        carrier:
          type: string
        city:
          type: string
        delivery_center_code:
          type: string
        delivery_type:
          type: string
        email:
          type: string
        full_name:
          type: string
        house_number:
          type: string
        house_number_suffix:
          type: string
        phone:
          type: string
        postal_code:
          type: string
        street:
          type: string
      required:
        - full_name
        - phone
        - email
        - street
        - house_number
        - house_number_suffix
        - postal_code
        - city
        - carrier
        - delivery_center_code
        - delivery_type
      type: object
    basic.DistanceUnit:
      enum:
        - in
        - cm
      example: cm
      type: string
    basic.Feature:
      enum:
        - require_seller_acceptance
        - use_hr_post
        - use_shippo
      example: require_seller_acceptance
      type: string
    basic.FinancialAddress:
      properties:
        aba:
          $ref: '#/components/schemas/basic.Aba'
        iban:
          $ref: '#/components/schemas/basic.Iban'
        sort_code:
          $ref: '#/components/schemas/basic.SortCode'
        swift:
          $ref: '#/components/schemas/basic.Swift'
      type: object
    basic.Iban:
      properties:
        account_holder_name:
          type: string
        bic:
          type: string
        country:
          type: string
        iban:
          type: string
      required:
        - account_holder_name
        - bic
        - country
        - iban
      type: object
    basic.MassUnit:
      enum:
        - lb
        - kg
      example: kg
      type: string
    basic.MultiUseListing:
      example:
        created: '2019-12-25T09:00:00Z'
        creator_id: ad5bb99f-85bf-47e1-be0d-15e7541c6ad7
        id: 77f36253-7a43-4d47-897d-f73dd208e17a
      properties:
        created:
          format: date-time
          type: string
        creator_id:
          type: string
        creator_role:
          $ref: '#/components/schemas/basic.Role'
        currency:
          type: string
        description:
          type: string
        disabled:
          format: date-time
          type: string
        id:
          type: string
        pricing:
          $ref: '#/components/schemas/basic.Pricing'
      required:
        - id
        - creator_id
        - created
        - creator_role
      type: object
    basic.PickUpDetails:
      properties:
        carrier:
          type: string
        city:
          type: string
        delivery_type:
          type: string
        email:
          type: string
        full_name:
          type: string
        house_number:
          type: string
        house_number_suffix:
          type: string
        phone:
          type: string
        pick_up_center_code:
          type: string
        postal_code:
          type: string
        street:
          type: string
      required:
        - full_name
        - phone
        - email
        - street
        - house_number
        - house_number_suffix
        - postal_code
        - city
        - carrier
        - pick_up_center_code
        - delivery_type
      type: object
    basic.Pricing:
      example:
        charge: 78
        price: 1234
      properties:
        charge:
          format: int64
          type: integer
        charge_international_payment:
          format: int64
          type: integer
        charge_seller:
          format: int64
          type: integer
        price:
          format: int64
          type: integer
      required:
        - price
        - charge
        - charge_seller
      type: object
    basic.Refund:
      properties:
        amount:
          format: int64
          type: integer
        id:
          type: string
        refunded:
          format: date-time
          type: string
      required:
        - id
        - amount
        - refunded
      type: object
    basic.Review:
      properties:
        approved:
          type: boolean
        finished:
          format: date-time
          type: string
        outcome_reason:
          type: string
        started:
          format: date-time
          type: string
      type: object
    basic.Role:
      enum:
        - buyer
        - seller
      example: buyer
      type: string
    basic.ServiceLevel:
      properties:
        extended_token:
          type: string
        name:
          type: string
        terms:
          type: string
        token:
          type: string
      required:
        - name
        - terms
        - token
        - extended_token
      type: object
    basic.ShipmentLabel:
      properties:
        label:
          type: string
      required:
        - label
      type: object
    basic.ShippoAddress:
      properties:
        city:
          type: string
        country:
          type: string
        email:
          type: string
        full_name:
          type: string
        phone:
          type: string
        state:
          type: string
        street_1:
          type: string
        street_2:
          type: string
        zip_code:
          type: string
      required:
        - full_name
        - street_1
        - zip_code
        - city
        - state
        - country
        - phone
      type: object
    basic.ShippoParcel:
      properties:
        distance_unit:
          type: string
        height:
          format: double
          type: number
        length:
          format: double
          type: number
        mass_unit:
          type: string
        shipment_date:
          type: string
        weight:
          format: double
          type: number
        width:
          format: double
          type: number
      required:
        - height
        - weight
        - width
        - length
        - mass_unit
        - distance_unit
        - shipment_date
      type: object
    basic.ShippoRate:
      properties:
        amount:
          type: string
        amount_local:
          type: string
        arrives_by:
          type: string
        attributes:
          items:
            type: string
          type: array
        currency:
          type: string
        currency_local:
          type: string
        duration_terms:
          type: string
        estimated_days:
          format: int64
          type: integer
        id:
          type: string
        provider:
          type: string
        provider_image:
          type: string
        servicelevel:
          $ref: '#/components/schemas/basic.ServiceLevel'
      required:
        - id
        - amount
        - currency
        - amount_local
        - currency_local
        - provider
        - provider_image
        - duration_terms
        - estimated_days
        - attributes
        - servicelevel
      type: object
    basic.ShippoShippingRatesResponse:
      properties:
        rates:
          items:
            $ref: '#/components/schemas/basic.ShippoRate'
          type: array
        shipment_id:
          type: string
      required:
        - shipment_id
        - rates
      type: object
    basic.SingleUseListing:
      example:
        created: '2019-12-25T09:00:00Z'
        creator_id: ad5bb99f-85bf-47e1-be0d-15e7541c6ad7
        id: 77f36253-7a43-4d47-897d-f73dd208e17a
      properties:
        created:
          format: date-time
          type: string
        creator_id:
          type: string
        creator_role:
          $ref: '#/components/schemas/basic.Role'
        currency:
          type: string
        description:
          type: string
        disabled:
          format: date-time
          type: string
        id:
          type: string
        pricing:
          $ref: '#/components/schemas/basic.Pricing'
      required:
        - id
        - creator_id
        - created
        - creator_role
      type: object
    basic.SortCode:
      properties:
        account_holder_name:
          type: string
        account_number:
          type: string
        sort_code:
          type: string
      required:
        - account_holder_name
        - account_number
        - sort_code
      type: object
    basic.Swift:
      properties:
        account_number:
          type: string
        bank_name:
          type: string
        swift_code:
          type: string
      required:
        - account_number
        - bank_name
        - swift_code
      type: object
    basic.Transaction:
      example:
        buyer_id: feb33a87-3917-4538-9260-127c8a6b5232
        charge: 78
        charge_seller: 0
        client_id: trustap-app
        created: '2019-12-25T09:00:00Z'
        currency: eur
        delivered: '2019-12-25T13:00:00Z'
        description: Soccer ticket
        funds_released: '2019-12-26T14:00:00Z'
        id: 1309
        is_payment_in_progress: false
        joined: '2019-12-25T10:00:00Z'
        paid: '2019-12-25T11:00:00Z'
        posta_hr_tracking:
          barcode: ABC12345
          barcode_generated: '2019-12-25T12:00:00Z'
        price: 1234
        quantity: 1
        seller_id: ad5bb99f-85bf-47e1-be0d-15e7541c6ad7
        status: funds_released
        tracked: '2019-12-25T12:00:00Z'
        tracking:
          carrier: ups
          tracking_code: '***'
      properties:
        amount_refunded:
          format: int64
          type: integer
        amount_released:
          format: int64
          type: integer
        buyer_id:
          type: string
        cancelled:
          format: date-time
          type: string
        charge:
          format: int64
          type: integer
        charge_international_payment:
          format: int64
          type: integer
        charge_postage_buyer:
          format: int64
          type: integer
        charge_postage_client:
          format: int64
          type: integer
        charge_seller:
          format: int64
          type: integer
        claimed_by_buyer:
          format: date-time
          type: string
        client_id:
          type: string
        complained:
          format: date-time
          type: string
        complaint:
          $ref: '#/components/schemas/Complaint'
        complaint_period_deadline:
          format: date-time
          type: string
        complaint_period_ended:
          format: date-time
          type: string
        created:
          format: date-time
          type: string
        currency:
          description: |
            The currency of the transaction. Note that, at present, the
            buyer must pay using the transaction's currency and the
            seller will be paid in the transaction's currency.
          type: string
        delivered:
          format: date-time
          type: string
        denied:
          format: date-time
          type: string
        description:
          type: string
        funds_released:
          format: date-time
          type: string
        id:
          format: int64
          type: integer
        image_url:
          description: >
            URL of the image displayed on the Trustap payment page to show the
            buyer

            the item they are paying for.

            Supports jpg, png, gif, bmp and svg files. Images displayed as a
            squares.

            Non-square images are cropped
          format: absolute_url
          type: string
        is_payment_in_progress:
          description: |
            If the transaction is paid via a delayed payment method,
            such as SEPA debit, this field will be `true` until the
            payment has fully succeeded or failed.
          type: boolean
        join_code:
          type: string
        joined:
          format: date-time
          type: string
        listing_creator_accepted:
          format: date-time
          type: string
        listing_creator_rejected:
          format: date-time
          type: string
        listing_id:
          description: |
            If the transaction is created from a listing then this is
            the ID of that listing; otherwise this property is omitted.
          type: string
        listing_type:
          $ref: '#/components/schemas/ListingType'
        order_issue:
          $ref: '#/components/schemas/OrderIssue'
        order_issue_raised:
          format: date-time
          type: string
        paid:
          format: date-time
          type: string
        payment_accepted:
          format: date-time
          type: string
        payment_refunded:
          format: date-time
          type: string
        posta_hr_tracking:
          $ref: '#/components/schemas/PostaHrTracking'
        price:
          format: int64
          type: integer
        quantity:
          format: int64
          type: integer
        refunds:
          items:
            $ref: '#/components/schemas/basic.Refund'
          type: array
        released_to_seller:
          type: boolean
        review:
          $ref: '#/components/schemas/basic.Review'
        review_flagged:
          format: date-time
          type: string
        seller_id:
          type: string
        shippo_transaction_id:
          type: string
        status:
          type: string
        tracked:
          format: date-time
          type: string
        tracking:
          $ref: '#/components/schemas/Tracking'
        tracking_details_deadline:
          format: date-time
          type: string
        tracking_details_window_started:
          format: date-time
          type: string
      required:
        - id
        - status
        - currency
        - price
        - charge
        - charge_seller
        - description
        - quantity
        - created
        - is_payment_in_progress
        - client_id
      type: object
    basic.UserDetailsName:
      example:
        first: John
        last: Doe
      properties:
        first:
          type: string
        last:
          type: string
      required:
        - first
        - last
      type: object
    p2p.Aba:
      properties:
        account_number:
          type: string
        bank_name:
          type: string
        routing_number:
          type: string
      required:
        - account_number
        - bank_name
        - routing_number
      type: object
    p2p.ActionsUrl:
      properties:
        actions_url:
          type: string
      required:
        - actions_url
      type: object
    p2p.BankTransferDetails:
      properties:
        amount:
          format: int64
          type: integer
        currency:
          type: string
        financial_address:
          $ref: '#/components/schemas/p2p.FinancialAddress'
        hosted_instructions_url:
          type: string
        reference:
          type: string
      required:
        - amount
        - currency
        - hosted_instructions_url
        - reference
        - financial_address
      type: object
    p2p.Cancellation:
      properties:
        reason:
          type: string
      required:
        - reason
      type: object
    p2p.Charge:
      example:
        charge: 78
        charge_calculator_version: 5
        charge_config: 1
        charge_seller: 0
        currency: eur
        payment_method: card
        price: 1234
      properties:
        charge:
          description: |
            The Trustap fee that the buyer will pay, in the `currency`'s
            smallest unit, for a queried amount. See [the Stripe
            documentation](https://stripe.com/docs/currencies#zero-decimal)
            for more details.
          format: int64
          type: integer
        charge_calculator_version:
          description: |
            The version of the Trustap charge calculator that was used
            to calculate this charge.

            This property is present for error-handling purposes. The
            Trustap API allows apps and users to query how much Trustap
            will charge for a transaction before creating a transaction.
            Trustap then requires the queried charge to be provided when
            creating a transaction or listing. At this point the charge
            is calculated again and checked against the provided charge,
            to ensure that the charge calculated for the new resource is
            the same as the one shown to the user. In the unlikely event
            that the Trustap charge calculator used to calculate the
            charge has been updated, then the
            `charge_calculator_version` property will be used to return
            an `incorrect_calc_version` to the API client, which will
            indicate that the `/charge` endpoint should be queried again
            to get the newest charge value.
          format: int64
          type: integer
        charge_config:
          default: 1
          format: int64
          type: integer
        charge_seller:
          description: |
            The Trustap fee that the seller will pay, in the
            `currency`'s smallest unit, for a queried amount. See [the
            Stripe
            documentation](https://stripe.com/docs/currencies#zero-decimal)
            for more details.
          format: int64
          type: integer
        currency:
          type: string
        payment_method:
          type: string
        price:
          format: int64
          type: integer
      required:
        - currency
        - charge
        - charge_seller
        - charge_calculator_version
        - price
      type: object
    p2p.Complaint:
      example:
        description: Item was fake
      properties:
        description:
          type: string
      required:
        - description
      type: object
    p2p.Currency:
      enum:
        - aud
        - eur
        - gbp
        - myr
        - pln
        - sek
        - usd
        - huf
      example: eur
      type: string
    p2p.DepositFeeMultiplier:
      properties:
        fee_multiplier:
          format: double
          type: number
      required:
        - fee_multiplier
      type: object
    p2p.DepositPaymentMethod:
      example:
        currency: eur
        deposit_charge: 2000
        deposit_charge_seller: 0
        deposit_price: 200000
        payment_method: bank_transfer
      properties:
        charge_config:
          format: int64
          type: integer
        currency:
          type: string
        deposit_charge:
          format: int64
          type: integer
        deposit_charge_seller:
          format: int64
          type: integer
        deposit_price:
          format: int64
          type: integer
        payment_method:
          type: string
      required:
        - payment_method
        - currency
        - deposit_price
        - deposit_charge
        - deposit_charge_seller
      type: object
    p2p.FinancialAddress:
      properties:
        aba:
          $ref: '#/components/schemas/p2p.Aba'
        iban:
          $ref: '#/components/schemas/p2p.Iban'
        sort_code:
          $ref: '#/components/schemas/p2p.SortCode'
        swift:
          $ref: '#/components/schemas/p2p.Swift'
      type: object
    p2p.Iban:
      properties:
        account_holder_name:
          type: string
        bic:
          type: string
        country:
          type: string
        iban:
          type: string
      required:
        - account_holder_name
        - bic
        - country
        - iban
      type: object
    p2p.ListingType:
      enum:
        - single_use
        - multi_use
      example: single_use
      type: string
    p2p.Pricing:
      example:
        charge: 78
        price: 1234
      properties:
        charge:
          format: int64
          type: integer
        charge_international_payment:
          format: int64
          type: integer
        charge_seller:
          format: int64
          type: integer
        deposit_fee_multiplier:
          $ref: '#/components/schemas/p2p.DepositFeeMultiplier'
        price:
          format: int64
          type: integer
      required:
        - price
        - charge
        - charge_seller
      type: object
    p2p.Refund:
      properties:
        amount:
          format: int64
          type: integer
        id:
          type: string
        refunded:
          format: date-time
          type: string
      required:
        - id
        - amount
        - refunded
      type: object
    p2p.Review:
      properties:
        approved:
          type: boolean
        finished:
          format: date-time
          type: string
        outcome_reason:
          type: string
        started:
          format: date-time
          type: string
      type: object
    p2p.Role:
      enum:
        - buyer
        - seller
      example: buyer
      type: string
    p2p.SortCode:
      properties:
        account_holder_name:
          type: string
        account_number:
          type: string
        sort_code:
          type: string
      required:
        - account_holder_name
        - account_number
        - sort_code
      type: object
    p2p.StripeToken:
      properties:
        stripe_token:
          type: string
      required:
        - stripe_token
      type: object
    p2p.Swift:
      properties:
        account_number:
          type: string
        bank_name:
          type: string
        swift_code:
          type: string
      required:
        - account_number
        - bank_name
        - swift_code
      type: object
    p2p.Transaction:
      example:
        buyer_handover_confirmed: '2019-12-25T16:00:00Z'
        buyer_id: feb33a87-3917-4538-9260-127c8a6b5232
        client_id: trustap-app
        created: '2019-12-25T09:00:00Z'
        currency: eur
        deposit_accepted: '2019-12-25T12:00:00Z'
        deposit_paid: '2019-12-25T11:00:00Z'
        deposit_pricing:
          charge: 78
          price: 1234
        description: Soccer ticket
        funds_released: '2019-12-25T17:00:00Z'
        id: 1309
        is_deposit_payment_in_progress: false
        is_remainder_payment_in_progress: false
        joined: '2019-12-25T10:00:00Z'
        priced: '2019-12-25T13:00:00Z'
        pricing:
          charge: 190
          price: 5000
        remainder_paid: '2019-12-25T14:00:00Z'
        seller_handover_confirmed: '2019-12-25T15:00:00Z'
        seller_id: ad5bb99f-85bf-47e1-be0d-15e7541c6ad7
        skip_remainder: false
        status: funds_released
      properties:
        amount_refunded:
          format: int64
          type: integer
        buyer_handover_confirmed:
          format: date-time
          type: string
        buyer_id:
          type: string
        buyer_is_guest:
          type: boolean
        cancellation:
          $ref: '#/components/schemas/p2p.Cancellation'
        cancelled:
          format: date-time
          type: string
        claimed_by_buyer:
          format: date-time
          type: string
        claimed_by_seller:
          format: date-time
          type: string
        client_id:
          type: string
        complained:
          format: date-time
          type: string
        complaint:
          $ref: '#/components/schemas/p2p.Complaint'
        complaint_period_deadline:
          format: date-time
          type: string
        complaint_period_ended:
          format: date-time
          type: string
        created:
          format: date-time
          type: string
        currency:
          description: |
            The currency of the transaction. Note that, at present, the
            buyer must pay using the transaction's currency and the
            seller will be paid in the transaction's currency.
          type: string
        deposit_accepted:
          format: date-time
          type: string
        deposit_paid:
          format: date-time
          type: string
        deposit_pricing:
          $ref: '#/components/schemas/p2p.Pricing'
        deposit_refunded:
          format: date-time
          type: string
        deposit_review:
          $ref: '#/components/schemas/p2p.Review'
        deposit_review_flagged:
          format: date-time
          type: string
        description:
          type: string
        funds_released:
          format: date-time
          type: string
        id:
          format: int64
          type: integer
        image_url:
          description: >
            URL of the image displayed on the Trustap payment page to show the
            buyer

            the item they are paying for.

            Supports jpg, png, gif, bmp and svg files. Images displayed as a
            squares.

            Non-square images are cropped
          format: absolute_url
          type: string
        is_deposit_payment_in_progress:
          description: |
            If the deposit is paid via a delayed payment method,
            such as SEPA debit, this field will be `true` until the
            payment has fully succeeded or failed.
          type: boolean
        is_remainder_payment_in_progress:
          description: |
            If the remainder is paid via a delayed payment method,
            such as SEPA debit, this field will be `true` until the
            payment has fully succeeded or failed.
          type: boolean
        join_code:
          type: string
        joined:
          format: date-time
          type: string
        listing_id:
          description: |
            If the transaction is created from a listing then this is
            the ID of that listing; otherwise this property is omitted.
          type: string
        listing_type:
          $ref: '#/components/schemas/p2p.ListingType'
        order_issue_raised:
          format: date-time
          type: string
        priced:
          format: date-time
          type: string
        pricing:
          $ref: '#/components/schemas/p2p.Pricing'
        quantity:
          format: int64
          type: integer
        refunded:
          format: date-time
          type: string
        refunds:
          items:
            $ref: '#/components/schemas/p2p.Refund'
          type: array
        rejected:
          format: date-time
          type: string
        released_to_seller:
          type: boolean
        remainder_paid:
          format: date-time
          type: string
        remainder_review:
          $ref: '#/components/schemas/p2p.Review'
        remainder_review_flagged:
          format: date-time
          type: string
        remainder_skipped:
          format: date-time
          type: string
        seller_handover_confirmed:
          format: date-time
          type: string
        seller_id:
          type: string
        seller_is_guest:
          type: boolean
        seller_phone_number:
          type: string
        skip_remainder:
          description: |
            If `skip_remainder` is `true` then this transaction will
            move to the "confirm handover" step after the deposit has
            been accepted.
          type: boolean
        status:
          type: string
      required:
        - id
        - currency
        - deposit_pricing
        - description
        - skip_remainder
        - status
        - quantity
        - created
        - is_deposit_payment_in_progress
        - is_remainder_payment_in_progress
        - client_id
      type: object
    personal.BankAccount:
      properties:
        bank_name:
          type: string
        country:
          type: string
        currency_alpha_2:
          type: string
        last4:
          type: string
        routing:
          type: string
      required:
        - country
        - currency_alpha_2
        - last4
        - bank_name
      type: object
    personal.BankDetails:
      properties:
        account_number:
          type: string
        country_code:
          type: string
        currency:
          type: string
        routing_number:
          type: string
      required:
        - account_number
        - country_code
        - currency
      type: object
    personal.Card:
      properties:
        last4:
          type: string
        month:
          format: int64
          type: integer
        year:
          format: int64
          type: integer
      required:
        - last4
        - month
        - year
      type: object
    personal.DateValidation:
      properties:
        max_date:
          type: integer
        max_day:
          type: integer
        max_month:
          type: integer
        max_year:
          type: integer
        min_day:
          type: integer
        min_month:
          type: integer
        min_year:
          type: integer
      type: object
    personal.DebitAccount:
      properties:
        bank_account:
          $ref: '#/components/schemas/personal.BankAccount'
        card:
          $ref: '#/components/schemas/personal.Card'
      required:
        - bank_account
        - card
      type: object
    personal.Details:
      properties:
        address_city:
          $ref: '#/components/schemas/personal.VerifiableString'
        address_country:
          $ref: '#/components/schemas/personal.VerifiableString'
        address_line1:
          $ref: '#/components/schemas/personal.VerifiableString'
        address_line2:
          $ref: '#/components/schemas/personal.VerifiableString'
        address_postal_code:
          $ref: '#/components/schemas/personal.VerifiableString'
        address_state:
          $ref: '#/components/schemas/personal.VerifiableString'
        dob:
          $ref: '#/components/schemas/personal.VerifiableDate'
        id_number:
          $ref: '#/components/schemas/personal.VerifiableIdNumber'
        name_first:
          $ref: '#/components/schemas/personal.VerifiableString'
        name_last:
          $ref: '#/components/schemas/personal.VerifiableString'
        phone:
          $ref: '#/components/schemas/personal.VerifiablePhone'
      required:
        - name_first
        - name_last
        - dob
        - phone
        - address_line1
        - address_line2
        - address_city
        - address_postal_code
        - address_state
        - address_country
        - id_number
      type: object
    personal.FieldType:
      enum:
        - date
        - id_number
        - phone
        - string
      type: string
    personal.InstantPayoutBalance:
      properties:
        amount:
          format: int64
          type: integer
        currency:
          type: string
      required:
        - amount
        - currency
      type: object
    personal.InvalidReason:
      properties:
        code:
          type: string
        description:
          description: An English-language description of the error.
          type: string
      required:
        - code
        - description
      type: object
    personal.PayoutAttempt:
      properties:
        amount:
          format: int64
          type: integer
        arrival_date:
          format: int64
          type: integer
        created_date:
          format: int64
          type: integer
        failure_code:
          enum:
            - account_closed
            - account_frozen
            - bank_account_restricted
            - bank_ownership_changed
            - could_not_process
            - debit_not_authorized
            - declined
            - insufficient_funds
            - invalid_account_number
            - incorrect_account_holder_name
            - incorrect_account_holder_address
            - incorrect_account_holder_tax_id
            - invalid_currency
            - no_account
            - unsupported_card
          type: string
        status:
          enum:
            - paid
            - pending
            - in_transit
            - canceled
            - failed
          type: string
      required:
        - amount
        - created_date
        - arrival_date
        - status
      type: object
    personal.Validation:
      properties:
        cannot_unset:
          type: boolean
        cannot_update:
          type: boolean
        max_length:
          type: integer
        min_length:
          type: integer
      type: object
    personal.VerifiableDate:
      properties:
        invalid_reason:
          $ref: '#/components/schemas/personal.InvalidReason'
        required_now:
          type: boolean
        status:
          $ref: '#/components/schemas/personal.VerificationStatus'
        type:
          $ref: '#/components/schemas/personal.FieldType'
        validation:
          $ref: '#/components/schemas/personal.DateValidation'
        value:
          properties:
            day:
              type: integer
            month:
              type: integer
            year:
              type: integer
          required:
            - day
            - month
            - year
          type: object
      required:
        - value
        - required_now
        - validation
        - status
        - type
      type: object
    personal.VerifiableIdNumber:
      properties:
        invalid_reason:
          $ref: '#/components/schemas/personal.InvalidReason'
        required_now:
          type: boolean
        status:
          $ref: '#/components/schemas/personal.VerificationStatus'
        type:
          $ref: '#/components/schemas/personal.FieldType'
        validation:
          properties:
            max_length:
              type: integer
            min_length:
              type: integer
          type: object
        value:
          properties:
            provided:
              type: boolean
          required:
            - provided
          type: object
      required:
        - required_now
        - value
        - validation
        - status
        - type
      type: object
    personal.VerifiablePhone:
      properties:
        invalid_reason:
          $ref: '#/components/schemas/personal.InvalidReason'
        required_now:
          type: boolean
        status:
          $ref: '#/components/schemas/personal.VerificationStatus'
        type:
          $ref: '#/components/schemas/personal.FieldType'
        validation:
          properties:
            number_min_length:
              type: integer
          type: object
        value:
          properties:
            dial_code:
              type: string
            dial_code_country:
              description: >-
                This field is mostly non-functional, but is instead used to
                render the phone number for the user. This field is necessary
                because different countries may use the same dial code (for
                example, the US and Canada).
              type: string
            number:
              type: string
          required:
            - dial_code_country
            - dial_code
            - number
          type: object
      required:
        - required_now
        - value
        - validation
        - status
        - type
      type: object
    personal.VerifiableString:
      properties:
        invalid_reason:
          $ref: '#/components/schemas/personal.InvalidReason'
        required_now:
          type: boolean
        status:
          $ref: '#/components/schemas/personal.VerificationStatus'
        type:
          $ref: '#/components/schemas/personal.FieldType'
        validation:
          $ref: '#/components/schemas/personal.Validation'
        value:
          type: string
      required:
        - required_now
        - type
        - value
        - validation
        - status
      type: object
    personal.VerificationSessionLastError:
      description: >
        Optional error information if there was an error in the verification
        session.
      properties:
        code:
          enum:
            - abandoned
            - consent_declined
            - country_not_supported
            - device_not_supported
            - document_expired
            - document_type_not_supported
            - document_unverified_other
            - email_unverified_other
            - email_verification_declined
            - id_number_insufficient_document_data
            - id_number_mismatch
            - id_number_unverified_other
            - phone_unverified_other
            - phone_verification_declined
            - selfie_document_missing_photo
            - selfie_face_mismatch
            - selfie_manipulated
            - selfie_unverified_other
            - under_supported_age
          type: string
        reason:
          description: |
            Explanation or description related to the error code.
          type: string
      required:
        - code
        - reason
      type: object
    personal.VerificationStatus:
      enum:
        - unset
        - invalid
        - verifying
        - verified_and_verifying
        - verified
        - set
      type: string
    users.Balances:
      properties:
        available:
          items:
            properties:
              amount:
                format: int64
                type: integer
              currency:
                type: string
            required:
              - currency
              - amount
            type: object
          type: array
      required:
        - available
      type: object
    users.Features:
      properties:
        instant_payouts_enabled:
          type: boolean
      type: object
    users.GuestUser:
      example:
        id: 1-feb33a87-3917-4538-9260-127c8a6b5232
      properties:
        created_at:
          format: date-time
          type: string
        deleted_at:
          format: date-time
          type: string
        email:
          type: string
        id:
          type: string
      required:
        - id
        - email
        - created_at
      type: object
    users.TosAcceptance:
      properties:
        ip:
          minLength: 1
          type: string
        unix_timestamp:
          format: int64
          type: integer
      required:
        - unix_timestamp
        - ip
      type: object
    users.User:
      example:
        id: 2-feb33a87-3917-4538-9260-127c8a6b5232
      properties:
        created_at:
          format: date-time
          type: string
        deleted_at:
          format: date-time
          type: string
        email:
          type: string
        id:
          type: string
      required:
        - id
        - email
        - created_at
      type: object
