{ "openapi": "3.0.3", "info": { "title": "trustshare API", "version": "1.0.24", "termsOfService": "http://trustshare.co/facilitator-terms.pdf", "contact": { "name": "Support", "email": "support@trustshare.co" }, "description": "Welcome to the trustshare API Reference documentation. Here you can find detailed\ninformation about the endpoints we provide as well as the shape of entities within\nthe system.\n\n# Environments\nThe trustshare API has two environments, __Sandbox__ and __Live__. Both environments are available under\nthe same endpoint however API Keys and client secrets are prefixed with the environment name.\n- A __Sandbox__ API Key will be in the format: `sandbox_api_[0-9a-z]`.\n- A __Live__ API Key will be in the format: `live_api_[0-9a-z]`.\n\n## Sandbox\nOur __Sandbox__ environment endeavours to be as close to the __Live__ environment as possible, however,\nthere are a couple of limitations and features which should be noted.\n- Card payments take around 7 days to settle into accounts. In __Live__ this is generally closer to 2 days.\n- Manual inbound payments can only be \"faked\" in __Sandbox__ when they are less-than or equal-to `250,000.00`.\n- Open Banking in __Sandbox__ will always use a \"Mock Bank\" UI to accept the payment." }, "servers": [ { "url": "https://rest.trustshare.io" } ], "tags": [ { "name": "Checkouts", "description": "Checkouts represent a specific payment transaction between a buyer and one, or many, seller\n[Participants](/resources/participants) in the __trustshare__ API. {{ className: \"lead\" }}\n\nCheckouts are created once a [Payment Intent](/resources/payment-intents) has\nbeen confirmed by a participant. When a checkout is created, it contains all the relevant\ninformation about the transaction, including the type of payment, the amount, and\nthe buyer participant's details. The status of the checkout is updated as the\ntransaction progresses through different stages, such as expecting funds (`settling`) or\nreceipt of funds (`settled`).\n\nYou can optionally listen to [Webhooks](/webhooks) to be notified of changes in status to\na checkout object." }, { "name": "Inbounds", "description": "Inbounds represent the physical receipt of funds into a [Project](/resources/projects)\nin the __trustshare__ API. {{ className: \"lead\" }}\n\nIf the inbound does not include an associated [Checkout](/resources/checkouts), it can be\nconsidered _unreconciled_. We do our best to reconcile to [Settlements](/resources/settlements),\neven if we cannot reconcile to a specific checkout, by taking various factors into account.\nIncluding amount and the source of funds.\n\nYou can be notified via [Webhooks](/webhooks) when funds settle into a project account\nyou hold." }, { "name": "Invoices", "description": "Invoices represent a small wrapper around [Checkouts](/resources/checkouts) in the\n__trustshare__ API, that also provide collection credentials that can be displayed to your buyers. {{ className: \"lead\" }}\n\nAn invoice is created at the confirmation of an `invoice`-type [Payment Intent](/resources/payment-intents).\nIt provides direct access to collection details and credentials, which are not usually available\non checkouts.\n\nInvoices work in tandem with [Checkouts](/resources/checkouts), and you should rely on the associated\ncheckout's status to keep up-to-date with status of the invoice." }, { "name": "Outbounds", "description": "Outbounds represent the movement of funds out of a [Project](/resources/projects) in the\n__trustshare__ API. {{ className: \"lead\" }}\n\nIf an outbound is made to an `unverified` [Participant](/resources/participants), the outbound\nwill be paused and an automated verification process will be sent to the participants provided\nemail. Once complete, the outbound will automatically continue the process.\n\nAPI initiated outbounds, ie. `release` and `refund`, can be created before any funds are available.\nWhen this occurs, the outbound will remain in the `awaiting_funds` status until funds are received.\nThey can also be scheduled to occur at a specific date in the future, in this case the verification\nrequirements will be eagerly achieved, ie. the verification email would be sent out at the\npoint of creation, rather than the scheduled payment date.\n\nThe status of the outbound is updated as the payment progresses through different stages,\nsuch as requiring participant verification (`paused`) or funds have left the system (`executed`).\n\nYou can optionally listen to [Webhooks](/webhooks) to be notified of changes in status to\nan outbound object.\n\n## Outbound types\n\nAn outbound can be of one of the following types:\n\n - `release` - A release is made from a [Settlement](/resources/settlements) or directly\n from the project balance. If released from a settlement, it can only target the seller\n [Participant](/resources/participants) defined in the settlement itself.\n - `refund` - A refund can only be made from a [Settlement](/resources/settlements) and\n will only target the buyer [Participant](/resources/participants) defined on the settlement.\n - `transfer` - A transfer outbound is created automatically as part of an _inter-project_\n [Transfer](/resources/transfers).\n - `payout` - A payout outbound is automatically created weekly that will send funds from\n your revenue account directly to your bank accounts provided during onboarding." }, { "name": "Participants", "description": "Participants represent a buyer or seller in the __trustshare__ API. {{ className: \"lead\" }}\n\nIn most cases, participants receiving funds from [Projects](/resources/projects) are\nrequired to be verified using a [Verification](/resources/verifications).\n\nYou can either create, and verify, participants up-front or you can create them lazily as\npart of a [Payment Intent](/resources/payment-intents). In either case, you can provide as\nmuch, or as little, information about the participant as you wish. The only requirement is\nat least an email address. The more information you provide during the creation\nof a participant, the less information the participant will have to\nprovide during the verification process.\n\nThe email address is the primary identifier for a participant, you can create as many\nparticipants with the same email address as you like. You will find that depending on\nthe level of provided information you may receive a different unique identifier than you had previously.\nThis is expected, and _using any ID related to a specific email address will work_.\nVerification for a specific email address is inherited across all associated participants.\n\n\n Please refrain from using fake email addresses for your participants,\n __even in the Sandbox environment__. We send a limited set of emails\n to the participants during the process.\n\n\nThe system will endeavour to automatically verify a participant receiving\nfunds at the point of release, if they are not already verified.\n\n
\n \n
\n\n## Bank account details\n\nKnowing which bank credentials to provide for a country and currency combination is tricky.\nYou can use our payout support endpoint to quickly query for which details you need.\n\n
\n \n
" }, { "name": "Payment Instruments", "description": "Payment Instruments are used to describe a method of payment that can be used\nto complete a checkout via the UI. You can create a payment instrument for a\n[Participant](/resources/participants) upfront on the API, which will appear\nto the user in the checkout flow. {{ className: \"lead\" }}\n\nInstruments can be used to confirm certain [intent types](/resources/payment-intents),\neither on-session during a checkout UI, or off-session using an invoice intent.\n\n## Instrument types\n\nWe currently support `trade_account` type payment instruments which define a\ntrade credit account for a __business__ buyer. Upon creation, a trade account\nwill enter a processing status during the credit approval process. This process\ncan take anywhere from 5 seconds to 72 hours depending on the buyer's country.\nYou can use [webhooks](/webhooks) to keep up-to-date on the status\nof a specific instrument.\n\nIf the account is approved, a credit limit is provisioned for the buyer which\ncan be used to confirm payment intents on net terms.\n\n
\n \n
" }, { "name": "Payment Intents", "description": "Payment Intents are a fundamental feature of the __trustshare__ API that enable\nbuyers to make payments to sellers with confidence and ease. The mechanism provides\na secure and reliable way for you to initiate transactions between buyer and\nseller [Participants](/resources/participants), and can be customized\nto support a range of use cases. {{ className: \"lead\" }}\n\nA payment intent requires confirmation from the buyer and, in most cases,\nthe intent will be consumed upon confirmation. If no [Project](/resources/projects)\nis provided as the target of the intent, we will automatically provision\na new account for the transaction.\n\n## Intent types\n\nPayment Intents support multiple types, such as `checkout`, `payment_link`, and\n`invoice`, and can be used for both simple and complex transactions. Each\ntype has its own specific properties and confirmation process. An intent\nis made up of a collection of [Settlements](/resources/settlements).\n\n
\n \n
\n\n### Customised UI with the `checkout` and `payment_link` types\n\nBoth the `checkout` and `payment_link` types allow you to show your user a customised\ncheckout UI that describes one or many line-items that define a transaction between\na buyer and one or many seller [Participants](/resources/participants).\n\nBuyers can use payment methods configured for your account, including\n__Cards__, __Open Banking__, __Bank transfer__, and __Trade Account credit__.\nThe UI will automatically infer the supported payment methods from\nthe contents of the intent.\n\nThe checkout intent will return a `client_secret` that requires\nconfirmation via the [SDK](/sdks) on the buyer's device. Alternatively,\nthe `payment_link` type will return a `url` property which\ncontains a shareable link.\n\n
\n \n
\n\n### Headless transactions with the `invoice` type\n\nAn `invoice` type payment intent describes a buyer participant's intent to fulfill an\ninvoice, now or in the future. It offers the same mechanism to describe settlements\nto multiple sellers from a single buyer.\n\nAn `invoice` type intent will, in most cases, require confirmation from the\nusers device via the [SDK](/sdks), however no UI will be displayed to the user.\nIt is up to your implementation how you intend to show the required information\nfor the user to fulfill the invoice.\n\nAlternatively, you can confirm an `invoice` type intent via the API where certain\ncriteria are met. [Confirming a payment intent](#confirming-a-payment-intent), requires\na `session_id` that can be retrieved via a [Setup Intent](/resources/setup-intents).\n\n\n The creation of an `invoice` intent requires\n the pre-creation of a \"controlled\" project.\n\n\n
\n \n
" }, { "name": "Projects", "description": "Projects represent a transactional bank account in the __trustshare__ API. All accounts are\nheld by trustshare, which allows us to defer verification of [Participants](/resources/participants)\nuntil the last possible moment. {{ className: \"lead\" }}\n\nA project can hold funds indefinitely in it's designated currency. Currently we support `eur`, `gbp`\nand `usd` projects. You can rely on us to automatically provision a project at the confirmation\nof a payment intent, or explicitly create a project for a specific use-case.\n\n## Controlled vs uncontrolled?\n\nA project that is `uncontrolled` has been automatically provisioned for you as the result\nof a confirmed [Payment Intent](/resources/payment-intents). As such, you will not\nbe able to receive the project's collection details, ie. unique bank account number and sort\ncode. If you need direct access to a project's collection details you must create\na project via the API.\n\n
\n \n
\n\n## The project balance\n\nThe project balance reflects only __unreconciled__ funds in the project. Funds from\n[Inbounds](/resources/inbounds) where we were unable to reconcile to a [Checkout](/resources/checkouts)\nor [Settlement](/resources/settlements) are reflected in this value. Settlements of type\n`funding` also impact the project balance.\n\nThis mechanism allows you to take funds from a buyer participant before knowing who\nthe seller or recipient of funds is. It also allows you to treat `controlled` projects\nlike a standard bank account without the need for settlements at all.\n\nOther settlement types hold funds within themselves, therefore disallowing release directly\nfrom the project balance. Depending on how you describe your releases when creating them\nwill dictate how funds are relinquished from settlements and projects.\n\n
\n \n
" }, { "name": "Settlements", "description": "Settlements represent a specific line-item, or transaction contained within a\n[Project](/resources/projects) on the __trustshare__ API. They connect\none, or two, [Participants](/resources/participants) to a project and\ndescribe the reason for payment. {{ className: \"lead\" }}\n\nSettlements are created once a [Payment Intent](/resources/payment-intents)\nhas been confirmed by a participant. A settlement is used primarily as a\nreconciliation mechanism that expects funds from the `from` participant.\nIf we can reliably confirm that the funds are from the buying participant\nthen we will automatically reconcile funds paid by them to\ntheir outstanding settlements.\n\n## Settlement types\n\nA payment intent is made up of a selection of settlements. When creating\nyour payment intent you can decide on the kind of settlements that will be\ncreate for the transaction. Settlement types allow you to dsesribe the\nbehaviour of funds moving through the system.\n\n\n Most settlement types hold funds within themselves, disallowing the release\n of those funds from the [project balance](/resources/projects#the-project-balance)\n itself. This means that funds held in settlements _must_ be released from the\n settlement itself and not the project balance. Only `funding` settlements\n do not earmark funds.\n\n\n
\n \n
\n\n### Moving funds instantly with the `immediate` type\n\nAn `immediate` type works, as the name suggests, as an immediate settlement\nto the supplied seller participant and will release the funds directly to the\nseller’s bank account as soon as the required funds are available\nwithin the dedicated account.\n\nThis is useful if you want to route money to multiple sellers as quickly\nas possible whilst splitting your fees.\n\n### Holding funds indefinitely with the `escrow` type\n\nThe `escrow` type is a flexible intent that can describe not\nonly a future requirement for funds, ie. funds not required immediately\nat checkout and therefore not included in the total for the payment initiation,\nbut also a future release date where funds available will be automatically released\nto the seller participant once the supplied date is in the past.\n\nBy not supplying a requirement date, an escrow settlement is considered to\nbe immediately required and will be included in the total for the checkout when\nit is confirmed via the SDK on the client-side. By not providing a release\ndate for the funds, the funds will be held in escrow indefinitely\nuntil they are released via an API call.\n\nThis is useful if you need to hold funds until a good or service is delivered.\n\n
\n \n
\n\n### Collecting funds without a specific target with the `funding` type\n\nThe `funding` type can be used where the seller participant can not\nbe determined up front, or where funds are held passively during a\ntransaction to be returned to the buyer participant upon completion.\nFunds reconciled against a funding settlement will increment\nthe underlying project balance.\n\nThis is useful if your payment flow is complex or you may not know the\nexact breakdown of where the money should go to up front.\n\n
\n \n
\n\n### Moving funds between projects with the `transfer` type\n\nThe `transfer` type allows you to immediately settle funds from\nany project, whether controlled or not, to a controlled project\nwhere funds can be held in project balances indefinitely.\n\nThis is useful if you wish your buyer to be provisioned a single\npay in target that will route funds to projects provisioned for sellers.\n\n### What's next?\n\nNow you have an understanding of how settlement types route funds\nthrough the system. Here are a few links to continue learning\nabout the process.\n\n- [Understand the different types of Payment Intent](/resources/payment-intents#intent-types)\n- [Learn about confirming payment intents](/quickstart#confirming-your-first-intent)\n- [Check out the different payment methods in the UI](/payments#payment-methods)" }, { "name": "Setup Intents", "description": "Sometimes you may want your users to interact with a checkout UI process,\nor you may want to charge at a later date. Setup Intents allow you to create\nsessions that can be used to complete processes on the __trustshare__ API,\nsuch as confirming an invoice payment intent. {{ className: \"lead\" }}\n\nA setup intent must be confirmed by the user's device via our client [SDK](/sdks),\nhowever may require no interaction from the user. The intent will be consumed upon confirmation.\n\n## Intent types\n\nCurrently, Setup Intents only support the `session` type, which allows you\nto create a detached session that can be used to\n[confirm invoice payment intents](/resources/payment-intents#confirm-a-payment-intent)\nfrom you backend system by utilising a trade account\n[Payment Instrument](/resources/payment-instruments). Eventually, we plan to\nextend the utility of setup intents to include things such as payout bank account\nmanagement and payment instrument management.\n\n
\n \n
\n\n### Confirming a `session` setup intent\n\nUpon confirmation, a `session` setup intent ties a specific [Participant](/resources/participants) to\na re-usable session object that can be provided to endpoints within the API.\nUnlike the checkout UI, when confirming a `session` setup intent no UI will be shown to\nparticipant. The following example shows how to achieve this with our client SDK.\n\n```js {{ title: \"Confirming a setup intent\" }}\nimport createSDK from '@trustshare/sdk';\n\nconst truatshare = createSDK('');\n\nconst result = await trustshare.sdk.v1.confirmSetupIntent(client_secret);\n```\n\nThe result of this confirmation will include a `session_id` and `expires_at` value\nthat can be stored in your own database and used at a later date. For products\nwhere a participant touch-point is rare, ie. where deals may be handled off-platform,\nit is advised to create and store a new session on each login. Due to there\nbeing no requirement for a UI, this process can happen completely transparently\nfrom the perspective of your users.\n\n\n Expired sessions will cause confirmation of payment intents to fail.\n" }, { "name": "Transfers", "description": "Transfers represent a movement of funds between/within [Project](/resources/projects)\naccounts held in the __trustshare__ API. They allow the movement of funds between\nprojects and settlements. {{ className: \"lead\" }}\n\nYou can use transfers to fix reconciliation mistakes by moving funds from one settlement\nto another. Or to batch payouts by moving funds from a settlement into a project balance\nto make a larger [Outbound](/resources/outbounds) possible.\n\n## Inter-project vs. within-project\n\nInter-project transfers can be made between different project accounts held in the\nsame currency. Where-as within-project transfers can be made between a project's balance\nand it's settlements. An associated [Outbound](/resources/outbounds) and\n[Inbound](/resources/inbounds) will only be created for an inter-project transfer\nas there is physical movement of funds.\n\n
\n \n
" }, { "name": "Verifications", "description": "Verifications represent the process of verifying a [Participant](/resources/participants)\non the __trustshare__ API. Only participants who are required to receive funds need to\nbe verified. {{ className: \"lead\" }}\n\nVerifications are based on an opt-out model. This means you do not need to\npre-verify or enroll your participants before transactions can take place. The\nverification flow is pushed to the last possible point during the payment life cycle.\nSellers are always verified on the system, but we are automatically able\nto accept payments intended for them.\n\nWe create system-initiated verifications the first time a participant is targeted\nin an [Outbound](/resources/outbounds). If you wish to verify a participant for\nyour own purposes you can manually create a verification. By providing as\nmuch information as you can, you can reduce the friction during\nthe verify process for your users.\n\n
\n \n
\n\n## Confirming a verification\n\nTo complete a verification, the user must go through a front-end driven process\non the __trustshare__ system. The `client_secret` provided on the verification\nobject should be passed to the SDK.\n\nThe UI presented to the user will reflect the status of the verification.\nFor example, a completed verification process will always just show\nthe Complete Screen, preventing the user from taking any further actions.\n\n```js {{ title: \"Confirming a verification on the user's device\" }}\nimport createSDK from '@trustshare/sdk';\n\nconst truatshare = createSDK('');\n\nawait trustshare.sdk.v1.confirmVerification(client_secret);\n```\n\n
\n \n
" } ], "x-trustshare-guides": { "/": { "title": "Introduction", "contents": "\n\n# API Documentation\n\nUse the __trustshare__ API to describe, and execute, complex payment flows\nfor a variety of use-cases. Bring the fintech ecosystem to your\nfingertips across payments, escrow, banking, and trade finance. {{ className: \"lead\" }}\n\n
\n
\n\n## Getting started {{ anchor: false }}\n\nTo get started, create a new organisation in your [dashboard](https://dashboard.trustshare.io),\nthen head to the [developers section](https://dashboard.trustshare.io/developers/api-keys)\nand generate a new API key pair. The _private key_ is used to interact with the __trustshare__ API,\nwhere-as the _public key_ is used to instantiate the client [SDK](/sdks). {{ className: \"lead\" }}\n\n
\n \n
\n\n## Guides\n\n\n\n## Resources\n\n" }, "/quickstart": { "title": "Quickstart", "contents": "# Quickstart\n\nThis guide will get you all set up and ready to use the __trustshare__ API.\nWe'll cover how to get started using one of our API clients and how to make your\nfirst API request to create a [Payment Intent](/resources/payment-intents). We'll\nthen look at confirming the intent we just created on the users device with the\nclient SDK. We'll also look at where to go next to find all the\ninformation you need to take full advantage of our powerful REST API. {{ className: 'lead' }}\n\n\n Before you can make requests to the API, you will need to generate your\n API key pair from your dashboard. You find it under\n [Developers » API Keys](https://dashboard.trustshare.io/developers/api-keys).\n\n\n## Choose your client\n\nBefore making your first API request, you need to pick which API client you\nwill use. In addition to good ol' cURL HTTP requests, we offer clients\nfor JavaScript environments, as well as an [Open API specification](https://swagger.io/specification/)\nthat will allow you to generate a client for your preferred language.\nIn the following example, you can see how to install each client.\n\n\n\n```bash {{ title: 'cURL' }}\n# cURL is most likely already installed on your machine\ncurl --version\n```\n\n```bash {{ language: 'js' }}\n# Install the trustshare API client\nnpm install @trustshare/api --save\n```\n\n\n\n
\n \n
\n\n## Making your first API request\n\nAfter picking your preferred client, you are ready to make your first call to\nthe __trustshare__ API. Below, you can see how to send a POST request to the\nintents endpoint to create your first [Payment Intent](/resources/payment-intents).\n\n\n\n```bash {{ title: 'cURL' }}\ncurl -X POST https://rest.trustshare.io/v1/intents/payment \\\n -H \"Authorization: \" \\\n -d @- << EOF\n {\n \"type\": \"checkout\",\n \"currency\": \"gbp\",\n \"from\": {\n \"email\": \"sink+buyer@trustshare.co\"\n },\n \"settlements\": [\n {\n \"type\": \"escrow\",\n \"amount\": 150000,\n \"description\": \"An example of a line item\",\n \"to\": {\n \"email\": \"sink+seller@trustshare.co\"\n }\n }\n ]\n }\n EOF\n```\n\n```js\nimport createClient from '@trustshare/api';\n\nconst trustshare = createClient('');\n\nawait trustshare.api.v1.createPaymentIntent({\n type: 'checkout',\n currency: 'gbp',\n from: {\n email: 'sink+buyer@trustshare.co'\n },\n settlements: [\n {\n type: 'escrow',\n amount: 150000,\n description: 'An example of a line item',\n to: {\n email: 'sink+seller@trustshare.co'\n }\n }\n ]\n});\n```\n\n\n\n
\n \n
\n\n## Confirming your first intent\n\nSo far, we've already set up an API client, now we must set up the SDK\nclient that will allow your users to confirm their intents. Our SDK client is a\nsmall plain JavaScript library that can be leveraged in whatever\nfrontend stack you are currently using. You can install the SDK via `npm`...\n\n```bash {{ language: 'js', title: '$ >' }}\n# Install the trustshare SDK client\nnpm install @trustshare/sdk --save\n```\n\nAlternatively, If you are not using a bundler to package your application,\nwe also offer a CDN for including the SDK client directly in your\nfront-end code. In this setup, skip the above `npm` install step and simply\ninclude the client SDK directly in your page source, using one of the below snippets.\n\n\n\n```html {{ title: 'ES Modules' }}\n\n\n```\n\n```html {{ title: 'Plain JS' }}\n\n\n```\n\n\n\nOn creation of the intent in the previous section, our API will return\na `client_secret` which must be used by the client-device of the purchasing\n[Participant](/resources/participants) to confirm their intention to pay.\nDepending on the overall size of the checkout, as well as your Organisation's\nconfiguration on our system, the user will be presented\nwith a number of payment methods which they can choose from.\n\nThe `client_secret` returned from the intent creation call should be handed directly\nto the SDK on the user's device. __It should not be persisted in your own system__.\n\n```js {{ title: \"Confirming a payment intent\" }}\nimport createSDK from '@trustshare/sdk';\n\n// The SDK is instantiated with the public key of an API key pair\nconst trustshare = createSDK('');\n\nconst result = await trustshare.sdk.v1.confirmPaymentIntent('');\n```\n\nDepending on the type of the payment intent a UI may be displayed to your\nbuyer. Upon confirmation, the system will create a new checkout and\nthe SDK will resolve with a `checkout_id` and `project_id`.\n\n
\n \n
\n\n## Other reference examples\n\nThe following repositories contain examples for implementing various processes,\nalong with native implementations for both Android and iOS.\n\n\n\n## What's next?\n\nGreat, you're now set up with an API client and have made your first\npayment intent on the API. Here are a few links that might be handy as you\nventure further into the trustshare API:\n\n- [Grab your API key from the dashboard](https://dashboard.trustshare.io/developers/api-keys)\n- [Check out the Payment Intents endpoint](/resources/payment-intents)\n- [Learn about the different payment methods in the UI](/payments)" }, "/sdks": { "title": "SDKs", "contents": "# Clients & SDKs\n\nIf you are running in a JavaScript/TypeScript environment such\nas [Node.js](https://nodejs.org), [Deno](https://deno.com/runtime),\nor [Cloudflare Workers](https://workers.cloudflare.com) you can use our\nprebuilt API client which is available on `npm`. It interacts with our GraphQL API\nand provides TypeScript definitions for intellisense in your editor of choice.\nThe client SDK allows you to confirm your payment intents on the client-device. {{ className: \"lead\" }}\n\nWe currently do not offer prebuilt client libraries for other languages. However, as we\noffer an OpenAPI specification, it is relatively straightforward to generate\na client for your language of choice. Using [Swagger Codegen](https://github.com/swagger-api/swagger-codegen),\nyou can easily generate clients for: PHP, Python, Go, Java, Rust, and many, many more.\n\n
\n \n
\n\n## Official libraries\n\n" }, "/authentication": { "title": "Authentication", "contents": "# Authentication\n\nYou'll need to authenticate your requests to access most of the endpoints in\nthe __trustshare__ API. In this guide, we'll look at\nhow authentication works. {{ className: 'lead' }}\n\n## Using your API key\n\nMost of the interactions you will need with the API will require the presence\nof an private key from an API key pair in the `Authorization` header of the request.\nYou will need to generate an API key pair from the\n[developer settings](htts://dashboard.trustshare.io/developers/api-keys)\non the dashboard, if you haven't done so already. Here's how to add\nthe token to the request header using cURL:\n\n```bash {{ title: 'Example request with API key' }}\ncurl https://rest.trustshare.io/v1/intent/intent_Av56qDDH7g \\\n -H \"Authorization: \"\n```\n\nAlways keep your private key safe and delete it if you suspect it has been compromised.\n\n## Using an SDK\n\nIf you use one of our official API clients, you will have to provide your\nprivate key from the API key pair at the instantiation of the client. However,\nwhen using the client [SDK](/sdks) you should use the public key from same pair.\n\n
\n \n
" }, "/sandbox": { "title": "Sandbox", "contents": "# Sandbox\n\nThe __trustshare__ API consists of two environments, sandbox and live. Both environments are\navailable under the same endpoint however API Keys and client secrets are prefixed\nwith the environment name. {{ className: \"lead\" }}\n\nOur __Sandbox__ environment endeavours to be as close to the __Live__ environment\nas possible, however, there are a couple of limitations and features which should be noted.\n\n- A __Sandbox__ API Key will be in the format: `sandbox_api_[0-9a-z]`.\n- A __Live__ API Key will be in the format: `live_api_[0-9a-z]`.\n\n\n __Please refrain from using fake emails in Sandbox.__ Due to sandbox so close\n in functionality to the live system, we send emails out to participants\n at certain points within the process.\n\n---\n\n## Payment timelines\n\nIn sandbox we fake credit the project accounts for all of the available payment\nmethods in the UI. This means that funds will eventually \"settle\" into the\nproject and form part of any [Settlement](/resources/settlements) and\n[Project](/resources/projects) balances.\n\nManual Bank Transfers will take roughly a minute to settle in sandbox.\nIt is important to note, that when using Manual Bank Transfer, it is imperative that the\nuser indicates the payment having been made by clicking the confirmation button\n(\"I've made the transfer\") on the last screen when in sandbox. Clicking the button\nensures the account will receive the fake credit in the sandbox environment.\n\n\n Manual inbound payments can only be \"faked\" in __Sandbox__ when they\n are less-than or equal-to `250,000.00`.\n\n\n__Card__ payments always incur lead time to settle which is inherited from the card\nschemes themselves. Unfortunately due to this, our card payments take a lot\nlonger to settle in sandbox. Sanbox card payments take around 7 days to settle, however,\nin the live environment, it is closer to 2 days.\n\n
\n \n
\n\n---\n\n## Testing payment methods\n\nSandbox offers the ability to test all the supported payment methods of the system.\nYou can force a specific outcome to occur by using the information outlined below.\n\n### Testing with Cards\n\nTo test __Card__ payments in the sandbox environment, you should __not__ use real card\ncredentials, this is a security enforcement. The following table describes card numbers\nwhich can be used to ensure a specific outcome for testing purposes.\n\n| Number | Brand | CVC | Date | Outcome |\n|---|---|---|---|---|\n| 4242424242424242 | Visa | Any 3 digits | Any future date | Payment will execute successfully |\n| 4000056655665556 | Visa (debit) | Any 3 digits | Any future date | Payment will execute successfully |\n| 5555555555554444 | Mastercard | Any 3 digits | Any future date | Payment will execute successfully |\n| 4000000000000002 | Visa | Any 3 digits | Any future date | Card will be declined at creation |\n| 4000000000000341 | Visa | Any 3 digits | Any future date | Card will be declined at payment |\n| 4000000000000069 | Visa | Any 3 digits | Any future date | Card is expired |\n| 4000000000000127 | Visa | Any 3 digits | Any future date | Incorrect CVV provided |\n\n### Testing with Open Banking\n\nWhen testing __Open Banking__ in sandbox, we will always display a \"Mock Bank\" UI\nto accept the payment independent of the bank chosen during the process.\nWhen presented with the \"Mock Bank\" UI, you can provide one of the following\nusernames to test a specific outcome. For successful outcomes, the\npayment should settle almost immediately, or at least within around 5 minutes.\n\n| Username | Password | Outcome |\n|---|---|---|\n| test_executed | Any digits | Payment will execute successfully |\n| test_authorisation_failed | Any digits | Payment will fail authorisation |\n| test_execution_rejected | Any digits | Payment will be rejected upon execution |\n\n### Testing with Direct Debit\n\nYou can test SEPA __Direct Debit__ against sandbox by scheduling\n[Settlements](/resources/settlements). The user will be prompted to provide\nthe source account details. Providing the following details will\nresult in the outcome described at the point of charging, ie. the\nscheduled date.\n\n| Account Number | Outcome |\n|---|---|\n| DE89370400440532013000 | The payment will succeed at the scheduled date |\n| BE68539007547034 | The payment will failed at the scheduled date |\n\n### Testing with Trade Account credit\n\nWhen testing __Trade Account credit__ for your business buyers, they will be shown\nan application process for credit within the checkout UI. You can provide\ninformation about the business at the creation of the intent that will be\nprefilled for the application process. Providing the following company numbers\nwill result in specific outcomes to test the flow.\n\n| Company Number | Country | Outcome |\n|---|---|---|\n| _Any company number_ | Norway, Sweden, and United Kingdom | Trade Account credit will be approved |\n| 08154624 | United Kingdom | Trade Account credit will be rejected |\n\n
\n \n
\n\n---\n\n## Verifying participants\n\n[Participants](/resources/participants) receiving funds from a project account are\nstill required to complete verification in the system. During the [Verification](/resources/verifications)\nUI-driven process, in sandbox we offer the ability to continue through the process\nas if it were production. Alternatively, you can click a button to automatically\npass or fail the verification as you see fit.\n\n
\n \n
" }, "/payments": { "title": "Payments", "contents": "# Payments\n\nThe __trustshare__ system is intent-based, therefore the primary way of\ngetting money into the platform is to create a [Payment Intent](/resources/payment-intents)\nfor your buyer to confirm. Confirmation of a payment intent can be seen\nas an _acceptance of terms_ associated with funding a [Project](/resources/projects). {{ className: \"lead\" }}\n\nA payment intent is comprised of a collection of settlements which are\nused to describe terms that the buyer must adhere to. Settlements describe\na payment from a single buyer [Participant](/resources/participants) to a\nsingle seller. However, you can use a payment intent to contain multiple settlements,\nessentially allowing a buyer to pay multiple sellers in one process.\n\n- [Learn about the different payment methods](/payments#payment-methods)\n- [Understand more about our country support](/payments#supported-countries)\n\n---\n\n## The checkout UI\n\nWhen your buyer confirms a `checkout` or `payment_link` intent they will be displayed\na checkout UI that you can customise from your\n[branding settings](https://dashboard.trustshare.io/settings/branding)\npage on the dashboard.\n\nThe UI will display supported payment methods inferred from the value of the\nintent and your organisation's configuration. Payment instruments such as\ncards, and trade accounts can be created and saved for future use in the UI.\n\nAlternatively, you can use `invoice` intents to take control of the UI yourself.\nHowever, we only support manual bank transfer methods for invoice intents.\n\n
\n \n
\n\n---\n\n## Payment methods\n\nWe currently offer a few different methods of payment into [Project](/resources/projects)\naccounts, starting with simple manual payments via international and local routes.\nEach individual project has a unique set of banking credentials, however you will\nnot be able to see the collection credentials for projects that are not \"controlled\".\n\nWhen using manual bank transfer, it is the user's responsibility to make the payment\nfrom their bank by any means available to them (online portal, bank branch etc.) to\nthe nominated bank account we provide via the UI or [Invoice](/resources/invoices).\nAs this action is outside of our control, we cannot guarantee the settlement\ntimeline and in reality can be any length. The associated [Settlements](/resources/settlements)\nwill enter a `settled` state only when the funds have physically arrived into\nthe nominated project account.\n\n\n In some cases, the buyer may be shown a __reference__ to use for the payment.\n It is advised in these instances that the reference is used to facilitate\n effective reconciliation to settlements within a project.\n\n\nPayments via the checkout UI can also use __Cards__, __Open Banking__,\n__Direct Debit__ and __Trade Account credit__. Each individual method has\nrequirements that must be met for a specific intent in order to be displayed\nto the user. If you would like to avoid presenting users with one or more\nof these payment methods for your use case, just let us know! We can adjust\nyour configuration to hide them from users.\n\n
\n \n
\n\n__Cards__ can be enabled for low-value payments, and can be stored by the buyer\nfor later use. Card payments take around 2 working days to settle into\nproject accounts.\n\nFor payment intents based in GBP or EUR, __Open Banking__ provides a streamlined\npayment initiation mechanism where the user instructs their bank via\ntheir online banking application. Open Banking payments can take anywhere\nfrom 5 seconds to a couple of minutes to settle into projects.\n\nUsing __Direct Debits__, if enabled, is currently limited to EUR payment intents\nthat defined scheduled future payments. Direct Debits take around 2 days to settle from\ntheir scheduled date.\n\n\n Some of these payment methods may not be configured for your account, please\n reach out to our team if you would like to discuss a specific payment method.\n\n\n
\n \n
\n\n## Credit payments\n\n__Trade Account credit__ can give your business buyers the ability to pay\non net terms ranging from __30-90 days__. Users can apply for their Trade Account\nin the UI receiving an instant decision. If approved, they can use\nthe credit line for the current checkout and any future payments.\n\nFor the trade account payment method to appear in the checkout UI, the\nbuyer participant of the intent must be defined as a business from one of\nour \"instant decision\" supported countries.\n\n\n We currently support \"instant decision\" on credit for Sweden, Norway, and United Kingdom.\n\n\nCredits from a trade account work with `immediate`, `escrow`, and `funding`\n[Settlements](/resources/settlements) where the credit is only fulfilled at\nthe point of release from a project or settlement via an\n[Outbound](/resources/outbounds). Credit will usually take around 1 day to\nsettle into projects and be automatically assigned to the correct outbounds.\n\n
\n \n
\n\n### Creating a trade credit account via API\n\nFor countries where we do not support \"instant decision\", as well as those we do, you can\nalternatively create a `trade_account` [Payment Instrument](/resources/payment-instrument)\non the API. You can use [webhooks](/webhooks) to keep up-to-date with the\nasynchronous decision associated with the credit application.\n\nPayment instruments created via the API will show up in the checkout UI for the\nassociated buyer when enabled. Below is an example of creating a new instrument.\n\n```js {{ title: \"Creating a payment instrument\" }}\nconst instrument = await trustshare.api.v1.createPaymentInstrument({\n type: 'trade_account',\n owner: {\n type: 'business',\n email: 'sink+buyer@trustshare.co',\n name: 'ACME Limited',\n business: {\n type: 'limited',\n company_number: '12345678',\n phone_number: '+447773452345',\n registered_address: {\n address_line_1: '23 The Road',\n town_city: 'London',\n region: 'Greater London',\n postal_code: 'N22 6TY',\n country: 'GB',\n },\n },\n },\n});\n```\n\n\n A trade account can only be created for a business participant, and\n all the information described above is required.\n\n\nThe resulting payment instrument identifier can be stored in your database\nfor future usage in the event you want to confirm an `invoice` payment intent...\n\n
\n \n
\n\n### Confirming an invoice payment intent with a trade account\n\nOnce a payment instrument has been created and enabled, it can also be used\nto [confirm an invoice payment intent](/resources/payment-intents#confirming-a-payment-intent)\ndirectly via the API with no-user interaction. However, you will need to complete\na [Setup Intent](/resources/setup-intent) to retrieve a `session_id` that can be used.\n\nThe following example shows how to create a setup intent for this purpose.\n\n```js {{ title: \"Creating a setup intent\" }}\nconst setup = await trustshare.api.v1.createSetupIntent({\n type: 'session',\n participant: {\n id: instrument.api.v1.createPaymentInstrument.owner.id,\n },\n});\n```\n\nThe resulting `client_secret` should be passed down to your frontend, where you\ncan use the client [SDK](/sdks) to confirm it. This can happen transparently\nfor the user as it requires no direct interaction via UI.\n\n```js {{ title: \"Confirming a setup intent\" }}\nconst result = await trustshare.sdk.v1.confirmSetupIntent('');\n```\n\nBy storing the resulting `session_id` in your database, it can be used for future\ninvoice payments by confirming the intent via the API. You can also provide\nthe required `terms` at this point to dictate the repayment requirements.\n\n```js {{ title: \"Confirming an invoice payment intent\" }}\nconst confirmation = await trustshare.api.v1.confirmPaymentIntent({\n id: intent.id,\n session_id,\n type: 'credit',\n credit: {\n payment_instrument_id: instrument.api.v1.createPaymentInstrument.id,\n terms: 'thirty_days',\n },\n});\n```\n\nThe resulting confirmation will include a `checkout_id` and `invoice_id` that\ncan be used along with our [webhooks](/webhooks) to be notified of a\nchange in status.\n\n
\n \n
\n\n---\n\n## Supported countries & industries\n\nWe can support payments to and from 224 countries across the world:\n\n_Åland Islands, Albania, Algeria, American Samoa, Andorra, Angola, Anguilla,\nAntarctica, Antigua and Barbuda, Argentina, Armenia, Aruba, Australia, Austria, Azerbaijan,\nBahamas, Bahrain, Bangladesh, Barbados, Belgium, Belize, Benin, Bermuda, Bhutan,\nBolivia, Bosnia and Herzegovina, Botswana, Bouvet Island, Brazil, British\nIndian Ocean Territory, British Virgin Islands, Brunei Darussalam, Bulgaria,\nCabo Verde, Cambodia, Cameroon, Canada, Caribbean Netherlands, Cayman Islands,\nCentral African Rep, Chad, Chile, China, Christmas Island, Cocos (Keeling) Islands,\nColumbia, Comoros, Congo, Cook Islands, Costa Rica, Côte d'Ivoire, Croatia, Curaçao, Cyprus,\nCzech Republic, Denmark, Djibouti, Dominica, Ecuador, Egypt, Equatorial Guinea,\nEritrea, Estonia, Eswatini, Ethiopia, Falkland Islands, Faroe Islands, Fiji, Finland,\nFrance, French Guiana, French Polynesia, French Southern Territories, Gabon, Gambia,\nGeorgia, Germany, Ghana, Gibraltar, Greece, Grenada, Guadeloupe, Guam, Guernsey, Guinea,\nHeard Island and McDonald Islands, Hong Kong, Hungary, Iceland, India, Indonesia, Ireland,\nIsle of Man, Israel, Italy, Jamaica, Japan, Jersey, Jordan, Kazakhstan, Kenya, Kiribati,\nKosovo, Kuwait, Kyrgyzstan, Laos, Latvia, Lebanon, Lesotho, Liberia, Liechtenstein,\nLithuania, Luxembourg, Macao, Madagascar, Malawi, Malaysia, Maldives, Mali, Malta,\nMarshall Islands, Martinique, Mauritania, Mauritania, Mayotte, Mexico, Micronesia, Monaco,\nMongolia, Montenegro, Montserrat, Morocco, Mozambique, Namibia, Nauru, Nepal, Netherlands,\nNetherlands Antilles, New Caledonia, New Zealand, Nicaragua, Niger, Nigeria, Niue, Norfolk Island,\nNorth Macedonia, North Mariana Islands, North Mariana Islands, Norway, Oman, Pakistan, Palau,\nPanama, Papua New Guinea, Paraguay, Peru, Philippines, Pitcairn, Poland, Portugal,\nPuerto Rico, Qatar, Reunion, Romania, Rwanda, Saint Barthélemy, Saint Helena,\nSaint Kitts and Nevis, Saint Lucia, Saint Martin, Saint Pierre and Miquelon, Samoa,\nSan Marino, Sao Tome and Principe, Saudi Arabia, Serbia, Seychelles, Sierra Leone, Singapore,\nSint Maarten, Slovakia, Slovenia, Solomon Islands, Somalia, South Africa, South Georgia\nand the South Sandwich Islands, South Korea, Spain, Sri Lanka, St. Vincent & Grenadines,\nSuriname, Svalbard and Mayen, Sweden, Switzerland, Taiwan, Tajikistan, Tanzania, Thailand,\nthe Democratic Republic, Timor-Leste, Togo, Tokelau, Tonga, Trinidad & Tobago, Tunisia, Turkey,\nTurks and Caicos Islands, Tuvalu, Uganda, Ukraine, United Arab Emirates, United Kingdom,\nUnited States, United States Minor Outlying Islands, United States Virgin Islands, Uruguay,\nUzbekistan, Vanuatu, Vatican City State (Holy See), Vietnam, Wallis & Futuna, Yemen, Zambia, and Zimbabwe._\n\n
\n \n
\n\n### Countries we can pay through local routes\n\nWe payout locally through local payout methods whenever possible in the following 49 countries:\n\n_Andorra, Australia, Austria, Belgium, Bulgaria, Canada, Croatia, Cyprus, Czech Republic,\nDenmark, Estonia, Faroe Islands, Finland, France, Germany, Gibraltar, Greece, Guernsey,\nHong Kong, Hungary, India, Indonesia, Ireland, Isle of Man, Italy, Jersey, Latvia,\nLiechtenstein, Lithuania, Luxembourg, Malaysia, Malta, Monaco, Netherlands, Norway, Philippines,\nPoland, Portugal, Romania, Saint Barthélemy, San Marino, Singapore, Slovakia, Slovenia,\nSpain, Sweden, Switzerland, United Kingdom, and United States._\n\n### Currencies we can payout via local and international routes\n\nWe can payout in the following currencies, with any required foreign-exchange happening automatically:\n\n_AED (United Arab Emirates), AUD (Australia), BGN (Bulgaria), BHD (Bahrain), CAD (Canada),\nCHF (Switzerland), CNY (China), CZK (Czech Republic), DKK (Denmark), EUR (Europe),\nGBP (United Kingdom), HKD (Hong Kong), HRK (Croatia), HUF (Hungary), ILS (Israel),\nJPY (Japan), KES (Kenya), KWD (Kuwait), MXN (Mexico), NOK (Norway), NZD (New Zealand),\nPLN (Poland), QAR (Qatar), RON (Romania), SAR (Saudi Arabia), SEK (Sweden), SGD (Singapore),\nTHB (Thailand), TRY (Turkey), USD (United States), and ZAR (South Africa)._\n\n### Countries we cannot support\n\nWe cannot support payments to and from the following 17 countries/regions:\n\n_Afghanistan, Belarus, Crimea, Donetsk, Luhansk, Cuba, Iran (Islamic Republic of), Iraq,\nLibya, Myanmar, North Korea, Russian Federation, South Sudan, Sudan, Syria, and Venezuela._\n\n### Industries we cannot support\n\nBefore starting your integration, it’s important to check our prohibited industries policy\ncarefully. Please speak to our team if you are unsure and to complete your onboarding.\n\n
\n \n
" }, "/webhooks": { "title": "Webhooks", "contents": "# Webhooks\n\nWebhooks allow you to gain insight into the __trustshare__ system in real-time.\nThey can be used to keep the state of your own system inline with trustshare's,\nor be notified of asynchronous processes. {{ className: \"lead\" }}\n\nDue to the asynchonous nature of payments in general, it is advised to\nleverage webhooks to correlate events and the movement of funds with\nyour own system and its processes.\n\nIn this section we will explore the process of registering and consuming webhooks\nand the types of events that the trustshare system will expose to your endpoints.\n\n## Registering webhooks\n\nTo register a new webhook, you need to have a URL in your app that\nwe can call. You can configure a new webhook from the dashboard\nunder the [developer settings](https://dashboard.trustshare.io/developers/webhooks).\nYou can set up as many webhook handlers as you want. This is useful\nwhilst developing against the [sandbox environment](/sandbox), to\nallow multiple developers to expose their own handlers.\n\nNow, whenever something of interest happens in the system, a message is\nfired off by us. In the next section, we'll look at how to consume webhooks.\n\n## Consuming webhooks\n\nWhen your app receives a webhook request from us, check\nthe `type` attribute to see what event caused it. The first part\nof the event type will tell you the resource that was\neffected by the event, e.g. an inbound, outbound, etc,\n\n\n Our webhook events do not include any information that could be\n considered [PII](https://en.wikipedia.org/wiki/Personal_data) and therefore,\n will only provide resource identifiers which can then be retrieved\n from the API.\n\n\n```json {{ title: 'Example webhook payload' }}\n{\n \"id\": \"wh_evt_1d6a4ZAzda\",\n \"type\": \"intent_confirmed\",\n \"payload\": {\n \"id\": \"intent_a6Abs421Ex\"\n }\n}\n```\n\nIn the example above, a [Payment Intent](/resources/payment-intents) was `confirmed`, and\nthe payload contains the relevant information for retrieving the intent from the API. Webhook\nhandlers should resond with a `200`-like reponse code to acknowledge receipt. In the event\nwe receive a non-`200`-like response we will endeavour to retry sending the event over\nthe next few minutes.\n\n
\n \n
\n\n---\n\n## Event types\n\nThe events that we expose are listed below. Please note that we can not guarantee\nthe order in which you receive events so it is up to you to ensure messages are handled\ncorrectly, even out of order.\n\n\n \n\n \n \n A payment intent was successfully confirmed by the pariticpant on the UI.\n \n \n An existing payment intent was cancelled via API call.\n \n \n A checkout is initiated at the point a payment intent is confirmed.\n \n \n A checkout has failed, usually due the payment method used.\n \n \n A checkout was cancelled by the participant mid-flow.\n \n \n A payment was rejected by the card issuer, or source bank.\n \n \n A checkout process has timed-out. Time-out durations may vary,\n depending on the payment method.\n \n \n A checkout process has been completed by the participant and\n we are _expecting_ funds to arrive.\n \n \n Funds have been received and the full amount of the checkout has\n been reconciled into the project.\n \n \n A debit has been scheduled for future collection.\n \n \n A debit has initiated the collection of funds.\n \n \n A debit collection has been successfully initiated and we are expecting\n funds to arrive.\n \n \n A debit collection has been received and successfully reconciled.\n \n \n A scheduled debit has been cancelled, usually due to a revocation of\n the associated mandate.\n \n \n A debit collection failed at initiation, usually due to insufficient funds.\n \n \n An inbound has been created and reconciled due to the receipt of funds into the system.\n \n \n A settlement has received all its required funds.\n \n \n A settlements funds have been, or are to be, released, however funds\n have not entirely left the system.\n \n \n A settlements funds have physically released from the system.\n \n \n A transfer is processing.\n \n \n A transfer has finalised and the funds have moved.\n \n \n A transfer has been cancelled via the API.\n \n \n A transfer has failed to process.\n \n \n An outbound has been created before the required funds are available.\n \n \n An outbound has been scheduled for a future date.\n \n \n An outbound has been paused pending another process completion, such as\n participant verification. The reason for the pause can be found in the `pause_reason`.\n \n \n An outbound is currently under review by our operations and compliance teams.\n \n \n An outbound was cancelled.\n \n \n An outbound failed to execute. The reason for the failure can be found in the `failure_reason`.\n \n \n An outbound is currently processing.\n \n \n An outbound has finalised and the funds have physically left the system.\n \n \n A participant has completed a verification process and become verified.\n \n \n A payment instrument is processing.\n \n \n A payment instrument has been enabled for use in payment intents.\n \n \n A payment instrument has been disabled.\n \n \n A payment instrument has been rejected after processing.\n \n \n A payment instrument has failed creation.\n \n \n A payout from your revenue account is processing.\n \n \n A payout from your revenue account has finalised and the funds have physically left the system.\n \n \n A payout from your revenue account has failed to process. Contact [support@trustshare.co](mailto:support@trustshare.co).\n \n \n A verification has been created and the flow is open and accessible to the user.\n The end-user needs to complete the verification process, i.e.: provide all requested information and go through the IDV selfie check at the end.\n \n \n A verification is currently either being processed through our automated system or being reviewed by our compliance team.\n The user has completed the verification flow and has submitted all the information we need.\n \n \n A verification has been successfully reviewed and passed.\n The participant the verification belongs to is now verified and can receive funds.\n \n \n A verification has been reviewed and failed.\n The participant the verification belongs to, cannot yet receive funds.\n \n \n\n \n \n\n ```json {{ 'title': 'Example payload' }}\n {\n \"id\": \"wh_evt_B16a4ZEQda\",\n \"type\": \"checkout_initiated\",\n \"payload\": {\n \"id\": \"checkout_oIpJS127J2x\",\n \"type\": \"local_bank_transfer\",\n \"amount\": 150000,\n \"intent_id\": \"intent_a6Abs421Ex\",\n \"project_id\": \"project_87gAqx31z\",\n \"participant_id\": \"participant_bNah32afl\"\n }\n }\n ```\n\n \n\n\n---\n\n## Security\n\nYou must provide a shared secret at the creation of a webhook\nin the [developer settings](https://dashboard.trustshare.io/developers/webhooks),\nwhich will be supplied to your webhook handler in the `x-trustshare-secret` header.\nValidating this shared secret allows you to confirm the authenticity of\nthe request to your endpoint. Here is an example of how to verify\nthe secret in your app:\n\n\n\n```js\nconst secret = req.headers['x-trustshare-secret'];\n\nif (process.env.TRUSTSHARE_WEBHOOK_SECRET === secret) {\n // Request is verified\n} else {\n // Request could not be verified\n}\n```\n\n```python\nfrom flask import request\nimport os\n\nsecret = request.headers.get('x-trustshare-secret')\n\nif os.environ.get('TRUSTSHARE_WEBHOOK_SECRET') == secret:\n # Request is verified\nelse:\n # Request could not be verified\n```\n\n```php\n$secret = $request['headers']['x-trustshare-secret'];\n\nif (getenv('TRUSTSHARE_WEBHOOK_SECRET') == $secret) {\n // Request is verified\n} else {\n // Request could not be verified\n}\n```\n\n\n\nIt's essential to keep your webhook secret safe — otherwise, you can no\nlonger be sure that a given webhook was sent by trustshare.\nDon't commit your secret webhook key to GitHub!" } }, "components": { "schemas": { "IntentType": { "type": "string", "enum": [ "checkout", "payment_link", "invoice" ] }, "IntentOutputType": { "type": "string", "enum": [ "checkout", "payment_link", "invoice", "session" ] }, "SetupIntentType": { "type": "string", "enum": [ "session" ] }, "SettlementIntent": { "type": "object", "properties": { "created_at": { "description": "The date the settlement intent was created.", "type": "string", "nullable": false }, "updated_at": { "description": "The date the settlement intent was last updated.", "type": "string", "nullable": false }, "to": { "description": "The beneficiary Participant of the settlement intent. Where the\ntype is `funding` this will be `null`.", "$ref": "#/components/schemas/KnownParticipant", "nullable": true }, "type": { "description": "The settlement intent type.", "$ref": "#/components/schemas/SettlementType", "nullable": false }, "amount": { "description": "The amount of the settlement intent.", "type": "integer", "nullable": false }, "description": { "description": "A description of the reason for the settlement.", "type": "string", "nullable": false }, "summary": { "description": "An optional summary of the settlement.", "type": "string", "nullable": true }, "fee_flat": { "description": "The flat fee the beneficiary Participant will be pay on each release\nfrom the settlement.", "type": "integer", "nullable": true }, "fee_percentage": { "description": "The percentage fee the beneficiary Participant will pay on each release\nfrom the settlement.", "type": "number", "nullable": true }, "tax_flat": { "description": "The pre-computed flat tax charge that has been added to the value of the settlement.\nThe settlement amount is inclusive of this value.", "type": "integer", "nullable": true }, "tax_percentage": { "description": "The tax charge that has been added to the value of the settlement, expressed as a percentage.\nThe settlement amount is inclusive of the computed percentage amount.", "type": "number", "nullable": true }, "required_by": { "description": "A date that describes when the funds are required. If the funds are required at a future\ndate, the amount will not be included in the total on the Checkout UI.\n\nYou can collect funds against this settlement at a later date by creating a new payment\nintent that targets the settlement ID when the buyer Participant agrees to the Checkout.", "type": "string", "nullable": true }, "release_at": { "description": "The date that describes when the funds will be automatically released.\n\nVerification will be eagerly attempted if required.", "type": "string", "nullable": true }, "reference": { "description": "The reference that will be used for releases from this settlement.", "type": "string", "nullable": true }, "metadata": { "description": "The metadata that was provided at the creation of the settlement intent.", "type": "object", "nullable": true } } }, "Requirement": { "type": "string", "enum": [ "account_number", "iban", "aba", "bank_code", "bic_swift", "branch_code", "bsb_code", "clabe", "cnaps", "ifsc", "sort_code", "bank_name", "bank_address", "identification" ] }, "Requirements": { "type": "object", "properties": { "country": { "description": "The country the bank account is held in.", "$ref": "#/components/schemas/Country", "nullable": false }, "currency": { "description": "The currency the bank account is held in.", "$ref": "#/components/schemas/BankAccountCurrency", "nullable": false }, "supported": { "description": "A boolean value denoting whether the request country/currency pair is supported.", "type": "boolean", "nullable": false }, "requirements": { "description": "An array of required fields that must be provided for the country/currency pair.", "type": "array", "items": { "$ref": "#/components/schemas/Requirement" }, "nullable": false } } }, "PaymentIntent": { "type": "object", "properties": { "id": { "description": "The unique identifier of the created intent.", "type": "string", "nullable": false }, "created_at": { "description": "The date the payment intent was created.", "type": "string", "nullable": false }, "updated_at": { "description": "The date the payment intent was last updated.", "type": "string", "nullable": false }, "project_id": { "description": "The unique ID of the project which this intent targets.", "type": "string", "nullable": true }, "from": { "description": "An object describing the buying Participant for the payment. Will be\n`null` when created without a defined buyer.", "$ref": "#/components/schemas/KnownParticipant", "nullable": true }, "client_secret": { "description": "The client secret for the intent.\n\n\n This secret should __never__ be stored on a backend system and should always\n be directly passed down to the expected participant's device.\n", "type": "string", "nullable": true }, "status": { "description": "The status of the payment intent.", "$ref": "#/components/schemas/IntentStatus", "nullable": false }, "currency": { "description": "The currency of the payment intent. If this payment intent is not against an existing Project,\nthe currency here will dictate the currency that the transactional account should be provisioned for.", "$ref": "#/components/schemas/Currency", "nullable": false }, "type": { "description": "The type of the payment intent.", "$ref": "#/components/schemas/IntentOutputType", "nullable": false }, "fee_flat": { "description": "A flat fee to charge the buyer Participant on successfully completing the intent.\n\nFees are calculated in the following way: (`total` * (1 + `fee_percentage`)) + `fee_flat`.", "type": "integer", "nullable": true }, "fee_percentage": { "description": "A fee percentage to charge the buyer Participant on successfully completing the intent.\nFee percentages must be provided as a fraction, ie. 1.5% as 0.015.\n\nFees are calculated in the following way: (`total` * (1 + `fee_percentage`)) + `fee_flat`.", "type": "number", "nullable": true }, "settlements": { "description": "A list of settlement intents. These describe the line items that will be displayed on the Checkout UI.", "type": "array", "items": { "$ref": "#/components/schemas/SettlementIntent" }, "nullable": false }, "redirect_url": { "description": "The redirect URL supplied at the creation of the intent.", "type": "string", "nullable": true }, "metadata": { "description": "The metadata that was provided at the creation of the payment intent.", "type": "object", "nullable": true } } }, "LinkIntent": { "type": "object", "properties": { "id": { "description": "The unique identifier of the created intent.", "type": "string", "nullable": false }, "created_at": { "description": "The date the payment intent was created.", "type": "string", "nullable": false }, "updated_at": { "description": "The date the payment intent was last updated.", "type": "string", "nullable": false }, "project_id": { "description": "The unique ID of the project which this intent targets.", "type": "string", "nullable": true }, "from": { "description": "An object describing the buying Participant for the payment. Will be\n`null` when created without a defined buyer.", "$ref": "#/components/schemas/KnownParticipant", "nullable": true }, "url": { "description": "The URL that can be shared to complete this payment.", "type": "string", "nullable": false }, "status": { "description": "The status of the payment intent.", "$ref": "#/components/schemas/IntentStatus", "nullable": false }, "currency": { "description": "The currency of the payment intent. If this payment intent is not against an existing Project,\nthe currency here will dictate the currency that the transactional account should be provisioned for.", "$ref": "#/components/schemas/Currency", "nullable": false }, "type": { "description": "The type of the payment intent.", "$ref": "#/components/schemas/IntentOutputType", "nullable": false }, "fee_flat": { "description": "A flat fee to charge the buyer Participant on successfully completing the intent.\n\nFees are calculated in the following way: (`total` * (1 + `fee_percentage`)) + `fee_flat`.", "type": "integer", "nullable": true }, "fee_percentage": { "description": "A fee percentage to charge the buyer Participant on successfully completing the intent.\nFee percentages must be provided as a fraction, ie. 1.5% as 0.015.\n\nFees are calculated in the following way: (`total` * (1 + `fee_percentage`)) + `fee_flat`.", "type": "number", "nullable": true }, "settlements": { "description": "A list of settlement intents. These describe the line items that will be displayed on the Checkout UI.", "type": "array", "items": { "$ref": "#/components/schemas/SettlementIntent" }, "nullable": false }, "redirect_url": { "description": "The redirect URL supplied at the creation of the intent.", "type": "string", "nullable": true }, "metadata": { "description": "The metadata that was provided at the creation of the payment intent.", "type": "object", "nullable": true } } }, "SessionIntent": { "type": "object", "properties": { "id": { "description": "The unique identifier of the created intent.", "type": "string", "nullable": false }, "created_at": { "description": "The date the setup intent was created.", "type": "string", "nullable": false }, "updated_at": { "description": "The date the setup intent was last updated.", "type": "string", "nullable": false }, "participant": { "description": "An object describing the Participant for setup.", "$ref": "#/components/schemas/KnownParticipant", "nullable": true }, "client_secret": { "description": "The client secret for the intent.\n\n\n This secret should __never__ be stored on a backend system and should always\n be directly passed down to the expected participant's device.\n", "type": "string", "nullable": true }, "status": { "description": "The status of the setup intent.", "$ref": "#/components/schemas/IntentStatus", "nullable": false }, "type": { "description": "The type of the intent.", "$ref": "#/components/schemas/IntentOutputType", "nullable": false }, "metadata": { "description": "The metadata that was provided at the creation of the setup intent.", "type": "object", "nullable": true } } }, "SetupIntent": { "type": "object", "discriminator": { "propertyName": "__typename", "mapping": { "SessionIntent": "#/components/schemas/SessionIntent" } }, "oneOf": [ { "allOf": [ { "type": "object", "properties": { "__typename": { "type": "string", "enum": [ "SessionIntent" ], "nullable": false } }, "required": [ "__typename" ] }, { "$ref": "#/components/schemas/SessionIntent" } ] } ], "description": "## The setup intent model\n\nThe setup intent object provides a comprehensive representation of an intended action\nto set up a re-usabled off-session payment instrument or method.", "title": "Setup Intents", "example": { "$ref": "#/components/examples/setup-intent.json" } }, "Currency": { "type": "string", "enum": [ "gbp", "eur", "usd" ] }, "IntentStatus": { "type": "string", "enum": [ "unconfirmed", "confirmed", "cancelled", "debug" ] }, "SettlementTargetInput": { "type": "object", "properties": { "id": { "description": "A unique ID of a participant to use for this intent.\n\nA string in the format: `participant_[0-9a-z]`.", "type": "string" }, "email": { "description": "The email address of the participant in this intent.", "type": "string" }, "type": { "description": "The type of participant.", "$ref": "#/components/schemas/ParticipantType" }, "name": { "description": "The participant's name.", "type": "string" }, "address": { "description": "An object describing the participant's address.", "$ref": "#/components/schemas/AddressInput" }, "bank_account": { "description": "An object describing the participant's bank account.", "$ref": "#/components/schemas/IntentBankAccountInput" }, "business": { "description": "An object describing the participant's business details.", "$ref": "#/components/schemas/BusinessInput" }, "individual": { "description": "An object dsescribing the participant's individual details.", "$ref": "#/components/schemas/IndividualInput" }, "organisation": { "description": "An object describing the participant's organisation details.", "$ref": "#/components/schemas/OrganisationInput" }, "project_id": { "description": "A unique ID of a project to use as the target for this settlement.\n\nA string in the format: `project_[0-9a-z]`.", "type": "string" }, "metadata": { "description": "A free-form metadata object that you can use to store against the participant. This is\nincredibly useful for storing a correlation ID that relates to an entity on your\nown system.", "type": "object" } } }, "SettlementInput": { "type": "object", "properties": { "id": { "description": "An ID of an existing settlement to target, allowing a user to Checkout against\na settlement with a discrepancy or a settlement required at a future date.\n\nA string in the format `settlement_[0-9a-z]`.", "type": "string" }, "type": { "description": "The type of settlement to be created.", "$ref": "#/components/schemas/SettlementType" }, "to": { "description": "An object describing the beneficiary Participant for this settlement.", "$ref": "#/components/schemas/SettlementTargetInput" }, "amount": { "description": "The amount of the settlement described in the lowest denomination\nfor the intent's currency. ie, £1,000.00 should be provided as `100000`.", "type": "integer" }, "description": { "description": "A description of the settlement that will be displayed as a line item\nin the Checkout UI.", "type": "string" }, "summary": { "description": "A further summary of the settlement that will be displayed under the line\nitem in the Checkout UI.", "type": "string" }, "fee_flat": { "description": "A flat fee to charge the beneficiary Participant on successfully\nreleasing funds from the settlement.\n\nFees are calculated in the following way: (`total` * (1 + `fee_percentage`)) + `fee_flat`.", "type": "integer" }, "fee_percentage": { "description": "A fee percentage to charge the beneficiary Participant on successfully\nreleasing funds from the settlement. Fee percentages must be provided\nas a fraction, ie. 1.5% as 0.015.\n\nFees are calculated in the following way: (`total` * (1 + `fee_percentage`)) + `fee_flat`.", "type": "number" }, "tax_flat": { "description": "A pre-computed flat tax charge that has been added to the value of the settlement.\nThe settlement amount should be inclusive of this value.\n\nFlat tax amount must be described in the lowest denomination\nfor the intent's currency. ie, £20.00 should be provided as `2000`.\n\nAssuming a 20% tax rate and a line item for a value of £100, `amount` and `tax_flat` should be:\n```\n {\n ...\n \"amount\": 12000,\n \"tax_flat\": 2000,\n ...\n }\n```\n\n`tax_flat` and `tax_percentage` are mutually exlusive for the same settlement.", "type": "integer" }, "tax_percentage": { "description": "A pre-computed tax charge that has been added to the value of the settlement, expressed as a percentage.\nThe settlement amount should be inclusive of the computed percentage amount.\n\nTax percentages must be provided as a fraction, ie. 20% as 0.2.\n\nAssuming a 20% tax rate and a line item for a value of £100, `amount` and `tax_percentage` should be:\n```\n {\n ...\n \"amount\": 12000,\n \"tax_percentage\": 0.2,\n ...\n }\n```\n\n`tax_flat` and `tax_percentage` are mutually exlusive for the same settlement.", "type": "number" }, "required_by": { "description": "A date that describes when the funds are required. If the funds are required at a future\ndate, the amount will not be included in the total on the Checkout UI.\n\nYou can collect funds against this settlement at a later date by creating a new payment\nintent that targets the settlement ID when the buyer Participant agrees to the Checkout.", "type": "string" }, "release_at": { "description": "A date that describes when the funds should be automatically released.\n\nVerification will be eagerly attempted if required.", "type": "string" }, "reference": { "description": "A reference that will be used for releases from this settlement and will appear on\na beneficiary's bank statement.", "type": "string" }, "metadata": { "description": "A free-form metadata object that you can use to store against the settlement. This is\nincredibly useful for storing a correlation ID that relates to an entity on your\nown system.", "type": "object" } } }, "Settlement": { "type": "object", "properties": { "id": { "description": "A unique ID for the settlement.\n\nA string in the format `settlement_[0-9a-z]`.", "type": "string", "nullable": false }, "created_at": { "description": "The date the settlement was created.", "type": "string", "nullable": false }, "updated_at": { "description": "The date the settlement was last updated.", "type": "string", "nullable": false }, "currency": { "description": "The currency of the over-arching Project that this settlement is against.", "$ref": "#/components/schemas/Currency", "nullable": false }, "status": { "description": "The current status of the settlement.", "$ref": "#/components/schemas/SettlementStatus", "nullable": false }, "type": { "description": "The type of the settlement.", "$ref": "#/components/schemas/SettlementType", "nullable": false }, "project_id": { "description": "The unique ID of the project which this settlement belongs to.", "type": "string", "nullable": false }, "from": { "description": "An object describing the buyer Participant for the settlement.", "$ref": "#/components/schemas/KnownParticipant", "nullable": true }, "to": { "description": "An object describing the beneficiary Participant for the settlement. In the\ncase of a `funding` settlement this value will always be null.", "$ref": "#/components/schemas/KnownParticipant", "nullable": true }, "amount": { "description": "The amount of the settlement.", "type": "integer", "nullable": false }, "description": { "description": "The provided description of the settlement.", "type": "string", "nullable": false }, "summary": { "description": "The provided summary of the settlement.", "type": "string", "nullable": true }, "balance": { "description": "The current balance of the settlement. The balance for a settlement is calculated\nin the following way:\n\n`balance` = `received` - (`released` + `refunded`)\n\nA negative balance infers that funds have been released however we are still waiting\nfor funds to reconcile into the settlement.", "type": "integer", "nullable": false }, "fee_flat": { "description": "The flat fee to charge the beneficiary Participant on successfully\nreleasing funds from the settlement.", "type": "integer", "nullable": true }, "fee_percentage": { "description": "The fee percentage to charge the beneficiary Participant on successfully\nreleasing funds from the settlement.", "type": "number", "nullable": true }, "tax_flat": { "description": "The pre-computed flat tax charge that has been added to the value of the settlement.\nThe settlement amount is inclusive of this value.", "type": "integer", "nullable": true }, "tax_percentage": { "description": "The tax charge that has been added to the value of the settlement, expressed as a percentage.\nThe settlement amount is inclusive of the computed percentage amount.", "type": "number", "nullable": true }, "required_by": { "description": "The date that describes when the funds are required.", "type": "string", "nullable": true }, "release_at": { "description": "The date that describes when the funds will be automatically released.\n\nVerification will be eagerly attempted if required.", "type": "string", "nullable": true }, "reference": { "description": "The reference that will be used for releases from this settlement.", "type": "string", "nullable": true }, "metadata": { "description": "The metadata that was provided at the creation of the underlying settlement intent.", "type": "object", "nullable": false } }, "description": "## The settlement model\n\nThe settlement object provides a comprehensive representation of a single line-item\nwithin the __trustshare__ API, including involved participants and any\nassociated data that may be useful for tracking and analysis purposes.", "title": "Settlements", "example": { "$ref": "#/components/examples/settlement.json" } }, "SettlementStatus": { "type": "string", "enum": [ "settling", "settled", "executing", "executed", "in_review", "cancelled" ] }, "DebitStatus": { "type": "string", "enum": [ "scheduled", "executing", "settling", "settled", "cancelled", "failed" ] }, "Debit": { "type": "object", "properties": { "id": { "description": "A unique ID for the debit.\n\nA string in the format `debit_[0-9a-z]`.", "type": "string", "nullable": false }, "status": { "description": "The status of the debit.", "$ref": "#/components/schemas/DebitStatus", "nullable": false }, "scheduled_at": { "description": "The date trustshare will attempt to take payment from the payer's bank account.", "type": "string", "nullable": false }, "amount": { "description": "The amount of the debit payment.", "type": "integer", "nullable": false }, "checkout_id": { "description": "A unique ID for the checkout this debit has been created for.", "type": "string", "nullable": false }, "project_id": { "description": "The unique ID of the project which this debit will fund.", "type": "string", "nullable": false } } }, "CheckoutType": { "type": "string", "enum": [ "card", "credit", "open_banking", "local_bank_transfer", "international_bank_transfer", "invoice", "direct_debit" ] }, "CheckoutStatus": { "type": "string", "enum": [ "cancelled", "failed", "abandoned", "settling", "settled" ] }, "Checkout": { "type": "object", "properties": { "id": { "description": "A unique ID for the checkout.\n\nA string in the format `checkout_[0-9a-z]`.", "type": "string", "nullable": false }, "created_at": { "description": "The date the checkout was created.", "type": "string", "nullable": false }, "updated_at": { "description": "The date the checkout was last updated.", "type": "string", "nullable": false }, "type": { "description": "The type of the checkout.", "$ref": "#/components/schemas/CheckoutType", "nullable": false }, "status": { "description": "The status of the checkout.", "$ref": "#/components/schemas/CheckoutStatus", "nullable": false }, "participant": { "description": "The buyer Participant of the checkout.", "$ref": "#/components/schemas/KnownParticipant", "nullable": false }, "outstanding": { "description": "The outstanding amount on the checkout to compare against the original amount set by the payment intent.\n\nSignifies if the checkout has been under or overfunded. In the case of overfunding, the value will be negative.", "type": "integer", "nullable": false }, "amount": { "description": "The amount of the checkout.", "type": "integer", "nullable": false }, "reference": { "description": "The unique reference for the checkout.", "type": "string", "nullable": false }, "intent_id": { "description": "The unique ID of the intent which caused the checkout to be created. This\nvalue will be null if the checkout was created via our Direct mechanism.", "type": "string", "nullable": true }, "project_id": { "description": "The unique ID of the project which this checkout will fund.", "type": "string", "nullable": false }, "transfers": { "description": "The `transfers` key historically used to represent the fees associated with the given checkout,\nsince these fees are \"transfered\" to the partner revenue accounts.\n\nThese fee transfers will now be listed under the `fees` key.\n\nWhile `transfers` going forward, will globally denote within-system fund movements initiated by the API user.", "deprecated": true, "type": "array", "items": { "$ref": "#/components/schemas/Transfer" }, "nullable": false }, "fees": { "description": "A list of fee transfers associated with the checkout.", "type": "array", "items": { "$ref": "#/components/schemas/Fee" }, "nullable": false }, "settlements": { "description": "A list of settlements that were targeted by the checkout.", "type": "array", "items": { "$ref": "#/components/schemas/Settlement" }, "nullable": false }, "debits": { "description": "A list of direct debit payments that have been scheduled by the checkout.", "type": "array", "items": { "$ref": "#/components/schemas/Debit" }, "nullable": false }, "metadata": { "description": "The metadata that was provided at the creation of the\npayment intent that caused this checkout.", "type": "object", "nullable": true } }, "description": "## The checkout model\n\nThe checkout object provides a comprehensive representation of a payment transaction\nwithin the __trustshare__ API, including [Settlements](/resources/settlements) and\nall relevant details and any associated data that may be useful for tracking and analysis purposes.", "title": "Checkouts", "example": { "$ref": "#/components/examples/checkout.json" } }, "InvoiceStatus": { "type": "string", "enum": [ "settling", "settled", "cancelled", "abandoned" ] }, "Invoice": { "type": "object", "properties": { "id": { "description": "A unique ID for the invoice.\n\nA string in the format `invoice_[0-9a-z]`.", "type": "string", "nullable": false }, "created_at": { "description": "The date the invoice was created.", "type": "string", "nullable": false }, "updated_at": { "description": "The date the invoice was last updated.", "type": "string", "nullable": false }, "status": { "description": "The status of the invoice.", "$ref": "#/components/schemas/InvoiceStatus", "nullable": false }, "currency": { "description": "The currency of the invoice.", "$ref": "#/components/schemas/Currency", "nullable": false }, "intent_id": { "description": "The unique ID of the intent which caused the invoice to be created.", "type": "string", "nullable": false }, "project_id": { "description": "The project ID the invoice was created against.", "type": "string", "nullable": false }, "participant": { "description": "The buyer Participant of the invoice.", "$ref": "#/components/schemas/KnownParticipant", "nullable": false }, "settlements": { "description": "A list of settlements against the invoice.", "type": "array", "items": { "$ref": "#/components/schemas/Settlement" }, "nullable": false }, "collect": { "description": "Payment details for the underlying account for local and international invoice collection routes.", "$ref": "#/components/schemas/Collect", "nullable": false }, "reference": { "description": "The unique reference for the invoice. This should be used for all bank transfers targeting this invoice.", "type": "string", "nullable": false }, "subtotal": { "description": "The invoice value denominated in the smallest unit for the currency. E.g. pence and cents.", "type": "integer", "nullable": false }, "fee": { "description": "The buyer fees specified for the invoice intent, denominated in the smallest unit for the currency. E.g. pence and cents.", "type": "integer", "nullable": false }, "total": { "description": "The full payable amount for the invoice (subtotal + fee), denominated in the smallest unit for the currency. E.g. pence and cents.", "type": "integer", "nullable": false }, "metadata": { "description": "The metadata that was provided at the creation of the\npayment intent that caused this invoice.", "type": "object", "nullable": true } }, "description": "## The invoice model\n\nThe invoice object represents a small wrapper around a [Checkout](/resources/checkouts),\nwhilst also exposing collection credentials, ie. direct bank account details, that\nyou can display directly to your buyers.", "title": "Invoices", "example": { "$ref": "#/components/examples/invoice.json" } }, "ProjectRoutingCodeType": { "type": "string", "enum": [ "sort_code", "bic_swift", "ach", "wire" ] }, "ProjectRoutingData": { "type": "object", "properties": { "routing_code_type": { "description": "The routing code type required to make payments to the project account, corresponding to the holding currency.", "$ref": "#/components/schemas/ProjectRoutingCodeType", "nullable": false }, "routing_code": { "description": "The routing code value.", "type": "string", "nullable": false } } }, "ProjectAccount": { "type": "object", "properties": { "currency": { "description": "The currency the project account is held in.", "$ref": "#/components/schemas/Currency", "nullable": false }, "iban": { "description": "The IBAN of the project account.", "type": "string", "nullable": false }, "account_number": { "description": "The account number of the project account. For EUR accounts, this will be `null`.", "type": "string", "nullable": true }, "routing_data": { "description": "Object array containing account routing information required to make payments to the project account.\nThe below list describes the types of `routing_data` you can receive for each project holding currency.\n\n- `usd` - the type can be `ach`, `wire`, or `bic_swift`\n- `eur` - the type will be `bic_swift`\n- `gbp` - the type can be `sort_code`, or `bic_swift`", "type": "array", "items": { "$ref": "#/components/schemas/ProjectRoutingData" }, "nullable": false }, "metadata": { "description": "Project account metadata associated with sending payments, such as bank name and address.", "type": "object", "nullable": false } } }, "CollectionAccount": { "type": "object", "properties": { "iban": { "description": "The IBAN of the collection account.", "type": "string", "nullable": true }, "account_number": { "description": "The account number of the collection account. For EUR accounts, this will be `null`.", "type": "string", "nullable": true }, "routing_data": { "description": "Object array containing account routing information required to make payments to the collection account.\nThe below list describes the types of `routing_data` you can receive for each collection currency.\n\n- `usd` - the type can be `ach`, `wire`, or `bic_swift`\n- `eur` - the type will be `bic_swift`\n- `gbp` - the type can be `sort_code`, or `bic_swift`", "type": "array", "items": { "$ref": "#/components/schemas/ProjectRoutingData" }, "nullable": false }, "reference": { "description": "The payment reference __must__ be used if defined, otherwise the payment might not be reconciled correctly.", "type": "string", "nullable": true }, "metadata": { "description": "Collection account metadata associated with sending payments, such as bank name and address.", "type": "object", "nullable": false } } }, "Collect": { "type": "object", "properties": { "local_bank_transfer": { "description": "An object describing collection account details for local payments.", "$ref": "#/components/schemas/CollectionAccount", "nullable": false }, "international_bank_transfer": { "description": "An object describing collection account details for international payments.", "$ref": "#/components/schemas/CollectionAccount", "nullable": false } } }, "ProjectTransferIn": { "type": "object", "properties": { "id": { "description": "A unique ID for the transfer.\n\nA string in the format `transfer_[0-9a-z]`.", "type": "string", "nullable": false }, "from": { "description": "An object describing the source of the transfer that initiated funds entering this project.", "$ref": "#/components/schemas/TransferSourceOrTarget", "nullable": false }, "inbound_id": { "description": "The unique ID of the inbound that describes funds entering this project as a result of the transfer.", "type": "string", "nullable": true } } }, "ProjectTransferOut": { "type": "object", "properties": { "id": { "description": "A unique ID for the transfer.\n\nA string in the format `transfer_[0-9a-z]`.", "type": "string", "nullable": false }, "to": { "description": "An object describing the target of the transfer that initiated funds leaving this project.", "$ref": "#/components/schemas/TransferSourceOrTarget", "nullable": false }, "outbound_id": { "description": "The unique ID of the outbound that describes funds leaving this project as a result of the transfer.", "type": "string", "nullable": true } } }, "ProjectTransfers": { "type": "object", "properties": { "in": { "description": "A list of transfers that have caused funds to enter this project.", "type": "array", "items": { "$ref": "#/components/schemas/ProjectTransferIn" }, "nullable": false }, "out": { "description": "A list of transfers that have caused funds to leave this project.", "type": "array", "items": { "$ref": "#/components/schemas/ProjectTransferOut" }, "nullable": false } } }, "Project": { "type": "object", "properties": { "id": { "description": "A unique ID for the project.\n\nA string in the format `project_[0-9a-z]`.", "type": "string", "nullable": false }, "created_at": { "description": "The date the project was created.", "type": "string", "nullable": false }, "updated_at": { "description": "The date the project was last updated.", "type": "string", "nullable": false }, "type": { "description": "A string of `controlled` | `uncontrolled`. Denotes whether the project has been explicitly created by calling the `createProject` end point.\nAn explicitly created project will be of type `controlled`, while a project implicitly created through a payment intent is considered `uncontrolled`.", "$ref": "#/components/schemas/ProjectType", "nullable": false }, "currency": { "description": "The currency the project account is held in.", "$ref": "#/components/schemas/Currency", "nullable": false }, "status": { "description": "The status of the project.", "$ref": "#/components/schemas/ProjectStatus", "nullable": false }, "balance": { "description": "The sum of all unreconciled inbounds and funding settlement balances currently in the underlying account.", "type": "integer", "nullable": false }, "checkouts": { "description": "A list of [checkouts](/resources/checkouts) that have funded the project.", "type": "array", "items": { "$ref": "#/components/schemas/Checkout" }, "nullable": false }, "settlements": { "description": "A list of [settlements](/resources/settlements) against the project.", "type": "array", "items": { "$ref": "#/components/schemas/Settlement" }, "nullable": false }, "inbounds": { "description": "A list of [inbounds](/resources/inbounds) which denote physical receipt of funds into the project account.", "type": "array", "items": { "$ref": "#/components/schemas/Inbound" }, "nullable": false }, "outbounds": { "description": "A list of [outbounds](/resources/outbounds) that have sent funds from the project account.", "type": "array", "items": { "$ref": "#/components/schemas/Outbound" }, "nullable": false }, "transfers": { "description": "An object containing lists of [transfers](/resources/transfers) in and out, that have caused funds to enter/leave this project.", "$ref": "#/components/schemas/ProjectTransfers", "nullable": false }, "collect": { "description": "Payment details for the underlying account for local and international collection routes.", "$ref": "#/components/schemas/Collect", "nullable": true }, "metadata": { "description": "The metadata that was provided at the creation of the project.", "type": "object", "nullable": false } }, "description": "## The project model\n\nThe project object provides a representation of a transactional bank account within\nthe __trustshare__ API, including it's associated [Settlements](/resources/settlements)\nand fund movements described by [Inbounds](/resources/inbounds),\n[Outbounds](/resources/outbounds), and [Transfers](/resources/transfers).", "title": "Projects", "example": { "$ref": "#/components/examples/project.json" } }, "ProjectType": { "type": "string", "enum": [ "uncontrolled", "controlled" ] }, "ProjectStatus": { "type": "string", "enum": [ "in_progress", "complete", "in_review", "closing", "closed" ] }, "InboundType": { "type": "string", "enum": [ "card", "credit", "open_banking", "local_bank_transfer", "international_bank_transfer", "manual_bank_transfer", "transfer" ] }, "OutboundType": { "type": "string", "enum": [ "release", "refund", "transfer", "payout" ] }, "InboundStatus": { "type": "string", "enum": [ "settling", "settled", "in_review" ] }, "OutboundStatus": { "type": "string", "enum": [ "scheduled", "awaiting_funds", "automated_review", "paused", "executing", "executed", "failed", "cancelled", "in_review", "processing" ] }, "TransferType": { "type": "string", "enum": [ "fee" ] }, "TransferSubType": { "type": "string", "enum": [ "buyer", "seller" ] }, "ConversionStatus": { "type": "string", "enum": [ "pending", "executing", "accepted", "failed" ] }, "Conversion": { "type": "object", "properties": { "from": { "description": "The currency being converted.", "$ref": "#/components/schemas/Currency", "nullable": false }, "to": { "description": "The target currency of the conversion.", "$ref": "#/components/schemas/BankAccountCurrency", "nullable": false }, "status": { "description": "The status of the conversion.", "$ref": "#/components/schemas/ConversionStatus", "nullable": false }, "expected_amount": { "description": "The expected amount of the conversion in the target currency. The amount\nis always in the lowest denomination of the target currency, so please\nbe aware of the target currencies _minor unit_.", "type": "integer", "nullable": true }, "rate": { "description": "The conversion rate in the form `from` -> `to`.", "type": "number", "nullable": true } } }, "Inbound": { "type": "object", "properties": { "id": { "description": "A unique ID for the inbound.\n\nA string in the format `inbound_[0-9a-z]`.", "type": "string", "nullable": false }, "created_at": { "description": "The date the project was created.", "type": "string", "nullable": false }, "updated_at": { "description": "The date the project was last updated.", "type": "string", "nullable": false }, "project_id": { "description": "The unique ID of the project which this inbound funds.", "type": "string", "nullable": false }, "checkout_id": { "description": "The unique ID of the checkout that this inbound has been reconciled against.\n\nIf we were unable to reconcile the inbound to a specific checkout this value will be null.", "type": "string", "nullable": true }, "transfer": { "description": "The transfer that initiated the creation of this inbound to denote fund movements.", "$ref": "#/components/schemas/ProjectTransferIn", "nullable": true }, "type": { "description": "The type of the inbound.", "$ref": "#/components/schemas/InboundType", "nullable": false }, "status": { "description": "The status of the inbound.", "$ref": "#/components/schemas/InboundStatus", "nullable": false }, "amount": { "description": "The amount of the inbound.", "type": "integer", "nullable": false }, "reference": { "description": "The reference that was used for the inbound.\n\nThis will be `null` if no reference is provided by the buyer or\nthe inbound is not a bank transfer, ie. manual or Open Banking initiated.", "type": "string", "nullable": true } }, "description": "## The inbound model\n\nThe inbound object provides a representation of physical receipt of funds\nwithin the __trustshare__ API, including the associated [Checkout](/resources/checkouts),\nif it could be reconciled, and the reference used.", "title": "Inbounds", "example": { "$ref": "#/components/examples/inbound.json" } }, "OutboundPausedReason": { "type": "string", "enum": [ "pending_participant_verification" ] }, "OutboundFailureReason": { "type": "string", "enum": [ "fx_amount_too_small", "unable_to_determine_target_account", "invalid_reference", "invalid_target_account_credentials", "missing_participant_information", "generic_failure_contact_support", "unsupported_payout_route" ] }, "Outbound": { "type": "object", "properties": { "id": { "description": "A unique ID for the outbound.\n\nA string in the format `outbound_[0-9a-z]`.", "type": "string", "nullable": false }, "created_at": { "description": "The date the outbound was created.", "type": "string", "nullable": false }, "updated_at": { "description": "The date the outbound was last updated.", "type": "string", "nullable": false }, "release_at": { "description": "The date that describes when the funds will be automatically released.\n\nVerification will be eagerly attempted if required.", "type": "string", "nullable": true }, "project_id": { "description": "The project ID the outbound was created against.", "type": "string", "nullable": true }, "settlement_id": { "description": "The settlement ID the outbound was created against. In the event\nfunds were released directly from a project, this value will be null.", "type": "string", "nullable": true }, "type": { "description": "The type of the outbound.", "$ref": "#/components/schemas/OutboundType", "nullable": false }, "status": { "description": "The status of the outbound.", "$ref": "#/components/schemas/OutboundStatus", "nullable": false }, "amount": { "description": "The amount of the outbound.", "type": "integer", "nullable": false }, "to": { "description": "An object describing the beneficiary Participant for the outbound payment.", "$ref": "#/components/schemas/KnownParticipant", "nullable": true }, "transfers": { "description": "The `transfers` key historically used to represent the fees associated with the given outbound,\nsince these fees are \"transfered\" to the partner revenue accounts.\n\nThese fee transfers will now be listed under the `fees` key.\n\nWhile `transfers` going forward, will globally denote within-system fund movements initiated by the API user.", "deprecated": true, "type": "array", "items": { "$ref": "#/components/schemas/Transfer" }, "nullable": false }, "fees": { "description": "A list of any fees created as the result of the outbound.", "type": "array", "items": { "$ref": "#/components/schemas/Fee" }, "nullable": false }, "transfer": { "description": "The transfer that initiated the creation of this outbound to denote fund movements.", "$ref": "#/components/schemas/ProjectTransferOut", "nullable": true }, "conversion": { "description": "An object describing a potential currency conversion to achieve the outbound.", "$ref": "#/components/schemas/Conversion", "nullable": true }, "paused_reason": { "description": "The reason why the outbound is currently in a `paused` status.", "$ref": "#/components/schemas/OutboundPausedReason", "nullable": true }, "failure_reason": { "description": "The reason why the outbound is currently in a `failed` status.", "$ref": "#/components/schemas/OutboundFailureReason", "nullable": true }, "reference": { "description": "The reference that will be used for the outbound.\n\nThe reference can be up to 18 characters in length and supports `a-z`, `A-Z`, `0-9`, `-`, and space characters.", "type": "string", "nullable": true }, "metadata": { "description": "The metadata that was provided at the creation of the release or refund.", "type": "object", "nullable": true } }, "description": "## The outbound model\n\nThe outbound object provides a comprehensive representation of a payment transaction\nwithin the __trustshare__ API, and all relevant details and any associated data that\nmay be useful for tracking and analysis purposes.", "title": "Outbounds", "example": { "$ref": "#/components/examples/outbound.json" } }, "PaymentType": { "type": "string", "enum": [ "credit" ] }, "CreditTerms": { "type": "string", "enum": [ "thirty_days", "sixty_days", "ninety_days", "end_of_month_plus_thirty_days" ] }, "CreditPaymentInput": { "type": "object", "properties": { "payment_instrument_id": { "description": "A unique ID of an existing payment instrument.\n\nA string in the format: `payment_instrument_[0-9a-z]`", "type": "string" }, "terms": { "description": "The preferred terms of the credit payment.", "$ref": "#/components/schemas/CreditTerms" } }, "required": [ "payment_instrument_id", "terms" ] }, "SettlementType": { "type": "string", "enum": [ "funding", "immediate", "escrow", "transfer" ] }, "ParticipantStatus": { "type": "string", "enum": [ "unverified", "verifying", "verified" ] }, "ParticipantType": { "type": "string", "enum": [ "unknown", "individual", "business", "third_party", "organisation" ] }, "BankAccountCurrency": { "type": "string", "enum": [ "aed", "afn", "all", "amd", "ang", "aoa", "ars", "aud", "awg", "azn", "bam", "bbd", "bdt", "bgn", "bhd", "bif", "bmd", "bnd", "bob", "brl", "bsd", "btn", "bwp", "byn", "bzd", "cad", "cdf", "chf", "clp", "cny", "cop", "crc", "cup", "cve", "czk", "djf", "dkk", "dop", "dzd", "egp", "ern", "etb", "eur", "fjd", "fkp", "gbp", "gel", "ghs", "gip", "gmd", "gnf", "gtq", "gyd", "hkd", "hnl", "hrk", "htg", "huf", "idr", "ils", "inr", "iqd", "irr", "isk", "jmd", "jod", "jpy", "kes", "kgs", "khr", "kmf", "kpw", "krw", "kwd", "kyd", "kzt", "lak", "lbp", "lkr", "lrd", "lsl", "ltl", "lvl", "lyd", "mad", "mdl", "mga", "mkd", "mmk", "mnt", "mop", "mro", "mur", "mvr", "mwk", "mxn", "myr", "mzn", "nad", "ngn", "nio", "nok", "npr", "nzd", "omr", "pab", "pen", "pgk", "php", "pkr", "pln", "pyg", "qar", "ron", "rsd", "rub", "rwf", "sar", "sbd", "scr", "sdg", "sek", "sgd", "shp", "sll", "sos", "srd", "ssp", "std", "syp", "szl", "thb", "tjs", "tmt", "tnd", "top", "try", "ttd", "tvd", "twd", "tzs", "uah", "ugx", "usd", "uyu", "uzs", "ved", "vnd", "vuv", "wst", "xaf", "xcd", "xof", "xpf", "yer", "zar", "zmw" ] }, "Country": { "type": "string", "enum": [ "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BR", "BS", "BT", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GG", "GH", "GI", "GL", "GM", "GN", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW" ] }, "RoutingCodeType": { "type": "string", "enum": [ "bic_swift", "aba", "clabe", "cnaps", "wire", "ach", "bank_code", "ifsc", "sort_code" ] }, "BankAccount": { "type": "object", "properties": { "id": { "description": "A unique ID for the bank_account.\n\nA string in the format `bank_account_[0-9a-z]`.", "type": "string", "nullable": false }, "country": { "description": "The country the bank account is held in.", "$ref": "#/components/schemas/Country", "nullable": false }, "currency": { "description": "The currency the bank account is held in.", "$ref": "#/components/schemas/BankAccountCurrency", "nullable": false }, "account_number": { "description": "The account number of the bank account.", "type": "string", "nullable": false }, "routing_code": { "description": "The routing code of the bank account.", "type": "string", "nullable": false }, "routing_code_type": { "description": "The routing code type of the bank account.", "$ref": "#/components/schemas/RoutingCodeType", "nullable": false }, "routing_data": { "description": "An object potentially containing further routing data.", "type": "object", "nullable": true } } }, "BankAccountInput": { "type": "object", "properties": { "country": { "description": "The country the bank account is held in.", "$ref": "#/components/schemas/Country" }, "currency": { "description": "The currency the bank account is held in.", "$ref": "#/components/schemas/BankAccountCurrency" }, "account_number": { "description": "The account number of the bank account.", "type": "string" }, "iban": { "description": "The IBAN of the bank account.", "type": "string" }, "aba": { "description": "The ABA routing code of the bank account (US only).", "type": "string" }, "bank_code": { "description": "The Bank Code of the bank account.", "type": "string" }, "bic_swift": { "description": "The Bank Identifier Code of the bank account on the SWIFT network.", "type": "string" }, "branch_code": { "description": "The Branch Code of the bank account.", "type": "string" }, "bsb_code": { "description": "The BSB code of the bank account (AU only).", "type": "string" }, "clabe": { "description": "The CLABE of the bank account (MX only).", "type": "string" }, "cnaps": { "description": "The CNAPS of the bank account (CN only).", "type": "string" }, "ifsc": { "description": "The IFSC of the bank account (IN only).", "type": "string" }, "sort_code": { "description": "The Sort Code of the bank account (UK only).", "type": "string" }, "bank_name": { "description": "The Bank Name of the bank account.", "type": "string" }, "bank_address": { "description": "The Bank Address of the bank account.", "type": "string" }, "identification": { "description": "The identification type of the bank account (MX only).", "type": "string" } }, "required": [ "country", "currency" ] }, "IntentBankAccountInput": { "type": "object", "properties": { "id": { "description": "A unique ID of a bank account to target for this intent.\n\nA string in the format: `bank_account_[0-9a-z]`.", "type": "string" }, "country": { "description": "The country the bank account is held in.", "$ref": "#/components/schemas/Country" }, "currency": { "description": "The currency the bank account is held in.", "$ref": "#/components/schemas/BankAccountCurrency" }, "account_number": { "description": "The account number of the bank account.", "type": "string" }, "iban": { "description": "The IBAN of the bank account.", "type": "string" }, "aba": { "description": "The ABA routing code of the bank account (US only).", "type": "string" }, "bank_code": { "description": "The Bank Code of the bank account.", "type": "string" }, "bic_swift": { "description": "The Bank Identifier Code of the bank account on the SWIFT network.", "type": "string" }, "branch_code": { "description": "The Branch Code of the bank account.", "type": "string" }, "bsb_code": { "description": "The BSB code of the bank account (AU only).", "type": "string" }, "clabe": { "description": "The CLABE of the bank account (MX only).", "type": "string" }, "cnaps": { "description": "The CNAPS of the bank account (CN only).", "type": "string" }, "ifsc": { "description": "The IFSC of the bank account (IN only).", "type": "string" }, "sort_code": { "description": "The Sort Code of the bank account (UK only).", "type": "string" }, "bank_name": { "description": "The Bank Name of the bank account.", "type": "string" }, "bank_address": { "description": "The Bank Address of the bank account.", "type": "string" }, "identification": { "description": "The identification type of the bank account (MX only).", "type": "string" } } }, "BusinessType": { "type": "string", "enum": [ "unknown", "limited", "public", "partnership", "sole_trader" ] }, "OrganisationType": { "type": "string", "enum": [ "unknown", "overseas_government", "treaty", "non_profit", "political", "voluntary_group", "sports_club", "other" ] }, "PersonType": { "type": "string", "enum": [ "unknown", "shareholder", "director", "partner", "applicant", "executive" ] }, "PersonInput": { "type": "object", "properties": { "type": { "description": "The person's type.", "$ref": "#/components/schemas/PersonType" }, "name": { "description": "The person's name.", "type": "string" }, "address": { "description": "The person's address.", "$ref": "#/components/schemas/AddressInput" }, "email": { "description": "The person's email address.", "type": "string" }, "phone_number": { "description": "The person's phone number.", "type": "string" }, "date_of_birth": { "description": "The person's date of birth.", "type": "string" } } }, "Person": { "type": "object", "properties": { "type": { "description": "The person's type.", "$ref": "#/components/schemas/PersonType", "nullable": false }, "name": { "description": "The person's name.", "type": "string", "nullable": true }, "address": { "description": "The person's address.", "$ref": "#/components/schemas/Address", "nullable": true }, "email": { "description": "The person's email address.", "type": "string", "nullable": true }, "phone_number": { "description": "The person's phone number.", "type": "string", "nullable": true }, "date_of_birth": { "description": "The person's date of birth.", "type": "string", "nullable": true } } }, "BusinessInput": { "type": "object", "properties": { "type": { "description": "The type of business.", "$ref": "#/components/schemas/BusinessType" }, "company_number": { "description": "The business' company number.", "type": "string" }, "registered_address": { "description": "The business' registered address.", "$ref": "#/components/schemas/AddressInput" }, "trading_address": { "description": "The business' trading address.", "$ref": "#/components/schemas/AddressInput" }, "shipping_address": { "description": "The business' shipping address.", "$ref": "#/components/schemas/AddressInput" }, "website": { "description": "The business' website.", "type": "string" }, "phone_number": { "description": "The business' phone number.", "type": "string" }, "persons": { "description": "A list of the business' employees with significant control.", "type": "array", "items": { "$ref": "#/components/schemas/PersonInput" } } } }, "Business": { "type": "object", "properties": { "type": { "description": "The type of business.", "$ref": "#/components/schemas/BusinessType", "nullable": false }, "company_number": { "description": "The business' company number.", "type": "string", "nullable": true }, "registered_address": { "description": "The business' registered address.", "$ref": "#/components/schemas/Address", "nullable": true }, "trading_address": { "description": "The business' trading address.", "$ref": "#/components/schemas/Address", "nullable": true }, "shipping_address": { "description": "The business' shipping address.", "$ref": "#/components/schemas/Address", "nullable": true }, "phone_number": { "description": "The business' phone number.", "type": "string", "nullable": true }, "website": { "description": "The business' website.", "type": "string", "nullable": true }, "persons": { "description": "A list of the business' employees with significant control.", "type": "array", "items": { "$ref": "#/components/schemas/Person" }, "nullable": false } } }, "IndividualInput": { "type": "object", "properties": { "date_of_birth": { "description": "The individual's date of birth.", "type": "string" }, "residential_address": { "description": "The individual's residential address.", "$ref": "#/components/schemas/AddressInput" }, "shipping_address": { "description": "The individual's shipping address.", "$ref": "#/components/schemas/AddressInput" }, "phone_number": { "description": "The individual's phone number.", "type": "string" } } }, "Individual": { "type": "object", "properties": { "date_of_birth": { "description": "The individual's date of birth.", "type": "string", "nullable": true }, "residential_address": { "description": "The individual's residential address.", "$ref": "#/components/schemas/Address", "nullable": true }, "shipping_address": { "description": "The individual's shipping address.", "$ref": "#/components/schemas/Address", "nullable": true }, "phone_number": { "description": "The individual's phone number.", "type": "string", "nullable": true } } }, "OrganisationInput": { "type": "object", "properties": { "type": { "description": "The type of organisation.", "$ref": "#/components/schemas/OrganisationType" }, "organisation_number": { "description": "The organisation's registered number.", "type": "string" }, "registered_address": { "description": "The organisation's registered address.", "$ref": "#/components/schemas/AddressInput" }, "shipping_address": { "description": "The organisation's shipping address.", "$ref": "#/components/schemas/AddressInput" }, "phone_number": { "description": "The organisation's phone number.", "type": "string" }, "website": { "description": "The organisation's website.", "type": "string" }, "persons": { "description": "The organisation's members with significant control.", "type": "array", "items": { "$ref": "#/components/schemas/PersonInput" } } } }, "Organisation": { "type": "object", "properties": { "type": { "description": "The type of organisation.", "$ref": "#/components/schemas/OrganisationType", "nullable": false }, "organisation_number": { "description": "The organisation's registered number.", "type": "string", "nullable": true }, "registered_address": { "description": "The organisation's registered address.", "$ref": "#/components/schemas/Address", "nullable": true }, "shipping_address": { "description": "The organisation's shipping address.", "$ref": "#/components/schemas/Address", "nullable": true }, "phone_number": { "description": "The organisation's phone number.", "type": "string", "nullable": true }, "website": { "description": "The organisation's website.", "type": "string", "nullable": true }, "persons": { "description": "The organisation's members with significant control.", "type": "array", "items": { "$ref": "#/components/schemas/Person" }, "nullable": false } } }, "ParticipantInput": { "type": "object", "properties": { "id": { "description": "A unique ID of a participant that already exists on the system.\n\nA string in the format: `participant_[0-9a-z]`.", "type": "string" }, "email": { "description": "The email address of the participant.", "type": "string" }, "type": { "description": "The type of participant.", "$ref": "#/components/schemas/ParticipantType" }, "name": { "description": "The participant's name.", "type": "string" }, "address": { "description": "An object describing the participant's address.", "$ref": "#/components/schemas/AddressInput" }, "bank_account": { "description": "An object describing the participant's bank account.", "$ref": "#/components/schemas/IntentBankAccountInput" }, "business": { "description": "An object describing the participant's business details.", "$ref": "#/components/schemas/BusinessInput" }, "individual": { "description": "An object dsescribing the participant's individual details.", "$ref": "#/components/schemas/IndividualInput" }, "organisation": { "description": "An object describing the participant's organisation details.", "$ref": "#/components/schemas/OrganisationInput" }, "metadata": { "description": "A free-form metadata object that you can use to store against the participant. This is\nincredibly useful for storing a correlation ID that relates to an entity on your\nown system.", "type": "object" } } }, "VerificationStatus": { "type": "string", "enum": [ "required", "partially_submitted", "id_verification_required", "automated_review", "manual_review", "passed", "failed" ] }, "VerificationType": { "type": "string", "enum": [ "unknown", "individual", "organisation", "business", "limited", "public", "partnership", "sole_trader", "overseas_government", "treaty", "non_profit", "political", "voluntary_group", "sports_club", "other" ] }, "Verification": { "type": "object", "properties": { "id": { "description": "A unique ID of the verification.\n\nA string in the format: `verification_[0-9a-z]`.", "type": "string", "nullable": false }, "type": { "description": "The type of entity this verification describes.", "$ref": "#/components/schemas/VerificationType", "nullable": false }, "status": { "description": "The verification status.", "$ref": "#/components/schemas/VerificationStatus", "nullable": false }, "participant": { "description": "An object describing the participant to be verified.", "$ref": "#/components/schemas/KnownParticipant", "nullable": false }, "client_secret": { "description": "The client secret for the verification.\n\n\n This secret should __never__ be stored on a backend system and should\n always be directly passed down to the expected participant's device.\n", "type": "string", "nullable": true }, "redirect_url": { "description": "The redirect URL supplied at the creation of the verification.", "type": "string", "nullable": true }, "metadata": { "description": "The metadata that was provided at the creation of the verification.", "type": "object", "nullable": true } }, "description": "## The verification model\n\nThe verification object provides a representation of the process a\n[Participant](/resources/participants) takes to receive funds within the __trustshare__\nAPI, including their verification status, and associated metadata.", "title": "Verifications", "example": { "$ref": "#/components/examples/verification.json" } }, "KnownParticipant": { "type": "object", "properties": { "id": { "description": "A unique ID of the participant.\n\nA string in the format: `participant_[0-9a-z]`.", "type": "string", "nullable": false }, "status": { "description": "The participant status.", "$ref": "#/components/schemas/ParticipantStatus", "nullable": false }, "type": { "description": "The participant type.", "$ref": "#/components/schemas/ParticipantType", "nullable": false }, "email": { "description": "The participant's email.", "type": "string", "nullable": false }, "name": { "description": "The participant's name.", "type": "string", "nullable": true }, "address": { "description": "An object describing the participant's address.", "$ref": "#/components/schemas/Address", "nullable": true }, "bank_account": { "description": "An object describing the participant's bank account.", "$ref": "#/components/schemas/BankAccount", "nullable": true }, "business": { "description": "An object describing the participant's business details.", "$ref": "#/components/schemas/Business", "nullable": true }, "individual": { "description": "An object describing the participant's individual details.", "$ref": "#/components/schemas/Individual", "nullable": true }, "organisation": { "description": "An object describing the participant's organisation details.", "$ref": "#/components/schemas/Organisation", "nullable": true }, "metadata": { "description": "The metadata that was provided at the creation of the participant.", "type": "object", "nullable": false } }, "description": "## The participant model\n\nThe participant object provides a representation of a buyer or seller within the __trustshare__\nAPI, including their verification status, _default_ bank account and associated metadata.", "title": "Participants", "example": { "$ref": "#/components/examples/participant.json" } }, "AddressType": { "type": "string", "enum": [ "unknown", "shipping", "billing", "residential", "registered", "trading" ] }, "Address": { "type": "object", "properties": { "type": { "description": "The address's type.", "$ref": "#/components/schemas/AddressType", "nullable": false }, "address_line_1": { "description": "First line of the address.", "type": "string", "nullable": false }, "address_line_2": { "description": "Second line of the address.", "type": "string", "nullable": true }, "town_city": { "description": "The town/city of the address.", "type": "string", "nullable": false }, "region": { "description": "The region of the address.", "type": "string", "nullable": true }, "postal_code": { "description": "The postal code of the address.", "type": "string", "nullable": false }, "country": { "description": "The country code of the address.", "$ref": "#/components/schemas/Country", "nullable": false } } }, "AddressInput": { "type": "object", "properties": { "type": { "description": "The type of the address, defaults to `unknown`.", "$ref": "#/components/schemas/AddressType" }, "address_line_1": { "description": "First line of the address.", "type": "string" }, "address_line_2": { "description": "Second line of the address.", "type": "string" }, "town_city": { "description": "The town/city of the address.", "type": "string" }, "region": { "description": "The region of the address.", "type": "string" }, "postal_code": { "description": "The postal code of the address.", "type": "string" }, "country": { "description": "The country code of the address.", "$ref": "#/components/schemas/Country" } }, "required": [ "address_line_1", "town_city", "postal_code", "country" ] }, "ReleaseInput": { "type": "object", "properties": { "settlement_id": { "description": "A unique ID of the settlement to release funds from.\n\nA string in the format: `settlement_[0-9a-z]`.", "type": "string" }, "project_id": { "description": "A unique ID of the project to release funds from.\n\nA string in the format: `project_[0-9a-z]`.", "type": "string" }, "amount": { "description": "The amount to release in the currency's lowest denomination.", "type": "integer" }, "fee_flat": { "description": "A flat fee to charge the beneficiary Participant on successfully releasing funds.", "type": "integer" }, "fee_percentage": { "description": "The fee percentage to charge the beneficiary Participant on successfully\nreleasing funds.", "type": "number" }, "to": { "description": "An object describing the beneficiary participant to release to.\n\nYou can only provide a participant at release when the settlement is of\ntype `funded` or you are releasing directly from a project.", "$ref": "#/components/schemas/ParticipantInput" }, "release_at": { "description": "A date that describes when the funds should be automatically released.\n\nVerification will be eagerly attempted if required.", "type": "string" }, "reference": { "description": "A reference that should be used for the outbound.\n\nThe reference can be up to 18 characters in length and supports `a-z`, `A-Z`, `0-9`, `-`, and space characters.\nThis will fall back to your company name if no reference is provided.", "type": "string" }, "metadata": { "description": "A free-form metadata object that you can use to store against the outbound. This is\nincredibly useful for storing a correlation ID that relates to an entity on your\nown system.", "type": "object" } } }, "RefundInput": { "type": "object", "properties": { "settlement_id": { "description": "A unique ID of a settlement to refund.\n\nA string in the format: `settlement_[0-9a-z]`.", "type": "string" }, "amount": { "description": "The amount to refund in the currencies lowest denomination.", "type": "integer" }, "release_at": { "description": "A date that describes when the funds should be automatically released.\n\nVerification will be eagerly attempted if required.", "type": "string" }, "reference": { "description": "A reference that should be used for the outbound.\n\nThe reference can be up to 18 characters in length and supports `a-z`, `A-Z`, `0-9`, `-`, and space characters.\nThis will fall back to your company name if no reference is provided.", "type": "string" }, "metadata": { "description": "A free-form metadata object that you can use to store against the outbound. This is\nincredibly useful for storing a correlation ID that relates to an entity on your\nown system.", "type": "object" } }, "required": [ "settlement_id" ] }, "OutboundResult": { "type": "object", "properties": { "outbounds": { "description": "A list of outbounds created off the back of a release or refund.", "type": "array", "items": { "$ref": "#/components/schemas/Outbound" }, "nullable": false } } }, "TransferStatus": { "type": "string", "enum": [ "awaiting_funds", "executing", "executed", "failed", "cancelled", "scheduled" ] }, "TransferSourceOrTarget": { "type": "object", "properties": { "project_id": { "description": "The unique ID of the project originating the funds being transfered.", "type": "string", "nullable": false }, "settlement_id": { "description": "The unique ID of the settlement originating the funds being transfered.", "type": "string", "nullable": true } } }, "Fee": { "type": "object", "properties": { "created_at": { "description": "The date the fee was created.", "type": "string", "nullable": false }, "updated_at": { "description": "The date the fee was last updated.", "type": "string", "nullable": false }, "type": { "description": "The type of fee.", "$ref": "#/components/schemas/TransferType", "nullable": false }, "subtype": { "description": "The subtype of fee.", "$ref": "#/components/schemas/TransferSubType", "nullable": false }, "amount": { "description": "The amount of the fee.", "type": "integer", "nullable": false } } }, "Transfer": { "type": "object", "properties": { "id": { "description": "The unique ID of the transfer.\n\nA string in the format: `transfer_[0-9a-z]`.", "type": "string", "nullable": false }, "created_at": { "description": "The date the transfer was created.", "type": "string", "nullable": false }, "updated_at": { "description": "The date the transfer was last updated.", "type": "string", "nullable": false }, "type": { "description": "The type of transfer.", "$ref": "#/components/schemas/TransferType", "nullable": false }, "subtype": { "description": "The subtype of transfer.", "$ref": "#/components/schemas/TransferSubType", "nullable": false }, "status": { "description": "The status of the transfer.", "$ref": "#/components/schemas/TransferStatus", "nullable": false }, "amount": { "description": "The amount of the transfer.", "type": "integer", "nullable": false }, "from": { "description": "The object describing the settlement or project originatig the funds being transfered.", "$ref": "#/components/schemas/TransferSourceOrTarget", "nullable": false }, "to": { "description": "The object describing the target project of the transfer.", "$ref": "#/components/schemas/TransferSourceOrTarget", "nullable": false }, "inbound_id": { "description": "The unique ID of the inbound that describes funds entering the target project as a result of this transfer.", "type": "string", "nullable": true }, "outbound_id": { "description": "The unique ID of the outbound that describes funds leaving the source project as a result of this transfer.", "type": "string", "nullable": true }, "release_at": { "description": "The date that describes when the funds will be automatically transfered.", "type": "string", "nullable": true }, "metadata": { "description": "The metadata that was provided at the creation of the transfer.", "type": "object", "nullable": true } }, "description": "## The transfer model\n\nThe transfer object provides a representation of an inter-project or within-project\ntransfer in the __trustshare__ API, include associated [Projects](/resources/projects),\n[Settlements](/resources/settlements), [Inbounds](/resources/inbounds), and\n[Outbounds](/resources/outbounds).", "title": "Transfers", "example": { "$ref": "#/components/examples/transfer.json" } }, "TransferSourceOrTargetInput": { "type": "object", "properties": { "project_id": { "description": "A unique ID for the project originating the funds being transfered.\n\nA string in the format `project_[0-9a-z]`.", "type": "string" }, "settlement_id": { "description": "A unique ID for the settlement originating the funds being transfered.\n\nA string in the format `settlement_[0-9a-z]`.", "type": "string" } } }, "TransferInput": { "type": "object", "properties": { "amount": { "description": "The amount to transfer in the currency's lowest denomination.", "type": "integer" }, "fee_flat": { "description": "A flat fee to charge on successfully completing a Transfer.", "type": "integer" }, "fee_percentage": { "description": "A fee percentage to charge on successfully completing a Transfer.\nFee percentages must be provided as a fraction, ie. 1.5% as 0.015.", "type": "number" }, "from": { "description": "An object describing the settlement or project originatig the funds being transfered.", "$ref": "#/components/schemas/TransferSourceOrTargetInput" }, "to": { "description": "An object describing the target project of the transfer.", "$ref": "#/components/schemas/TransferSourceOrTargetInput" }, "release_at": { "description": "A date that describes when the funds should be automatically transfered.", "type": "string" }, "metadata": { "description": "A free-form metadata object that you can use to store against the transfer.", "type": "object" } }, "required": [ "amount", "from", "to" ] }, "TransferResult": { "type": "object", "properties": { "transfers": { "description": "A list of transfers created.", "type": "array", "items": { "$ref": "#/components/schemas/Transfer" }, "nullable": false } } }, "PaymentInstrumentType": { "type": "string", "enum": [ "trade_account" ] }, "PaymentInstrumentStatus": { "type": "string", "enum": [ "enabled", "disabled", "processing", "rejected", "failed" ] }, "Limit": { "type": "object", "properties": { "gbp": { "description": "The limit in GBP.", "type": "integer", "nullable": false }, "eur": { "description": "The limit in EUR.", "type": "integer", "nullable": false }, "usd": { "description": "The limit in USD.", "type": "integer", "nullable": false } } }, "TradeAccount": { "type": "object", "properties": { "credit_limit": { "description": "The currently available credit limit of the trade account.", "$ref": "#/components/schemas/Limit", "nullable": false }, "max_order_value": { "description": "The maximum order value of the trade account.", "$ref": "#/components/schemas/Limit", "nullable": false } } }, "PaymentInstrument": { "type": "object", "properties": { "id": { "description": "The unique ID of the payment instrument.\n\nA string in the format: `payment_instrument_[0-9a-z]`.", "type": "string", "nullable": false }, "created_at": { "description": "The date the payment instrument was created.", "type": "string", "nullable": false }, "updated_at": { "description": "The date the payment instrument was last updated.", "type": "string", "nullable": false }, "status": { "description": "The status of the payment instrument.", "$ref": "#/components/schemas/PaymentInstrumentStatus", "nullable": false }, "type": { "description": "The type of the payment instrument.", "$ref": "#/components/schemas/PaymentInstrumentType", "nullable": false }, "owner": { "description": "The participant this payment instrument belongs to.", "$ref": "#/components/schemas/KnownParticipant", "nullable": false }, "trade_account": { "description": "The object describing the details for the trade account.", "$ref": "#/components/schemas/TradeAccount", "nullable": true } }, "description": "## The payment instrument model\n\nThe payment instrument object provides a comprehensive representation of a method of payment\nthat can be used within the __trustshare__ API, including the owner participant,\nand associated method-specific metadata.", "title": "Payment Instruments", "example": { "$ref": "#/components/examples/payment-instrument.json" } }, "DepositIntent": { "type": "object", "discriminator": { "propertyName": "__typename", "mapping": { "PaymentIntent": "#/components/schemas/PaymentIntent", "LinkIntent": "#/components/schemas/LinkIntent" } }, "oneOf": [ { "allOf": [ { "type": "object", "properties": { "__typename": { "type": "string", "enum": [ "PaymentIntent" ], "nullable": false } }, "required": [ "__typename" ] }, { "$ref": "#/components/schemas/PaymentIntent" } ] }, { "allOf": [ { "type": "object", "properties": { "__typename": { "type": "string", "enum": [ "LinkIntent" ], "nullable": false } }, "required": [ "__typename" ] }, { "$ref": "#/components/schemas/LinkIntent" } ] } ], "description": "## The payment intent model\n\nThe payment intent object provides a comprehensive representation of an intended\npayment transaction within the __trustshare__ API, including the buyer [Participant](/resources/participants),\nand [Settlements](/resources/settlements).", "title": "Payment Intents", "example": { "$ref": "#/components/examples/intent.json" } }, "Intent": { "type": "object", "discriminator": { "propertyName": "__typename", "mapping": { "PaymentIntent": "#/components/schemas/PaymentIntent", "LinkIntent": "#/components/schemas/LinkIntent", "SessionIntent": "#/components/schemas/SessionIntent" } }, "oneOf": [ { "allOf": [ { "type": "object", "properties": { "__typename": { "type": "string", "enum": [ "PaymentIntent" ], "nullable": false } }, "required": [ "__typename" ] }, { "$ref": "#/components/schemas/PaymentIntent" } ] }, { "allOf": [ { "type": "object", "properties": { "__typename": { "type": "string", "enum": [ "LinkIntent" ], "nullable": false } }, "required": [ "__typename" ] }, { "$ref": "#/components/schemas/LinkIntent" } ] }, { "allOf": [ { "type": "object", "properties": { "__typename": { "type": "string", "enum": [ "SessionIntent" ], "nullable": false } }, "required": [ "__typename" ] }, { "$ref": "#/components/schemas/SessionIntent" } ] } ] }, "CreditResult": { "type": "object", "properties": { "success": { "description": "A boolean describing the result of the credit attempt.", "type": "boolean", "nullable": false } } }, "Confirmation": { "type": "object", "properties": { "checkout_id": { "description": "The unique ID of the checkout that was created as a result of the confirmation.\n\nA string in the format: `checkout_[0-9a-z]`", "type": "string", "nullable": false }, "project_id": { "description": "The unique ID of the project that was targeted as a result of the confirmation.\n\nA string in the format: `project_[0-9a-z]`", "type": "string", "nullable": false }, "invoice_id": { "description": "The unique ID of the invoice that was created as a result of the confirmation.\n\nA string in the format: `invoice_[0-9a-z]`", "type": "string", "nullable": true } } } }, "examples": { "checkout.json": { "value": { "id": "checkout_brHj82TCC6", "created_at": "2023-12-19T18:41:21.760Z", "updated_at": "2023-12-19T18:41:21.760Z", "type": "local_bank_transfer", "status": "settling", "outstanding": 102500, "amount": 102500, "reference": "C7FHU3WJT", "intent_id": "intent_7qhr8Qix1w", "project_id": "project_Pqnkso64bq", "transfers": [ { "created_at": "2023-12-19T18:41:21.760Z", "updated_at": "2023-12-19T18:41:21.760Z", "type": "fee", "subtype": "buyer", "amount": 2500 } ], "fees": [ { "created_at": "2023-12-19T18:41:21.760Z", "updated_at": "2023-12-19T18:41:21.760Z", "type": "fee", "subtype": "buyer", "amount": 2500 } ], "participant": { "id": "participant_8yraDgeOOQ", "status": "unverified", "email": "sink+buyer@trustshare.co", "type": "individual", "name": "Rufus McGuire", "address": { "type": "unknown", "address_line_1": "50 Mereworth Road", "address_line_2": "Tunbridge Wells", "town_city": "Kent", "region": null, "postal_code": "GU10 3PL", "country": "GB" }, "bank_account": null, "business": null, "individual": null, "organisation": null, "metadata": {} }, "settlements": [ { "id": "settlement_YODHq1kRm7", "created_at": "2023-12-19T18:41:21.760Z", "updated_at": "2023-12-19T18:41:21.760Z", "currency": "gbp", "status": "settling", "type": "escrow", "project_id": "project_Pqnkso64bq", "to": { "id": "participant_JevcdLf9Ky", "status": "unverified", "email": "sink+seller@trustshare.co", "type": "business", "name": null, "address": { "type": "unknown", "address_line_1": "1 Third Party Way", "address_line_2": null, "town_city": "Third Party City", "region": null, "postal_code": "TP1 1PT", "country": "GB" }, "bank_account": { "id": "bank_account_tUKVDdAItY", "country": "GB", "currency": "gbp", "account_number": "01139097", "routing_code": "309455", "routing_code_type": "sort_code", "routing_data": {} }, "business": null, "individual": null, "organisation": null, "metadata": {} }, "amount": 100000, "description": "Escrow to unverified", "summary": null, "balance": 0, "fee_flat": 0, "fee_percentage": 0, "tax_flat": 20000, "tax_percentage": 0, "required_by": "2023-12-19T18:41:21.550Z", "release_at": null, "reference": null, "metadata": {} } ], "debits": [], "metadata": { "foo": "my meta gets cloned onto my checkout ✌️" } } }, "confirm-payment-intent-input.json": { "value": { "session_id": "session_qbaoFDZaAD", "type": "credit", "credit": { "payment_instrument_id": "payment_instrument_vUztfj1NCB", "terms": "thirty_days" } } }, "confirmed-payment-intent.json": { "value": { "checkout_id": "checkout_huHrkOn9gJ", "project_id": "project_9xa0MXfCYo", "invoice_id": "invoice_d8SLo2WMmM" } }, "create-participant-input.json": { "value": { "email": "sink+buyer@trustshare.co", "name": "Tester Dude", "address": { "type": "residential", "address_line_1": "23 The Road", "town_city": "London", "region": "Greater London", "postal_code": "N22 6TY", "country": "GB" }, "bank_account": { "country": "GB", "currency": "gbp", "account_number": "12345465", "sort_code": "122343" }, "metadata": { "foo": "could store my metadata" } } }, "create-payment-instrument-input.json": { "value": { "type": "trade_account", "owner": { "type": "business", "email": "sink+example@trustshare.co", "name": "Example Company", "business": { "type": "limited", "company_number": "87654321", "phone_number": "+447773452345", "registered_address": { "address_line_1": "23 The Road", "town_city": "London", "postal_code": "N22 6TY", "country": "GB" }, "website": "https://example.com" } } } }, "create-payment-intent-input.json": { "value": { "type": "checkout", "currency": "gbp", "fee_flat": 1000, "fee_percentage": 0.015, "metadata": { "foo": "managed to store meta on PAYMENT INTENT" }, "from": { "email": "sink+buyer@trustshare.co", "type": "individual", "name": "Rufus McGuire", "address": { "address_line_1": "23 The Road", "town_city": "London", "region": "Greater London", "postal_code": "N22 6TY", "country": "GB" } }, "settlements": [ { "type": "funding", "amount": 1000, "description": "Some funding", "metadata": { "foo": "managed to store meta on SETTLEMENT INTENT" } }, { "type": "escrow", "amount": 1000, "description": "Funds held in escrow", "to": { "email": "sink+seller@trustshare.co" }, "metadata": { "foo": "managed to store meta on SETTLEMENT INTENT" } }, { "type": "immediate", "amount": 100000, "description": "Funds for immediate release", "fee_flat": 250, "to": { "type": "business", "email": "sink+seller@trustshare.co", "bank_account": { "country": "GB", "currency": "gbp", "account_number": "01139097", "sort_code": "309455" } } } ] } }, "create-project-input.json": { "value": { "currency": "gbp", "metadata": { "foo": "managed to store my own meta" } } }, "create-refunds-input.json": { "value": { "refunds": [ { "settlement_id": "settlement_3utaGg3bOz", "amount": 40000, "metadata": { "foo": "can store meta on outbound through createRefund" } } ] } }, "create-refunds.json": { "value": { "outbounds": [ { "id": "outbound_JMlKno4Ggq", "created_at": "2023-12-20T13:46:15.375Z", "updated_at": "2023-12-20T13:46:15.375Z", "release_at": null, "project_id": "project_tjpRgoSbT7", "settlement_id": "settlement_3utaGg3bOz", "type": "refund", "reference": null, "status": "processing", "paused_reason": null, "failure_reason": null, "amount": 40000, "to": { "id": "participant_8yraDgeOOQ", "status": "unverified", "email": "sink+buyer@trustshare.co", "type": "individual", "name": "Rufus McGuire", "address": { "type": "unknown", "address_line_1": "50 Mereworth Road", "address_line_2": "Tunbridge Wells", "town_city": "Kent", "region": null, "postal_code": "GU10 3PL", "country": "GB" }, "bank_account": null, "business": null, "individual": null, "organisation": null, "metadata": {} }, "transfers": [], "fees": [], "conversion": null, "transfer": null, "metadata": { "foo": "can store meta on outbound through createRefund" } } ] } }, "create-releases-input.json": { "value": { "releases": [ { "settlement_id": "settlement_30l0tD1p0a", "amount": 40000, "metadata": { "foo": "can store meta on outbound through createRelease" } } ] } }, "create-releases.json": { "value": { "outbounds": [ { "id": "outbound_i5imOBPAy1", "created_at": "2023-12-20T13:46:38.353Z", "updated_at": "2023-12-20T13:46:38.353Z", "release_at": null, "project_id": "project_3gYsE37asR", "settlement_id": "settlement_30l0tD1p0a", "type": "release", "reference": null, "status": "processing", "paused_reason": null, "failure_reason": null, "amount": 40000, "to": { "id": "participant_7kjauDtnjW", "status": "unverified", "email": "sink+seller@trustshare.co", "type": "unknown", "name": null, "address": null, "bank_account": null, "business": null, "individual": null, "organisation": null, "metadata": {} }, "transfers": [], "fees": [], "conversion": null, "transfer": null, "metadata": { "foo": "can store meta on outbound through createRelease" } } ] } }, "create-setup-intent-input.json": { "value": { "type": "session", "participant": { "email": "sink+buyer@trustshare.co", "type": "individual", "name": "Rufus McGuire", "address": { "address_line_1": "23 The Road", "town_city": "London", "region": "Greater London", "postal_code": "N22 6TY", "country": "GB" } }, "metadata": { "foo": "managed to store meta on SETUP INTENT" } } }, "create-transfers-input.json": { "value": { "transfers": [ { "amount": 25000, "from": { "project_id": "project_Tk1B74J4qq" }, "to": { "project_id": "project_hbo76KAZkG" }, "metadata": { "foo": "can store my metadata" } } ] } }, "create-transfers.json": { "value": { "transfers": [ { "id": "transfer_XkXoRYNDd2", "created_at": "2023-12-20T15:10:17.126Z", "updated_at": "2023-12-20T15:10:17.126Z", "status": "awaiting_funds", "amount": 25000, "from": { "project_id": "project_Tk1B74J4qq", "settlement_id": null }, "to": { "project_id": "project_hbo76KAZkG", "settlement_id": null }, "inbound_id": null, "outbound_id": "outbound_QITD6jr2KA", "release_at": null, "metadata": { "foo": "can store my metadata" } } ] } }, "create-verification-input.json": { "value": { "email": "sink+seller@trustshare.co", "name": "Rufus McGuire", "type": "individual", "address": { "address_line_1": "23 The Road", "town_city": "London", "region": "Greater London", "postal_code": "N22 6TY", "country": "GB" }, "bank_account": { "country": "GB", "currency": "gbp", "account_number": "01139097", "sort_code": "309455" }, "metadata": { "foo": "managed to store my meta on VERIFICATION" } } }, "credit-project-input.json": { "value": { "id": "project_5T3ch0hE49", "amount": 5000 } }, "credit-project.json": { "value": { "success": true } }, "inbound.json": { "value": { "id": "inbound_Z7iHsk97xi", "created_at": "2023-12-19T18:40:41.343Z", "updated_at": "2023-12-19T18:40:41.970Z", "project_id": "project_1JCcWy1zmr", "checkout_id": "checkout_VrLS9atLam", "type": "local_bank_transfer", "status": "settled", "amount": 102500, "reference": "C6D57WTZ7", "transfer": null } }, "intent.json": { "value": { "__typename": "PaymentIntent", "id": "intent_yUp8bMPp0S", "created_at": "2023-12-20T14:14:19.500Z", "updated_at": "2023-12-20T14:14:19.500Z", "client_secret": "sandbox_i_HAehWCcHPVAbqAEDxKkS3LrvWLmLEU1RGNFRKLJI26gmLzIeSZVNlpCJTr6kjyqm", "project_id": null, "from": { "id": "participant_UJfvRzo3Xk", "status": "unverified", "email": "sink+buyer@trustshare.co", "type": "individual", "name": "Rufus McGuire", "address": { "type": "unknown", "address_line_1": "23 The Road", "address_line_2": null, "town_city": "London", "region": "Greater London", "postal_code": "N22 6TY", "country": "GB" }, "bank_account": null, "business": null, "individual": null, "organisation": null, "metadata": {} }, "fee_flat": 1000, "fee_percentage": 0.015, "status": "unconfirmed", "currency": "gbp", "type": "checkout", "metadata": { "foo": "managed to store meta on PAYMENT INTENT" }, "redirect_url": null, "settlements": [ { "created_at": "2023-12-20T14:14:19.500Z", "updated_at": "2023-12-20T14:14:19.500Z", "to": null, "type": "funding", "amount": 1000, "description": "Some funding", "summary": null, "fee_flat": 0, "fee_percentage": 0, "tax_flat": 0, "tax_percentage": 0, "required_by": "2023-12-20T14:14:19.500Z", "release_at": null, "reference": null, "metadata": { "foo": "managed to store meta on SETTLEMENT INTENT" } }, { "created_at": "2023-12-20T14:14:19.500Z", "updated_at": "2023-12-20T14:14:19.500Z", "to": { "id": "participant_7kjauDtnjW", "status": "unverified", "email": "sink+seller@trustshare.co", "type": "unknown", "name": null, "address": null, "bank_account": null, "business": null, "individual": null, "organisation": null, "metadata": {} }, "type": "escrow", "amount": 1000, "description": "Funds held in escrow", "summary": null, "fee_flat": 0, "fee_percentage": 0, "tax_flat": 0, "tax_percentage": 0, "required_by": "2023-12-20T14:14:19.500Z", "release_at": null, "reference": null, "metadata": { "foo": "managed to store meta on SETTLEMENT INTENT" } }, { "created_at": "2023-12-20T14:14:19.500Z", "updated_at": "2023-12-20T14:14:19.500Z", "to": { "id": "participant_wbGGky93H5", "status": "unverified", "email": "sink+seller@trustshare.co", "type": "business", "name": null, "address": null, "bank_account": { "id": "bank_account_tUKVDdAItY", "country": "GB", "currency": "gbp", "account_number": "01139097", "routing_code": "309455", "routing_code_type": "sort_code", "routing_data": {} }, "business": null, "individual": null, "organisation": null, "metadata": {} }, "type": "immediate", "amount": 100000, "description": "Funds for immediate release", "summary": null, "fee_flat": 250, "fee_percentage": 0, "tax_flat": 0, "tax_percentage": 0, "required_by": "2023-12-20T14:14:19.500Z", "release_at": null, "reference": null, "metadata": {} } ] } }, "invoice.json": { "value": { "id": "invoice_2RbzK40cA9", "created_at": "2023-12-19T18:41:23.258Z", "updated_at": "2023-12-19T18:41:23.258Z", "status": "settling", "currency": "gbp", "project_id": "project_B9VHDPoR7N", "intent_id": "intent_vwltebxAXo", "participant": { "id": "participant_Kg3Kco1H5Z", "status": "unverified", "email": "sink+buyer@trustshare.co", "type": "unknown", "name": null, "address": null, "bank_account": null, "business": null, "individual": null, "organisation": null, "metadata": {} }, "settlements": [ { "id": "settlement_3PgVRA2dDm", "created_at": "2023-12-19T18:41:23.258Z", "updated_at": "2023-12-19T18:41:23.258Z", "currency": "gbp", "status": "settling", "type": "escrow", "project_id": "project_B9VHDPoR7N", "from": { "id": "participant_Kg3Kco1H5Z", "status": "unverified", "email": "sink+buyer@trustshare.co", "type": "unknown", "name": null, "address": null, "bank_account": null, "business": null, "individual": null, "organisation": null, "metadata": {} }, "to": { "id": "participant_7kjauDtnjW", "status": "unverified", "email": "sink+seller@trustshare.co", "type": "unknown", "name": null, "address": null, "bank_account": null, "business": null, "individual": null, "organisation": null, "metadata": {} }, "amount": 1000, "description": "Some funding", "summary": null, "balance": 0, "fee_flat": 0, "fee_percentage": 0, "tax_flat": 200, "tax_percentage": 0, "required_by": "2023-12-19T18:41:23.047Z", "release_at": null, "reference": null, "metadata": { "foo": "managed to store settlement intent meta" } } ], "collect": { "local_bank_transfer": { "iban": null, "account_number": "03554472", "routing_data": [ { "routing_code_type": "sort_code", "routing_code": "000000" } ], "reference": "C7SD4YVX5", "metadata": { "bank_name": "Modulr FS", "bank_address": "Scale Space, 58 Wood Lane, London, United Kingdom, W12 7RZ", "payee_name": "trustshare limited", "payee_address": "71-75 Shelton Street, London. WC2H 9JQ", "payee_tel": "0044 2045199980" } }, "international_bank_transfer": { "iban": "GB32TRWI230xxxxxxxxxxx", "account_number": null, "routing_data": [ { "routing_code_type": "bic_swift", "routing_code": "TRWIGB2L" } ], "reference": "C7SD4YVX5", "metadata": { "bank_name": "Wise", "bank_address": "56 Shoreditch High Street, London. E1 6JJ. United Kingdom", "payee_name": "trustshare limited", "payee_address": "71-75 Shelton Street, London. WC2H 9JQ", "payee_tel": "0044 2045199980" } } }, "reference": "C7SD4YVX5", "subtotal": 1000, "fee": 1015, "total": 2015, "metadata": { "foo": "managed to store payment intent meta" } } }, "outbound.json": { "value": { "id": "outbound_fDZZQ2EYf0", "created_at": "2023-12-19T18:41:11.629Z", "updated_at": "2023-12-19T18:41:12.075Z", "release_at": null, "project_id": "project_1Yd1QJnWIX", "settlement_id": "settlement_1vX33h20He", "type": "release", "reference": null, "status": "awaiting_funds", "paused_reason": null, "failure_reason": null, "amount": 99750, "to": { "id": "participant_JevcdLf9Ky", "status": "unverified", "email": "sink+seller@trustshare.co", "type": "business", "name": null, "address": { "type": "unknown", "address_line_1": "1 Third Party Way", "address_line_2": null, "town_city": "Third Party City", "region": null, "postal_code": "TP1 1PT", "country": "GB" }, "bank_account": { "id": "bank_account_tUKVDdAItY", "country": "GB", "currency": "gbp", "account_number": "01139097", "routing_code": "309455", "routing_code_type": "sort_code", "routing_data": {} }, "business": null, "individual": null, "organisation": null, "metadata": {} }, "transfers": [ { "created_at": "2023-12-19T18:41:11.629Z", "updated_at": "2023-12-19T18:41:11.629Z", "type": "fee", "subtype": "seller", "amount": 250 } ], "fees": [ { "created_at": "2023-12-19T18:41:11.629Z", "updated_at": "2023-12-19T18:41:11.629Z", "type": "fee", "subtype": "seller", "amount": 250 } ], "conversion": null, "transfer": null, "metadata": {} } }, "participant.json": { "value": { "id": "participant_eHTQstcsRb", "status": "unverified", "email": "sink+buyer@trustshare.co", "type": "unknown", "name": "Tester Dude", "address": { "type": "residential", "address_line_1": "23 The Road", "address_line_2": null, "town_city": "London", "region": "Greater London", "postal_code": "N22 6TY", "country": "GB" }, "bank_account": { "id": "bank_account_8pEw9AmBhX", "country": "GB", "currency": "gbp", "account_number": "12345465", "routing_code": "122343", "routing_code_type": "sort_code", "routing_data": {} }, "business": null, "individual": null, "organisation": null, "metadata": { "foo": "could store my metadata" } } }, "payment-instrument.json": { "value": { "id": "payment_instrument_xjLpoByIOK", "created_at": "2023-12-19T17:39:56.451Z", "updated_at": "2023-12-19T18:40:59.793Z", "status": "enabled", "type": "trade_account", "owner": { "id": "participant_0SaYgKb2Qp", "status": "unverified", "email": "sink+example@trustshare.co", "type": "business", "name": "Example Company", "address": null, "bank_account": null, "business": { "type": "limited", "company_number": "87654321", "registered_address": { "type": "registered", "address_line_1": "23 The Road", "address_line_2": null, "town_city": "London", "region": null, "postal_code": "N22 6TY", "country": "GB" }, "trading_address": null, "shipping_address": null, "phone_number": "+447773452345", "website": "https://example.com", "persons": [] }, "individual": null, "organisation": null, "metadata": {} }, "trade_account": { "credit_limit": { "gbp": 100000000, "eur": 124115700, "usd": 140790000 }, "max_order_value": { "gbp": 10000000, "eur": 12411570, "usd": 14079000 } } } }, "payout-support.json": { "value": { "country": "GB", "currency": "gbp", "supported": true, "requirements": [ "account_number", "sort_code" ] } }, "project.json": { "value": { "id": "project_rqh1rMNnMs", "created_at": "2023-12-19T18:41:23.541Z", "updated_at": "2023-12-19T18:41:23.541Z", "type": "controlled", "currency": "gbp", "status": "in_progress", "balance": 0, "collect": { "local_bank_transfer": { "iban": null, "account_number": "03554465", "routing_data": [ { "routing_code_type": "sort_code", "routing_code": "000000" } ], "reference": null, "metadata": { "bank_name": "Modulr FS", "bank_address": "Scale Space, 58 Wood Lane, London, United Kingdom, W12 7RZ", "payee_name": "trustshare limited", "payee_address": "71-75 Shelton Street, London. WC2H 9JQ", "payee_tel": "0044 2045199980" } }, "international_bank_transfer": { "iban": "GB32TRWI230xxxxxxxxxxx", "account_number": null, "routing_data": [ { "routing_code_type": "bic_swift", "routing_code": "TRWIGB2L" } ], "reference": "P9NENBMK2", "metadata": { "bank_name": "Wise", "bank_address": "56 Shoreditch High Street, London. E1 6JJ. United Kingdom", "payee_name": "trustshare limited", "payee_address": "71-75 Shelton Street, London. WC2H 9JQ", "payee_tel": "0044 2045199980" } } }, "checkouts": [], "settlements": [], "inbounds": [], "outbounds": [], "transfers": { "in": [], "out": [] }, "metadata": { "foo": "managed to store my own meta" } } }, "settlement.json": { "value": { "id": "settlement_58hQF4DupX", "created_at": "2023-12-19T18:41:24.398Z", "updated_at": "2023-12-19T18:41:24.398Z", "currency": "gbp", "status": "settling", "type": "escrow", "project_id": "project_36IRtw47Gz", "from": { "id": "participant_8yraDgeOOQ", "status": "unverified", "email": "sink+buyer@trustshare.co", "type": "individual", "name": "Rufus McGuire", "address": { "type": "unknown", "address_line_1": "50 Mereworth Road", "address_line_2": "Tunbridge Wells", "town_city": "Kent", "region": null, "postal_code": "GU10 3PL", "country": "GB" }, "bank_account": null, "business": null, "individual": null, "organisation": null, "metadata": {} }, "to": { "id": "participant_JevcdLf9Ky", "status": "unverified", "email": "sink+seller@trustshare.co", "type": "business", "name": null, "address": { "type": "unknown", "address_line_1": "1 Third Party Way", "address_line_2": null, "town_city": "Third Party City", "region": null, "postal_code": "TP1 1PT", "country": "GB" }, "bank_account": { "id": "bank_account_tUKVDdAItY", "country": "GB", "currency": "gbp", "account_number": "01139097", "routing_code": "309455", "routing_code_type": "sort_code", "routing_data": {} }, "business": null, "individual": null, "organisation": null, "metadata": {} }, "amount": 100000, "description": "A Payment for something", "summary": "Local Outbound", "balance": 0, "fee_flat": 250, "fee_percentage": 0, "tax_flat": 0, "tax_percentage": 0.2, "required_by": "2023-12-19T18:41:24.192Z", "release_at": null, "reference": null, "metadata": { "foo": "managed to store meta on SETTLEMENT INTENT" } } }, "setup-intent.json": { "value": { "__typename": "SessionIntent", "id": "intent_tTAEyQksYi", "created_at": "2023-12-20T13:42:31.440Z", "updated_at": "2023-12-20T13:42:31.440Z", "participant": { "id": "participant_UJfvRzo3Xk", "status": "unverified", "email": "sink+buyer@trustshare.co", "type": "individual", "name": "Rufus McGuire", "address": { "type": "unknown", "address_line_1": "23 The Road", "address_line_2": null, "town_city": "London", "region": "Greater London", "postal_code": "N22 6TY", "country": "GB" }, "bank_account": null, "business": null, "individual": null, "organisation": null, "metadata": {} }, "client_secret": "sandbox_su_i_mf55PLQgDcmFmdedB4wbc7gPhJqS9cQftBZY7hdjWk6XsZOUk1Fhq5Jkwmvb9eg4", "status": "unconfirmed", "type": "session", "metadata": { "foo": "managed to store meta on SETUP INTENT" } } }, "transfer.json": { "value": { "id": "transfer_KKm0NR7sHg", "created_at": "2023-12-19T18:46:23.484Z", "updated_at": "2023-12-19T18:46:29.719Z", "status": "executed", "amount": 25000, "from": { "project_id": "project_KOXg0PqnFd", "settlement_id": null }, "to": { "project_id": "project_wpVHxBljof", "settlement_id": null }, "inbound_id": "inbound_JU7MwvMQFG", "outbound_id": "outbound_m6xIw5pM6H", "release_at": null, "metadata": { "foo": "can store my metadata" } } }, "verification.json": { "value": { "id": "verification_QLDAI2oPpm", "type": "individual", "status": "required", "participant": { "id": "participant_S15J7WrBQJ", "status": "unverified", "email": "sink+seller@trustshare.co", "type": "individual", "name": "Rufus McGuire", "address": { "type": "unknown", "address_line_1": "23 The Road", "address_line_2": null, "town_city": "London", "region": "Greater London", "postal_code": "N22 6TY", "country": "GB" }, "bank_account": { "id": "bank_account_tUKVDdAItY", "country": "GB", "currency": "gbp", "account_number": "01139097", "routing_code": "309455", "routing_code_type": "sort_code", "routing_data": {} }, "business": null, "individual": null, "organisation": null, "metadata": {} }, "client_secret": "sandbox_v_BcAtzjWl8snjr2QhdCSLpunSKhv6pom9Zx0ugsDvNjQLBxmf2f7JgXAZKpCGWUQD", "metadata": { "foo": "managed to store my meta on VERIFICATION" } } } } }, "paths": { "/v1/intent/{id}": { "get": { "operationId": "getIntent", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID of an existing intent.\n\nA string in the format: `intent_[0-9a-z]`", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Retrieve an existing intent.\n\nThis endpoint is polymorphic and will return any intent type,\nincluding both [Payment Intents](/resources/payment-intents)\nand [Setup Intents](/resources/setup-intents).", "summary": "Get an Intent", "tags": [ "Payment Intents", "Setup Intents" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Intent" }, "examples": { "Payment Intents": { "$ref": "#/components/examples/intent.json" }, "Setup Intents": { "$ref": "#/components/examples/setup-intent.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/v1/verification/{id}": { "get": { "operationId": "getVerification", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID of an existing verification.\n\nA string in the format: `verification_[0-9a-z]`", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Retrieve an existing verification.", "summary": "Get a Verification", "tags": [ "Verifications" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Verification" }, "examples": { "response": { "$ref": "#/components/examples/verification.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/v1/participant/{id}": { "get": { "operationId": "getParticipant", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID of an existing participant.\n\nA string in the format: `participant_[0-9a-z]`", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Retrieve an existing participant.", "summary": "Get a Participant", "tags": [ "Participants" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnownParticipant" }, "examples": { "response": { "$ref": "#/components/examples/participant.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/v1/inbound/{id}": { "get": { "operationId": "getInbound", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID of an existing inbound.\n\nA string in the format: `inbound_[0-9a-z]`", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Retrieve an inbound payment.", "summary": "Get an Inbound", "tags": [ "Inbounds" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Inbound" }, "examples": { "response": { "$ref": "#/components/examples/inbound.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/v1/outbound/{id}": { "get": { "operationId": "getOutbound", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID of an existing outbound.\n\nA string in the format: `outbound_[0-9a-z]`", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Retrieve an outbound release or refund payment.", "summary": "Get an Outbound", "tags": [ "Outbounds" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Outbound" }, "examples": { "response": { "$ref": "#/components/examples/outbound.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/v1/project/{id}": { "get": { "operationId": "getProject", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID of an existing project.\n\nA string in the format: `project_[0-9a-z]`", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Retrieve an existing project.", "summary": "Get a Project", "tags": [ "Projects" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Project" }, "examples": { "response": { "$ref": "#/components/examples/project.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/v1/transfer/{id}": { "get": { "operationId": "getTransfer", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID of an existing transfer.\n\nA string in the format: `transfer_[0-9a-z]`", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Retrieve an existing transfer.", "summary": "Get a Transfer", "tags": [ "Transfers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Transfer" }, "examples": { "response": { "$ref": "#/components/examples/transfer.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/v1/checkout/{id}": { "get": { "operationId": "getCheckout", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID of an existing checkout.\n\nA string in the format: `checkout_[0-9a-z]`", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Retrieve an existing checkout.", "summary": "Get a Checkout", "tags": [ "Checkouts" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Checkout" }, "examples": { "response": { "$ref": "#/components/examples/checkout.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/v1/invoice/{id}": { "get": { "operationId": "getInvoice", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID of an existing invoice.\n\nA string in the format: `invoice_[0-9a-z]`", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Retrieve an existing invoice.", "summary": "Get an Invoice", "tags": [ "Invoices" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" }, "examples": { "response": { "$ref": "#/components/examples/invoice.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/v1/settlement/{id}": { "get": { "operationId": "getSettlement", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID of an existing settlement.\n\nA string in the format: `settlement_[0-9a-z]`", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Retrieve an existing settlement.", "summary": "Get a Settlement", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Settlement" }, "examples": { "response": { "$ref": "#/components/examples/settlement.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/v1/payment-instrument/{id}": { "get": { "operationId": "getPaymentInstrument", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID of an existing payment instrument.\n\nA string in the format: `payment_instrument_[0-9a-z]`", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Retrieve an existing payment instrument.", "summary": "Get a Payment Instrument", "tags": [ "Payment Instruments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentInstrument" }, "examples": { "response": { "$ref": "#/components/examples/payment-instrument.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/v1/support/payout": { "get": { "operationId": "getPayoutSupport", "parameters": [ { "description": "The country the bank account is held in.", "example": "GB", "in": "query", "name": "country", "schema": { "$ref": "#/components/schemas/Country" }, "required": true }, { "description": "The currency the bank account is held in.", "example": "gbp", "in": "query", "name": "currency", "schema": { "$ref": "#/components/schemas/BankAccountCurrency" }, "required": true } ], "description": "Given a country/currency pairing, returns whether the pair is supported along\nwith the required fields that must be provided to the API when\nincluding a bank account.", "summary": "Get Payout Support", "tags": [ "Participants" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Requirements" }, "examples": { "response": { "$ref": "#/components/examples/payout-support.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/_sandbox/v1/project/{id}/credit": { "post": { "operationId": "creditProject", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID of an existing project.\n\nA string in the format: `project_[0-9a-z]`", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "__For use in sandbox only.__\n\nCredit a project with an amount of funds. An optional reference\ncan be provided to target a specific checkout.", "summary": "Credit a Project", "tags": [ "Projects", "Sandbox" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditResult" }, "examples": { "input": { "$ref": "#/components/examples/credit-project-input.json" }, "response": { "$ref": "#/components/examples/credit-project.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "amount": { "description": "The amount to credit to the project in the lowest denomination\nfor the intent's currency. ie, £1,000.00 should be provided as `100000`.", "type": "integer" }, "reference": { "description": "The reference to use for the credit. With this value you\ncan target an existing checkout or invoice.\n\nReferences are in the format `C[A-Z0-9]`.", "type": "string" } }, "required": [ "id", "amount" ] }, "examples": { "input": { "$ref": "#/components/examples/credit-project-input.json" } } } }, "required": true } } }, "/v1/projects": { "post": { "operationId": "createProject", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true } ], "description": "Creating a Project allows you to take control of a project account.\nThis account can be used to collect funds from any number of Participants,\nas well as release funds to any number of Participants.", "summary": "Create a Project", "tags": [ "Projects" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Project" }, "examples": { "input": { "$ref": "#/components/examples/create-project-input.json" }, "response": { "$ref": "#/components/examples/project.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "currency": { "description": "The currency the project account will be held in.", "$ref": "#/components/schemas/Currency" }, "metadata": { "description": "A free-form metadata object that you can use to store against the project. This is\nincredibly useful for storing a correlation ID that relates to an entity on your\nown system.", "type": "object" } }, "required": [ "currency" ] }, "examples": { "input": { "$ref": "#/components/examples/create-project-input.json" } } } }, "required": true } } }, "/v1/intents/payment": { "post": { "operationId": "createPaymentIntent", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true } ], "description": "A payment intent describes a participants intention to fund a project account. We\ncurrently support 3 different types of Payment Intent:\n\n- A `checkout` Payment Intent is consumed as soon as a Participant\n clicks \"Pay Now\" on the Checkout UI. It therefore, can not be re-used.\n- A `payment_link` Payment Intent is consumed and can be re-used if it does\n not include a `from` Participant.\n- An `invoice` Payment Intent, although still requiring confirmation of a user,\n will not take them through a UI driven process. On confirmation of an\n invoice Payment Intent, a new invoice will be provisioned.\n\n
\n \n
\n\n### With or without a defined buyer\n\nA buyer can optionally be provided at the creation of an intent. If no buyer\nis provided, the user confirming the intent will be asked to provide their\nemail address and a new participant will be created in the system.\n\nAt a minimum, when a buyer participant is provided, we require just the\nemail address. However, you can also provide a name and an address which will be\nused in the UI to further personalise the buyer's experience.\n\n### Include inline fees\n\nFees can be applied to a payment intent to charge a buyer at successful\ncompletion of a checkout. Fees can also be applied to a settlement to\ncharge a seller at each successful release from a settlement. You can\nprovide both an optional flat fee and an optional percentage fee to charge.\nThe percentage fee must be provided to the __API__ as\na fraction, ie. a fee of `1.5%` is provided to the __API__ as `0.015`.\n\n\n Fees are always calculated as: (`total` * `fee_percentage`) + `fee_flat`\n\n\n### Targeting an existing project\n\nAt creation, an intent can optionally be targeted at an existing project. This is useful\nif you wish to provision a project account up front, or if you need to collect more\nfunds in the event of a discrepancy. You can find more information about how\nprojects relate to the rest of the system by referencing our [Projects](/resources/projects) page.\n\n\n You may not need projects for your use-case. However, every checkout\n is backed by an under-lying project account.\n", "summary": "Create a Payment Intent", "tags": [ "Payment Intents" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DepositIntent" }, "examples": { "input": { "$ref": "#/components/examples/create-payment-intent-input.json" }, "response": { "$ref": "#/components/examples/intent.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "description": "The type of Payment Intent to create.", "$ref": "#/components/schemas/IntentType" }, "currency": { "description": "The currency to collect for the payment. If a `project_id` is provided, this\ncurrency must equate to the currency of the project account.", "$ref": "#/components/schemas/Currency" }, "from": { "description": "Optionally provide the buyer [Participant](/resources/participants) to prefill\ninformation in the checkout UI. If no buyer is provided, then the UI will include\na field to collect their email address.\n\n\n By not providing a buyer, the intent will not be consumed. Allowing it to be\n used for multiple buyers of the same transaction.\n", "$ref": "#/components/schemas/ParticipantInput" }, "project_id": { "description": "Optionally provide a `project_id` to target the payemnt at an existing project account.\nIf no `project_id` is provided, a new Project will be automatically provisioned for you.", "type": "string" }, "fee_flat": { "description": "A flat fee to charge the buyer Participant on successfully completing a Checkout.", "type": "integer" }, "fee_percentage": { "description": "A fee percentage to charge the buyer Participant on successfully completing a Checkout.\nFee percentages must be provided as a fraction, ie. 1.5% as 0.015.", "type": "number" }, "settlements": { "description": "A list of settlements that the buyer Participant must fulfill.", "type": "array", "items": { "$ref": "#/components/schemas/SettlementInput" } }, "redirect_url": { "description": "For both `checkout` and `payment_link` intent types you can provide a redirect URL\nthat the user will be directed to at the end of the checkout process.\n\nThe URL will have the `project_id` and `checkout_id` appended to the query string.\nFor example, given the redirect URL `https://example.com/complete`, your users will\nbe redirected to `https://example.com/complete?checkout_id={checkout_id}&project_id={project_id}`.\n\n\n When using the SDK to confirm a `checkout` type payment intent, the\n parent page — ie. the page opening the modal — will be redirected to this URL.\n", "type": "string" }, "metadata": { "description": "A free-form metadata object that you can use to store against the intent. This is\nincredibly useful for storing a correlation ID that relates to an entity on your\nown system.", "type": "object" } }, "required": [ "type", "settlements" ] }, "examples": { "input": { "$ref": "#/components/examples/create-payment-intent-input.json" } } } }, "required": true } } }, "/v1/intents/setup": { "post": { "operationId": "createSetupIntent", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true } ], "description": "A setup intent describes a participants intention to allow you to use one\nof their payment instruments off-session at a later date.", "summary": "Create a Setup Intent", "tags": [ "Setup Intents" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetupIntent" }, "examples": { "input": { "$ref": "#/components/examples/create-setup-intent-input.json" }, "response": { "$ref": "#/components/examples/setup-intent.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "description": "The type of Setup Intent to create.", "$ref": "#/components/schemas/SetupIntentType" }, "participant": { "description": "Provide the [Participant](/resources/participants) the setup relates to.", "$ref": "#/components/schemas/ParticipantInput" }, "metadata": { "description": "A free-form metadata object that you can use to store against the intent. This is\nincredibly useful for storing a correlation ID that relates to an entity on your\nown system.", "type": "object" } }, "required": [ "type", "participant" ] }, "examples": { "input": { "$ref": "#/components/examples/create-setup-intent-input.json" } } } }, "required": true } } }, "/v1/intent/{id}/confirm": { "post": { "operationId": "confirmPaymentIntent", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID of an existing intent that needs to be confirmed.\n\nA string in the format: `intent_[0-9a-z]`", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "In certain cases you may be able to confirm a payment intent from your backend\nsystem and not require a user to go through a checkout UI process.\n\nConfirming a payment intent from the API requires a `session_id` to be provided\nwhich refers to a session from a [Setup Intent](/resources/setup-intents), that\nhas not already expired.\n\n\n You can only confirm `invoice` payment intents via the API.\n", "summary": "Confirm a Payment Intent", "tags": [ "Payment Intents" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Confirmation" }, "examples": { "input": { "$ref": "#/components/examples/confirm-payment-intent-input.json" }, "response": { "$ref": "#/components/examples/confirmed-payment-intent.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "session_id": { "description": "A unique ID of an existing session created by a setup intent.\n\nA string in the format: `session_[0-9a-z]`", "type": "string" }, "type": { "description": "The type of payment method to be used for fulfilling the intent.", "$ref": "#/components/schemas/PaymentType" }, "credit": { "description": "An object containing metadata associated with a credit payment.\nRequired if the payment `type` is credit.", "$ref": "#/components/schemas/CreditPaymentInput" } }, "required": [ "id", "session_id", "type" ] }, "examples": { "input": { "$ref": "#/components/examples/confirm-payment-intent-input.json" } } } }, "required": true } } }, "/v1/verifications": { "post": { "operationId": "createVerification", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true } ], "description": "A Verification describes the intent to verify a participant.", "summary": "Create a Verification", "tags": [ "Verifications" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Verification" }, "examples": { "input": { "$ref": "#/components/examples/create-verification-input.json" }, "response": { "$ref": "#/components/examples/verification.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "description": "A unique ID of an existing participant that needs to be verified.\n\nA string in the format: `participant_[0-9a-z]`", "type": "string" }, "type": { "description": "The type of participant to verify. This helps inform the verification\nprocess in the Verify UI.", "$ref": "#/components/schemas/ParticipantType" }, "email": { "description": "The email of the participant to verify.", "type": "string" }, "name": { "description": "The name of the participant to verify.", "type": "string" }, "address": { "description": "An object describing the address of the participant to verify.", "$ref": "#/components/schemas/AddressInput" }, "bank_account": { "description": "A bank account describing the address of the participant to verify.", "$ref": "#/components/schemas/BankAccountInput" }, "business": { "description": "An object describing the participant's business details.", "$ref": "#/components/schemas/BusinessInput" }, "individual": { "description": "An object dsescribing the participant's individual details.", "$ref": "#/components/schemas/IndividualInput" }, "organisation": { "description": "An object describing the participant's organisation details.", "$ref": "#/components/schemas/OrganisationInput" }, "redirect_url": { "description": "You can provide a redirect URL that the user will be directed to at the end of the verification process.\n\nThe URL will have the `verification_id` appended to the query string.\nFor example, given the redirect URL `https://example.com/complete`, your users will\nbe redirected to `https://example.com/complete?verification_id={verification_id}`.\n\n\n When using the SDK to confirm a `verification`, the\n parent page — ie. the page opening the modal — will be redirected to this URL.\n", "type": "string" }, "metadata": { "description": "A free-form metadata object that you can use to store against the intent. This is\nincredibly useful for storing a correlation ID that relates to an entity on your\nown system.", "type": "object" } } }, "examples": { "input": { "$ref": "#/components/examples/create-verification-input.json" } } } }, "required": true } } }, "/v1/participants": { "post": { "operationId": "createParticipant", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true } ], "description": "Optionally, you can pre-create a participant to use in an intent. The returned\nunique ID should be used in the intent creation call. The minimum requirement for\ncreating a participant is an email address.", "summary": "Create a Participant", "tags": [ "Participants" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnownParticipant" }, "examples": { "input": { "$ref": "#/components/examples/create-participant-input.json" }, "response": { "$ref": "#/components/examples/participant.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "description": "The email of the participant.", "type": "string" }, "name": { "description": "The name of the participant.", "type": "string" }, "type": { "description": "The type of the participant.", "$ref": "#/components/schemas/ParticipantType" }, "address": { "description": "An object describing the address of the participant.", "$ref": "#/components/schemas/AddressInput" }, "bank_account": { "description": "An object describing the bank account of the participant.", "$ref": "#/components/schemas/BankAccountInput" }, "business": { "description": "An object describing the participant's business details.", "$ref": "#/components/schemas/BusinessInput" }, "individual": { "description": "An object dsescribing the participant's individual details.", "$ref": "#/components/schemas/IndividualInput" }, "organisation": { "description": "An object describing the participant's organisation details.", "$ref": "#/components/schemas/OrganisationInput" }, "metadata": { "description": "A free-form metadata object that you can use to store against the participant. This is\nincredibly useful for storing a correlation ID that relates to an entity on your\nown system.", "type": "object" } }, "required": [ "email" ] }, "examples": { "input": { "$ref": "#/components/examples/create-participant-input.json" } } } }, "required": true } } }, "/v1/outbounds/releases": { "post": { "operationId": "createReleases", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true } ], "description": "Used to create releases from projects and settlements.", "summary": "Create Releases", "tags": [ "Outbounds" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutboundResult" }, "examples": { "input": { "$ref": "#/components/examples/create-releases-input.json" }, "response": { "$ref": "#/components/examples/create-releases.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "releases": { "description": "A list of releases to create.", "type": "array", "items": { "$ref": "#/components/schemas/ReleaseInput" } } }, "required": [ "releases" ] }, "examples": { "input": { "$ref": "#/components/examples/create-releases-input.json" } } } }, "required": true } } }, "/v1/outbounds/refunds": { "post": { "operationId": "createRefunds", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true } ], "description": "Used to create refunds against settlements.", "summary": "Create Refunds", "tags": [ "Outbounds" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutboundResult" }, "examples": { "input": { "$ref": "#/components/examples/create-refunds-input.json" }, "response": { "$ref": "#/components/examples/create-refunds.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "refunds": { "description": "A list of refunds to create.", "type": "array", "items": { "$ref": "#/components/schemas/RefundInput" } } }, "required": [ "refunds" ] }, "examples": { "input": { "$ref": "#/components/examples/create-refunds-input.json" } } } }, "required": true } } }, "/v1/transfers": { "post": { "operationId": "createTransfers", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true } ], "description": "Used to create internal transfers between project accounts.", "summary": "Create Transfers", "tags": [ "Transfers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransferResult" }, "examples": { "input": { "$ref": "#/components/examples/create-transfers-input.json" }, "response": { "$ref": "#/components/examples/create-transfers.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "transfers": { "description": "A list of transfers to create.", "type": "array", "items": { "$ref": "#/components/schemas/TransferInput" } } }, "required": [ "transfers" ] }, "examples": { "input": { "$ref": "#/components/examples/create-transfers-input.json" } } } }, "required": true } } }, "/v1/payment-instruments": { "post": { "operationId": "createPaymentInstrument", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true } ], "description": "Used to create payment instruments that users can use to complete checkout.\n\nA `trade_account` type payment instrument can only be created for a business.\nTo successfully create a trade account, we will require a number of fields to be provided on the `business` key of the `owner`.\n\nRequired fields: `company_number`, `registered_address`, `phone_number`.", "summary": "Create a Payment Instrument", "tags": [ "Payment Instruments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentInstrument" }, "examples": { "input": { "$ref": "#/components/examples/create-payment-instrument-input.json" }, "response": { "$ref": "#/components/examples/payment-instrument.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "description": "The type of payment instrument to create.", "$ref": "#/components/schemas/PaymentInstrumentType" }, "owner": { "description": "An object describing the details for the trade account.", "$ref": "#/components/schemas/ParticipantInput" } }, "required": [ "type", "owner" ] }, "examples": { "input": { "$ref": "#/components/examples/create-payment-instrument-input.json" } } } }, "required": true } } }, "/v1/outbound/{id}/cancel": { "post": { "operationId": "cancelOutbound", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID for the outbound.\n\nA string in the format `outbound_[0-9a-z]`.", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Used to cancel an outbound where execution has not started yet.", "summary": "Cancel an Outbound", "tags": [ "Outbounds" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Outbound" }, "examples": { "response": { "$ref": "#/components/examples/outbound.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/v1/settlement/{id}/cancel": { "post": { "operationId": "cancelSettlement", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID for the settlement.\n\nA string in the format `settlement_[0-9a-z]`.", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Used to cancel a settlement that has not yet finalised, i.e. it has a `settling` status.\n\nA cancellable settlement may already have a reconciled balance, in which case,\nafter being cancelled, the balance can be used in all the normal ways: release/refund/transfer.\nThis situation can occur when the buyer is using manual bank transfers to pay.\n\n\n The primary use for cancelling a settlement is to stop any funds being reconciled to it in the future.\n", "summary": "Cancel a Settlement", "tags": [ "Settlements" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Settlement" }, "examples": { "response": { "$ref": "#/components/examples/settlement.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } }, "/v1/intent/{id}/cancel": { "post": { "operationId": "cancelIntent", "parameters": [ { "description": "Your API Key in the format `[sandbox|live]_api_[0-9a-z]`.", "in": "header", "name": "Authorization", "schema": { "type": "string" }, "required": true }, { "description": "A unique ID for the payment intent.\n\nA string in the format `intent_[0-9a-z]`.", "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "description": "Used to cancel an intent that has not yet finalised, i.e. it has an `unconfirmed` status.", "summary": "Cancel an Intent", "tags": [ "Payment Intents" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Intent" }, "examples": { "response": { "$ref": "#/components/examples/intent.json" } } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorised" }, "500": { "description": "Something went wrong" } } } } } }