{
  "openapi": "3.0.0",
  "info": {
    "contact": {
      "email": "support@trustap.com"
    },
    "description": "The Trustap API is a REST-based API for managing user data and\ntransactions for Trustap users.\n\nNote that, like Stripe, all API `price` and `charge` fields expect\namounts to be provided in a currency's smallest unit. See [the Stripe\ndocumentation](https://stripe.com/docs/currencies#zero-decimal) for more\ndetails.\n\nAPI Keys\n--------\n\nSome endpoints such as `/charge` endpoints can be accessed directly\nusing an API key. API keys are provided as the \"username\" portion of a\nbasic auth authentication. For example, the Trustap fee for a new online\ntransaction can be determined using the following cURL request with an\nAPI key:\n\n``` bash\ncurl -u '<api_key>': 'https://dev.stage.trustap.com/api/v1/charge?currency=eur&price=1234'\n```\n\nDeprecation\n-----------\n\nDeprecated endpoints are tagged with the word `DEPRECATED` at the start\nof their description. The deprecation message will describe what\nendpoints/approach should be used instead.\n\nNote that deprecated endpoints will not be removed from the current\nversion of the API, but their use is discouraged. Furthermore, migrating\nto later major versions of the API will be made easier by avoiding\ndeprecated endpoints.\n\nProduction\n----------\n\nThis documentation references the staging environment of the Trustap\nAPI, which is available at `https://dev.stage.trustap.com` and uses the\n`trustap-stage` realm during authentication. This environment can be\nused for implementing and testing features using test credit cards, bank\naccounts, etc.\n\nWhen all features using Trustap have been implemented and tested\nsufficiently, the production environment of the Trustap API can be used\nto process actual currency. This environment is available at\n`https://dev.trustap.com` and uses the `trustap` realm during\nauthentication.\n\nNote that only your client ID will be the same in the staging and\nproduction Trustap API environments; your client secret and API key will\nbe different in the two environments.\n",
    "title": "Trustap API",
    "version": "0.1.0"
  },
  "paths": {
    "/api/v1/batch/transactions": {
      "get": {
        "description": "This endpoint takes a required `ids` parameter that contains a\ncomma-separated list of transaction IDs, and returns the\ntransactions corresponding to those IDs. A maximum of 50 IDs may\nbe provided, results are returned in the order specified in\n`ids`, and duplicates are preserved. Transactions that couldn't\nbe found will be returned as `null` values in the result array.\nThe following example request results in the `200 OK` response\ndescribed below, assuming that the transaction with ID `1990`\ncouldn't be found:\n\n``` http\nhttps://dev.stage.trustap.com/api/v1/batch/transactions?ids=1309,609,1990,609\n```\n",
        "operationId": "basic.getTransactionsByIds",
        "parameters": [
          {
            "description": "A comma-separated list of transaction IDs\n",
            "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\n\n`code` can be one of the following:\n\n  * `ids_missing`\n  * `invalid_id`\n  * `too_many_ids`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Get multiple online transactions by their IDs",
        "tags": [
          "Online Transactions"
        ]
      }
    },
    "/api/v1/charge": {
      "get": {
        "description": "This returns the Trustap fee, in the `currency`'s smallest unit,\nfor a transaction involving goods with the supplied `price`. See\n[the Stripe\ndocumentation](https://stripe.com/docs/currencies#zero-decimal)\nfor more details.\n",
        "operationId": "basic.getCharge",
        "parameters": [
          {
            "description": "The currency that the `price` is specified in.\n",
            "in": "query",
            "name": "currency",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The price of the goods being sold in this transaction, in\nthe `currency`'s smallest unit. For example, if a trading\ncard is being sold for $12.34 (with `currency` as `usd`),\nthen the request for the charge for this transaction would\nbe `/charge?price=1234&currency=usd`.\n",
            "in": "query",
            "name": "price",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Deprecated.\n",
            "in": "query",
            "name": "quantity",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "The payment method that will be used to pay for the\ntransaction. This is necessary because different payment\nmethods may result in different fees.\n\nThe default value is `card`.\n",
            "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.\n",
            "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\n\n`code` can be one of the following:\n\n  * `currency_missing`\n  * `invalid_price`\n  * `negative_price`\n  * `price_too_low`\n  * `unsupported_currency`\n  * `invalid_charge_config`\n  * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": []
          },
          {
            "APIKey": []
          }
        ],
        "summary": "Get the Trustap fee for an online transaction",
        "tags": [
          "Online Payment"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/clients/{client_id}/timelines": {
      "get": {
        "operationId": "basic_client.getTimelinesForClient",
        "parameters": [
          {
            "in": "path",
            "name": "client_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/basic.ClientTimelines"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Get timelines for the given client",
        "tags": [
          "Clients"
        ]
      }
    },
    "/api/v1/guest_users": {
      "post": {
        "description": "This endpoint creates guest user which can be used as the buyer or the seller.\nIf guest user is used as the seller in a transaction, they need to be created with\n`country_code` parameter correctly set. This is important because of currencies\nthey can use in their transactions.\n`tos_acceptance` is the parameter which is important for disputes/chargeback and \nrepresent the timestamp when Trustap ToS were accepted https://www.trustap.com/terms.\n",
        "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\n  `code` can be one of the following:\n    * `email_missing`\n    * `first_name_missing`\n    * `last_name_missing`\n    * `tos_acceptance_ip_missing`\n    * `invalid_country_code`\n    * `invalid_email`\n    * `invalid_tos_acceptance_date`\n"
          }
        },
        "summary": "Create a new guest user",
        "tags": [
          "Buyers and Sellers"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `routing_number_invalid`: The routing number is invalid.\n  * `account_number_invalid`: The account number is invalid.\n  * `parameter_missing`: Parameter is missing.\n  * `invalid_account_type`: The given debit account type is invalid.\n  * `bank_account_unusable`: The bank account is unusable.\n  * `bank_details_missing`: The bank details are missing.\n  * `bank_token_missing`: The bank token is missing.\n  * `card_details_missing`: The card details are missing.\n"
          }
        },
        "summary": "Set debit account details",
        "tags": [
          "Personal"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/me/notifications": {
      "get": {
        "operationId": "app_notifs.getNotifications",
        "parameters": [
          {
            "description": "Only return transactions that were created chronologically\nbefore the transaction with this ID\n",
            "in": "query",
            "name": "before_id",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "description": "Only return notifications that were created chronologically\nafter the notification with this ID (i.e. with smaller IDs)\n",
            "in": "query",
            "name": "after_id",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "description": "The maximum number of notifications to return\n",
            "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\n\n`code` can be one of the following:\n\n  * `invalid_before_id`\n  * `invalid_after_id`\n  * `invalid_limit`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Get the notifications for the logged-in user",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/me/payout_attempts": {
      "get": {
        "description": "Payout attempts are returned in reverse chronological order -\nthe first attempt in the returned array will be the most recent\npayout attempt.\n",
        "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"
        ]
      }
    },
    "/api/v1/me/payouts": {
      "get": {
        "operationId": "users.getPayouts",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/users.Payouts"
                }
              }
            }
          }
        },
        "summary": "Get the list of payouts for the current user in each currency",
        "tags": [
          "Buyers and Sellers"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/me/personal/stripe_publishable_key": {
      "get": {
        "description": "Returns the Publishable Key for the Stripe Platform\nwhich the user is linked to.\n",
        "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\n",
        "tags": [
          "Personal"
        ]
      }
    },
    "/api/v1/me/profile/payout_status": {
      "get": {
        "description": "This endpoint requires\nthe user identified by the `Trustap-User` header to have granted the `profile`\nscope to the client that is performing the request. Offline access is allowed for this endpoint when the user has\ngranted the `profile` scope to the client\nthat is performing the request.\n",
        "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\n",
        "tags": [
          "Personal"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `unconfirmed_setup_intent`: The given SetupIntent has not\n    been confirmed\n"
          }
        },
        "summary": "Get the ownership details from the given SetupIntent using Stripe Financial Connections",
        "tags": [
          "Personal"
        ]
      }
    },
    "/api/v1/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\nConnections session\n",
        "tags": [
          "Personal"
        ]
      }
    },
    "/api/v1/me/transactions": {
      "get": {
        "description": "Transactions are currently sorted by ID.\n",
        "operationId": "basic.getTransactions",
        "parameters": [
          {
            "description": "Only return transactions that were created chronologically\nbefore the transaction with this ID\n",
            "in": "query",
            "name": "before_id",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "description": "Only return transactions that were created chronologically\nafter the transaction with this ID (i.e. with smaller IDs)\n",
            "in": "query",
            "name": "after_id",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "description": "The maximum number of transactions to return\n",
            "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_buyer_client": 0,
                      "charge_seller": 0,
                      "charge_seller_client": 0,
                      "client_id": "trustap-app",
                      "created": "2019-12-25T09:00:00Z",
                      "currency": "eur",
                      "description": "Soccer ticket",
                      "id": 1309,
                      "is_payment_in_progress": false,
                      "join_code": "54c5bb89-a5ea-4be7-ad7a-e740c2eebab4",
                      "price": 1234,
                      "quantity": 1,
                      "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
                      "status": "created"
                    },
                    {
                      "buyer_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
                      "charge": 78,
                      "charge_buyer_client": 0,
                      "charge_seller": 0,
                      "charge_seller_client": 0,
                      "client_id": "trustap-app",
                      "created": "2018-12-25T09:00:00Z",
                      "currency": "eur",
                      "description": "Soccer ticket",
                      "id": 609,
                      "is_payment_in_progress": false,
                      "join_code": "c9cd6a9d-1096-4d38-b4aa-2c354beac845",
                      "price": 1234,
                      "quantity": 1,
                      "status": "created"
                    }
                  ],
                  "items": {
                    "$ref": "#/components/schemas/basic.Transaction"
                  },
                  "type": "array"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request\n\n`code` can be one of the following:\n\n  * `invalid_before_id`\n  * `invalid_after_id`\n  * `invalid_limit`\n",
            "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\n`/charge` with the price of the goods specified in `price`.\n",
        "operationId": "basic.createTransaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "example": {
                  "charge": 78,
                  "charge_calculator_version": 5,
                  "charge_seller": 0,
                  "currency": "eur",
                  "description": "Little Fish",
                  "price": 1234,
                  "role": "seller"
                },
                "properties": {
                  "charge": {
                    "description": "The `charge` value returned from a request to\n`/charge`.\n",
                    "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.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "charge_seller": {
                    "description": "The seller `charge` value returned from a\nrequest to `/charge`.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "client_id": {
                    "type": "string"
                  },
                  "currency": {
                    "description": "The currency that the `price` is specified in.\n",
                    "type": "string"
                  },
                  "description": {
                    "description": "A description of the goods being sold.\n",
                    "type": "string"
                  },
                  "features": {
                    "description": "`features` contains flags that modify the\ntransaction flow.\n",
                    "items": {
                      "$ref": "#/components/schemas/basic.Feature"
                    },
                    "type": "array"
                  },
                  "payment_method": {
                    "description": "The payment method to use for the transaction.\n",
                    "type": "string"
                  },
                  "price": {
                    "description": "The price of the goods being sold, in the\n`currency`'s smallest unit.  The `charge` value\nshould correspond to the Trustap charge created\nwith this price, otherwise this request will\nfail with a `400` error.\n",
                    "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\n\n`code` can be one of the following:\n\n  * `incorrect_calc_version`\n  * `incorrect_charge`\n  * `incorrect_charge_seller`\n  * `invalid_calc_version`\n  * `negative_price`\n  * `price_too_low`\n  * `invalid_charge_config`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Create a new online transaction",
        "tags": [
          "Online Transactions"
        ]
      }
    },
    "/api/v1/me/transactions/create_and_join": {
      "post": {
        "description": "This endpoint is an optimised call that allows a transaction to\nbe created and joined in a single request. It requires the user\nidentified by `join_user_id` to have granted the\n`basic_tx:offline_create_join` scope to the client that is\nperforming the request.\n",
        "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
                },
                "properties": {
                  "charge": {
                    "description": "The `charge` value returned from a request to\n`/charge`.\n",
                    "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.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "charge_seller": {
                    "description": "The seller `charge` value returned from a request to\n`/charge`.\n",
                    "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.\n",
                    "type": "string"
                  },
                  "description": {
                    "description": "A description of the goods being sold.\n",
                    "type": "string"
                  },
                  "features": {
                    "description": "`features` contains flags that modify the\ntransaction flow.\n",
                    "items": {
                      "$ref": "#/components/schemas/basic.Feature"
                    },
                    "type": "array"
                  },
                  "join_user_id": {
                    "description": "The user that will be joined to the new\ntransaction when it is created. It cannot be the\nID of the user making the request.\n",
                    "type": "string"
                  },
                  "payment_method": {
                    "description": "The payment method to use for the transaction.\n",
                    "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\n`currency`'s smallest unit.  The `charge` value\nshould correspond to the Trustap charge created\nwith this price, otherwise this request will\nfail with a `400` error.\n",
                    "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\n\n`code` can be one of the following:\n\n  * `invalid_join_user_id`\n  * `duplicate_user_id`: The user specified by\n    `join_user_id` is the user making the request.\n  * `incorrect_calc_version`\n  * `incorrect_charge`\n  * `incorrect_charge_seller`\n  * `unsupported_currency`\n  * `user_not_owned_by_client`\n  * `invalid_calc_version`\n  * `negative_price`\n  * `price_too_low`\n  * `user_already_joined`\n  * `already_cancelled`\n  * `feature_not_found`\n  * `invalid_charge_config`\n  * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Create a new online transaction with both users",
        "tags": [
          "Online Transactions"
        ]
      }
    },
    "/api/v1/me/transactions/create_with_guest_user": {
      "post": {
        "description": "This endpoint is an optimised call that allows a transaction to\nbe created and joined in a single request. It requires the\nonline user to have granted the `basic_tx:offline_create_join` scope\nto the client that is performing the request.\nThis endpoint allows creating a transaction with both buyer and seller\nas guest or full users, or one party to be guest user and the other full user.\n",
        "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\n(it can be full user id or guest user id).\n",
                    "type": "string"
                  },
                  "charge": {
                    "description": "The `charge` value returned from a request to\n`/charge`.\n",
                    "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.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "charge_seller": {
                    "description": "The seller `charge` value returned from a\nrequest to `/charge`.\n",
                    "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.\n",
                    "type": "string"
                  },
                  "features": {
                    "description": "`features` contains flags that modify the\ntransaction flow.\n",
                    "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\nthe item they are paying for.\nSupports jpg, png, gif, bmp, webp and svg files. Images displayed as a\nsquares. Non-square images are cropped.\n",
                    "format": "absolute_url",
                    "maxLength": 2047,
                    "type": "string"
                  },
                  "payment_method": {
                    "description": "The payment method to use for the transaction.\n",
                    "type": "string"
                  },
                  "postage_fee": {
                    "description": "The custom `postage fee`, this fee only applies in the case\n`postage fee feature flag` is enabled.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "price": {
                    "description": "The price of the goods being sold, in the\n`currency`'s smallest unit.  The `charge` value\nshould correspond to the Trustap charge created\nwith this price, otherwise this request will\nfail with a `400` error.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "seller_id": {
                    "description": "The id of the seller for this transaction\n(it can be full user id or guest user id).\n",
                    "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\n\n`code` can be one of the following:\n  * `incorrect_calc_version`\n  * `incorrect_charge`\n  * `incorrect_charge_seller`\n  * `invalid_calc_version`\n  * `negative_price`\n  * `price_too_low`\n  * `incompatible_countries`\n  * `unsupported_currency`\n  * `invalid_role`\n  * `no_guest_user`\n  * `invalid_charge_config`\n  * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.\n  * `invalid_image_url`\n  * `image_url_too_long`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Create a new online transaction with both users",
        "tags": [
          "Online Transactions"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `user_is_company`: Verification sessions aren't yet supported\n    for users with a `business_type` of `company`.\n"
          }
        },
        "summary": "Create verification method and message if not available\n",
        "tags": [
          "Personal"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `stripe_identity_not_available`: stripe identity is currently not available for this account.\n"
          },
          "409": {
            "description": "Conflict\n\n`code` can be one of the following:\n\n  * `user_is_company`: Verification sessions aren't yet supported\n    for users with a `business_type` of `company`.\n"
          }
        },
        "summary": "Create verification session and retrieve client secret for it\n",
        "tags": [
          "Personal"
        ]
      }
    },
    "/api/v1/me/verification_session_native": {
      "get": {
        "description": "Creates verification session for native apps that use Stripe native SDK, \nand returns it's `Verification Session ID` with appropriate `Ephemeral Key`.\nOffline access is allowed for this endpoint when the user has\ngranted the `profile` scope to the client that is performing the request.\n",
        "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\n\n`code` can be one of the following:\n\n  * `stripe_identity_not_available`: stripe identity is currently not available for this account.\n"
          },
          "409": {
            "description": "Conflict\n\n`code` can be one of the following:\n\n  * `user_is_company`: Verification sessions aren't yet supported\n    for users with a `business_type` of `company`.\n"
          }
        },
        "summary": "Create verification session for native apps that use Stripe native SDK",
        "tags": [
          "Personal"
        ]
      }
    },
    "/api/v1/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\n",
        "tags": [
          "Personal"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/p2p/batch/transactions": {
      "get": {
        "description": "This endpoint takes a required `ids` parameter that contains a\ncomma-separated list of transaction IDs, and returns the\ntransactions corresponding to those IDs. A maximum of 50 IDs may\nbe provided, and results are returned in the order specified in\n`ids`, and duplicates are preserved. Transactions that couldn't\nbe found will be returned as `null` values in the result array.\nThe following example request results in the `200 OK` response\ndescribed below, assuming that the transaction with ID `1990`\ncouldn't be found:\n\n\n``` http\nhttps://dev.stage.trustap.com/api/v1/p2p/batch/transactions?ids=1309,609,1990,609\n```\n",
        "operationId": "getP2pTransactionsByIds",
        "parameters": [
          {
            "description": "A comma-separated list of transaction IDs\n",
            "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\n\n`code` can be one of the following:\n\n  * `ids_missing`\n  * `invalid_id`\n  * `too_many_ids`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Get multiple face-to-face transactions by their IDs",
        "tags": [
          "F2F Transactions"
        ]
      }
    },
    "/api/v1/p2p/charge": {
      "get": {
        "description": "This returns the Trustap fee, in the `currency`'s smallest unit,\nfor a transaction involving goods with the supplied `price`. See\n[the Stripe\ndocumentation](https://stripe.com/docs/currencies#zero-decimal)\nfor more details.\n",
        "operationId": "p2p.getCharge",
        "parameters": [
          {
            "description": "The currency that the `price` is specified in.\n",
            "in": "query",
            "name": "currency",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The price of the goods being sold in this transaction, in\nthe `currency`'s smallest unit. For example, if a trading\ncard is being sold for $12.34 (with `currency` as `usd`),\nthen the request for the charge for this transaction would\nbe `/p2p/charge?price=1234&currency=usd`.\n",
            "in": "query",
            "name": "price",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "The `fee_multiplier` parameter is used to apply a higher percentage\nfee based on the total price of the transaction. The percentage fee\nis calculated multiplying the `percentage fee` by the `fee_multiplier`.\n",
            "in": "query",
            "name": "fee_multiplier",
            "required": false,
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "description": "Deprecated.\n",
            "in": "query",
            "name": "quantity",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "The payment method that will be used to pay for the\ntransaction. This is necessary because different payment\nmethods may result in different fees.\n\nThe default value is `card`.\n",
            "in": "query",
            "name": "payment_method",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The charge config for which the charge amount is computed.\n",
            "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\n\n`code` can be one of the following:\n\n  * `currency_missing`\n  * `invalid_price`\n  * `negative_price`\n  * `price_too_low`\n  * `unsupported_currency`\n  * `invalid_charge_config`\n  * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.\n",
            "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"
        ]
      }
    },
    "/api/v1/p2p/clients/{client_id}/timelines": {
      "get": {
        "operationId": "p2p_client.getTimelinesForClient",
        "parameters": [
          {
            "in": "path",
            "name": "client_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/p2p.ClientTimelines"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Get timelines for the given client",
        "tags": [
          "Clients"
        ]
      }
    },
    "/api/v1/p2p/listings/create_with_seller": {
      "post": {
        "operationId": "p2p.createListingWithSeller",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ad_id": {
                    "description": "Unique ID for the product or service.\nNot used by Trustap internally, but returned in webhook events.\n",
                    "type": "string"
                  },
                  "currency": {
                    "$ref": "#/components/schemas/p2p.Currency"
                  },
                  "description": {
                    "description": "Description of the product or service.\nThis description is shown in all emails and payment screens.\n",
                    "type": "string"
                  },
                  "image_url": {
                    "description": "URL of the image displayed on the Trustap payment page to show the buyer\nthe item they are paying for.\nSupports jpg, png, gif, bmp, webp and svg files. Images displayed as a\nsquares. Non-square images are cropped.\n",
                    "format": "absolute_url",
                    "maxLength": 2047,
                    "type": "string"
                  },
                  "seller_country_code": {
                    "description": "ISO 4217 three-character currency code representing the currency of the transaction.\n",
                    "type": "string"
                  },
                  "seller_email": {
                    "description": "Valid email address of your seller.\nEnsure this email is correct as Trustap will send all transaction correspondence to this email.\n",
                    "type": "string"
                  },
                  "seller_phone_number": {
                    "description": "Phone number of seller.\n",
                    "type": "string"
                  },
                  "value": {
                    "description": "The price of the product or service.\nThis value must be provided in a currency's smallest unit.\n",
                    "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\n\n`code` can be one of the following:\n\n    * `invalid_role`: '' is not a valid role\n    * `invalid_image_url`: '' is not a valid image url\n    * `image_url_too_long`\n"
          }
        },
        "summary": "Creates a transaction with guest seller and returns actions\npage url\n",
        "tags": [
          "Trustap Lite"
        ]
      }
    },
    "/api/v1/p2p/me/transactions": {
      "get": {
        "description": "Transactions are currently sorted by ID.\n",
        "operationId": "p2p.getTransactions",
        "parameters": [
          {
            "description": "Only return transactions that were created chronologically\nbefore the transaction with this ID\n",
            "in": "query",
            "name": "before_id",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "description": "Only return transactions that were created chronologically\nafter the transaction with this ID (i.e. with smaller IDs)\n",
            "in": "query",
            "name": "after_id",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "description": "The maximum number of transactions to return\n",
            "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_buyer_client": 0,
                        "charge_seller": 0,
                        "charge_seller_client": 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_buyer_client": 0,
                        "charge_seller": 0,
                        "charge_seller_client": 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\n\n`code` can be one of the following:\n\n  * `invalid_before_id`\n  * `invalid_after_id`\n  * `invalid_limit`\n  * `excessive_limit`\n",
            "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`\nbut takes `deposit_price` and `deposit_charge` fields instead of\nthe `price` and `charge` fields.\nOffline access is allowed for this endpoint when the user has\ngranted the `p2p_tx:offline_create_join` scope to the client\nthat is performing the request.\n",
        "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/p2p.Currency"
                  },
                  "deposit_charge": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "deposit_charge_config": {
                    "description": "The charge config for which the charge amount is computed.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "deposit_charge_seller": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "deposit_payment_method": {
                    "description": "The payment method to use for the transaction.\n",
                    "type": "string"
                  },
                  "deposit_price": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "description": {
                    "description": "A description of the goods being sold.\n",
                    "type": "string"
                  },
                  "role": {
                    "$ref": "#/components/schemas/p2p.Role"
                  },
                  "skip_remainder": {
                    "description": "If `skip_remainder` is `true` then this\ntransaction will move to the \"confirm handover\"\nstep after the deposit has been accepted.\n",
                    "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\n\n`code` can be one of the following:\n\n  * `incorrect_calc_version`\n  * `incorrect_charge`\n  * `incorrect_charge_seller`\n  * `invalid_calc_version`\n  * `negative_price`\n  * `price_too_low`\n  * `invalid_charge_config`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Create a new face-to-face transaction",
        "tags": [
          "F2F Transactions"
        ]
      }
    },
    "/api/v1/p2p/me/transactions/create_and_join": {
      "post": {
        "description": "This endpoint is an optimised call that allows a transaction to\nbe created and joined in a single request. It requires the user\nidentified by `join_user_id` to have granted the\n`p2p_tx:offline_create_join` scope to the client that is\nperforming the request.\n\nNote that this endpoint is similar to `POST /me/transactions`\nbut takes `deposit_price` and `deposit_charge` fields instead of\nthe `price` and `charge` fields.\n",
        "operationId": "p2p.createAndJoinTransaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "example": {
                  "charge_calculator_version": 5,
                  "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/p2p.Currency"
                  },
                  "deposit_charge": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "deposit_charge_config": {
                    "description": "The charge config for which the charge amount is computed.\n",
                    "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\nfee based on the total price of the transaction. The percentage fee\nis calculated multiplying the `percentage fee` by the `fee_multiplier`.\n",
                    "format": "double",
                    "type": "number"
                  },
                  "deposit_payment_method": {
                    "description": "The payment method to use for the transaction.\n",
                    "type": "string"
                  },
                  "deposit_price": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "description": {
                    "description": "A description of the goods being sold.\n",
                    "type": "string"
                  },
                  "join_user_id": {
                    "description": "The user that will be joined to the new\ntransaction when it is created. It cannot be the\nID of the user making the request.\n",
                    "type": "string"
                  },
                  "skip_remainder": {
                    "description": "If `skip_remainder` is `true` then the\ntransaction will move to the \"confirm handover\"\nstep after the deposit has been accepted.\n",
                    "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\n\n`code` can be one of the following:\n\n  * `invalid_join_user_id`\n  * `unsupported_currency`\n  * `user_not_owned_by_client`\n  * `duplicate_user_id`: The user specified by\n  * `join_user_id` is the user making the request.\n  * `incorrect_charge`\n  * `incorrect_charge_seller`\n  * `second_party_already_joined`\n  * `duplicate_user_id`\n  * `incompatible_countries`\n  * `incompatible_users`\n  * `negative_price`\n  * `price_too_low`\n  * `invalid_charge_config`\n  * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Create a new face-to-face transaction with both users",
        "tags": [
          "F2F Transactions"
        ]
      }
    },
    "/api/v1/p2p/me/transactions/create_with_guest_user": {
      "post": {
        "description": "This endpoint is an optimised call that allows a transaction to\nbe created and joined in a single request. It requires the\nonline user to have granted the `p2p_tx:offline_create_join` scope\nto the client that is performing the request.\nThis endpoint allows creating a transaction with both buyer and seller\nas guest users, or one party to be guest user and the other full user.\n",
        "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\n(it can be full user id or guest user id).\n",
                    "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.\n",
                    "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\nfee based on the total price of the transaction. The percentage fee\nis calculated multiplying the `percentage fee` by the `fee_multiplier`.\n",
                    "format": "double",
                    "type": "number"
                  },
                  "deposit_payment_method": {
                    "description": "The payment method to use for the transaction.\n",
                    "type": "string"
                  },
                  "deposit_price": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "description": {
                    "description": "A description of the goods being sold.\n",
                    "type": "string"
                  },
                  "image_url": {
                    "description": "URL of the image displayed on the Trustap payment page to show the buyer\nthe item they are paying for.\nSupports jpg, png, gif, bmp, webp and svg files. Images displayed as a\nsquares. Non-square images are cropped.\n",
                    "format": "absolute_url",
                    "maxLength": 2047,
                    "type": "string"
                  },
                  "seller_id": {
                    "description": "The id of the seller for this transaction\n(it can be full user id or guest user id).\n",
                    "type": "string"
                  },
                  "skip_remainder": {
                    "description": "If `skip_remainder` is `true` then the\ntransaction will move to the \"confirm handover\"\nstep after the deposit has been accepted.\n",
                    "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\n\n`code` can be one of the following:\n  * `incompatible_platforms`\n  * `no_guest_user`\n  * `invalid_role`\n  * `incorrect_charge`\n  * `unsupported_currency`\n  * `fee_multiplier_too_low`\n  * `negative_price`\n  * `price_too_low`\n  * `invalid_charge_config`\n  * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.\n  * `invalid_image_url`\n  * `image_url_too_long`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Create a new face-to-face transaction with both users",
        "tags": [
          "F2F Transactions"
        ]
      }
    },
    "/api/v1/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.\n",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/p2p.Transaction"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request\n\n`code` can be one of the following:\n\n  * `invalid_id`\n  * `second_party_already_joined`\n  * `values_not_changed`\n",
            "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"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `funds_already_released`\n  * `deposit_not_paid`\n  * `deposit_already_refunded`\n  * `not_complained`\n"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Accept a complaint for this face-to-face transaction",
        "tags": [
          "F2F Complaint"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `deposit_not_paid`\n  * `deposit_payment_in_review`\n  * `deposit_already_accepted`\n  * `already_cancelled`\n  * `deposit_already_captured`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_seller`\n",
            "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"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `not_seller`\n  * `subject_is_not_guest_user`\n  * `deposit_not_paid`\n  * `deposit_already_accepted`\n",
            "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"
        ]
      }
    },
    "/api/v1/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\n`code` can be one of the following:\n  * `payment_method_not_bank_transfer`\n"
          }
        },
        "summary": "Get the bank transfer details for a face-to-face transaction which payment method is `bank_transfer`\n",
        "tags": [
          "F2F Payment"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/p2p/transactions/{transaction_id}/cancel_with_description": {
      "post": {
        "description": "If a transaction is cancelled after the deposit has been paid\nthen the deposit (excluding the Trustap fee) will be returned to\nthe buyer.\nOffline access is allowed for this endpoint when the user has\ngranted the `p2p_tx:offline_cancel` scope to the client\nthat is performing the request.\n",
        "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\n\n`code` can be one of the following:\n\n  * `second_party_not_joined`\n  * `already_cancelled`\n  * `remainder_already_paid`\n  * `handover_already_confirmed`\n",
            "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"
        ]
      }
    },
    "/api/v1/p2p/transactions/{transaction_id}/cancel_with_description_with_guest_user": {
      "post": {
        "description": "If a transaction is cancelled after the deposit has been paid\nthen the deposit (excluding the Trustap fee) will be returned to\nthe buyer.\n",
        "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\n\n`code` can be one of the following:\n\n  * `missing_description`\n  * `empty_description`\n  * `already_cancelled`\n  * `remainder_already_paid`\n  * `handover_already_confirmed`\n",
            "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"
        ]
      }
    },
    "/api/v1/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.\nThis endpoint is only accessible for a client.\n",
        "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\n\n`code` can be one of the following:\n\n  * `already_claimed`\n  * `cannot_claim_own_transaction`\n",
            "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"
        ]
      }
    },
    "/api/v1/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.\nThis endpoint is only accessible for a client.\n",
        "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\n\n`code` can be one of the following:\n\n  * `already_claimed`\n  * `cannot_claim_own_transaction`\n  * `invalid_user_platform`\n",
            "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"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `remainder_required`\n  * `already_complained`\n  * `funds_already_released`\n  * `complaint_period_expired`\n"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Submit a complaint for this face-to-face transaction",
        "tags": [
          "F2F Complaint"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `remainder_required`\n  * `already_complained`\n  * `funds_already_released`\n  * `complaint_period_expired`\n"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Submit a complaint for this face-to-face transaction with a guest buyer",
        "tags": [
          "F2F Complaint"
        ]
      }
    },
    "/api/v1/p2p/transactions/{transaction_id}/confirm_handover": {
      "post": {
        "description": "Both parties should confirm the handover for a face-to-face\ntransaction. The complaints period begins when the seller\nconfirms the handover.\nOffline access is allowed for this endpoint when the user has\ngranted the `p2p_tx:offline_confirm_handover` scope to the client\nthat is performing the request.\n",
        "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\n\n`code` can be one of the following:\n\n  * `remainder_required`\n  * `already_complained`\n  * `seller_handover_already_confirmed`\n  * `buyer_handover_already_confirmed`\n  * `remainder_payment_in_review`\n  * `already_cancelled`\n  * `handover_confirmation_not_supported`\n"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Confirm the handover for this face-to-face transaction",
        "tags": [
          "F2F Handover"
        ]
      }
    },
    "/api/v1/p2p/transactions/{transaction_id}/confirm_handover_with_guest_user": {
      "post": {
        "description": "Both parties should confirm the handover for a face-to-face\ntransaction. Full users don't have access to this endpoint.\n",
        "operationId": "p2p.confirmHandoverWithGuestUserForTransaction",
        "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\n\n`code` can be one of the following:\n\n  * `remainder_required`\n  * `already_complained`\n  * `seller_handover_already_confirmed`\n  * `buyer_handover_already_confirmed`\n  * `handover_confirmation_not_supported`\n"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Confirm the handover for this face-to-face transaction with a guest user",
        "tags": [
          "F2F Handover"
        ]
      }
    },
    "/api/v1/p2p/transactions/{transaction_id}/deposit_stripe_client_secret": {
      "get": {
        "description": "This endpoint is used for the asynchronous payment flow using\nStripe. The `client_secret` returned from this endpoint should\nbe passed to\n[stripe.confirmCardPayment](https://stripe.com/docs/stripe-js/reference#stripe-confirm-card-payment)\nto start the payment process.\n",
        "operationId": "p2p.getDepositStripeClientSecretForTransaction",
        "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\n\n`code` can be one of the following:\n\n  * `deposit_already_paid`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_buyer`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Get the Stripe client secret for this face-to-face transaction\n",
        "tags": [
          "F2F Payment"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `complaint_period_expired`\n  * `already_complained`\n  * `handover_not_confirmed`\n  * `funds_already_released`\n"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "End the complaint period for this face-to-face transaction with a guest buyer",
        "tags": [
          "F2F Complaint"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `cannot_join_own_transaction`\n  * `already_cancelled``\n",
            "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"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `too_many_metadata_fields`\n  * `value_too_long`\n  * `field_name_too_long`\n  * `empty_json`\n  * `json_type_not_allowed``\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Set metadata for a face-to-face transaction",
        "tags": [
          "F2F Transactions"
        ]
      }
    },
    "/api/v1/p2p/transactions/{transaction_id}/set_deposit_payment_method": {
      "post": {
        "description": "Set deposit payment method for face-to-face transaction. Values can be `card`,\n`bank_transfer`, `p24`, and `fpx`.\n",
        "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\n\n`code` can be one of the following:\n\n  * `invalid_payment_method`\n  * `deposit_already_paid`\n  * `payment_method_already_set`: The specified payment method and charge configuration are already set.\n  * `invalid_charge_config`: Charge configuration must be an integer greater than or equal to 1.\n  * `unsupported_currency`\n  * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.\n  * `currency_missing`\n  * `incorrect_charge`: Specified charge doesn't match expected charge.\n  * `incorrect_charge_seller`: Specified seller charge doesn't match expected seller charge.\n  * `incorrect_price`: Specified price doesn't match expected price.\n  * `incorrect_currency`: Specified currency doesn't match expected currency.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Set deposit payment method for this face-to-face transaction",
        "tags": [
          "F2F Payment"
        ]
      }
    },
    "/api/v1/p2p/transactions/{transaction_id}/stripe_publishable_key": {
      "get": {
        "description": "Returns the Publishable Key for the Stripe Platform\nwhich is hosting this transaction.\n",
        "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\n\n`code` can be one of the following:\n\n  * `invalid_id`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_buyer`\n  * `not_seller`\n",
            "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\n",
        "tags": [
          "F2F Buyer/Seller Details"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/p2p/transactions/{transactionId}/set_price": {
      "post": {
        "description": "`price` is the total price of the item, and thus includes the\nprice already paid for the deposit.\n\nNote that this endpoint will return a `remainder_too_low`\nresponse if the difference between the total price and the\ndeposit price is too low.\nOffline access is allowed for this endpoint when the user has\ngranted the `p2p_tx:offline_set_price` scope to the client\nthat is performing the request.\n",
        "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\n`/p2p/charge`.\n",
                    "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\n`currency`'s smallest unit.  The `charge` value\nshould correspond to the Trustap charge created\nwith this price, otherwise this request will\nfail with a `400` error.\n",
                    "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\n\n`code` can be one of the following:\n\n  * `currency_mismatch`: Pricing currency is different\n    to the transaction's currency.\n  * `remainder_already_skipped`\n  * `remainder_too_low`: The difference between the\n    total price of this transaction isn't larger than\n    the deposit price.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_seller`\n",
            "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"
        ]
      }
    },
    "/api/v1/p2p/transactions/{transactionId}/skip_remainder": {
      "post": {
        "description": "This will skip the remainder payment of this transaction, and\nthe total price of the transaction will not need to be set. Note\nthat this must be done before the total price of the transaction\nis set using `/set_price`.\n",
        "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\n\n`code` can be one of the following:\n\n  * `price_already_set`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_seller`\n",
            "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"
        ]
      }
    },
    "/api/v1/p2p/transactions_by_claim_secret/{secret}/claim_as_buyer": {
      "post": {
        "description": "This endpoint allows a full user to claim a transaction\nas buyer given a claim secret.\n",
        "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\n\n`code` can be one of the following:\n\n  * `already_claimed`\n  * `cannot_claim_own_transaction`\n  * `missing_secret`\n  * `invalid_user_platform`\n"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Claim F2F transaction as buyer given a claim secret",
        "tags": [
          "F2F Transactions"
        ]
      }
    },
    "/api/v1/p2p/transactions_by_claim_secret/{secret}/claim_as_seller": {
      "post": {
        "description": "This endpoint allows a full user to claim a transaction\nas seller given a claim secret.\n",
        "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\n\n`code` can be one of the following:\n\n  * `missing_secret`\n  * `already_claimed`\n  * `cannot_claim_own_transaction`\n  * `invalid_user_platform`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Claim a F2F transaction as the seller",
        "tags": [
          "F2F Transactions"
        ]
      }
    },
    "/api/v1/p2p/transactions_by_join_code/{join_code}": {
      "get": {
        "operationId": "p2p.getTransactionByJoinCode",
        "parameters": [
          {
            "in": "path",
            "name": "join_code",
            "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"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `cannot_join_own_transaction`\n  * `already_cancelled`\n  * `unsupported_currency`\n  * `invalid_payment_method`\n  * `invalid_user_id`\n  * `incompatible_users`\n",
            "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"
        ]
      }
    },
    "/api/v1/shippo_shipping_rates": {
      "post": {
        "description": "This returns the list of Shippo shipping rates available\nfor the addreses provided i.e sender's address and recipient's\naddress.\n",
        "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",
                  "sender_zip_code": "44685"
                },
                "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\n\n`code` can be one of the following:\n  * `missing_shipment_details`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": []
          },
          {
            "APIKey": []
          }
        ],
        "summary": "Get the list of Shippo shipping rates available",
        "tags": [
          "Online Shipping"
        ]
      }
    },
    "/api/v1/supported_carriers": {
      "get": {
        "description": "This returns the carriers that are currently supported for\nautomated tracking in the online model. The carrier `name`\nshould be shown to users but the `code` should be submitted to\nthe `/track` endpoint when submitting tracking details.\nLikewise, when showing a transaction to the user, the `carrier`\nfield stored with the transaction should be used to index these\ncarriers and show the human-readable name of the carrier to the\nuser, if this index is found.\n",
        "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"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `join_code_missing`\n",
            "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\nbuyer and seller of a transaction can access a transaction using\nits ID.\n",
        "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\n\n`code` can be one of the following:\n\n  * `join_code_missing`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Join an online transaction using a join code",
        "tags": [
          "Online Transactions"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `invalid_id`\n",
            "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\n`/charge`.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "charge_seller": {
                    "description": "The `charge_seller` value returned from a\nrequest to `/charge`.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "description": {
                    "description": "A description of the goods being sold.\n",
                    "type": "string"
                  },
                  "price": {
                    "description": "The price of the goods being sold, in the\n`currency`'s smallest unit.  The `charge` value\nshould correspond to the Trustap charge created\nwith this price, otherwise this request will\nfail with a `400` error.\n",
                    "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\n\n`code` can be one of the following:\n\n  * `invalid_id`\n  * `second_party_already_joined`\n  * `values_not_changed`\n",
            "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"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `funds_already_released`\n  * `not_paid`\n  * `not_complained`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_seller`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Accept complaint for this online transaction",
        "tags": [
          "Online Complaint"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/accept_payment": {
      "post": {
        "description": "This endpoint lets the seller accept payment and is accessible only if the seller\nhas granted a feature `require_seller_acceptance`.\nOffline access is allowed for this endpoint when the user has\ngranted the `basic_tx:offline_accept_payment` scope to the client\nthat is performing the request.\n",
        "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\n\n`code` can be one of the following:\n\n  * `missing_required_feature`\n  * `payment_already_accepted`\n  * `transaction_not_paid_yet`\n",
            "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"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/accept_payment_with_guest_seller": {
      "post": {
        "description": "This endpoint allows payment acceptance for the seller specified in the\nheader as `Trustap-User`.\n",
        "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\n\n`code` can be one of the following:\n\n  * `missing_required_feature`\n  * `payment_already_accepted`\n  * `missing_shippo_shipping_rate_id`\n  * `transaction_not_paid_yet`\n",
            "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"
        ]
      }
    },
    "/api/v1/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\n`code` can be one of the following:\n  * `payment_method_not_bank_transfer`\n"
          }
        },
        "summary": "Get bank transfer details for an online transaction which payment method is `bank_transfer`\n",
        "tags": [
          "Online Payment"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/cancel": {
      "post": {
        "description": "Transaction can be cancelled until it's paid or if the feature\n`RequireSellerAcceptance` is present, it can be cancelled\nuntil it's tracked.\nOffline access is allowed for this endpoint when the user has\ngranted the `basic_tx:offline_cancel` scope to the client\nthat is performing the request.\n",
        "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\n\n`code` can be one of the following:\n\n  * `invalid_id`\n  * `already_paid`\n  * `already_cancelled`\n  * `tracking_already_added`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Cancel this online transaction",
        "tags": [
          "Online Cancel"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/cancel_with_guest_user": {
      "post": {
        "description": "This endpoint cancels a transaction for the user specified in the header\nas `Trustap-User`.\nTransaction can be cancelled until it's paid or if the feature\n`RequireSellerAcceptance` is present, it can be cancelled until it's tracked.\n",
        "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\n\n`code` can be one of the following:\n\n  * `invalid_id`\n  * `already_paid`\n  * `already_cancelled`\n  * `tracking_already_added`\n",
            "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"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/charge": {
      "get": {
        "description": "This returns the Trustap fee, in the `currency`'s smallest unit,\nfor a transaction involving goods with the supplied `price`. See\n[the Stripe\ndocumentation](https://stripe.com/docs/currencies#zero-decimal)\nfor more details.\n",
        "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\nthe `currency`'s smallest unit. For example, if a trading\ncard is being sold for $12.34 (with `currency` as `usd`),\nthen the request for the charge for this transaction would\nbe `/charge?price=1234&currency=usd`.\n",
            "in": "query",
            "name": "price",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "Deprecated.\n",
            "in": "query",
            "name": "quantity",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "The payment method that will be used to pay for the\ntransaction. This is necessary because different payment\nmethods may result in different fees.\n\nThe default value is `card`.\n",
            "in": "query",
            "name": "payment_method",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The charge config for which the charge amount is computed.\n",
            "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\n\n`code` can be one of the following:\n\n  * `invalid_payment_method`\n  * `unsupported_currency`\n  * `currency_missing`\n  * `invalid_price`\n  * `negative_price`\n  * `price_too_low`\n  * `invalid_charge_config`\n  * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": []
          },
          {
            "APIKey": []
          }
        ],
        "summary": "Get the Trustap fee for an online transaction",
        "tags": [
          "Online Payment"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/claim_for_buyer": {
      "post": {
        "description": "This endpoint enables a client to claim an online transaction on behalf of a buyer.\nThis endpoint is only accessible for a client.\n",
        "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\n\n`code` can be one of the following:\n\n  * `already_claimed`\n  * `cannot_claim_own_transaction`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Claim online transaction on behalf of the buyer",
        "tags": [
          "Online Transactions"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/claim_for_seller": {
      "post": {
        "description": "This endpoint enables a client to claim an online transaction on behalf of a seller.\nThis endpoint is only accessible for a client.\n",
        "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\n\n`code` can be one of the following:\n\n  * `already_claimed`\n  * `cannot_claim_own_transaction`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Claim online transactions on behalf of the seller",
        "tags": [
          "Online Transactions"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `empty_complaint_description`\n  * `already_complained`\n  * `unconfirmed_delivery`: The complaint period for\n    this transaction has not yet started.\n  * `complaint_period_ended_prematurely`: The buyer has\n    already ended the complaint period.\n  * `complaint_period_expired`\n  * `funds_already_released`\n  * `invalid_id`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_buyer`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Submit a detailed complaint for this online transaction",
        "tags": [
          "Online Complaint"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `empty_complaint_description`\n  * `already_complained`\n  * `unconfirmed_delivery`: The complaint period for\n    this transaction has not yet started.\n  * `complaint_period_ended_prematurely`: The buyer has\n    already ended the complaint period.\n  * `complaint_period_expired`\n  * `funds_already_released`\n  * `invalid_id`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_buyer`\n",
            "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"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/confirm_delivery": {
      "post": {
        "description": "This endpoint allows the buyer to manually confirm the delivery of the\nitem in the case that the state of the transaction was not updated\nasynchronously by Trustap.\n",
        "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\n\n`code` can be one of the following:\n\n  * `tracking_not_added`\n  * `delivery_already_set`\n  * `invalid_id`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_buyer`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Confirm delivery for this online transaction",
        "tags": [
          "Online Shipping"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/confirm_delivery_with_guest_buyer": {
      "post": {
        "description": "This endpoint allows the client to manually confirm the delivery\non behalf of the guest buyer specified in the header as `Trustap-User`.\n",
        "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\n\n`code` can be one of the following:\n\n  * `tracking_not_added`\n  * `delivery_already_set`\n  * `invalid_id`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_buyer`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Confirm delivery for this online transaction",
        "tags": [
          "Online Shipping"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `complaint_period_expired`\n  * `already_complained`\n  * `complaint_period_ended_prematurely`\n  * `invalid_id`\n  * `unconfirmed_delivery`: The complaint period for\n    this transaction has not yet started.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_buyer`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "End the complaint period for this online transaction",
        "tags": [
          "Online Complaint"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/extend_tracking_deadline": {
      "post": {
        "description": "This endpoint allows the buyer to extend the tracking details\nsubmission deadline for the seller.\n",
        "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\n\n`code` can be one of the following:\n\n  * `invalid_id`\n  * `tracking_already_added`\n  * `payment_details_not_added`\n  * `tracking_submission_window_not_started`\n"
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_buyer`\n",
            "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"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/generate_shipment_label": {
      "post": {
        "description": "This endpoint returns a PDF containing the label for the\ntransaction's parcel. Both sender and recipient details\nhave to be submitted before making a call to this endpoint.\n",
        "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\n\n`code` can be one of the following:\n\n  * `pick_up_details_missing`\n  * `drop_off_details_missing`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_seller`\n",
            "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"
        ]
      }
    },
    "/api/v1/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"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/set_payment_method": {
      "post": {
        "description": "Different payment methods incur different rates, so the payment\nmethod to be used for a transaction must be set before the\npayment is made. This requires retrieving the charge associated\nwith the payment method using\n`GET /transactions/{transaction_id}/charge`, and passing the\ngenerated charge as a parameter to this endpoint.\n",
        "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\n`/charge`.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "charge_config": {
                    "description": "The charge config for which the charge amount is computed.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "charge_seller": {
                    "description": "The `charge_seller` value returned from a request to\n`/charge`.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "payment_method": {
                    "type": "string"
                  },
                  "price": {
                    "description": "The price of the goods being sold, in the\n`currency`'s smallest unit.  The `charge` value\nshould correspond to the Trustap charge created\nwith this price, otherwise this request will\nfail with a `400` error.\n",
                    "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\n\n`code` can be one of the following:\n\n  * `invalid_payment_method`\n  * `unsupported_currency`\n  * `currency_missing`\n  * `incorrect_charge`\n  * `incorrect_charge_seller`\n  * `incorrect_price`\n  * `incorrect_currency`\n  * `invalid_charge_config`\n  * `unsupported_combination`: The provided payment method, charge config and currency combination isn't supported.\n  * `payment_method_already_set`: The specified payment method and charge configuration are already set.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_buyer`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Set the payment method to be used for this online transaction\n",
        "tags": [
          "Online Payment"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `empty_name`\n  * `empty_country`\n"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Post the shipping details of the buyer from this online transaction",
        "tags": [
          "Online Shipping"
        ]
      }
    },
    "/api/v1/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",
                  "is_sender_address": true,
                  "phone": "4215559099",
                  "state": "Victoria",
                  "street_1": "21-27 Marshall Court",
                  "zip_code": "10000"
                },
                "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\n`code` can be one of the following:\n  * `missing_tx_feature`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Set the sender's or recipient's address for Shippo shipment",
        "tags": [
          "Online Shipping"
        ]
      }
    },
    "/api/v1/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\n`code` can be one of the following:\n  * `missing_tx_feature`\n  * `customs_declaration_already_submitted`\n  * `nothing_to_declare`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Send a customs declaration for this online transaction's shipment",
        "tags": [
          "Online Shipping"
        ]
      }
    },
    "/api/v1/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,
                  "length": 10,
                  "mass_unit": "lb",
                  "shipment_date": "2019-12-25T09:00:00Z",
                  "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.MassUnit"
                  },
                  "shipment_date": {
                    "description": "Date the shipment will be tendered to the carrier.\nMust be in the format 2014-01-18T00:35:03.463Z\n",
                    "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\n`code` can be one of the following:\n  * `missing_tx_feature`\n  * `wrong_shipment_date_format`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Set Shippo parcel details for this online transaction",
        "tags": [
          "Online Shipping"
        ]
      }
    },
    "/api/v1/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\n`code` can be one of the following:\n  * `transaction_not_tracked`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Get Shippo generated label details for this online transaction",
        "tags": [
          "Online Shipping"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/shippo_shipping_rate": {
      "post": {
        "description": "Set Shippo shipping rate for the transaction.\nThis rate will be used to purchase the Shippo label once the\ntransaction is paid. Shipment ID can be provided as an optional parameter,\ndepending on the flow which is used to obtain it.\n",
        "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\n`code` can be one of the following:\n  * `missing_tx_feature`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Set Shippo shipping rate for this online transaction",
        "tags": [
          "Online Shipping"
        ]
      }
    },
    "/api/v1/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\n`code` can be one of the following:\n  * `missing_tx_feature`\n  * `missing_shipment_details`\n  * `customs_declaration_required`\n",
            "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"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/stripe_client_secret": {
      "get": {
        "description": "This endpoint is used for the asynchronous payment flow using\nStripe. The `client_secret` returned from this endpoint should\nbe passed to\n[stripe.confirmCardPayment](https://stripe.com/docs/stripe-js/reference#stripe-confirm-card-payment)\nto start the payment process.\n",
        "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\n\n`code` can be one of the following:\n\n  * `already_paid`\n  * `invalid_id`\n  * `not_accepted`: This transaction was created from a\n    listing but the listing's creator has not yet\n    accepted this transaction.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_buyer`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Get the Stripe client secret for this online transaction\n",
        "tags": [
          "Online Buyer/Seller Details"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/stripe_publishable_key": {
      "get": {
        "description": "Returns the Publishable Key for the Stripe Platform\nwhich is hosting this transaction.\n",
        "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\n\n`code` can be one of the following:\n\n  * `invalid_id`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_buyer`\n  * `not_seller`\n",
            "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\n",
        "tags": [
          "Online Buyer/Seller Details"
        ]
      }
    },
    "/api/v1/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\n\n`code` can be one of the following:\n\n  * `delivery_already_set`\n  * `tracking_not_added`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_buyer`\n",
            "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"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/track": {
      "post": {
        "description": "After the tracking information has been submitted then the state\nof the transaction will be updated asynchronously by Trustap\nonce the delivery of the item has been confirmed, at which point\nthe `delivered` field of the transaction will be set.\nOffline access is allowed for this endpoint when the user has\ngranted the `basic_tx:offline_track` scope to the client\nthat is performing the request.\n",
        "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\n\n`code` can be one of the following:\n\n  * `invalid_id`\n  * `empty_carrier`\n  * `empty_tracking_code`\n  * `tracking_already_added`\n  * `payment_details_not_added`\n  * `tracking_details_deadline_expired`\n  * `already_cancelled`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_seller`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Set postal tracking details for this online transaction",
        "tags": [
          "Online Shipping"
        ]
      }
    },
    "/api/v1/transactions/{transaction_id}/track_with_guest_seller": {
      "post": {
        "description": "Add tracking details for the guest seller specified\nin the header as `Trustap-User`.\n",
        "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\n\n`code` can be one of the following:\n\n  * `invalid_id`\n  * `empty_carrier`\n  * `empty_tracking_code`\n  * `tracking_already_added`\n  * `payment_details_not_added`\n  * `tracking_details_deadline_expired`\n  * `already_cancelled`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\n`code` can be one of the following:\n\n  * `not_seller`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Set postal tracking details for this online transaction",
        "tags": [
          "Online Shipping"
        ]
      }
    },
    "/api/v1/transactions_by_claim_secret/{secret}/claim_as_buyer": {
      "post": {
        "description": "This endpoint allows a full user to claim for a transaction\nas buyer given a claim secret.\n",
        "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\n\n`code` can be one of the following:\n\n  * `already_claimed`\n  * `cannot_claim_own_transaction`\n  * `missing_secret`\n"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Claim for an online transaction as buyer given a claim secret",
        "tags": [
          "Online Transactions"
        ]
      }
    },
    "/api/v1/transactions_by_claim_secret/{secret}/claim_as_seller": {
      "post": {
        "description": "This endpoint allows a full user to claim a transaction\nas seller given a claim secret.\n",
        "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\n\n`code` can be one of the following:\n\n  * `missing_secret`\n  * `already_claimed`\n  * `cannot_claim_own_transaction`\n  * `invalid_user_platform`\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Claim an Online transaction as the seller",
        "tags": [
          "Online Transactions"
        ]
      }
    },
    "/v2/admin/transactions/{transaction_id}/release_funds": {
      "post": {
        "operationId": "v2_transactions_admin.releaseFundsForTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "transaction_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v2_transactions_admin.Transaction"
                }
              }
            }
          }
        },
        "summary": "Release funds to the seller for a transaction",
        "tags": [
          "Transactions"
        ],
        "x-toc-endpoint": {
          "context": "p2p",
          "meta": {
            "log_req_body": true,
            "log_resp_body": true
          }
        }
      }
    },
    "/v2/fees": {
      "get": {
        "description": "This returns the Trustap fee, in the `currency`'s smallest unit,\nfor a transaction involving goods with the supplied `amount`. See\n[the Stripe\ndocumentation](https://stripe.com/docs/currencies#zero-decimal)\nfor more details.\n",
        "operationId": "v2_transactions.getFees",
        "parameters": [
          {
            "description": "The currency that the `amount` is specified in.\n",
            "in": "query",
            "name": "currency",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The price of the goods being sold in this transaction, in\nthe `currency`'s smallest unit. For example, if a trading\ncard is being sold for $12.34 (with `currency` as `usd`),\nthen the request for the fees for this transaction would\nbe `/v2/fees?amount=1234&currency=usd`.\n",
            "in": "query",
            "name": "amount",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "description": "The payment method that will be used to pay for the\ntransaction. This is necessary because different payment\nmethods may result in different fees.\n\nThe default value is `card`.\n",
            "in": "query",
            "name": "payment_method",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The fee config for which the fees are computed.\n",
            "in": "query",
            "name": "fees_config",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v2_transactions.Fees"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "example": {
                    "code": "negative_amount",
                    "message": "`amount` cannot be negative"
                  },
                  "properties": {
                    "code": {
                      "description": "* `unsupported_combination`: The provided payment method,\nfee config and currency combination isn't supported.\n",
                      "enum": [
                        "currency_missing",
                        "invalid_amount",
                        "negative_amount",
                        "amount_too_low",
                        "unsupported_currency",
                        "invalid_fee_config",
                        "unsupported_combination"
                      ],
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": []
          },
          {
            "APIKey": []
          }
        ],
        "summary": "Get the Trustap fee for a transaction",
        "tags": [
          "Payment"
        ],
        "x-toc-endpoint": {
          "context": "p2p_optional_user",
          "meta": {
            "log_req_body": true,
            "log_resp_body": true,
            "require_active_country": false
          }
        }
      }
    },
    "/v2/transactions": {
      "post": {
        "description": "Offline access is allowed for this endpoint.\n",
        "operationId": "v2_transactions.createTransaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "amount": {
                    "description": "The price of the goods being sold in this transaction, in\nthe `currency`'s smallest unit. For example, if a trading\ncard is being sold for $12.34 (with `currency` as `usd`),\nthen the body would contain `{\"amount\": 1234, \"currency\": \"usd\"}`.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "buyer_id": {
                    "description": "The ID of the user that will be the buyer in this transaction.\n",
                    "type": "string"
                  },
                  "currency": {
                    "description": "The currency that the `amount` is specified in.\n",
                    "type": "string",
                    "x-toc-ref": "#/definitions/Currency"
                  },
                  "description": {
                    "description": "A description of the goods being sold.",
                    "type": "string"
                  },
                  "fees_buyer": {
                    "description": "The buyer fees for this transaction, in the `currency`'s smallest\nunit.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "fees_config": {
                    "description": "The fee config for which the fees are computed.",
                    "format": "int64",
                    "type": "integer"
                  },
                  "fees_seller": {
                    "description": "The seller fees for this transaction, in the `currency`'s smallest\nunit.\n",
                    "format": "int64",
                    "type": "integer"
                  },
                  "image_url": {
                    "description": "URL of the image displayed on the Trustap payment page to show the buyer\nthe item they are paying for.\nSupports jpg, png, gif, bmp, webp and svg files. Images displayed as a\nsquares. Non-square images are cropped.\n",
                    "format": "absolute_url",
                    "maxLength": 2047,
                    "type": "string"
                  },
                  "payment_method": {
                    "description": "The payment method that will be used to pay for the\ntransaction. This is necessary because different payment\nmethods may result in different fees.\n\nThe default value is `card`.\n",
                    "type": "string"
                  },
                  "role": {
                    "description": "The role of the user creating the transaction.\n",
                    "type": "string",
                    "x-toc-ref": "#/definitions/Role"
                  },
                  "seller_id": {
                    "description": "The ID of the user that will be the seller in this transaction.\n",
                    "type": "string"
                  }
                },
                "required": [
                  "currency",
                  "amount",
                  "fees_buyer",
                  "description"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v2_transactions.Transaction"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "example": {
                    "code": "negative_amount",
                    "message": "`price` cannot be negative"
                  },
                  "properties": {
                    "code": {
                      "enum": [
                        "invalid_currency",
                        "missing_user_id",
                        "invalid_user_id",
                        "missing_seller_id",
                        "missing_buyer_id",
                        "invalid_seller_id",
                        "invalid_buyer_id",
                        "incorrect_charge",
                        "negative_amount",
                        "amount_too_low",
                        "invalid_charge_config",
                        "missing_role",
                        "invalid_role"
                      ],
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            }
          }
        },
        "summary": "Create a new transaction",
        "tags": [
          "Transactions"
        ],
        "x-toc-endpoint": {
          "context": "v2_create_transaction",
          "meta": {
            "log_req_body": true,
            "log_resp_body": true
          }
        }
      }
    },
    "/v2/transactions/{transaction_id}": {
      "get": {
        "operationId": "v2_transactions.getTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "transaction_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v2_transactions.Transaction"
                }
              }
            }
          }
        },
        "summary": "Get a face-to-face transaction by its ID",
        "tags": [
          "Transactions"
        ],
        "x-toc-endpoint": {
          "context": "p2p_open",
          "meta": {
            "log_req_body": true,
            "log_resp_body": true,
            "require_active_country": false
          }
        }
      }
    },
    "/v2/transactions/{transaction_id}/accept_payment": {
      "post": {
        "operationId": "v2_transactions.acceptPaymentForTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "transaction_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v2_transactions.Transaction"
                }
              }
            }
          }
        },
        "summary": "Accept the payment for a transaction",
        "tags": [
          "Transactions"
        ],
        "x-toc-endpoint": {
          "context": "p2p",
          "meta": {
            "log_req_body": true,
            "log_resp_body": true,
            "require_active_country": true
          }
        }
      }
    },
    "/v2/transactions/{transaction_id}/confirm_handover": {
      "post": {
        "operationId": "v2_transactions.confirmHandoverForTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "transaction_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v2_transactions.Transaction"
                }
              }
            }
          }
        },
        "summary": "Accept the payment for a transaction",
        "tags": [
          "Transactions"
        ],
        "x-toc-endpoint": {
          "context": "p2p",
          "meta": {
            "log_req_body": true,
            "log_resp_body": true,
            "require_active_country": true
          }
        }
      }
    },
    "/v2/transactions/{transaction_id}/payment_details/stripe": {
      "get": {
        "operationId": "v2_transactions.getPaymentDetailsStripeForTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "transaction_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v2_transactions.PaymentDetailsStripe"
                }
              }
            }
          }
        },
        "summary": "Get the Stripe payment details for this transaction",
        "tags": [
          "Transactions"
        ],
        "x-toc-endpoint": {
          "context": "p2p_open",
          "meta": {
            "log_req_body": true,
            "log_resp_body": true,
            "require_active_country": false
          }
        }
      }
    },
    "/v2/transactions_by_join_code/{join_code}": {
      "get": {
        "operationId": "v2_transactions.getTransactionByJoinCode",
        "parameters": [
          {
            "in": "path",
            "name": "join_code",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v2_transactions.Transaction"
                }
              }
            }
          }
        },
        "summary": "Get a transaction by its join code",
        "tags": [
          "Transactions"
        ],
        "x-toc-endpoint": {
          "context": "p2p_open",
          "meta": {
            "log_req_body": true,
            "log_resp_body": true,
            "require_active_country": false
          }
        }
      }
    },
    "/v2/transactions_by_join_code/{join_code}/join": {
      "post": {
        "operationId": "v2_transactions.joinTransactionByJoinCode",
        "parameters": [
          {
            "in": "path",
            "name": "join_code",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v2_transactions.Transaction"
                }
              }
            }
          }
        },
        "summary": "Join a transaction by its join code",
        "tags": [
          "Transactions"
        ],
        "x-toc-endpoint": {
          "context": "p2p",
          "meta": {
            "log_req_body": true,
            "log_resp_body": true,
            "require_active_country": true
          }
        }
      }
    }
  },
  "security": [
    {
      "OAuth2": []
    }
  ],
  "tags": [
    {
      "description": "Online transactions are used when the goods are delivered using registered\nmail.\n",
      "name": "Online Transactions"
    },
    {
      "description": "Clients represent partner applications.\n",
      "name": "Clients"
    },
    {
      "description": "Users represent users of the platform.\n",
      "name": "Buyers and Sellers"
    },
    {
      "description": "Personal endpoints are used for managing personal details for users, for\n\"Know Your Customer\" requirements.\n",
      "name": "Personal"
    },
    {
      "description": "Notifications log updates for users.\n",
      "name": "Notifications"
    },
    {
      "description": "F2F2 transactions are used when the goods are delivered in person.\n",
      "name": "F2F Transactions"
    },
    {
      "description": "Payment endpoints for face-to-face transactions.\n",
      "name": "F2F Payment"
    },
    {
      "description": "Handover endpoints for face-to-face transactions.\n",
      "name": "F2F Handover"
    },
    {
      "description": "Complaint endpoints for face-to-face transactions.\n",
      "name": "F2F Complaint"
    },
    {
      "description": "Cancel endpoints for face-to-face transactions.\n",
      "name": "F2F Cancel"
    },
    {
      "description": "User details endpoints for face-to-face transactions.\n",
      "name": "F2F Buyer/Seller Details"
    },
    {
      "description": "Subscriptions are used for recurring payments.\n",
      "name": "Subscriptions"
    },
    {
      "description": "These endpoints are no longer supported. We do not recommend using these\nendpoints.\n",
      "name": "F2F Multi-use Listings"
    },
    {
      "description": "These endpoints are no longer supported. We do not recommend using these\nendpoints.\n",
      "name": "F2F Single-use Listings"
    },
    {
      "description": "Endpoints for Trustap lite\n",
      "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",
        "F2F Shipping"
      ]
    },
    {
      "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"
    }
  ],
  "components": {
    "requestBodies": {
      "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\nwhile the user is offline.\n",
              "basic_ls:offline_create": "This client may create Online listings for the user while the\nuser is offline.\n",
              "basic_tx:offline_accept_payment": "This client may accept payments for Online transactions on the\nuser's behalf while the user is offline.\n",
              "basic_tx:offline_cancel": "This client may cancel Online transactions on the user's behalf\nwhile the user is offline.\n",
              "basic_tx:offline_claim": "This client may claim Online transactions on the user's behalf\nwhile the user is offline.\n",
              "basic_tx:offline_complain": "This client may submit complaints for Online transactions on the\nuser's behalf while the user is offline.\n",
              "basic_tx:offline_create_join": "This client may create and join Online transactions on the\nuser's behalf while the user is offline.\n",
              "basic_tx:offline_track": "This client may submit tracking information for Online\ntransactions on the user's behalf while the user is offline.\n",
              "openid": "This client is making an OpenID Connect request.\n",
              "p2p_ls:offline_create": "This client may create F2F listings for the user while the user\nis offline.\n",
              "p2p_ls:offline_update": "This client may update F2F listings on the user's behalf while\nthe user is offline.\n",
              "p2p_tx:offline_accept_deposit": "This client may accept deposits for F2F transactions on the\nuser's behalf while the user is offline.\n",
              "p2p_tx:offline_cancel": "This client may cancel F2F transactions on the user's behalf\nwhile the user is offline.\n",
              "p2p_tx:offline_claim": "This client may claim F2F transactions on the user's behalf\nwhile the user is offline.\n",
              "p2p_tx:offline_complain": "This client may submit complaints for F2F transactions on the\nuser's behalf while the user is offline.\n",
              "p2p_tx:offline_confirm_handover": "This client may confirm handovers for F2F transactions on the\nuser's behalf while the user is offline.\n",
              "p2p_tx:offline_create_join": "This client may create and join F2F transactions on the user's\nbehalf while the user is offline.\n",
              "p2p_tx:offline_set_price": "This client may set the price for F2F transactions on the user's\nbehalf while the user is offline.\n",
              "profile": "This client may access the user's default profile claims: `name`,\n`family_name`, `given_name`, `middle_name`, `nickname`,\n`preferred_username`, `profile`, `picture`, `website`, `gender`,\n`birthdate`, `zoneinfo`, `locale`, and `updated_at`.\n"
            }
          }
        }
      }
    },
    "schemas": {
      "Carrier": {
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "name"
        ],
        "type": "object"
      },
      "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:\n`due`, `not_due`, `verifying`, `verified`\n",
            "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\nhandling errors the `code` field should be used to determine\nthe type of error that occurred, as the text in the `error`\nfield may change unexpectedly.\n",
            "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"
      },
      "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:\n- `complete`: The user has completed their profile and payment information,\nand can accept payouts.\n- `verifying`: The user has submitted profile and payment information, which\nis currently being verified.\n- `due`: The user has not adequately filled out their payment information,\nor may need to update or ammend the provided information before they can\naccept payouts.\n",
            "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.Charge": {
        "example": {
          "charge": 340,
          "charge_buyer_client": 0,
          "charge_calculator_version": 5,
          "charge_config": 1,
          "charge_postage_buyer": 1000,
          "charge_seller": 0,
          "charge_seller_client": 0,
          "currency": "eur",
          "payment_method": "card",
          "price": 10000
        },
        "properties": {
          "charge": {
            "description": "The Trustap fee that the buyer will pay, in the `currency`'s\nsmallest unit, for a queried amount. See [the Stripe\ndocumentation](https://stripe.com/docs/currencies#zero-decimal)\nfor more details.\n",
            "format": "int64",
            "type": "integer"
          },
          "charge_buyer_client": {
            "description": "The portion of the buyer's fee that is attributed to the client,\nin the `currency`'s smallest unit.\n",
            "format": "int64",
            "type": "integer"
          },
          "charge_calculator_version": {
            "description": "The version of the Trustap charge calculator that was used\nto calculate this charge.\n\nThis property is present for error-handling purposes. The\nTrustap API allows apps and users to query how much Trustap\nwill charge for a transaction before creating a transaction.\nTrustap then requires the queried charge to be provided when\ncreating a transaction or listing. At this point the charge\nis calculated again and checked against the provided charge,\nto ensure that the charge calculated for the new resource is\nthe same as the one shown to the user. In the unlikely event\nthat the Trustap charge calculator used to calculate the\ncharge has been updated, then the\n`charge_calculator_version` property will be used to return\nan `incorrect_calc_version` to the API client, which will\nindicate that the `/charge` endpoint should be queried again\nto get the newest charge value.\n",
            "format": "int64",
            "type": "integer"
          },
          "charge_config": {
            "default": 1,
            "description": "The config for which the charge amount is computed.\n",
            "format": "int64",
            "type": "integer"
          },
          "charge_postage_buyer": {
            "description": "When the transaction handles the generation of postage\nlabels, then `charge_postage_buyer` will be added to cover this\nfee together with `charge_postage_client`\n",
            "format": "int64",
            "type": "integer"
          },
          "charge_postage_client": {
            "format": "int64",
            "type": "integer"
          },
          "charge_seller": {
            "description": "The Trustap fee that the seller will pay, in the\n`currency`'s smallest unit, for a queried amount. See [the\nStripe\ndocumentation](https://stripe.com/docs/currencies#zero-decimal)\nfor more details.\n",
            "format": "int64",
            "type": "integer"
          },
          "charge_seller_client": {
            "description": "The portion of the seller's fee that is attributed to the client,\nin the `currency`'s smallest unit.\n",
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "payment_method": {
            "type": "string"
          },
          "price": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "currency",
          "charge",
          "charge_seller",
          "charge_buyer_client",
          "charge_seller_client",
          "charge_calculator_version",
          "price"
        ],
        "type": "object"
      },
      "basic.ClientTimelines": {
        "properties": {
          "complaint_period_seconds": {
            "format": "int64",
            "type": "integer"
          },
          "delivery_allowance_seconds": {
            "format": "int64",
            "type": "integer"
          },
          "tracking_details_allowance_seconds": {
            "format": "int64",
            "type": "integer"
          }
        },
        "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.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.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_buyer_client": 0,
          "charge_seller": 0,
          "charge_seller_client": 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_buyer_client": {
            "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"
          },
          "charge_seller_client": {
            "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\nbuyer must pay using the transaction's currency and the\nseller will be paid in the transaction's currency.\n",
            "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\nthe item they are paying for.\nSupports jpg, png, gif, bmp and svg files. Images displayed as a squares.\nNon-square images are cropped\n",
            "format": "absolute_url",
            "type": "string"
          },
          "is_payment_in_progress": {
            "description": "If the transaction is paid via a delayed payment method,\nsuch as SEPA debit, this field will be `true` until the\npayment has fully succeeded or failed.\n",
            "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\nthe ID of that listing; otherwise this property is omitted.\n",
            "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",
          "charge_buyer_client",
          "charge_seller_client",
          "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_buyer_client": 0,
          "charge_calculator_version": 5,
          "charge_config": 1,
          "charge_seller": 0,
          "charge_seller_client": 0,
          "currency": "eur",
          "payment_method": "card",
          "price": 1234
        },
        "properties": {
          "charge": {
            "description": "The Trustap fee that the buyer will pay, in the `currency`'s\nsmallest unit, for a queried amount. See [the Stripe\ndocumentation](https://stripe.com/docs/currencies#zero-decimal)\nfor more details.\n",
            "format": "int64",
            "type": "integer"
          },
          "charge_buyer_client": {
            "description": "The portion of the buyer's fee that is attributed to the client,\nin the `currency`'s smallest unit.\n",
            "format": "int64",
            "type": "integer"
          },
          "charge_calculator_version": {
            "description": "The version of the Trustap charge calculator that was used\nto calculate this charge.\n\nThis property is present for error-handling purposes. The\nTrustap API allows apps and users to query how much Trustap\nwill charge for a transaction before creating a transaction.\nTrustap then requires the queried charge to be provided when\ncreating a transaction or listing. At this point the charge\nis calculated again and checked against the provided charge,\nto ensure that the charge calculated for the new resource is\nthe same as the one shown to the user. In the unlikely event\nthat the Trustap charge calculator used to calculate the\ncharge has been updated, then the\n`charge_calculator_version` property will be used to return\nan `incorrect_calc_version` to the API client, which will\nindicate that the `/charge` endpoint should be queried again\nto get the newest charge value.\n",
            "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\n`currency`'s smallest unit, for a queried amount. See [the\nStripe\ndocumentation](https://stripe.com/docs/currencies#zero-decimal)\nfor more details.\n",
            "format": "int64",
            "type": "integer"
          },
          "charge_seller_client": {
            "description": "The portion of the seller's fee that is attributed to the client,\nin the `currency`'s smallest unit.\n",
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "payment_method": {
            "type": "string"
          },
          "price": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "currency",
          "charge",
          "charge_seller",
          "charge_buyer_client",
          "charge_seller_client",
          "charge_calculator_version",
          "price"
        ],
        "type": "object"
      },
      "p2p.ClientTimelines": {
        "properties": {
          "complaint_period_seconds": {
            "format": "int64",
            "type": "integer"
          }
        },
        "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,
          "charge_buyer_client": 0,
          "charge_seller": 0,
          "charge_seller_client": 0,
          "price": 1234
        },
        "properties": {
          "charge": {
            "format": "int64",
            "type": "integer"
          },
          "charge_buyer_client": {
            "format": "int64",
            "type": "integer"
          },
          "charge_international_payment": {
            "format": "int64",
            "type": "integer"
          },
          "charge_seller": {
            "format": "int64",
            "type": "integer"
          },
          "charge_seller_client": {
            "format": "int64",
            "type": "integer"
          },
          "deposit_fee_multiplier": {
            "$ref": "#/components/schemas/p2p.DepositFeeMultiplier"
          },
          "price": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "price",
          "charge",
          "charge_seller",
          "charge_buyer_client",
          "charge_seller_client"
        ],
        "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.Swift": {
        "properties": {
          "account_number": {
            "type": "string"
          },
          "bank_name": {
            "type": "string"
          },
          "swift_code": {
            "type": "string"
          }
        },
        "required": [
          "account_number",
          "bank_name",
          "swift_code"
        ],
        "type": "object"
      },
      "p2p.Tracking": {
        "example": {
          "carrier": "ups",
          "tracking_code": "***"
        },
        "properties": {
          "carrier": {
            "type": "string"
          },
          "tracking_code": {
            "type": "string"
          }
        },
        "required": [
          "carrier",
          "tracking_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,
            "charge_buyer_client": 0,
            "charge_seller": 0,
            "charge_seller_client": 0,
            "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,
            "charge_buyer_client": 0,
            "charge_seller": 0,
            "charge_seller_client": 0,
            "price": 5000
          },
          "quantity": 1,
          "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_accrual_net": {
            "format": "int64",
            "type": "integer"
          },
          "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\nbuyer must pay using the transaction's currency and the\nseller will be paid in the transaction's currency.\n",
            "type": "string"
          },
          "delivered": {
            "format": "date-time",
            "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\nthe item they are paying for.\nSupports jpg, png, gif, bmp and svg files. Images displayed as a squares.\nNon-square images are cropped\n",
            "format": "absolute_url",
            "type": "string"
          },
          "is_deposit_payment_in_progress": {
            "description": "If the deposit is paid via a delayed payment method,\nsuch as SEPA debit, this field will be `true` until the\npayment has fully succeeded or failed.\n",
            "type": "boolean"
          },
          "is_remainder_payment_in_progress": {
            "description": "If the remainder is paid via a delayed payment method,\nsuch as SEPA debit, this field will be `true` until the\npayment has fully succeeded or failed.\n",
            "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\nthe ID of that listing; otherwise this property is omitted.\n",
            "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\nmove to the \"confirm handover\" step after the deposit has\nbeen accepted.\n",
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "tracked": {
            "format": "date-time",
            "type": "string"
          },
          "tracking": {
            "$ref": "#/components/schemas/p2p.Tracking"
          }
        },
        "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.\n",
        "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.\n",
            "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": {
          "created_at": "2019-12-25T13:00:00Z",
          "email": "jo@example.com",
          "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.PayoutItem": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "arriving": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "initiated": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "status",
          "initiated",
          "arriving"
        ],
        "type": "object"
      },
      "users.Payouts": {
        "properties": {
          "payouts": {
            "items": {
              "$ref": "#/components/schemas/users.PayoutItem"
            },
            "type": "array"
          }
        },
        "required": [
          "payouts"
        ],
        "type": "object"
      },
      "users.TosAcceptance": {
        "properties": {
          "ip": {
            "minLength": 1,
            "type": "string"
          },
          "unix_timestamp": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "unix_timestamp",
          "ip"
        ],
        "type": "object"
      },
      "v2_transactions.Events": {
        "properties": {
          "by_key": {
            "description": "These fields indicate the time that the first instance of the given\nevent occurred. Where events can repeat (such as `refunded`),\nduplicate instances can be retrieved from the `by_time` sibling\nproperty.\n",
            "properties": {
              "buyer_handover_confirmed": {
                "format": "date-time",
                "type": "string"
              },
              "cancelled": {
                "format": "date-time",
                "type": "string"
              },
              "claimed_by_buyer": {
                "format": "date-time",
                "type": "string"
              },
              "claimed_by_seller": {
                "format": "date-time",
                "type": "string"
              },
              "complained": {
                "format": "date-time",
                "type": "string"
              },
              "complaint_period_ended": {
                "format": "date-time",
                "type": "string"
              },
              "created": {
                "format": "date-time",
                "type": "string"
              },
              "funds_released": {
                "format": "date-time",
                "type": "string"
              },
              "joined": {
                "format": "date-time",
                "type": "string"
              },
              "order_issue_raised": {
                "format": "date-time",
                "type": "string"
              },
              "paid": {
                "format": "date-time",
                "type": "string"
              },
              "payment_accepted": {
                "format": "date-time",
                "type": "string"
              },
              "refunded": {
                "format": "date-time",
                "type": "string"
              },
              "rejected": {
                "format": "date-time",
                "type": "string"
              },
              "review_flagged": {
                "format": "date-time",
                "type": "string"
              },
              "seller_handover_confirmed": {
                "format": "date-time",
                "type": "string"
              }
            },
            "required": [
              "created"
            ],
            "type": "object"
          },
          "by_time": {
            "items": {
              "properties": {
                "at": {
                  "format": "date-time",
                  "type": "string"
                },
                "by": {
                  "description": "This contains the ID of the user that triggered this event. It\nis not present for events that are triggered by the platform,\nsuch as by automated systems.\n",
                  "type": "string"
                },
                "code": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "at"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "by_time",
          "by_key"
        ],
        "type": "object"
      },
      "v2_transactions.Fees": {
        "example": {
          "buyer": 78,
          "config": 1,
          "seller": 0
        },
        "properties": {
          "buyer": {
            "format": "int64",
            "type": "integer"
          },
          "config": {
            "format": "int64",
            "type": "integer"
          },
          "seller": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "buyer",
          "seller",
          "config"
        ],
        "type": "object"
      },
      "v2_transactions.PaymentDetailsStripe": {
        "properties": {
          "client_secret": {
            "type": "string"
          },
          "publishable_key": {
            "type": "string"
          }
        },
        "required": [
          "publishable_key",
          "client_secret"
        ],
        "type": "object"
      },
      "v2_transactions.Pricing": {
        "properties": {
          "amount": {
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "description": "The currency of the transaction. Note that, at present, the\nbuyer must pay using the transaction's currency and the\nseller will be paid in the transaction's currency. Conversion to this\ncurrency will happen automatically during payment if the buyer pays\nwith a different currency.\n",
            "type": "string"
          },
          "fees": {
            "properties": {
              "buyer": {
                "format": "int64",
                "type": "integer"
              },
              "buyer_client": {
                "format": "int64",
                "type": "integer"
              },
              "international_payment": {
                "format": "int64",
                "type": "integer"
              },
              "seller": {
                "format": "int64",
                "type": "integer"
              },
              "seller_client": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "buyer",
              "seller",
              "buyer_client",
              "seller_client"
            ],
            "type": "object"
          }
        },
        "required": [
          "amount",
          "currency",
          "fees"
        ],
        "type": "object"
      },
      "v2_transactions.Status": {
        "enum": [
          "created",
          "joined",
          "rejected",
          "cancelled",
          "order_issue_raised",
          "paid",
          "review_flagged",
          "payment_accepted",
          "complained",
          "complaint_period_ended",
          "refunded",
          "buyer_handover_confirmed",
          "seller_handover_confirmed",
          "funds_released",
          "claimed_by_buyer",
          "claimed_by_seller"
        ],
        "type": "string"
      },
      "v2_transactions.Transaction": {
        "example": {
          "buyer": {
            "id": "9097",
            "is_guest": false
          },
          "client_id": "1234",
          "deadlines": {
            "complaints": "2019-12-25T15:00:00Z"
          },
          "description": "Soccer ticket",
          "events": {
            "by_key": {
              "buyer_handover_confirmed": "2019-12-25T16:00:00Z",
              "created": "2019-12-25T09:00:00Z",
              "funds_released": "2019-12-25T17:00:00Z",
              "joined": "2019-12-25T10:00:00Z",
              "paid": "2019-12-25T11:00:00Z",
              "payment_accepted": "2019-12-25T12:00:00Z",
              "seller_handover_confirmed": "2019-12-25T15:00:00Z"
            },
            "by_time": []
          },
          "funds_release": {
            "refunds": [],
            "released_to_seller": false
          },
          "id": "tx_2106",
          "pricing": {
            "amount": 1000,
            "currency": "eur",
            "fees": {
              "buyer": 110,
              "buyer_client": 10,
              "international_payment": 20,
              "seller": 0,
              "seller_client": 5
            }
          },
          "review": {
            "approved": true,
            "outcome_reason": "Not fraudulent."
          },
          "seller": {
            "id": "9790",
            "is_guest": false
          },
          "status": "funds_released"
        },
        "properties": {
          "buyer": {
            "$ref": "#/components/schemas/v2_transactions.User"
          },
          "cancellation": {
            "properties": {
              "description": {
                "type": "string"
              }
            },
            "required": [
              "description"
            ],
            "type": "object"
          },
          "client_id": {
            "type": "string"
          },
          "complaint": {
            "properties": {
              "description": {
                "type": "string"
              }
            },
            "required": [
              "description"
            ],
            "type": "object"
          },
          "deadlines": {
            "description": "This property contains all possible actions that have associated\ndeadlines for completion. Actions with `null` do not have deadlines\ncurrently pending.\n",
            "properties": {
              "complaints": {
                "format": "date-time",
                "type": "string",
                "nullable": true
              }
            },
            "type": "object"
          },
          "description": {
            "type": "string"
          },
          "events": {
            "$ref": "#/components/schemas/v2_transactions.Events"
          },
          "funds_release": {
            "properties": {
              "refunds": {
                "items": {
                  "properties": {
                    "amount": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "amount"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "released_to_seller": {
                "type": "boolean"
              }
            },
            "required": [
              "released_to_seller",
              "refunds"
            ],
            "type": "object"
          },
          "id": {
            "format": "type_id",
            "type": "string"
          },
          "join_code": {
            "type": "string"
          },
          "payment_link": {
            "description": "URL to the actions page where the buyer can pay the deposit.\n",
            "type": "string"
          },
          "pricing": {
            "$ref": "#/components/schemas/v2_transactions.Pricing"
          },
          "review": {
            "properties": {
              "approved": {
                "type": "boolean"
              },
              "outcome_reason": {
                "type": "string"
              }
            },
            "required": [
              "approved",
              "outcome_reason"
            ],
            "type": "object"
          },
          "seller": {
            "$ref": "#/components/schemas/v2_transactions.User"
          },
          "status": {
            "$ref": "#/components/schemas/v2_transactions.Status"
          }
        },
        "required": [
          "id",
          "status",
          "client_id",
          "pricing",
          "deadlines",
          "description",
          "events"
        ],
        "type": "object"
      },
      "v2_transactions.User": {
        "example": {
          "id": "9097",
          "is_guest": false
        },
        "properties": {
          "id": {
            "type": "string"
          },
          "is_guest": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "is_guest"
        ],
        "type": "object"
      },
      "v2_transactions_admin.Transaction": {
        "properties": {
          "buyer": {
            "$ref": "#/components/schemas/v2_transactions.User"
          },
          "cancellation": {
            "properties": {
              "description": {
                "type": "string"
              }
            },
            "required": [
              "description"
            ],
            "type": "object"
          },
          "client_id": {
            "type": "string"
          },
          "complaint": {
            "properties": {
              "description": {
                "type": "string"
              }
            },
            "required": [
              "description"
            ],
            "type": "object"
          },
          "deadlines": {
            "description": "This property contains all possible actions that have associated\ndeadlines for completion. Actions with `null` do not have deadlines\ncurrently pending.\n",
            "properties": {
              "complaints": {
                "format": "date-time",
                "type": "string",
                "nullable": true
              }
            },
            "type": "object"
          },
          "description": {
            "type": "string"
          },
          "events": {
            "$ref": "#/components/schemas/v2_transactions.Events"
          },
          "funds_release": {
            "properties": {
              "refunds": {
                "items": {
                  "properties": {
                    "amount": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "amount"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "released_to_seller": {
                "type": "boolean"
              }
            },
            "required": [
              "released_to_seller",
              "refunds"
            ],
            "type": "object"
          },
          "id": {
            "format": "type_id",
            "type": "string"
          },
          "join_code": {
            "type": "string"
          },
          "payment_processor": {
            "properties": {
              "stripe": {
                "properties": {
                  "charge_id": {
                    "type": "string"
                  },
                  "payment_intent_id": {
                    "type": "string"
                  },
                  "platform_id": {
                    "type": "string"
                  },
                  "transfer_id": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "pricing": {
            "$ref": "#/components/schemas/v2_transactions.Pricing"
          },
          "review": {
            "properties": {
              "approved": {
                "type": "boolean"
              },
              "outcome_reason": {
                "type": "string"
              }
            },
            "required": [
              "approved",
              "outcome_reason"
            ],
            "type": "object"
          },
          "seller": {
            "$ref": "#/components/schemas/v2_transactions.User"
          },
          "status": {
            "$ref": "#/components/schemas/v2_transactions.Status"
          }
        },
        "required": [
          "id",
          "status",
          "client_id",
          "pricing",
          "deadlines",
          "description",
          "events"
        ],
        "type": "object"
      }
    }
  }
}