UNPKG

@redocly/openapi-core

Version:

See https://github.com/Redocly/openapi-cli

1,660 lines (1,497 loc) 1.06 MB
openapi: 3.0.3 info: version: '2.1' title: Combined API contact: name: Rebilly API Support url: 'https://www.rebilly.com/contact/' email: integrations@rebilly.com license: name: Rebilly url: 'https://www.rebilly.com/api-license/' termsOfService: 'https://www.rebilly.com/terms-of-use/' x-logo: url: 'https://rebilly-core.redoc.ly/rb_apiLogo.svg' backgroundColor: '#0033A0' description: > # Introduction The Rebilly API is built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use Rebilly's API, or you can use one of our SDKs (currently available in [PHP](https://github.com/Rebilly/rebilly-php) and [Javascript](https://github.com/Rebilly/rebilly-js-sdk)). We have other APIs that are also available. Every action from our [app](https://app.rebilly.com) is supported by an API which is documented and available for use so that you may automate any workflows necessary. This document contains the most commonly integrated resources. # Authentication When you sign up for an account, you are given your first secret API key. You can generate additional API keys, and delete API keys (as you may need to rotate your keys in the future). You authenticate to the Rebilly API by providing your secret key in the request header. Rebilly offers three forms of authentication: secret key, publishable key, JSON Web Tokens, and public signature key. - [Secret API key](#section/Authentication/SecretApiKey): used for requests made from the server side. Never share these keys. Keep them guarded and secure. - [Publishable API key](#section/Authentication/PublishableApiKey): used for requests from the client side. For now can only be used to create a [Payment Token](#operation/PostToken) and a [File token](#operation/PostFile). - [JWT](#section/Authentication/JWT): short lifetime tokens that can be assigned a specific expiration time. Never share your secret keys. Keep them guarded and secure. <!-- ReDoc-Inject: <security-definitions> --> # Errors Rebilly follow's the error response format proposed in [RFC 7807](https://tools.ietf.org/html/rfc7807) also known as Problem Details for HTTP APIs. As with our normal API responses, your client must be prepared to gracefully handle additional members of the response. ## Forbidden <RedocResponse pointer={"#/components/responses/Forbidden"} /> ## Conflict <RedocResponse pointer={"#/components/responses/Conflict"} /> ## NotFound <RedocResponse pointer={"#/components/responses/NotFound"} /> ## Unauthorized <RedocResponse pointer={"#/components/responses/Unauthorized"} /> ## ValidationError <RedocResponse pointer={"#/components/responses/ValidationError"} /> # SDKs Rebilly offers a Javascript SDK and a PHP SDK to help interact with the API. However, no SDK is required to use the API. Rebilly also offers [FramePay](https://docs.rebilly.com/docs/developer-docs/framepay/), a client-side iFrame-based solution to help create payment tokens while minimizing PCI DSS compliance burdens and maximizing the customizability. [FramePay](https://docs.rebilly.com/docs/developer-docs/framepay/) is interacting with the [payment tokens creation operation](#operation/PostToken). ## Javascript SDK The [Javascript SDK](https://github.com/Rebilly/rebilly-js-sdk) is maintained within Github, and contains the installation and usage instructions. ## PHP SDK For all PHP SDK examples provided in these docs you will need to configure the `$client`. You may do it like this: ```php $client = new Rebilly\Client([ 'apiKey' => 'YourApiKeyHere', 'baseUrl' => 'https://api.rebilly.com', ]); ``` # Using filter with collections Rebilly provides collections filtering. You can use `?filter` param on collection to define which records should be shown in the response. Here is filter format description: - Fields and values in filter are separated with `:`: `?filter=firstName:John`. - Fields in filter are separated with `;`: `?filter=firstName:John;lastName:Doe`. - You can use multiple values using `,` as values separator: `?filter=firstName:John,Bob`. - To negate the filter use `!`: `?filter=firstName:!John`. Note that you can negate multiple values like this: `?filter=firstName:!John,Bob`. This filter rule will exclude all Johns and Bobs from the response. - You can use range filters like this: `?filter=amount:1..10`. - You can use gte (greater than or equals) filter like this: `?filter=amount:1..`, or lte (less than or equals) than filter like this: `?filter=amount:..10`. - You can create some [predefined values lists](https://user-api-docs.rebilly.com/#tag/Lists) and use them in filter: `?filter=firstName:@yourListName`. You can also exclude list values: `?filter=firstName:!@yourListName` # Expand to include embedded objects Rebilly provides the ability to pre-load additional objects with a request. You can use `?expand` param on most requests to expand and include embedded objects within the `_embedded` property of the response. The `_embedded` property contains an array of objects keyed by the expand parameter value(s). You may expand multiple objects by passing them as comma-separated to the expand value like so: ``` ?expand=recentInvoice,customer ``` And in the response, you would see: ``` "_embedded": [ "recentInvoice": {...}, "customer": {...} ] ``` Expand may be utilitized not only on `GET` requests but also on `PATCH`, `POST`, `PUT` requests too. # Getting started guide Rebilly's API has over 300 operations. That's more than you'll need to implement your use cases. If you have a use case you would like to implement, please consult us for feedback on the best API operations for the task. Our getting started guide will demonstrate a basic order form use case. It will allow us to highlight core resources in Rebilly that will be helpful for many other use cases too. Within 25 minutes, you'll have sent API requests (via our console) to create a subscription order. [Click here to visit our API Guide Tutorial](https://api-guides.rebilly.com/). servers: - url: 'https://api.rebilly.com/v2.1' description: Live Server - url: 'https://api-sandbox.rebilly.com/v2.1' description: Sandbox Server tags: - name: 3D Secure description: | 3D Secure is a way to authenticate and protect transactions. Typically, it's only possible to protect the initial transaction in a subscription with 3D Secure. - name: Bank Accounts description: | Bank Accounts are a type of payment instrument used to collect ACH (echeck) payments, similar to how a payment card would be used to for a credit card payment. - name: Blacklists description: | Your blacklists contains values of customerIds, email addresses, ipAddresses, bank identification numbers, countries or payment cards that you do NOT want to do business with. They are a good tool for managing risk. A blacklist entry that expires after a period of time we call a greylist. - name: Coupons description: > Coupons allows to apply different types of discounts to Invoices, Subscriptions and Plans. Redeemed Coupons will be applied only to Invoices with the same currency. - name: Customers description: | Customers are your customers, sometimes known as accounts, clients, members, patrons, or players in other systems. - name: Customers Timeline description: > The customers timeline keeps an audit trail of changes and activity for each customer. - name: KYC Documents description: > Customer KYC files uploaded on behalf of a customer, tagged with a document type and submitted for validation. - name: Customer Authentication description: > Create authentication credentials, login, logout, and verify your customers. - name: Custom Fields description: | Create additional custom fields for particular resources. You may name, describe, and determine the type of the schema. - name: Disputes description: | Handle disputes (chargebacks and retrievals). - name: Files description: > A File is an entity that can store a physical file and some metadata. It also provides an easy access to its size, mime-type, user-defined tags and description thus allowing easy sorting and searching among stored files. There are several methods of file uploading available: multipart/form-data encoded form, RAW POST (by sending file contents as POST body), fetching from URL (by providing the file URL via 'url' param) Attachment is an entity that is used to link a File to one or multiple objects like Customer, Dispute, Payment, Transaction, Subscription, Plan, Product, Invoice, Note. That allows to quickly find and use files related to those specific entities. - name: Invoices description: > Invoices leave a record for both you and your customer of the products sold. - name: Payment Cards description: > Payment cards are a type of payment instrument used for credit and debit card sales. Rebilly securely vaults the full payment card number, and can pass it onward securely to any gateway account to transact business. - name: PayPal Accounts description: > PayPal Accounts are used for paying with PayPal. We can generate a BAID (billing agreement id) which will allow for recurring billing. - name: Payment Tokens description: > Payment tokens are used to reduce the scope of PCI DSS compliance. A payment token can be made using a different authentication scheme (refer to the public key authentication scheme in the Authentication section), which allows you to create a payment token directly from the browser, bypassing the need to send sensitive cardholder info to your servers. We recommend using this with our Rebilly.js library, which helps you wire a form into this API resource and create payment tokens. - name: Plans description: > Plans are a template for making a subscription. For example, you may have a plan that has a 30-day free trial followed by a recurring charge of $19.95 per month until canceled. The combination of the plan and a request to make a subscription will apply those instructions to create the invoices according to the plan's schedule. - name: Products description: | A product describes what you sell (goods or services). A product determines how what you sell appears on invoices and receipts. The pricing for products is set in Plans. One product can have many plans. - name: Reports description: > The Rebilly Reporting API is currently experimental. You may see the [Reports API Documentation here](https://reports-api-docs.rebilly.com). - name: Search description: | Search data including customers, invoices, orders, transactions and more. - name: Shipping Zones description: > A shipping zone contains regions and countries that you ship to. Each shipping zone has its own shipping rates. - name: Subscriptions description: > A subscription applies a plan's template to create invoices for a customer at the appropriate scheduled intervals. A subscription may also determine if the payment is collected automatically (with autopay set true). - name: Taxes description: | You can map a product to a tax category. The tax category is used by tax providers to calculate taxes for invoices. - name: Transactions description: | Get and refund transactions. - name: Users description: > The Rebilly User API is primarily for our GUI apps. You may see the [User API Documentation here](https://user-api-docs.rebilly.com). A User represents a person who can login to Rebilly, and take actions subject to their granted permissions. It has resources less commonly integrated by 3rd parties. security: - SecretApiKey: [] - JWT: [] components: securitySchemes: JWT: description: > You can create a JSON Web Token (JWT) via our [JWT Session resource](https://user-api-docs.rebilly.com/#operation/PostSigninRequest). Usage format: `Bearer <JWT>` type: http scheme: bearer bearerFormat: JWT PublishableApiKey: description: > Only for the Tokens resource. You can create a Publishable API Key via our [API Keys resource](https://user-api-docs.rebilly.com/#tag/API-Keys), by specifying the type as `publishable`. name: Authorization type: apiKey in: header SecretApiKey: description: > When you sign up for an account, you are given your first secret API key. To do so please [follow this link.](https://app.rebilly.com/signup) Also you can generate additional API keys, and delete API keys (as you may need to rotate your keys in the future). All API keys can be restricted to a small set of permissions (restricted API keys). name: REB-APIKEY type: apiKey in: header schemas: ResourceId: type: string description: The resource ID. Defaults to UUID v4 maxLength: 50 example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 CurrencyCode: type: string description: ISO 4217 alphabetic currency code minLength: 3 maxLength: 3 example: USD ServerTimestamp: type: string description: 'Read-only timestamp, automatically assigned on back-end.' format: date-time readOnly: true Link: type: object properties: href: description: The link URL type: string required: - href SelfLink: type: object allOf: - $ref: '#/components/schemas/Link' properties: rel: description: The link type type: string enum: - self required: - rel ThreeDSecure: type: object required: - enrolled - enrollmentEci - customerId - gatewayAccountId - paymentCardId - websiteId - currency - amount properties: id: description: The 3D Secure entry identifier string readOnly: true allOf: - $ref: '#/components/schemas/ResourceId' customerId: description: Related customer ID allOf: - $ref: '#/components/schemas/ResourceId' gatewayAccountId: description: Related gateway account ID allOf: - $ref: '#/components/schemas/ResourceId' paymentCardId: description: Related payment card ID allOf: - $ref: '#/components/schemas/ResourceId' websiteId: description: Related Website ID allOf: - $ref: '#/components/schemas/ResourceId' enrolled: description: Is the cardholder enrolled in 3DSecure type: string enum: - 'Y' - 'N' - U enrollmentEci: description: The 3D Secure entry enrollment eci type: string eci: description: The 3D Secure entry electronic commerce indicator type: integer cavv: description: The 3D Secure entry cardholder authentication verification value type: string xid: description: The 3D Secure entry transaction Id type: string payerAuthResponseStatus: description: The 3D Secure entry Auth Response Status type: string enum: - 'Y' - 'N' - U - A signatureVerification: description: If signature was verified type: string enum: - 'Y' - 'N' amount: description: Transaction amount type: number format: double currency: allOf: - $ref: '#/components/schemas/CurrencyCode' createdTime: description: The 3D Secure entry created time allOf: - $ref: '#/components/schemas/ServerTimestamp' _links: type: array description: The links related to resource readOnly: true minItems: 1 items: $ref: '#/components/schemas/SelfLink' BlankProblem: description: >- The Problem Details JSON Object [[RFC7807](https://tools.ietf.org/html/rfc7807)]. type: object minProperties: 1 additionalProperties: true properties: status: type: integer description: The HTTP status code. minimum: 400 maximum: 599 title: type: string description: >- A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. DocumentedProblem: type: object allOf: - properties: type: type: string description: >- A URI reference [[RFC3986](https://tools.ietf.org/html/rfc3986)] that identifies the problem type. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". format: uri - $ref: '#/components/schemas/BlankProblem' DetailedProblem: type: object allOf: - $ref: '#/components/schemas/BlankProblem' - properties: detail: type: string description: >- A human-readable explanation specific to this occurrence of the problem. Problem: type: object allOf: - $ref: '#/components/schemas/DocumentedProblem' - $ref: '#/components/schemas/DetailedProblem' Error: type: object allOf: - $ref: '#/components/schemas/Problem' - properties: error: deprecated: true type: string ValidationErrorExtensions: type: object properties: invalidFields: type: array items: type: object properties: field: type: string description: >- The field name. Dot notation is used for nested object field names. message: type: string example: - field: field1 message: field1 is invalid - field: subObject.field2 message: field2 is invalid - field: subObject.field2 message: another error in the field2 InvalidError: description: Invalid data was sent allOf: - $ref: '#/components/schemas/Error' - $ref: '#/components/schemas/ValidationErrorExtensions' FileLink: type: object allOf: - $ref: '#/components/schemas/Link' properties: rel: description: The link type type: string enum: - file required: - rel AttachmentResourceLink: type: object allOf: - $ref: '#/components/schemas/Link' properties: rel: description: The link type type: string enum: - customer - dispute - invoice - payment - plan - product - subscription - transaction required: - rel FileDownloadLink: type: object allOf: - $ref: '#/components/schemas/Link' properties: rel: description: The link type type: string enum: - download required: - rel SignedLinkLink: type: object allOf: - $ref: '#/components/schemas/Link' properties: rel: description: The link type type: string enum: - signedLink required: - rel PermalinkLink: type: object allOf: - $ref: '#/components/schemas/Link' properties: rel: description: The link type type: string enum: - permalink required: - rel File: type: object properties: id: readOnly: true allOf: - $ref: '#/components/schemas/ResourceId' name: description: Original File name type: string extension: description: The File extension type: string description: description: The File description type: string tags: description: The tags list type: array items: type: string mime: description: The mime type type: string readOnly: true enum: - image/png - image/jpeg - image/gif - application/pdf - audio/mpeg size: description: The File size in bytes type: integer readOnly: true width: description: 'Image width, applicable to images only' type: integer readOnly: true height: description: 'Image height, applicable to images only' type: integer readOnly: true sha1: description: Hash sum of the file type: string readOnly: true createdTime: description: The upload date/time allOf: - $ref: '#/components/schemas/ServerTimestamp' updatedTime: description: The latest update date/time allOf: - $ref: '#/components/schemas/ServerTimestamp' isPublic: description: >- Is the file available publicly (without authentication). If true, the permalink in the _links section contains the public URL. type: boolean _links: type: array description: The links related to resource readOnly: true minItems: 3 items: anyOf: - $ref: '#/components/schemas/SelfLink' - $ref: '#/components/schemas/FileDownloadLink' - $ref: '#/components/schemas/SignedLinkLink' - $ref: '#/components/schemas/PermalinkLink' FileEmbed: type: object description: File object readOnly: true properties: file: $ref: '#/components/schemas/File' Attachment: type: object required: - fileId - relatedId - relatedType properties: id: readOnly: true allOf: - $ref: '#/components/schemas/ResourceId' fileId: description: Linked File object id type: string relatedType: description: Linked object type type: string enum: - customer - dispute - gateway-timeline-comment - invoice - organization - payment - plan - product - subscription - transaction - customer-timeline-comment - transaction-timeline-comment - order-timeline-comment relatedId: description: Linked object Id type: string name: description: The Original Attachment name type: string description: description: The Attachment description type: string createdTime: description: Creation date/time allOf: - $ref: '#/components/schemas/ServerTimestamp' updatedTime: description: Latest update date/time allOf: - $ref: '#/components/schemas/ServerTimestamp' _links: type: array description: The links related to resource readOnly: true minItems: 3 items: anyOf: - $ref: '#/components/schemas/SelfLink' - $ref: '#/components/schemas/FileLink' - $ref: '#/components/schemas/AttachmentResourceLink' _embedded: type: array description: >- Any embedded objects available that are requested by the `expand` querystring parameter. readOnly: true minItems: 1 items: anyOf: - $ref: '#/components/schemas/FileEmbed' AuthenticationOptions: type: object properties: passwordPattern: description: Allowed password pattern type: string credentialTtl: description: The default lifetime of the credential in seconds type: integer authTokenTtl: description: The default lifetime of the auth-token in seconds type: integer resetTokenTtl: description: The default lifetime of the reset-token in seconds type: integer otpRequired: description: Should OTP be required to exchange token type: boolean AuthenticationToken: type: object discriminator: propertyName: mode mapping: password: '#/components/schemas/password' passwordless: '#/components/schemas/passwordless' properties: token: description: The token identifier string type: string readOnly: true mode: description: The token's generation mode type: string enum: - password - passwordless writeOnly: true default: password otpRequired: description: Should OTP be required to exchange this token type: boolean credentialId: description: The credential's ID readOnly: true allOf: - $ref: '#/components/schemas/ResourceId' AuthenticationTokenMetadata: type: object properties: expiredTime: description: Token's expired time type: string format: date-time _links: type: array description: The links related to resource readOnly: true minItems: 1 items: $ref: '#/components/schemas/SelfLink' password: required: - username - password allOf: - $ref: '#/components/schemas/AuthenticationToken' - properties: username: description: The token's username type: string password: description: The token's password type: string format: password writeOnly: true customerId: description: The token's customer ID readOnly: true allOf: - $ref: '#/components/schemas/ResourceId' - $ref: '#/components/schemas/AuthenticationTokenMetadata' passwordless: required: - customerId allOf: - $ref: '#/components/schemas/AuthenticationToken' - properties: customerId: description: The token's customer ID allOf: - $ref: '#/components/schemas/ResourceId' - $ref: '#/components/schemas/AuthenticationTokenMetadata' CustomerLink: type: object allOf: - $ref: '#/components/schemas/Link' properties: rel: description: The link type type: string enum: - customer required: - rel CustomerJWT: type: object properties: id: description: The session identifier string allOf: - $ref: '#/components/schemas/ResourceId' readOnly: true type: description: Session type type: string readOnly: true enum: - customer token: description: The session's token used for authentication type: string readOnly: true invalidate: description: Whether to invalidate token after exchange or not type: boolean default: true example: true writeOnly: true oneTimePassword: description: The one time password sent via an email. Should contain digits only. type: string pattern: '^[0-9]{6}$' example: '123456' writeOnly: true customerId: description: The customer's ID readOnly: true allOf: - $ref: '#/components/schemas/ResourceId' createdTime: description: Session created time type: string format: date-time readOnly: true updatedTime: description: Session updated time allOf: - $ref: '#/components/schemas/ServerTimestamp' expiredTime: description: Session expired time. Defaults to one hour type: string format: date-time _links: type: array description: The links related to resource readOnly: true minItems: 1 items: $ref: '#/components/schemas/CustomerLink' ContactPhoneNumbers: description: The list of phone numbers type: array items: type: object required: - label - value properties: label: description: The phone label type: string example: main value: description: The phone value type: string example: 512-710-1640 primary: description: True if phone is primary type: boolean example: true ContactEmails: description: The list of emails type: array items: type: object required: - label - value properties: label: description: The email label type: string example: main value: description: The email value type: string example: rebilly@example.com primary: description: True if email is primary type: boolean example: true ContactObject: type: object properties: firstName: description: The contact first name type: string example: Benjamin nullable: true lastName: description: The contact last name type: string example: Franklin nullable: true organization: description: The contact organization type: string nullable: true example: null address: description: The contact street address type: string maxLength: 60 example: 36 Craven St nullable: true address2: description: The contact street address (second line) type: string maxLength: 60 nullable: true city: description: The contact city type: string maxLength: 45 nullable: true example: London region: description: The contact region (state) type: string maxLength: 45 nullable: true example: London country: description: The contact country ISO Alpha-2 code type: string pattern: '^[A-Z]{2}$' nullable: true example: GB postalCode: description: The contact postal code type: string maxLength: 10 nullable: true example: WC2N 5NF phoneNumbers: $ref: '#/components/schemas/ContactPhoneNumbers' emails: $ref: '#/components/schemas/ContactEmails' hash: description: >- A hash that can be used to compare multiple contacts for identical attribute values type: string maxLength: 40 example: 056ae6d97c788b9e98b049ebafd7b229bf852221 readOnly: true BrowserData: type: object title: Browser data description: Browser data used for 3DS and risk scoring. required: - colorDepth - javaEnabled - language - screenHeight - screenWidth - timeZoneOffset properties: acceptHeader: description: The browser's accept header value. type: string maxLength: 2048 example: >- text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 colorDepth: description: >- The browser's color depth in bits per pixel obtained using the `screen.colorDepth` property. type: integer enum: - 1 - 4 - 8 - 15 - 16 - 24 - 32 - 48 example: 24 ipAddress: description: The browser's IP address (ipv4 or ipv6). type: string format: ipv4 or ipv6 example: 93.92.91.90 javaEnabled: description: >- Whether Java is enabled in a browser or not. Value is returned from the `navigator.javaEnabled` property. type: boolean language: description: >- The browser's language settings returned from the `navigator.language` property. type: string example: en-US maxLength: 8 screenHeight: description: >- The browser's screen height returned from the `screen.height` property. type: integer example: 900 screenWidth: description: >- The browser's screen width returned from the `screen.width` property. type: integer example: 1440 timeZoneOffset: description: > The browser's time zone offset in minutes from UTC. A positive offset indicates the local time is behind UTC, and negative is ahead. Can find it with `(new Date()).getTimezoneOffset()` property. type: integer minimum: -1410 maximum: 1410 example: 300 userAgent: description: The user-agent header. type: string maxLength: 2048 example: > Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 deviceFingerprintHash: description: >- The device fingerprint hash. See [Valve's fingerprintjs2](https://github.com/Valve/fingerprintjs2). type: string example: pIUt3xbgX3l9g3YDiLbx ResourceCustomFields: description: > "Custom Fields list as a map `{"custom field name": "custom field value", ...}"`. The format must follow the saved format (see Custom Fields section for the formats). type: object Method: type: string description: The payment method enum: - payment-card - ach - bank-account - cash - check - paypal - Alipay - ApplePay - AstroPay Card - bank-transfer - bitcoin - Boleto - cash-deposit - CASHlib - CashToCode - China UnionPay - CODVoucher - Conekta-oxxo - cryptocurrency - Cupon-de-pagos - domestic-cards - echeck - ecoPayz - ecoVoucher - EPS - ePay.bg - Flexepin - Giropay - Google Pay - Gpaysafe - iDebit - iDEAL - INOVAPAY-pin - INOVAPAY-wallet - InstaDebit - instant-bank-transfer - Interac-online - Interac-eTransfer - Interac-express-connect - Interac - invoice - Jeton - Klarna - LPG-online - LPG-payment-card - miscellaneous - Neosurf - Netbanking - Neteller - Nordea-Solo - OchaPay - online-bank-transfer - Onlineueberweisen - OXXO - Pagsmile-lottery - Pagsmile-deposit-express - PayCash - Paysafecard - Pay4Fun - PinPay - phone - POLi - Przelewy24 - QQPay - Resurs - SEPA - Skrill - Skrill Rapid Transfer - SMSVoucher - SparkPay - swift-dbt - ToditoCash-card - Trustly - UPayCard - voucher - Webpay - WeChat Pay - Zotapay PaymentInstrument: type: object required: - method discriminator: propertyName: method mapping: ach: '#/components/schemas/achInstrument' Alipay: '#/components/schemas/AlipayInstrument' AstroPay Card: '#/components/schemas/AstroPay-CardInstrument' bank-account: '#/components/schemas/bank-accountInstrument' bitcoin: '#/components/schemas/bitcoinInstrument' Boleto: '#/components/schemas/BoletoInstrument' cash: '#/components/schemas/cashInstrument' check: '#/components/schemas/checkInstrument' China UnionPay: '#/components/schemas/China-UnionPayInstrument' ePay.bg: '#/components/schemas/ePay-bgInstrument' EPS: '#/components/schemas/EPSInstrument' Flexepin: '#/components/schemas/FlexepinInstrument' iDEAL: '#/components/schemas/iDEALInstrument' Klarna: '#/components/schemas/KlarnaInstrument' payment-card: '#/components/schemas/payment-cardInstrument' paypal: '#/components/schemas/paypalInstrument' QQPay: '#/components/schemas/QQPayInstrument' Skrill Rapid Transfer: '#/components/schemas/Skrill-Rapid-TransferInstrument' SMSVoucher: '#/components/schemas/SMSVoucherInstrument' UPayCard: '#/components/schemas/UPayCardInstrument' WeChat Pay: '#/components/schemas/WeChat-PayInstrument' AlipayInstrument: '#/components/schemas/AlipayInstrument' AstroPay-CardInstrument: '#/components/schemas/AstroPay-CardInstrument' BoletoInstrument: '#/components/schemas/BoletoInstrument' China-UnionPayInstrument: '#/components/schemas/China-UnionPayInstrument' EPSInstrument: '#/components/schemas/EPSInstrument' FlexepinInstrument: '#/components/schemas/FlexepinInstrument' KlarnaInstrument: '#/components/schemas/KlarnaInstrument' QQPayInstrument: '#/components/schemas/QQPayInstrument' SMSVoucherInstrument: '#/components/schemas/SMSVoucherInstrument' Skrill-Rapid-TransferInstrument: '#/components/schemas/Skrill-Rapid-TransferInstrument' UPayCardInstrument: '#/components/schemas/UPayCardInstrument' WeChat-PayInstrument: '#/components/schemas/WeChat-PayInstrument' achInstrument: '#/components/schemas/achInstrument' bank-accountInstrument: '#/components/schemas/bank-accountInstrument' bitcoinInstrument: '#/components/schemas/bitcoinInstrument' cashInstrument: '#/components/schemas/cashInstrument' checkInstrument: '#/components/schemas/checkInstrument' ePay-bgInstrument: '#/components/schemas/ePay-bgInstrument' iDEALInstrument: '#/components/schemas/iDEALInstrument' payment-cardInstrument: '#/components/schemas/payment-cardInstrument' paypalInstrument: '#/components/schemas/paypalInstrument' properties: method: $ref: '#/components/schemas/Method' achInstrument: description: ACH payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' - type: object required: - bankAccountId properties: bankAccountId: description: The bank account identifier string allOf: - $ref: '#/components/schemas/ResourceId' AlipayInstrument: description: Alipay payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' AstroPay-CardInstrument: description: AstroPay Card payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' bank-accountInstrument: description: ACH payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' - type: object required: - bankAccountId properties: bankAccountId: description: The bank account identifier string allOf: - $ref: '#/components/schemas/ResourceId' bitcoinInstrument: description: Bitcoin payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' BoletoInstrument: description: Boleto payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' cashInstrument: description: Cash payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' - type: object properties: receivedBy: description: The receiver's name type: string checkInstrument: description: Check payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' - type: object properties: reference: description: Reference data type: string China-UnionPayInstrument: description: China UnionPay payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' ePay-bgInstrument: description: ePay.bg payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' EPSInstrument: description: EPS payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' FlexepinInstrument: description: Flexepin payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' iDEALInstrument: description: iDEAL payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' KlarnaInstrument: description: Klarna payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' payment-cardInstrument: description: Payment card payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' - type: object required: - paymentCardId properties: paymentCardId: description: The payment card identifier string allOf: - $ref: '#/components/schemas/ResourceId' paypalInstrument: description: PayPal payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' - type: object required: - payPalAccountId properties: payPalAccountId: description: The PayPal account identifier string allOf: - $ref: '#/components/schemas/ResourceId' QQPayInstrument: description: QQPay payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' Skrill-Rapid-TransferInstrument: description: Skrill Rapid Transfer payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' SMSVoucherInstrument: description: SMSVoucher payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' UPayCardInstrument: description: SMSVoucher payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' WeChat-PayInstrument: description: WeChat Pay payment instrument object allOf: - $ref: '#/components/schemas/PaymentInstrument' CustomerAverageValue: type: object readOnly: true properties: currency: description: Merchant's reporting currency allOf: - $ref: '#/components/schemas/CurrencyCode' amount: description: Average approved payment amount in Merchant's reporting currency type: number format: double amountUsd: description: Average approved payment amount in USD type: number format: double CustomerLifetimeRevenue: type: object readOnly: true properties: currency: description: Merchant's reporting currency allOf: - $ref: '#/components/schemas/CurrencyCode' amount: description: Revenue amount in Merchant's reporting currency type: number format: double amountUsd: description: Revenue amount in USD type: number format: double Tag: type: object description: Tag required: - name properties: id: description: The tag's identifier string readOnly: true allOf: - $ref: '#/components/schemas/ResourceId' name: description: 'The tag''s unique name, which is case-insensitive.' type: string maxLength: 255 pattern: '^[@~\-\.\w\s]+$' example: New createdTime: description: The tag's created time allOf: - $ref: '#/components/schemas/ServerTimestamp' updatedTime: description: The tag's updated time allOf: - $ref: '#/components/schemas/ServerTimestamp' _links: type: array description: The links related to resource readOnly: true minItems: 1 items: anyOf: - $ref: '#/components/schemas/SelfLink' DefaultPaymentInstrumentLink: type: object allOf: - $ref: '#/components/schemas/Link' properties: rel: description: The link type type: string enum: - defaultPaymentInstrument required: - rel LeadSourceLink: type: object allOf: - $ref: '#/components/schemas/Link' properties: rel: description: The link type type: string enum: - leadSource required: - rel WebsiteLink: type: object allOf: - $ref: '#/components/schemas/Link' properties: rel: description: The link type type: string enum: - website required: - rel LeadSourceData: type: object properties: medium: description: 'Lead Source''s medium (eg search, display)' type: string source: description: 'Lead Source''s source (eg google, yahoo)' type: string campaign: description: Lead Source's campaign (eg go-big-123) type: string term: description: Lead Source's term (eg salt shakers) type: string content: description: Lead Source's content (eg smiley faces) type: string affiliate: description: 'Lead Source''s affiliate (eg 123, Bob Smith)' type: string subAffiliate: description: >- Lead Source's sub-affiliate also called a sub-id or click id in some circles (eg 123456) type: string salesAgent: description: Lead Source's sales agent (eg James Bond) type: string clickId: description: Lead Source's click id (may come from an ad server) type: string path: description: Lead Source's path url (eg www.example.com/some/l