UNPKG

366 kBJSONView Raw
1{"openapi":"3.0.0","info":{"contact":{"email":"integrations@rebilly.com","name":"Rebilly API Support","url":"https://www.rebilly.com/contact/"},"description":"# Introduction\nThe Rebilly API is built on HTTP. Our API is RESTful. It has predictable\nresource URLs. It returns HTTP response codes to indicate errors. It also\naccepts and returns JSON in the HTTP body. You can use your favorite\nHTTP/REST library for your programming language to use Rebilly's API, or\nyou can use one of our SDKs (currently available in [PHP](https://github.com/Rebilly/rebilly-php)\nand [Javascript](https://github.com/Rebilly/rebilly-js-sdk)).\n\nWe have other APIs that are also available. Every action from our [app](https://app.rebilly.com)\nis supported by an API which is documented and available for use so that you\nmay automate any workflows necessary. This document contains the most commonly\nintegrated resources.\n\n# Authentication\nWhen you sign up for an account, you are given your first API key.\nYou can generate additional API keys, and delete API keys (as you may\nneed to rotate your keys in the future). You authenticate to the\nRebilly API by providing your secret key in the request header.\n\nRebilly offers three forms of authentication: secret key, publishable key, JSON Web Tokens, and public signature key.\n- [Secret API key](#section/Authentication/SecretApiKey): used for requests made from the server side. Never share these keys. Keep them guarded and secure\n- [Publishable API key](#section/Authentication/PublishableApiKey): used for requests from the client side. For now can only be used on the [Tokens resource](#tag/Payment-Tokens%2Fpaths%2F~1tokens%2Fpost)\n- [JWT](#section/Authentication/JWT): short lifetime tokens that can be assigned a specific expiration time\n\nNever share your secret keys. Keep them guarded and secure.\n\n<!-- ReDoc-Inject: <security-definitions> -->\n\n# PHP SDK\nFor all PHP SDK examples provided in this spec you will need to configure `$client`.\nYou may do it like this:\n\n```php\n$client = new Rebilly\\Client([\n 'apiKey' => 'YourApiKeyHere',\n 'baseUrl' => 'https://api.rebilly.com',\n]);\n```\n\n# Using filter\nRebilly provides collections filtering. You can use `?filter` param on collection to define which records should be shown in the response.\n\nHere is filter format description:\n\n- Fields and values in filter are separated with `:`: `?filter=firstName:John`.\n\n- Fields in filter are separated with `;`: `?filter=firstName:John;lastName:Doe`.\n\n- You can use multiple values using `,` as values separator: `?filter=firstName:John,Bob`.\n\n- 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.\n\n- You can use range filters like this: `?filter=amount:1..10`.\n\n- 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`.\n\n- You can create some [predefined values lists](https://rebilly.github.io/RebillyUserAPI/#tag/Lists) and use them in filter: `?filter=firstName:@yourListName`. You can also exclude list values: `?filter=firstName:!@yourListName`\n","license":{"name":"Rebilly","url":"https://www.rebilly.com/api-license/"},"termsOfService":"https://www.rebilly.com/terms/","title":"Rebilly","version":"2.1","x-apisguru-categories":["payment","ecommerce"],"x-logo":{"backgroundColor":"#0033A0","url":"https://rebilly.github.io/RebillyAPI/rb_apiLogo.svg"},"x-origin":[{"format":"swagger","url":"http://rebilly.github.io/RebillyAPI/swagger.json","version":"2.0"}],"x-providerName":"rebilly.com"},"security":[{"SecretApiKey":[]},{"JWT":[]}],"tags":[{"description":"3D Secure is a way to authenticate and protect transactions. Typically,\nit's only possible to protect the initial transaction in a subscription\nwith 3D Secure.\n","name":"3D Secure"},{"description":"Bank Accounts are a type of payment instrument used to collect\nACH (echeck) payments, similar to how a payment\ncard would be used to for a credit card payment.\n","name":"Bank Accounts"},{"description":"Your blacklists contains values of customerIds, email addresses,\nipAddresses, bank identification numbers, countries or payment cards that\nyou do NOT want to do business with. They are a good tool for managing\nrisk. A blacklist entry that expires after a period of time we call a\ngreylist.\n","name":"Blacklists"},{"description":"Contacts are Customer's address book.\nAll contact information used in Invoices, Subscriptions, Transacions, etc is enlisted here. Hovewer, changing a Contact won't change corresponding contact information in related resources\n","name":"Contacts"},{"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.\n","name":"Coupons"},{"description":"Customers are your customers, sometimes known as accounts, clients,\nmembers, patrons, or players in other systems.\n","name":"Customers"},{"description":"Customer KYC files uploaded on behalf of a customer, tagged with a document type\nand submitted for validation.\n","name":"KYC Documents"},{"description":"Create authentication credentials, login, logout, and verify your customers.\n","name":"Customer Authentication"},{"description":"Create additional custom fields for particular resources. You may name,\ndescribe, and determine the type of the schema.\n","name":"Custom Fields"},{"description":"Handle disputes (chargebacks and retrievals).\n","name":"Disputes"},{"description":"A File is an entity that can store a phyiscal file and some metadata. It also provides an easy access to\nits size, mime-type, user-defined tags and description thus allowing easy sorting and searching among stored\nfiles.\nThere are several methods of file uploading available: multipart/form-data encoded form, RAW POST (by sending\nfile contents as POST body), fetching from URL (by providing the file URL via 'url' param)\nAttachment is an entity that is used to link a File to one or multiple objects like Customer, Dispute, Payment,\nTransaction, Subscription, Plan, Product, Invoice, Note. That allows to quickly find and use files related to\nthose specific entities.\n","name":"Files"},{"description":"Invoices leave a record for both you and your customer of the products sold.\n","name":"Invoices"},{"description":"Collect money from your customers with payments. You can schedule a payment\nto occur in the future. You can assign a dunning schedule to a payment to collect\nin the case of a decline.\n\nSome payments may be, what we term, suspended payments. These types of payments\nrequire user interaction. For example, an initial PayPal purchase, a 3D Secure\npurchase, China Union Pay, and more require the customer's interaction to\ncomplete the payment. We call these a \"suspended\" payment flow.\n","name":"Payments"},{"description":"Payment cards are a type of payment instrument used for credit and debit card\nsales. Rebilly securely vaults the full payment card number, and can pass it\nonward securely to any gateway account to transact business.\n","name":"Payment Cards"},{"description":"PayPal Accounts are used for paying with PayPal. We can generate a BAID (billing\nagreement id) which will allow for recurring billing.\n","name":"PayPal Accounts"},{"description":"Payment tokens are used to reduce the scope of PCI DSS compliance. A payment\ntoken can be made using a different authentication scheme (refer to the public key\nauthentication scheme in the Authentication section), which allows you to\ncreate a payment token directly from the browser, bypassing the need to send\nsensitive cardholder info to your servers. We recommend using this with our\nRebilly.js library, which helps you wire a form into this API resource and create\npayment tokens.\n","name":"Payment Tokens"},{"description":"Plans are a template for making a subscription. For example, you may have a plan\nthat has a 30-day free trial followed by a recurring charge of $19.95 per month\nuntil canceled. The combination of the plan and a request to make a subscription\nwill apply those instructions to create the invoices according to the plan's\nschedule.\n","name":"Plans"},{"description":"A product describes what you sell (goods or services). \nA product determines how what you sell appears on invoices and receipts.\nThe pricing for products is set in Plans. One product can have many\nplans.\n","name":"Products"},{"description":"The Rebilly Reporting API is currently experimental. You may see\nthe [Reports API Documentation here](https://rebilly.github.io/RebillyReportsAPI/).\n","name":"Reports"},{"description":"A shipping zone contains regions and countries that you ship to. Each shipping zone has its own shipping rates.\n","name":"Shipping Zones"},{"description":"A subscription applies a plan's template to create invoices for a customer at the\nappropriate scheduled intervals. A subscription may also determine if the payment\nis collected automatically (with autopay set true).\n","name":"Subscriptions"},{"description":"You can map a product to a tax category. The tax category is used by\ntax providers to calculate taxes for invoices.\n","name":"Taxes"},{"description":"Get and refund transactions.\n","name":"Transactions"},{"description":"The Rebilly User API is primarily for our GUI apps. You may see\nthe [User API Documentation here](https://rebilly.github.io/RebillyUserAPI/).\nA User represents a person who can login to Rebilly, and take actions subject to\ntheir granted permissions. It has resources less commonly integrated by\n3rd parties.\n","name":"Users"}],"paths":{"/3dsecure":{"get":{"parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/ThreeDSecure"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of ThreeDSecure entries","tags":["3D Secure"]},"post":{"description":"Create a ThreeDSecure entry\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreeDSecure"}}},"description":"ThreeDSecure resource","required":true},"responses":{"201":{"description":"ThreeDSecure entry was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/ThreeDSecure"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a ThreeDSecure entry","tags":["3D Secure"]}},"/3dsecure/{id}":{"get":{"description":"Retrieve a ThreeDSecure entry with specified identifier string\n","responses":{"200":{"description":"ThreeDSecure entry was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/ThreeDSecure"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a ThreeDSecure entry","tags":["3D Secure"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/attachments":{"get":{"description":"Retrieve a list of Attachments\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"},{"$ref":"#/components/parameters/collectionFilter"},{"$ref":"#/components/parameters/collectionQuery"},{"$ref":"#/components/parameters/collectionExpand"},{"$ref":"#/components/parameters/collectionFields"},{"description":"The collection items sort field and order (prefix with \"-\" for descending sort).","in":"query","name":"sort","style":"form","explode":false,"schema":{"type":"array","items":{"enum":["id","-id","name","-name","relatedId","-relatedId","relatedType","-relatedType","fileId","-fileId","createdTime","-createdTime","updatedTime","-updatedTime"],"type":"string"}}}],"responses":{"200":{"description":"A list of Attachments was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Attachment"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of Attachments","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$attachments = $client->attachments()->search([\n 'filter' => 'relatedType:customer',\n]);\n"}]},"post":{"description":"Create an Attachment\n","requestBody":{"$ref":"#/components/requestBodies/Attachment"},"responses":{"201":{"description":"Attachment was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create an Attachment","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$attachmentForm = new Rebilly\\Entities\\Attachment();\n$attachmentForm->setFileId('fileId');\n$attachmentForm->setRelatedType($attachmentForm::TYPE_CUSTOMER);\n$attachmentForm->setRelatedId('customerId');\n\ntry {\n $attachment = $client->attachments()->create($attachmentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/attachments/{id}":{"delete":{"description":"Delete the Attachment with predefined identifier string\n","responses":{"204":{"description":"Attachment was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Delete an Attachment","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$client->attachments()->delete('attachmentId');\n"}]},"get":{"description":"Retrieve a Attachment with specified identifier string\n","responses":{"200":{"description":"Attachment was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve an Attachment","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$attachment = $client->attachments()->load('attachmentId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Update the Attachment with predefined ID\n","requestBody":{"$ref":"#/components/requestBodies/Attachment"},"responses":{"200":{"description":"Attachment was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"201":{"description":"Attachment was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Update the Attachment with predefined ID","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$attachmentForm = new Rebilly\\Entities\\Attachment();\n$attachmentForm->setFileId('fileId');\n$attachmentForm->setRelatedType($attachmentForm::TYPE_CUSTOMER);\n$attachmentForm->setRelatedId('customerId');\n\ntry {\n $attachment = $client->attachments()->update('attachmentId', $attachmentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/authentication-options":{"get":{"description":"Read current authentication options\n","responses":{"200":{"description":"Current authentication options was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/AuthenticationOptions"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Read current authentication options","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$authenticationOptions = $client->authenticationOptions()->load();\n"}]},"put":{"description":"Change options\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticationOptions"}}},"description":"Authentication Options resource","required":true},"responses":{"200":{"description":"Authentication Options were updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/AuthenticationOptions"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Change authentication options","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$authenticationOptionsForm = new Rebilly\\Entities\\AuthenticationOptions();\n// Regular expression below matches any password with 6+ length that contains alphabet symbols and/or numbers.\n$authenticationOptionsForm->setPasswordPattern('/^[a-zA-Z0-9]{6,}$/');\n\ntry {\n $authenticationOptions = $client->authenticationOptions()->update($authenticationOptionsForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/authentication-tokens":{"get":{"description":"Retrieve a list of auth tokens\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of auth tokens was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/AuthenticationToken"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of auth tokens","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$authenticationTokens = $client->authenticationTokens()->search([\n 'filter' => 'customerId:testCustomer',\n]);\n"}]},"post":{"description":"Login a user (customer)\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticationToken"}}},"description":"AuthenticationToken resource","required":true},"responses":{"201":{"description":"Login successful","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/AuthenticationToken"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Login","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$authenticationForm = new Rebilly\\Entities\\AuthenticationToken();\n$authenticationForm->setUsername('username');\n$authenticationForm->setPassword('test123');\n\ntry {\n $authenticationToken = $client->authenticationTokens()->login($authenticationForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/authentication-tokens/{token}":{"delete":{"description":"Logout a user\n","responses":{"204":{"description":"User was logged out","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Logout a user","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$client->authenticationTokens()->logout('token');\n"}]},"get":{"description":"Verify an authentication token\n","responses":{"200":{"description":"Authentication Token was verified","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/AuthenticationToken"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Verify","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$isVerified = $client->authenticationTokens()->verify('token');\n"}]},"parameters":[{"description":"The token identifier string","in":"path","name":"token","required":true,"schema":{"type":"string"}}]},"/bank-accounts":{"get":{"description":"Retrieve a list of Bank Accounts\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of Bank Accounts was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/BankAccount"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of bank accounts","tags":["Bank Accounts"],"x-code-samples":[{"lang":"PHP","source":"$bankAccounts = $client->bankAccounts()->search([\n 'filter' => 'customerId:testId',\n]);\n"}]},"post":{"description":"Create a Bank Account\n","requestBody":{"$ref":"#/components/requestBodies/BankAccount"},"responses":{"201":{"description":"Bank Account was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a Bank Account","tags":["Bank Accounts"],"x-code-samples":[{"lang":"PHP","source":"$bankAccountForm = new Rebilly\\Entities\\BankAccount();\n$bankAccountForm->setCustomerId('customerId');\n$bankAccountForm->setRoutingNumber('0123456');\n$bankAccountForm->setAccountNumber('0123456');\n$bankAccountForm->setAccountType('checking');\n$bankAccountForm->setBillingAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $bankAccount = $client->bankAccounts()->create($bankAccountForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/bank-accounts/{id}":{"get":{"description":"Retrieve a Bank Account with specified identifier string\n","responses":{"200":{"description":"BankAccount was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a Bank Account","tags":["Bank Accounts"],"x-code-samples":[{"lang":"PHP","source":"$bankAccount = $client->bankAccounts()->load('bankAccountId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create or update a BankAccount with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/BankAccount"},"responses":{"200":{"description":"BankAccount was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"201":{"description":"BankAccount was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a BankAccount with predefined ID","tags":["Bank Accounts"],"x-code-samples":[{"lang":"PHP","source":"$bankAccountForm = new Rebilly\\Entities\\BankAccount();\n$bankAccountForm->setCustomerId('customerId');\n$bankAccountForm->setRoutingNumber('0123456');\n$bankAccountForm->setAccountNumber('0123456');\n$bankAccountForm->setAccountType('checking');\n$bankAccountForm->setBillingAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $bankAccount = $client->customers()->create($bankAccountForm, 'bankAccountId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/bank-accounts/{id}/deactivation":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Deactivate a Bank Account\n","responses":{"201":{"description":"Deactivated successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Deactivate a Bank Account","tags":["Bank Accounts"],"x-code-samples":[{"lang":"PHP","source":"$bankAccount = $client->bankAccounts()->deactivate('bankAccountId');\n"}]}},"/blacklists":{"get":{"description":"Retrieve a list of blacklists\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of Blacklists was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Blacklist"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of blacklists","tags":["Blacklists"],"x-code-samples":[{"lang":"PHP","source":"$blacklists = $client->blacklists()->search([\n 'filter' => 'value:testValue',\n]);\n"}]},"post":{"description":"Create a blacklist\n","requestBody":{"$ref":"#/components/requestBodies/Blacklist"},"responses":{"201":{"description":"Blacklist was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Blacklist"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a blacklist","tags":["Blacklists"],"x-code-samples":[{"lang":"PHP","source":"$blacklistForm = new Rebilly\\Entities\\Blacklist();\n$blacklistForm->setType($blacklistForm::TYPE_EMAIL);\n$blacklistForm->setValue('test@test.com');\n$blacklistForm->setExpiredTime('2025-01-01 05:00:00');\n\ntry {\n $blacklist = $client->blacklists()->create($blacklistForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/blacklists/{id}":{"delete":{"description":"Delete a blacklist with predefined identifier string\n","responses":{"204":{"description":"Blacklist was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Delete a blacklist","tags":["Blacklists"],"x-code-samples":[{"lang":"PHP","source":"$client->blacklists()->delete('blacklistId');\n"}]},"get":{"description":"Retrieve a blacklist with specified identifier string\n","responses":{"200":{"description":"Blacklist was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Blacklist"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a blacklist","tags":["Blacklists"],"x-code-samples":[{"lang":"PHP","source":"$blacklist = $client->blacklists()->load('blacklistId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create a blacklist with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/Blacklist"},"responses":{"201":{"description":"Blacklist was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Blacklist"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"409":{"description":"Blacklist exist and cannot be updated","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a blacklist with predefined ID","tags":["Blacklists"],"x-code-samples":[{"lang":"PHP","source":"$blacklistForm = new Rebilly\\Entities\\Blacklist();\n$blacklistForm->setType($blacklistForm::TYPE_EMAIL);\n$blacklistForm->setValue('test@test.com');\n$blacklistForm->setExpiredTime('2025-01-01 05:00:00');\n\ntry {\n $blacklist = $client->blacklists()->create($blacklistForm, 'blacklistId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/contacts":{"get":{"description":"Retrieve a list of contacts\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of Contacts was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Contact"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of contacts","tags":["Contacts"],"x-code-samples":[{"lang":"PHP","source":"$contacts = $client->contacts()->search([\n 'filter' => 'firstName:John',\n]);\n"}]},"post":{"description":"Create a contact\n","requestBody":{"$ref":"#/components/requestBodies/Contact"},"responses":{"201":{"description":"Contact was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a contact","tags":["Contacts"],"x-code-samples":[{"lang":"PHP","source":"$contactForm = new Rebilly\\Entities\\Contact();\n$contactForm->setFirstName('Sherlock');\n$contactForm->setLastName('Holmes');\n$contactForm->setOrganization('TestOrganization');\n$contactForm->setEmails(\n [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ]\n);\n$contactForm->setPhoneNumbers(\n [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ]\n);\n\ntry {\n $contact = $client->contacts()->create($contactForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/contacts/{id}":{"delete":{"description":"Delete a contact with predefined identifier string\n","responses":{"204":{"description":"Contact was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"402":{"description":"Contact cannot be deleted"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Delete a contact","tags":["Contacts"]},"get":{"description":"Retrieve a contact with specified identifier string\n","responses":{"200":{"description":"Contact was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a contact","tags":["Contacts"],"x-code-samples":[{"lang":"PHP","source":"$contact = $client->contacts()->load('contactId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create or update a contact with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/Contact"},"responses":{"201":{"description":"Contact was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Contact exists and cannot be updated"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create or update a contact with predefined ID","tags":["Contacts"],"x-code-samples":[{"lang":"PHP","source":"$contactForm = new Rebilly\\Entities\\Contact();\n$contactForm->setFirstName('Sherlock');\n$contactForm->setLastName('Holmes');\n$contactForm->setOrganization('TestOrganization');\n$contactForm->setEmails(\n [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ]\n);\n$contactForm->setPhoneNumbers(\n [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ]\n);\n\ntry {\n $contact = $client->contacts()->update('contactId', $contactForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/coupons":{"get":{"description":"Retrieve a list of coupons\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"},{"$ref":"#/components/parameters/collectionFilter"},{"$ref":"#/components/parameters/collectionQuery"},{"$ref":"#/components/parameters/collectionSort"}],"responses":{"200":{"description":"A list of coupons was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Coupon"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of coupons","tags":["Coupons"],"x-code-samples":[{"lang":"PHP","source":"$coupons = $client->coupons()->search([\n 'filter' => 'status:issued',\n]);\n"}]},"post":{"description":"Create a coupon\n","requestBody":{"$ref":"#/components/requestBodies/Coupon"},"responses":{"201":{"description":"Coupon was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a coupon","tags":["Coupons"],"x-code-samples":[{"lang":"PHP","source":"$couponForm = new Rebilly\\Entities\\Coupons\\Coupon();\n\n$discountArray = [\n 'currency' => 'USD',\n 'amount' => 1.99,\n];\n\n$discountForm = new \\Rebilly\\Entities\\Coupons\\Discounts\\Fixed($discountArray);\n$couponForm->setDiscount($discountForm);\n// Coupon can be used right now\n$couponForm->setIssuedTime(date('Y-m-d H:i:s'));\n\n$restrictionArray = [\n 'quantity' => 2,\n];\n\n$restrictionForm = new Rebilly\\Entities\\Coupons\\Restrictions\\DiscountsPerRedemption($restrictionArray);\n\n$couponForm->setRestrictions([$restrictionForm]);\n\ntry {\n $coupon = $client->coupons()->create($couponForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/coupons-redemptions":{"get":{"parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"},{"$ref":"#/components/parameters/collectionFilter"},{"$ref":"#/components/parameters/collectionQuery"},{"$ref":"#/components/parameters/collectionSort"}],"responses":{"200":{"description":"Coupons redemptions were retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/CouponRedemption"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of coupon redemptions","tags":["Coupons"],"x-code-samples":[{"lang":"PHP","source":"$couponRedemptions = $client->couponsRedemptions()->search([\n 'filter' => 'customerId:testCustomer',\n]);\n"}]},"post":{"description":"Redeem a coupon\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponRedemption"}}},"description":"Redeem a coupon","required":true},"responses":{"201":{"description":"Coupon was redeemed","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/CouponRedemption"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Redeem a coupon","tags":["Coupons"],"x-code-samples":[{"lang":"PHP","source":"$redemptionForm = new Rebilly\\Entities\\Coupons\\Redemption();\n$redemptionForm->setCustomerId('customerId');\n$redemptionForm->setRedemptionCode('redemptionCode');\n\n$restrictionArray = [\n 'type' => Rebilly\\Entities\\Coupons\\Restriction::TYPE_DISCOUNTS_PER_REDEMPTION,\n 'quantity' => 2,\n];\n\n$restrictionForm = new Rebilly\\Entities\\Coupons\\Restriction([\n $restrictionArray,\n]);\n\n$redemptionForm->setAdditionalRestrictions($restrictionForm);\n\ntry {\n $couponRedemption = $client->couponsRedemptions()->redeem($redemptionForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/coupons-redemptions/{id}":{"get":{"responses":{"200":{"description":"Retrieve a coupon redemption with specified identifier string","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/CouponRedemption"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a coupon redemption with specified identifier string","tags":["Coupons"],"x-code-samples":[{"lang":"PHP","source":"$couponRedemption = $client->couponsRedemptions()->load('redemptionCode');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/coupons-redemptions/{id}/cancel":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"responses":{"201":{"description":"Cancel a coupon redemption"},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Cancel a coupon redemption","tags":["Coupons"],"x-code-samples":[{"lang":"PHP","source":"$client->couponsRedemptions()->cancel('id');\n"}]}},"/coupons/{redemptionCode}":{"get":{"description":"Retrieve a coupon with specified redemption code string\n","responses":{"200":{"description":"Coupon was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a coupon","tags":["Coupons"],"x-code-samples":[{"lang":"PHP","source":"$coupon = $client->coupons()->load('redemptionCode');\n"}]},"parameters":[{"description":"The Coupon's redemption code","in":"path","name":"redemptionCode","required":true,"schema":{"type":"string"}}],"put":{"description":"Create or update a coupon with predefined redemption code\n","requestBody":{"$ref":"#/components/requestBodies/Coupon"},"responses":{"200":{"description":"Coupon was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"201":{"description":"Coupon was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Coupon was redeemed already and cannot be changed"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create or update a coupon with predefined redemption code","tags":["Coupons"],"x-code-samples":[{"lang":"PHP","source":"$couponForm = new Rebilly\\Entities\\Coupons\\Coupon();\n\n$discountArray = [\n 'type' => Rebilly\\Entities\\Coupons\\Discount::TYPE_FIXED,\n 'currency' => 'USD',\n 'amount' => 1.99,\n];\n\n$discountForm = new Rebilly\\Entities\\Coupons\\Discount($discountArray);\n$couponForm->setDiscount($discountForm);\n\n$restrictionArray = [\n 'type' => Rebilly\\Entities\\Coupons\\Restriction::TYPE_DISCOUNTS_PER_REDEMPTION,\n 'quantity' => 2,\n];\n\n$restrictionForm = new Rebilly\\Entities\\Coupons\\Restriction([\n $restrictionArray,\n]);\n\n$couponForm->setRestrictions($restrictionForm);\n\ntry {\n $coupon = $client->coupons()->create($couponForm, 'redemptionCode');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/coupons/{redemptionCode}/expiration":{"parameters":[{"description":"The Coupon's redemption code","in":"path","name":"redemptionCode","required":true,"schema":{"type":"string"}}],"post":{"description":"Set a coupon's expiry time with the specified redemption code.\nThe expiredTime of a coupon must be greater than its issuedTime.\nThis cannot be performed on expired coupons.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponExpiration"}}},"description":"Coupon resource"},"responses":{"201":{"description":"Coupon expiration was successfully set","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Set a coupon's expiration time.","tags":["Coupons"]}},"/credentials":{"get":{"description":"Retrieve a list of credentials\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of Credentials was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Credential"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of credentials","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$customerCredentials = $client->customerCredentials()->search([\n 'filter' => 'customerId:testCustomer',\n]);\n"}]},"post":{"description":"Create a credential\n","requestBody":{"$ref":"#/components/requestBodies/Credential"},"responses":{"201":{"description":"Credential was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Credential"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a credential","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$customerCredentialForm = new Rebilly\\Entities\\CustomerCredential();\n$customerCredentialForm->setCustomerId('customerId');\n$customerCredentialForm->setUsername('test');\n$customerCredentialForm->setPassword('1234');\n\ntry {\n $customerCredential = $client->customerCredentials()->create($customerCredentialForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/credentials/{id}":{"delete":{"description":"Delete a credential with predefined identifier string\n","responses":{"204":{"description":"Credential was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Delete a credential","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$client->customerCredentials()->delete('credentialId');\n"}]},"get":{"description":"Retrieve a credential with specified identifier string\n","responses":{"200":{"description":"Credential was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Credential"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a credential","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$customerCredential = $client->customerCredentials()->load('credentialId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create or update a credential with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/Credential"},"responses":{"200":{"description":"Credential was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Credential"}}}},"201":{"description":"Credential was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Credential"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create or update a credential with predefined ID","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$customerCredentialForm = new Rebilly\\Entities\\CustomerCredential();\n$customerCredentialForm->setCustomerId('customerId');\n$customerCredentialForm->setUsername('test');\n$customerCredentialForm->setPassword('1234');\n\ntry {\n $customerCredential = $client->customerCredentials()->update('credentialId', $customerCredentialForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/custom-fields/{resource}":{"get":{"description":"Retrieve a schema of Custom Fields for the given resource type\n","responses":{"200":{"description":"A schema of Custom Fields was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"description":"The list of custom fields","items":{"$ref":"#/components/schemas/CustomField"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve Custom Fields","tags":["Custom Fields"],"x-code-samples":[{"lang":"PHP","source":"$customFields = $client->customFields()->search([\n 'filter' => 'type:boolean',\n]);\n"}]},"parameters":[{"description":"The resource type string","in":"path","name":"resource","required":true,"schema":{"type":"string","enum":["customers","payment-cards","subscriptions","transactions","websites","contacts","products"]}}]},"/custom-fields/{resource}/{name}":{"get":{"description":"Retrieve a schema of the given Custom Field for the given resource type\n","responses":{"200":{"description":"A schema of the Custom Field was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/CustomField"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a Custom Field","tags":["Custom Fields"],"x-code-samples":[{"lang":"PHP","source":"$customField = $client->customFields()->load('customers', 'customerId');\n"}]},"parameters":[{"description":"The resource type string","in":"path","name":"resource","required":true,"schema":{"type":"string","enum":["customers","payment-cards","subscriptions","transactions","websites","contacts","products"]}},{"description":"The custom field's identifier string","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"put":{"description":"Create or alter a schema of the given Custom Field for the given resource type.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomField"}}},"description":"Custom Fields schema of the given resource type","required":true},"responses":{"200":{"description":"The Custom Field was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/CustomField"}}}},"201":{"description":"The Custom Fields was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/CustomField"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"409":{"description":"The schema is in use: remove all the associated data in order to remove or alter the schema","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create or alter a Custom Field","tags":["Custom Fields"],"x-code-samples":[{"lang":"PHP","source":"$customFieldForm = new Rebilly\\Entities\\CustomField();\n$customFieldForm->setType($customFieldForm::TYPE_BOOLEAN);\n\ntry {\n $customField = $client->customFields()->update('customers', 'testFieldName', $customFieldForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/customers":{"get":{"description":"Retrieve a list of customers\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"},{"$ref":"#/components/parameters/collectionFilter"},{"$ref":"#/components/parameters/collectionQuery"},{"$ref":"#/components/parameters/collectionExpand"},{"$ref":"#/components/parameters/collectionFields"},{"description":"The collection items sort field and order (prefix with \"-\" for descending sort).","in":"query","name":"sort","style":"form","explode":false,"schema":{"type":"array","items":{"enum":["id","-id","email","-email","createdTime","-createdTime","updatedTime","-updatedTime"],"type":"string"}}},{"description":"The response media type","in":"header","name":"Accept","schema":{"type":"string","enum":["application/json","text/csv"],"default":"application/json"}}],"responses":{"200":{"description":"A list of Customers was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Customer"},"type":"array"}},"text/csv":{"schema":{"items":{"$ref":"#/components/schemas/Customer"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of customers","tags":["Customers"],"x-code-samples":[{"lang":"PHP","source":"$customers = $client->customers()->search([\n 'filter' => 'firstName:John',\n]);\n"}]},"post":{"description":"Create a customer\n","requestBody":{"$ref":"#/components/requestBodies/Customer"},"responses":{"201":{"description":"Customer was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a customer","tags":["Customers"],"x-code-samples":[{"lang":"PHP","source":"$customerForm = new Rebilly\\Entities\\Customer();\n$customerForm->setPrimaryAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $customer = $client->customers()->create($customerForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/customers/{id}":{"get":{"description":"Retrieve a customer with specified identifier string\n","responses":{"200":{"description":"Customer was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a customer","tags":["Customers"],"x-code-samples":[{"lang":"PHP","source":"$customers = $client->customers()->load('myCustomerId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create a customer with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/Customer"},"responses":{"200":{"description":"Customer was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"201":{"description":"Customer was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a customer with predefined ID","tags":["Customers"],"x-code-samples":[{"lang":"PHP","source":"$customerForm = new Rebilly\\Entities\\Customer();\n$customerForm->setPrimaryAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $customer = $client->customers()->update('myCustomerId', $customerForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/customers/{id}/lead-source":{"delete":{"description":"Delete a Lead Source that belongs to a certain customer\n","responses":{"204":{"description":"Lead Source was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Lead Source cannot be deleted"}},"summary":"Delete a Lead Source for a customer","tags":["Customers"],"x-code-samples":[{"lang":"PHP","source":"$customer = $client->customers()->deleteLeadSource('myCustomerId');\n"}]},"get":{"description":"Retrieve a Lead Source of given customer\n","responses":{"200":{"description":"Lead Source was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/LeadSource"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a customer's Lead Source","tags":["Customers"],"x-code-samples":[{"lang":"PHP","source":"$customer = $client->customers()->load('myCustomerId');\n$leadSource = $customer->getLeadSource();\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create a Lead Source for a customer\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSource"}}},"description":"Lead Source resource","required":true},"responses":{"200":{"description":"Lead Source was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/LeadSource"}}}},"201":{"description":"Lead Source was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/LeadSource"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a Lead Source for a customer","tags":["Customers"],"x-code-samples":[{"lang":"PHP","source":"$leadSourceForm = new Rebilly\\Entities\\LeadSource();\n$leadSourceForm->setSource('TestSource');\n$leadSourceForm->setCampaign('TestCampaign');\n\ntry {\n $customer = $client->customers()->updateLeadSource('myCustomerId', $leadSourceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/disputes":{"get":{"description":"Retrieve a list of disputes\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of disputes was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Dispute"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of disputes","tags":["Disputes"],"x-code-samples":[{"lang":"PHP","source":"$disputes = $client->disputes()->search([\n 'filter' => 'transactionId:testId',\n]);\n"}]},"post":{"description":"Create a dispute\n","requestBody":{"$ref":"#/components/requestBodies/Dispute"},"responses":{"201":{"description":"Dispute was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Dispute"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a dispute","tags":["Disputes"],"x-code-samples":[{"lang":"PHP","source":"$disputeForm = new Rebilly\\Entities\\Dispute();\n$disputeForm->setTransactionId('transactionId');\n$disputeForm->setCurrency('USD');\n$disputeForm->setAmount(10);\n$disputeForm->setReasonCode(1000);\n$disputeForm->setType($disputeForm::TYPE_1CB);\n$disputeForm->setStatus($disputeForm::STATUS_RESPONSE_NEEDED);\n$disputeForm->setPostedTime('2025-01-01 05:00:00');\n\ntry {\n $dispute = $client->disputes()->create($disputeForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/disputes/{id}":{"get":{"description":"Retrieve a dispute with specified identifier string\n","responses":{"200":{"description":"Dispute was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Dispute"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a dispute","tags":["Disputes"],"x-code-samples":[{"lang":"PHP","source":"$dispute = $client->disputes()->load('disputeId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create or update a Dispute with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/Dispute"},"responses":{"200":{"description":"Dispute was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Dispute"}}}},"201":{"description":"Dispute was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Dispute"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create or update a Dispute with predefined ID","tags":["Disputes"],"x-code-samples":[{"lang":"PHP","source":"$disputeForm = new Rebilly\\Entities\\Dispute();\n$disputeForm->setTransactionId('transactionId');\n$disputeForm->setCurrency('USD');\n$disputeForm->setAmount(10);\n$disputeForm->setReasonCode(1000);\n$disputeForm->setType($disputeForm::TYPE_1CB);\n$disputeForm->setStatus($disputeForm::STATUS_RESPONSE_NEEDED);\n$disputeForm->setPostedTime('2025-01-01 05:00:00');\n\ntry {\n $dispute = $client->disputes()->update('disputeId', $dispute);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/disputes/{id}/matched-rules":{"get":{"description":"Get matched rules for the dispute","responses":{"200":{"description":"List of matched rules was retrieved successfully.","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/MatchedRule"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get matched rules for the dispute","tags":["Disputes"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/files":{"get":{"description":"Retrieve a list of files\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"},{"$ref":"#/components/parameters/collectionFilter"},{"$ref":"#/components/parameters/collectionQuery"},{"$ref":"#/components/parameters/collectionExpand"},{"$ref":"#/components/parameters/collectionFields"},{"description":"The collection items sort field and order (prefix with \"-\" for descending sort).","in":"query","name":"sort","style":"form","explode":false,"schema":{"type":"array","items":{"enum":["id","-id","name","-name","extension","-extension","size","-size","width","-width","height","-height","createdTime","-createdTime","updatedTime","-updatedTime"],"type":"string"}}}],"responses":{"200":{"description":"A list of Files was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/File"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of files","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$files = $client->files()->search([\n 'filter' => 'name:TestFile',\n]);\n"}]},"post":{"description":"Additionally, a file can be sent with:\n - multipart/form-data POST request: in this case all property names are the same as the JSON ones (`file` is an uploaded file)\n - file body request: the file body is sent as the request body, with the appropriate `Content-Type`. No aditional\n properties can be set along the request data\n\nThe following file types only are allowed:\n - jpg\n - png\n - gif\n - pdf\n - mp3\n\n\nIf using a Publishable Api Key, only private files can be created. The files can later on be modified or used using\n a secret API key.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileCreateRequest"}}},"required":true},"responses":{"201":{"description":"File was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/File"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"security":[{"SecretApiKey":[]},{"JWT":[]},{"PublishableApiKey":[]}],"summary":"Create a file","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$fileForm = new Rebilly\\Entities\\File();\n$fileForm->setUrl('http://test.com/somefile.jpg');\n\ntry {\n $file = $client->files()->create($fileForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/files/{id}":{"delete":{"description":"Delete the File with predefined identifier string\n","responses":{"204":{"description":"File was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Delete a File","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$client->files()->delete('fileId');\n"}]},"get":{"description":"Retrieve a File with specified identifier string\n","responses":{"200":{"description":"File was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/File"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a File Record","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$file = $client->files()->load('fileId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Update the File with predefined ID\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}},"description":"File resource","required":true},"responses":{"200":{"description":"File was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/File"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Update the File with predefined ID. Note that file can be uploaded with POST only.","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$fileForm = new Rebilly\\Entities\\File();\n$fileForm->setDescription('This is a test file');\n\ntry {\n $file = $client->files()->update('fileId', $fileForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/files/{id}/download":{"get":{"description":"Download a file\n","responses":{"200":{"description":"The file was retrieved successfully","headers":{"Content-Length":{"description":"The number of bytes in the file","schema":{"type":"integer"}},"Content-Type":{"description":"The MIME type of the file","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"readOnly":true,"type":"string"}}}},"302":{"$ref":"#/components/responses/Found"},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Download a file","tags":["Files"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/files/{id}/download{extension}":{"get":{"description":"Download image in specific format. Images are converted server-side\n","responses":{"200":{"description":"The file was retrieved successfully","headers":{"Content-Length":{"description":"The number of bytes in the file","schema":{"type":"integer"}},"Content-Type":{"description":"The MIME type of the file","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"readOnly":true,"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Download image in specific format","tags":["Files"]},"parameters":[{"$ref":"#/components/parameters/resourceId"},{"description":"File extension which also indicates the desired file format","in":"path","name":"extension","required":true,"schema":{"type":"string","enum":[".png",".jpg",".gif"]}}]},"/invoices":{"get":{"description":"Retrieve a list of invoices\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"},{"description":"The response media type","in":"header","name":"Accept","schema":{"type":"string","enum":["application/json","text/csv"],"default":"application/json"}}],"responses":{"200":{"description":"A list of invoices was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Invoice"},"type":"array"}},"text/csv":{"schema":{"items":{"$ref":"#/components/schemas/Invoice"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of invoices","tags":["Invoices"],"x-code-samples":[{"lang":"PHP","source":"$invoices = $client->invoices()->search([\n 'filter' => 'customerId:testCustomerId',\n]);\n"}]},"post":{"description":"Create an invoice\n","requestBody":{"$ref":"#/components/requestBodies/Invoice"},"responses":{"201":{"description":"Invoice was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create an invoice","tags":["Invoices"],"x-code-samples":[{"lang":"PHP","source":"<?\n$invoiceForm = new Rebilly\\Entities\\Invoice();\n$invoiceForm->setCustomerId('customerId');\n$invoiceForm->setWebsiteId('websiteId');\n$invoiceForm->setCurrency('USD');\n$invoiceForm->setBillingAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $invoice = $client->invoices()->create($invoiceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/invoices/{id}":{"get":{"description":"Retrieve an invoice with specified identifier string\n","parameters":[{"description":"The response media type","in":"header","name":"Accept","schema":{"type":"string","enum":["application/json","application/pdf"],"default":"application/json"}}],"responses":{"200":{"description":"Invoice was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}},"application/pdf":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve an invoice","tags":["Invoices"],"x-code-samples":[{"lang":"PHP","source":"$invoice = $client->invoices()->load('invoiceId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create or update an invoice with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/Invoice"},"responses":{"200":{"description":"Invoice was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"201":{"description":"Invoice was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create or update an invoice with predefined ID","tags":["Invoices"],"x-code-samples":[{"lang":"PHP","source":"<?\n$invoiceForm = new Rebilly\\Entities\\Invoice();\n$invoiceForm->setCustomerId('customerId');\n$invoiceForm->setWebsiteId('websiteId');\n$invoiceForm->setCurrency('USD');\n$invoiceForm->setBillingAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $invoice = $client->invoices()->update('invoiceId', $invoiceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/invoices/{id}/abandon":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Abandon an invoice with specified identifier string\n","responses":{"201":{"description":"Invoice was abandoned successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Abandon an invoice","tags":["Invoices"],"x-code-samples":[{"lang":"PHP","source":"$invoice = $client->invoices()->abandon('invoiceId');\n"}]}},"/invoices/{id}/issue":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Issue an invoice with specified identifier string\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceIssue"}}},"description":"InvoiceIssue resource","required":true},"responses":{"201":{"description":"Invoice was issued successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Issue an invoice","tags":["Invoices"],"x-code-samples":[{"lang":"PHP","source":"$invoice = $client->invoices()->issue('invoiceId', '2025-01-01 05:00:00');\n"}]}},"/invoices/{id}/items":{"get":{"description":"Retrieve an invoice items with specified invoice identifier string\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"Invoice items were retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/InvoiceItem"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve invoice items","tags":["Invoices"],"x-code-samples":[{"lang":"PHP","source":"$invoiceItems = $client->invoiceItems()->search('invoiceId', [\n 'filter' => 'quantity:5',\n]);\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Create an invoice item\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceItem"}}},"description":"InvoiceItem resource","required":true},"responses":{"201":{"description":"InvoiceItem was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvoiceItem"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create an invoice item","tags":["Invoices"],"x-code-samples":[{"lang":"PHP","source":"$invoiceItemForm = new Rebilly\\Entities\\InvoiceItem();\n$invoiceItemForm->setType($invoiceItemForm::TYPE_DEBIT);\n$invoiceItemForm->setUnitPrice(0.99);\n$invoiceItemForm->setQuantity(5);\n\ntry {\n $invoiceItem = $client->invoiceItems()->create($invoiceItemForm, 'invoiceId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/invoices/{id}/matched-rules":{"get":{"description":"Get matched rules for the invoice","responses":{"200":{"description":"List of matched rules was retrieved successfully.","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/MatchedRule"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get matched rules for the invoice","tags":["Invoices"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/invoices/{id}/void":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Void an invoice with specified identifier string\n","responses":{"201":{"description":"Invoice was voided successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Void an invoice","tags":["Invoices"],"x-code-samples":[{"lang":"PHP","source":"$invoice = $client->invoices()->void('invoiceId');\n"}]}},"/kyc-documents":{"get":{"description":"Retrieve a list of KYC documents\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"},{"$ref":"#/components/parameters/collectionFilter"},{"description":"The collection items sort field and order (prefix with \"-\" for descending sort).","in":"query","name":"sort","style":"form","explode":false,"schema":{"type":"array","items":{"enum":["id","-id","createdTime","-createdTime","updatedTime","-updatedTime"],"type":"string"}}},{"description":"The response media type","in":"header","name":"Accept","schema":{"type":"string","enum":["application/json"],"default":"application/json"}}],"responses":{"200":{"description":"A list of KYC documents was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/KycDocument"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of KYC documents","tags":["KYC Documents"]},"post":{"description":"Create a KYC Document\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KycDocument"}}},"description":"Kyc document resource","required":true},"responses":{"201":{"description":"Kyc document was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/KycDocument"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a KYC Document","tags":["KYC Documents"]}},"/kyc-documents/{id}":{"get":{"description":"Retrieve a KYC document with specified identifier string\n","parameters":[{"description":"The response media type","in":"header","name":"Accept","schema":{"type":"string","enum":["application/json"],"default":"application/json"}}],"responses":{"200":{"description":"KYC document was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KycDocument"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a KYC Document","tags":["KYC Documents"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create or update a KYC document with predefined identifier string\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KycDocument"}}},"description":"KYC document resource","required":true},"responses":{"200":{"description":"KYC document was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/KycDocument"}}}},"201":{"description":"KYC document was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/KycDocument"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create or update a KYC document with predefined ID","tags":["KYC Documents"]}},"/kyc-documents/{id}/acceptance":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Manually override automated status and accept the document\n","responses":{"201":{"description":"KYC document acceptance was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/KycDocument"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Accept a KYC document","tags":["KYC Documents"]}},"/kyc-documents/{id}/rejection":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Manually override automated status and reject the document\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KycDocumentRejection"}}},"description":"KYC document resource","required":true},"responses":{"201":{"description":"KYC document rejection was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/KycDocument"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Reject a KYC document","tags":["KYC Documents"]}},"/password-tokens":{"get":{"description":"Retrieve a list of tokens\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of Reset Password Tokens was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/ResetPasswordToken"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of tokens","tags":["Customer Authentication"]},"post":{"description":"Create a Reset Password Token\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordToken"}}},"description":"ResetPasswordToken resource","required":true},"responses":{"201":{"description":"Reset Password Token was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/ResetPasswordToken"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a Reset Password Token","tags":["Customer Authentication"]}},"/password-tokens/{id}":{"delete":{"description":"Delete a Reset Password Token with predefined identifier string\n","responses":{"204":{"description":"ResetPasswordToken was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"ResetPasswordToken has related resources and cannot be deleted"}},"summary":"Delete a Reset Password Token","tags":["Customer Authentication"]},"get":{"description":"Retrieve a Reset Password Token with specified identifier string\n","responses":{"200":{"description":"ResetPasswordToken was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/ResetPasswordToken"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a Reset Password Token","tags":["Customer Authentication"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/payment-cards":{"get":{"description":"Retrieve a list of Payments Cards\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of Payment Card was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/PaymentCard"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of Payment Cards","tags":["Payment Cards"],"x-code-samples":[{"lang":"PHP","source":"$paymentCards = $client->paymentCards()->search([\n 'filter' => 'status:active',\n]);\n"}]},"post":{"description":"Create a Payment Card\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCard"}}},"description":"PaymentCard resource","required":true},"responses":{"200":{"description":"PaymentCard was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PaymentCard"}}}},"201":{"description":"Payment Card was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PaymentCard"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a Payment Card","tags":["Payment Cards"],"x-code-samples":[{"lang":"PHP","source":"$paymentCardForm = new Rebilly\\Entities\\PaymentCard();\n$paymentCardForm->setCustomerId('customerId');\n$paymentCardForm->setPan('4111111111111111');\n$paymentCardForm->setExpYear(2025);\n$paymentCardForm->setExpMonth(8);\n$paymentCardForm->setBillingAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $paymentCard = $client->paymentCards()->create($paymentCardForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/payment-cards/{id}":{"get":{"description":"Retrieve a Payment Card with specified identifier string\n","responses":{"200":{"description":"PaymentCard was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PaymentCard"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a Payment Card","tags":["Payment Cards"],"x-code-samples":[{"lang":"PHP","source":"$paymentCard = $client->paymentCards()->load('paymentCardId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"patch":{"description":"Update any of the payment card's values except for the pan\n","requestBody":{"content":{"application/json":{"schema":{"properties":{"billingAddress":{"$ref":"#/components/schemas/ContactObject"},"customFields":{"$ref":"#/components/schemas/ResourceCustomFields"},"cvv":{"description":"Card's cvv (card verification value).","type":"string"},"expMonth":{"description":"Card's expiry month","type":"string"},"expYear":{"description":"Card's expiry year","type":"string"},"status":{"description":"Card's status","enum":["active","inactive","deactivated"],"type":"string"},"stickyGatewayAccountId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Sticky Gateway Account ID"}},"type":"object"}}},"description":"Payment card"},"responses":{"200":{"description":"Payment card was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PaymentCard"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Update a payment card's values","tags":["Payment Cards"]},"put":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCard"}}},"description":"Payment card"},"responses":{"200":{"description":"PaymentCard was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PaymentCard"}}}},"201":{"description":"Payment card was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PaymentCard"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"409":{"description":"Payment card already exists and cannot be updated","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a payment card with predefined ID","tags":["Payment Cards"],"x-code-samples":[{"lang":"PHP","source":"$paymentCardForm = new Rebilly\\Entities\\PaymentCard();\n$paymentCardForm->setCustomerId('customerId');\n$paymentCardForm->setPan('4111111111111111');\n$paymentCardForm->setExpYear(2025);\n$paymentCardForm->setExpMonth(8);\n$paymentCardForm->setBillingAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $paymentCard = $client->paymentCards()->create($paymentCardForm, 'paymentCardId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/payment-cards/{id}/authorization":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Authorize a Payment Card\n","requestBody":{"content":{"application/json":{"schema":{"properties":{"amount":{"description":"Amount","format":"double","type":"number"},"currency":{"description":"Currency (three letter code)","type":"string"},"gatewayAccountId":{"description":"The Gateway account ID","type":"string"},"websiteId":{"description":"The Website ID","type":"string"}},"required":["websiteId","currency"],"type":"object"}}},"description":"Payment Card resource","required":true},"responses":{"201":{"description":"Authorization successful","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PaymentCard"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Authorize a Payment Card","tags":["Payment Cards"],"x-code-samples":[{"lang":"PHP","source":"$paymentCardAuthorizationForm = new Rebilly\\Entities\\PaymentCardAuthorization();\n$paymentCardAuthorizationForm->setWebsiteId('websiteId');\n$paymentCardAuthorizationForm->setCurrency('USD');\n$paymentCardAuthorizationForm->setGatewayAccountId('gatewayAccountId');\n\ntry {\n $paymentCard = $client->paymentCards()->authorize('paymentCardId', $paymentCardAuthorizationForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/payment-cards/{id}/deactivation":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Deactivate a Payment Card\n","responses":{"201":{"description":"Authorization successful","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PaymentCard"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Deactivate a Payment Card","tags":["Payment Cards"],"x-code-samples":[{"lang":"PHP","source":"$client->paymentCards()->deactivate('paymentCardId');\n"}]}},"/payment-cards/{id}/matched-rules":{"get":{"description":"Get matched rules for the payment card","responses":{"200":{"description":"List of matched rules was retrieved successfully.","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/MatchedRule"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get matched rules for the payment card","tags":["Payment Cards"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/payment-instrument-validation":{"get":{"description":"Retrieve a Payment Instrument validation with specified identifier string\n","responses":{"200":{"description":"Successfully retrieved a payment instrument validation","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/PaymentInstrumentValidation"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a Payment Instrument validation","tags":["Payment Instrument Validation"]},"post":{"description":"Validate a payment instrument\n","requestBody":{"content":{"application/json":{"schema":{"properties":{"method":{"description":"Payment method","type":"string"},"payementInstrumentId":{"description":"Payment instrument ID","type":"string"}},"required":["method","payementInstrumentId"],"type":"object"}}},"description":"Payment instrument"},"responses":{"201":{"description":"Validation successful","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PaymentInstrumentValidation"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Validate a payment instrument","tags":["Payment Instrument Validation"]}},"/payment-instrument-validation/{id}":{"get":{"description":"Retrieve a list of validated payment instruments\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of validated payment instrument was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PaymentInstrumentValidation"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of validated payment instruments","tags":["Payment Instrument Validation"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/payments":{"get":{"description":"Retrieve a payment list\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"},{"description":"The response media type","in":"header","name":"Accept","schema":{"type":"string","enum":["application/json","text/csv"],"default":"application/json"}}],"responses":{"200":{"description":"Payment list was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Payment"},"type":"array"}},"text/csv":{"schema":{"items":{"$ref":"#/components/schemas/Payment"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a payment list","tags":["Payments"],"x-code-samples":[{"lang":"PHP","source":"$payments = $client->payments()->search([\n 'filter' => 'currency:USD',\n]);\n"}]},"post":{"description":"Create a payment\n","requestBody":{"$ref":"#/components/requestBodies/Payment"},"responses":{"201":{"description":"Payment was processed","content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Payment"},"type":"array"}}}},"202":{"description":"Payment was accepted","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a payment","tags":["Payments"],"x-code-samples":[{"lang":"PHP","source":"$paymentForm = new Rebilly\\Entities\\Payment();\n\n$paymentForm->setWebsiteId('websiteId');\n$paymentForm->setCustomerId('customerId');\n$paymentForm->setCurrency('USD');\n$paymentForm->setAmount(1.99);\n\n$data = [\n 'method' => Rebilly\\Entities\\PaymentMethod::METHOD_CASH,\n];\n\n$paymentInstrumentForm = new Rebilly\\Entities\\PaymentMethodInstrument($data);\n\n$paymentForm->setPaymentInstrument($paymentInstrumentForm);\n\ntry {\n $payment = $client->payments()->create($paymentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/payments/{id}":{"get":{"description":"Retrieve a payment with specified identifier string\n","responses":{"200":{"description":"Payment was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a payment","tags":["Payments"],"x-code-samples":[{"lang":"PHP","source":"$payment = $client->payments()->load('paymentId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Make a payment with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/Payment"},"responses":{"201":{"description":"Payment was processed","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Payment"},"type":"array"}}}},"202":{"description":"Payment was accepted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a payment with predefined ID","tags":["Payments"],"x-code-samples":[{"lang":"PHP","source":"$paymentForm = new Rebilly\\Entities\\Payment();\n\n$paymentForm->setWebsiteId('websiteId');\n$paymentForm->setCustomerId('customerId');\n$paymentForm->setCurrency('USD');\n$paymentForm->setAmount(1.99);\n\n$data = [\n 'method' => Rebilly\\Entities\\PaymentMethod::METHOD_CASH,\n];\n\n$paymentInstrumentForm = new Rebilly\\Entities\\PaymentMethodInstrument($data);\n\n$paymentForm->setPaymentInstrument($paymentInstrumentForm);\n\ntry {\n $payment = $client->payments()->update('paymentId', $paymentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/paypal-accounts":{"get":{"description":"Retrieve a list of PayPal Accounts\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of PayPal Accounts was retrieved successfully","content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/PayPalAccount"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of PayPal accounts","tags":["PayPal Accounts"],"x-code-samples":[{"lang":"PHP","source":"$payPalAccounts = $client->payPalAccounts()->search([\n 'filter' => 'status:active',\n]);\n"}]},"post":{"description":"Create a PayPal Account\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayPalAccount"}}},"description":"PayPalAccount resource","required":true},"responses":{"201":{"description":"PayPal Account was created","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PayPalAccount"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a PayPal Account","tags":["PayPal Accounts"],"x-code-samples":[{"lang":"PHP","source":"$payPalForm = new Rebilly\\Entities\\PayPalAccount();\n$payPalForm->setCustomerId('customerId');\n$payPalForm->setBillingAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $payPalAccount = $client->payPalAccounts()->create($payPalForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/paypal-accounts/{id}":{"get":{"description":"Retrieve a PayPal Account with specified identifier string\n","responses":{"200":{"description":"PayPal Account was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PayPalAccount"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a PayPal Account","tags":["PayPal Accounts"],"x-code-samples":[{"lang":"PHP","source":"$payPalAccount = $client->payPalAccounts()->load('payPalAccountId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayPalAccount"}}},"description":"PayPal Account","required":true},"responses":{"201":{"description":"PayPal Account was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PayPalAccount"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"409":{"description":"PayPal Account exist and cannot be updated","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a PayPal account with predefined ID","tags":["PayPal Accounts"],"x-code-samples":[{"lang":"PHP","source":"$payPalForm = new Rebilly\\Entities\\PayPalAccount();\n$payPalForm->setCustomerId('customerId');\n$payPalForm->setBillingAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $payPalAccount = $client->payPalAccounts()->create($payPalForm, 'payPalAccountId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/paypal-accounts/{id}/activation":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Activate a PayPal Account\n","requestBody":{"content":{"application/json":{"schema":{"properties":{"amount":{"default":1,"description":"The amount to authorize","format":"double","type":"number"},"currency":{"description":"Currency (three letter code)","type":"string"},"gatewayAccountId":{"description":"The Gateway Account ID which use to send transactions","type":"string"},"redirectURLs":{"description":"Redirect URLs","type":"object"},"websiteId":{"description":"The Website ID","type":"string"}},"required":["websiteId","currency"],"type":"object"}}},"description":"PayPal Account resource","required":true},"responses":{"201":{"description":"Activate successful","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PayPalAccount"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Activate a PayPal Account","tags":["PayPal Accounts"],"x-code-samples":[{"lang":"PHP","source":"$activationData = [\n 'websiteId' => 'testWebsiteId',\n 'currency' => 'USD',\n];\n\ntry {\n $client->payPalAccounts()->activate($activationData, 'payPalAccountId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/paypal-accounts/{id}/deactivation":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Deactivate a PayPal Account\n","responses":{"201":{"description":"Deactivate successful","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PayPalAccount"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Deactivate a PayPal Account","tags":["PayPal Accounts"],"x-code-samples":[{"lang":"PHP","source":"$client->payPalAccounts()->deactivate('payPalAccountId');\n"}]}},"/plans":{"get":{"description":"Retrieve a list of plans\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of Plans was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Plan"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of plans","tags":["Plans"],"x-code-samples":[{"lang":"PHP","source":"$plans = $client->plans()->search([\n 'filter' => 'name:TestPlan',\n]);\n"}]},"post":{"description":"Create a plan\n","requestBody":{"$ref":"#/components/requestBodies/Plan"},"responses":{"201":{"description":"Plan was created","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a plan","tags":["Plans"],"x-code-samples":[{"lang":"PHP","source":"$planForm = new Rebilly\\Entities\\Plan();\n$planForm->setName('TestPlan');\n$planForm->setCurrency('USD');\n$planForm->setTrialAmount(1);\n$planForm->setTrialPeriodUnit('day');\n$planForm->setTrialPeriodLength(1);\n$planForm->setProductId('test-product');\n\ntry {\n $plan = $client->plans()->create($planForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/plans/{id}":{"delete":{"description":"Delete a Plan with predefined identifier string\n","responses":{"204":{"description":"Plan was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}},"summary":"Delete a Plan","tags":["Plans"],"x-code-samples":[{"lang":"PHP","source":"$client->plans()->delete('planId');\n"}]},"get":{"description":"Retrieve a plan with specified identifier string\n","responses":{"200":{"description":"Plan was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a plan","tags":["Plans"],"x-code-samples":[{"lang":"PHP","source":"$plan = $client->plans()->load('planId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create or update a Plan with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/Plan"},"responses":{"200":{"description":"Plan was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"201":{"description":"Plan was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create or update a Plan with predefined ID","tags":["Plans"],"x-code-samples":[{"lang":"PHP","source":"$planForm = new Rebilly\\Entities\\Plan();\n$planForm->setName('TestPlan');\n$planForm->setCurrency('USD');\n$planForm->setTrialAmount(1);\n$planForm->setTrialPeriodUnit('day');\n$planForm->setTrialPeriodLength(1);\n\ntry {\n $plan = $client->plans()->update('planId', $planForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/products":{"get":{"description":"Retrieve a list of products\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of products was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Product"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of products","tags":["Products"]},"post":{"description":"Create a Product\n","requestBody":{"$ref":"#/components/requestBodies/Product"},"responses":{"201":{"description":"Product was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Product"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a Product","tags":["Products"]}},"/products/{id}":{"delete":{"description":"Delete a product with predefined identifier string\n","responses":{"204":{"description":"Product was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Delete a product","tags":["Products"]},"get":{"description":"Retrieve a product with specified identifier string\n","responses":{"200":{"description":"Product was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Product"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a product","tags":["Products"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create a product with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/Product"},"responses":{"200":{"description":"Product was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Product"}}}},"201":{"description":"Product was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Product"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a product with predefined ID","tags":["Products"]}},"/queue/payments":{"get":{"description":"Retrieve a scheduled payment list\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"Successful retrieve the payments list that still waiting to be processed","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Payment"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a scheduled payment list","tags":["Payments"],"x-code-samples":[{"lang":"PHP","source":"$payments = $client->payments()->searchInQueue([\n 'filter' => 'currency:USD',\n]);\n"}]}},"/queue/payments/{id}":{"get":{"description":"Retrieve a payment with specified identifier string\n","responses":{"200":{"description":"Successful retrieve the payment that still waiting to be processed","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"303":{"description":"Payment was successfully processed and moved out from queue","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a scheduled payment","tags":["Payments"],"x-code-samples":[{"lang":"PHP","source":"$payment = $client->payments()->loadFromQueue('paymentId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"requestBody":{"$ref":"#/components/requestBodies/Payment"},"responses":{"200":{"description":"Payment was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Payment is already handled and cannot be updated"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Update pending payment","tags":["Payments"]}},"/shipping-zones":{"get":{"description":"Retrieve a list of shipping zones\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of shipping zones was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/ShippingZone"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of shipping zones","tags":["Shipping Zones"]},"post":{"description":"Create a Shipping Zone\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingZone"}}},"description":"Shipping Zone resource","required":true},"responses":{"201":{"description":"Shipping Zone was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/ShippingZone"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a Shipping Zone","tags":["Shipping Zones"]}},"/shipping-zones/{id}":{"delete":{"description":"Delete a shipping zone with predefined identifier string\n","responses":{"204":{"description":"Shipping zone was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Delete a shipping zone","tags":["Shipping Zones"]},"get":{"description":"Retrieve a shipping zone with specified identifier string\n","responses":{"200":{"description":"Shipping zone was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/ShippingZone"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a shipping zone","tags":["Shipping Zones"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create a shipping zone with predefined identifier string\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingZone"}}},"description":"Shipping zone resource","required":true},"responses":{"200":{"description":"Shipping zone was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/ShippingZone"}}}},"201":{"description":"Shipping zone was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/ShippingZone"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a shipping zone with predefined ID","tags":["Shipping Zones"]}},"/subscription-cancellations":{"get":{"description":"Retrieve a list of cancellations for all subscriptions","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of cancellations was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Cancellation"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of cancellations","tags":["Subscriptions"]},"post":{"description":"Cancel a subscription or preview the cancellation parameters before that","requestBody":{"$ref":"#/components/requestBodies/Cancellation"},"responses":{"201":{"description":"Cancellation was created, subscription is or will be deactivated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Cancellation"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Cancel a subscription","tags":["Subscriptions"],"x-code-samples":[{"lang":"PHP","source":"$subscriptionCancelForm = new Rebilly\\Entities\\SubscriptionCancel();\n$subscriptionCancelForm->setEffectiveTime(new DateTime());\n\ntry {\n $subscription = $client->subscriptions()->cancel('subscriptionId', $subscriptionCancelForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/subscription-cancellations/{id}":{"delete":{"description":"Delete a subscription's cancellation. Only draft can be deleted.","responses":{"204":{"description":"Cancellaton was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Cancellaton cannot be deleted"}},"summary":"Delete a cancellation","tags":["Subscriptions"]},"get":{"description":"Retrieve a subscription cancellatopn with specified identifier string","responses":{"200":{"description":"Cancellation was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Cancellation"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a subscription cancellatopn","tags":["Subscriptions"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Cancel a subscription","requestBody":{"$ref":"#/components/requestBodies/Cancellation"},"responses":{"200":{"description":"Cancellation was updated, subscription is or will be deactivated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Cancellation"}}}},"201":{"description":"Cancellation was created, subscription is or will be deactivated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Cancellation"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Cancel a subscription","tags":["Subscriptions"]}},"/subscription-reactivations":{"get":{"description":"Retrieve a list of reactivations for all subscriptions","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of reactivations was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Reactivation"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of reactivations","tags":["Subscriptions"]},"post":{"description":"Reactivate a subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reactivation"}}},"description":"Reactivation resource","required":true},"responses":{"201":{"description":"Reactivation was created, subscription is active and won't be deactivated.\nIf there was a cancellation with status \"confirmed\", it is revoked.\n","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Reactivation"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Reactivate a subscription","tags":["Subscriptions"]}},"/subscription-reactivations/{id}":{"get":{"description":"Retrieve a subscription reactivation with specified identifier string","responses":{"200":{"description":"Reactivation was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Reactivation"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a subscription reactivation","tags":["Subscriptions"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/subscriptions":{"get":{"description":"Retrieve a list of subscriptions\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"},{"description":"The response media type","in":"header","name":"Accept","schema":{"type":"string","enum":["application/json","text/csv"],"default":"application/json"}}],"responses":{"200":{"description":"A list of subscriptions was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Subscription"},"type":"array"}},"text/csv":{"schema":{"items":{"$ref":"#/components/schemas/Subscription"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of subscriptions","tags":["Subscriptions"],"x-code-samples":[{"lang":"PHP","source":"$subscriptions = $client->subscriptions()->search([\n 'filter' => 'customerId:testCustomerId',\n]);\n"}]},"post":{"description":"Create a subscription\n","requestBody":{"$ref":"#/components/requestBodies/Subscription"},"responses":{"201":{"description":"Subscription was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a subscription","tags":["Subscriptions"],"x-code-samples":[{"lang":"PHP","source":"$subscriptionForm = new Rebilly\\Entities\\Subscription();\n$subscriptionForm->setCustomerId('customerId');\n$subscriptionForm->setWebsiteId('websiteId');\n$subscriptionForm->setPlanId('planId');\n$subscriptionForm->setBillingAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $subscription = $client->subscriptions()->create($subscriptionForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/subscriptions/{id}":{"get":{"description":"Retrieve a subscription with specified identifier string\n","responses":{"200":{"description":"Subscription was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a subscription","tags":["Subscriptions"],"x-code-samples":[{"lang":"PHP","source":"$subscription = $client->subscriptions()->load('subscriptionId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create or update a subscription with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/Subscription"},"responses":{"200":{"description":"Subscription was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"201":{"description":"Subscription was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create or update a subscription with predefined ID","tags":["Subscriptions"],"x-code-samples":[{"lang":"PHP","source":"$subscriptionForm = new Rebilly\\Entities\\Subscription();\n$subscriptionForm->setCustomerId('customerId');\n$subscriptionForm->setWebsiteId('websiteId');\n$subscriptionForm->setPlanId('planId');\n$subscriptionForm->setBillingAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $subscription = $client->subscriptions()->update('subscriptionId', $subscriptionForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/subscriptions/{id}/change-plan":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Change a subscription's plan and designate when and if there should be pro rata credits given.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionChange"}}},"description":"Change the plan","required":true},"responses":{"200":{"description":"Subscription was changed","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Change a subscription's plan","tags":["Subscriptions"],"x-code-samples":[{"lang":"PHP","source":"$subscriptionChangePlanForm = new Rebilly\\Entities\\SubscriptionChangePlan();\n$subscriptionChangePlanForm->setPlanId('newPlanId');\n$subscriptionChangePlanForm->setRenewalPolicy('retain');\n$subscriptionChangePlanForm->setPreview(true);\n$subscriptionChangePlanForm->setProrated(true);\n$subscriptionChangePlanForm->setEffectiveTime('2018-02-02 00:00:00');\n\ntry {\n $subscription = $client->subscriptions()->changePlan('subscriptionId', $subscriptionChangePlanForm);\n echo $subscription->getLineItemSubtotal();\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/subscriptions/{id}/interim-invoice":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Issue an interim invoice for a subscription, typically used in conjunction with plan changes and pro rata adjustments.\nThis process creates an invoice, adds the subscription's line items to the invoice, and issues the invoice, and applies\npayment to it if a transaction id is supplied.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionInvoice"}}},"description":"Issue an interim invoice","required":true},"responses":{"201":{"description":"Invoice was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Issue an interim invoice for a subscription","tags":["Subscriptions"]}},"/subscriptions/{id}/matched-rules":{"get":{"description":"Get matched rules for the subscription","responses":{"200":{"description":"List of matched rules was retrieved successfully.","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/MatchedRule"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get matched rules for the subscription","tags":["Subscriptions"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/tokens":{"get":{"description":"Retrieve a list of tokens\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of tokens was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/PaymentToken"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of tokens","tags":["Payment Tokens"],"x-code-samples":[{"lang":"PHP","source":"$paymentCardTokens = $client->paymentCardTokens()->search([\n 'filter' => 'token:string',\n]);\n"}]},"post":{"description":"Create a token\n","requestBody":{"$ref":"#/components/requestBodies/PaymentToken"},"responses":{"201":{"description":"Token was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PaymentToken"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"security":[{"PublishableApiKey":[]}],"summary":"Create a payment token","tags":["Payment Tokens"],"x-code-samples":[{"lang":"PHP","source":"$paymentCardTokenForm = new Rebilly\\Entities\\PaymentCardToken();\n$paymentCardTokenForm->setBillingAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\n$paymentInstrumentForm = new Entities\\PaymentInstruments\\PaymentCardPaymentInstrument();\n$paymentInstrumentForm->setPan('4111111111111111');\n$paymentInstrumentForm->setExpYear(2025);\n$paymentInstrumentForm->setExpMonth(8);\n$paymentInstrumentForm->setCvv(123);\n\n$paymentCardTokenForm->setPaymentInstrument($paymentInstrumentForm);\n\ntry {\n $paymentCardToken = $client->paymentCardTokens()->create($paymentCardTokenForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/tokens/{token}":{"get":{"description":"Retrieve a token with specified identifier string\n","responses":{"200":{"description":"Token was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PaymentToken"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"PublishableApiKey":[]}],"summary":"Retrieve a token","tags":["Payment Tokens"],"x-code-samples":[{"lang":"PHP","source":"$paymentCardToken = $client->paymentCardTokens()->load('tokenId');\n"}]},"parameters":[{"description":"The token identifier string","in":"path","name":"token","required":true,"schema":{"type":"string"}}]},"/tokens/{token}/expiration":{"parameters":[{"description":"The token identifier string","in":"path","name":"token","required":true,"schema":{"type":"string"}}],"post":{"description":"Expire a token\n","requestBody":{"$ref":"#/components/requestBodies/PaymentToken"},"responses":{"201":{"description":"Token expiration successful","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/PaymentToken"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Expire a token","tags":["Payment Tokens"],"x-code-samples":[{"lang":"PHP","source":"try {\n $paymentCardToken = $client->paymentCardTokens()->expire('tokenId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/transactions":{"get":{"description":"Retrieve a list of transactions\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"},{"$ref":"#/components/parameters/collectionFilter"},{"$ref":"#/components/parameters/collectionQuery"},{"$ref":"#/components/parameters/collectionSort"},{"description":"The response media type","in":"header","name":"Accept","schema":{"type":"string","enum":["application/json","text/csv"],"default":"application/json"}}],"responses":{"200":{"description":"A list of transactions was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Transaction"},"type":"array"}},"text/csv":{"schema":{"items":{"$ref":"#/components/schemas/Transaction"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Retrieve a list of transactions","tags":["Transactions"],"x-code-samples":[{"lang":"PHP","source":"$transactions = $client->transactions()->search([\n 'filter' => 'result:approved',\n]);\n"}]}},"/transactions/{id}":{"get":{"description":"Retrieve a Transaction with specified identifier string\n","responses":{"200":{"description":"Transaction was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a Transaction","tags":["Transactions"],"x-code-samples":[{"lang":"PHP","source":"$transaction = $client->transactions()->load('transactionId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/transactions/{id}/cancel":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Cancel a scheduled transaction. Once handled a transaction cannot be canceled","responses":{"201":{"description":"Successful cancel the payment","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Cancel a pending or suspended transaction","tags":["Transactions"],"x-code-samples":[{"lang":"PHP","source":"try {\n $payment = $client->transactions()->cancel('transactionId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/transactions/{id}/gateway-logs":{"get":{"description":"Retrieve Gateway communication Logs for Transaction with specified identifier string","responses":{"200":{"description":"Logs were retrieved successfully","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/TransactionGatewayLog"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a Transaction Gateway Logs","tags":["Transactions"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/transactions/{id}/matched-rules":{"get":{"description":"Get matched rules for the transaction","responses":{"200":{"description":"List of matched rules was retrieved successfully.","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/MatchedRule"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Get matched rules for the transaction","tags":["Transactions"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/transactions/{id}/refund":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Refund a Transaction with specified identifier string.\nNote that the refund will be in the same currency as the original transaction.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRefund"}}},"description":"Transaction resource","required":true},"responses":{"201":{"description":"Transaction was refunded successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Refund a Transaction","tags":["Transactions"],"x-code-samples":[{"lang":"PHP","source":"$transaction = $client->transactions()->refund('transactionId', 1.99);\n"}]}}},"x-tagGroups":[{"name":"Customers","tags":["Customers","Customer Authentication","Custom Fields","Contacts","Files","KYC Documents"]},{"name":"Payment Instruments","tags":["Bank Accounts","Payment Cards","Payment Tokens","PayPal Accounts","Payment Instrument Validation"]},{"name":"Payments","tags":["3D Secure","Payments","Transactions","Disputes","Blacklists"]},{"name":"Invoices & Subscriptions","tags":["Coupons","Invoices","Plans","Products","Shipping Zones","Subscriptions","Taxes"]},{"name":"Misc","tags":["Reports","Users"]}],"servers":[{"description":"Live Server","url":"https://api.rebilly.com/v2.1"},{"description":"Sandbox Server","url":"https://api-sandbox.rebilly.com/v2.1"}],"components":{"parameters":{"collectionExpand":{"description":"Expand response to get full related object intead of ID. See the expand guide for more info.","in":"query","name":"expand","schema":{"type":"string"}},"collectionFields":{"description":"Limit the returned fields to the list specified, separated by comma. Note that id is always returned.","in":"query","name":"fields","schema":{"type":"string"}},"collectionFilter":{"description":"The collection items filter requires a special format.\nUse \",\" for multiple allowed values. Use \";\" for multiple fields.\nSee the [filter guide](https://rebilly.github.io/RebillyAPI/#section/Using-filter) for more options and examples about this format.\n","in":"query","name":"filter","schema":{"type":"string"}},"collectionLimit":{"description":"The collection items limit","in":"query","name":"limit","schema":{"type":"integer","minimum":0,"maximum":1000}},"collectionOffset":{"description":"The collection items offset","in":"query","name":"offset","schema":{"type":"integer","minimum":0}},"collectionQuery":{"description":"The partial search of the text fields.","in":"query","name":"q","schema":{"type":"string"}},"collectionSort":{"description":"The collection items sort field and order (prefix with \"-\" for descending sort).","in":"query","name":"sort","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string"}}},"hash":{"description":"The token identifier string","in":"path","name":"hash","required":true,"schema":{"type":"string"}},"mediaType":{"description":"The response media type","in":"header","name":"Accept","schema":{"type":"string","enum":["application/json"],"default":"application/json"}},"resourceId":{"description":"The resource identifier string","in":"path","name":"id","required":true,"schema":{"type":"string"}},"rulesVersion":{"description":"The rule set version. Expand response to get full related object instead of ID. See the expand guide for more info.","in":"path","name":"version","required":true,"schema":{"type":"integer","minimum":1}},"systemEventType":{"description":"The event type","in":"path","name":"eventType","required":true,"schema":{"type":"string"}}},"responses":{"AccessForbidden":{"description":"Access forbidden, invalid API-KEY was used","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Conflict","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Found":{"description":"Resource was moved","headers":{"Location":{"schema":{"type":"string"}}}},"InvalidDataError":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}},"NotFound":{"description":"Resource was not found","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBodies":{"Payment":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}},"description":"Payment resource","required":true},"BankAccount":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccount"}}},"description":"BankAccount resource","required":true},"Contact":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"description":"Contact resource","required":true},"Attachment":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}},"description":"Attachment resource","required":true},"Blacklist":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Blacklist"}}},"description":"Blacklist resource","required":true},"Coupon":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon"}}},"description":"Coupon resource","required":true},"Credential":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credential"}}},"description":"Credential resource","required":true},"Customer":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}},"description":"Customer resource","required":true},"Dispute":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dispute"}}},"description":"Dispute resource","required":true},"Invoice":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"Invoice resource","required":true},"Plan":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}},"description":"Plan resource","required":true},"Product":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"description":"Product resource","required":true},"Cancellation":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancellation"}}},"description":"Cancellation resource","required":true},"Subscription":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"description":"Subscription resource","required":true},"PaymentToken":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentToken"}}},"description":"PaymentToken resource","required":true}},"securitySchemes":{"JWT":{"description":"You can create a JSON Web Token (JWT) via our [Sessions resource](https://rebilly.github.io/RebillyUserAPI/#tag/Sessions%2Fpaths%2F~1signin%2Fpost).\nUsage format: `Bearer <JWT>`\n","in":"header","name":"Authorization","type":"apiKey","x-scheme":"bearer","x-type":"http"},"PublishableApiKey":{"description":"Only for the Tokens resource.\nYou can create a Publishable API Key via our [API Keys resource](https://rebilly.github.io/RebillyUserAPI/#tag/API-Keys), by specifying the type as `publishable`.\n","in":"header","name":"Authorization","type":"apiKey"},"SecretApiKey":{"description":"When you sign up for an account, you are given your first secret API key.\nTo do so please [follow this link.](https://app.rebilly.com/signup)\nAlso you can generate additional API keys, and delete API keys (as you may\nneed to rotate your keys in the future).\n","in":"header","name":"REB-APIKEY","type":"apiKey"}},"schemas":{"A1Gateway":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"description":"A1Gateway credentials object","properties":{"accountId":{"description":"A1Gateway account ID","type":"string"},"password":{"description":"A1Gateway password","format":"password","type":"string"}},"required":["accountId","password"],"type":"object"},"mpi":{"$ref":"#/components/schemas/A1GatewayMpis"}},"required":["gatewayConfig"],"type":"object"}],"description":"A1Gateway config"},"A1GatewayMpis":{"description":"A1Gateway Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["PaayMpi","Other"]}},"required":["name"],"type":"object"},"AmexVPC":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"description":"AmexVPC credentials object","properties":{"accessCode":{"description":"Access Code","format":"password","type":"string"},"merchantId":{"description":"Merchant ID","type":"string"},"password":{"description":"Password (used for refund, void and capture)","format":"password","type":"string"},"url":{"description":"Virtual Payment Client URL","type":"string"},"user":{"description":"User (used for refund, void and capture)","type":"string"}},"required":["url","merchantId","accessCode","user","password"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"AmexVPC config"},"AmountAdjustment":{"discriminator":{"propertyName":"method"},"properties":{"method":{"enum":["none","partial","discount"],"type":"string"}},"required":["method"],"type":"object"},"AmountRestrictions":{"properties":{"currency":{"description":"Currency (three letter ISO 4217 code)","type":"string"},"max":{"description":"The maximum amount allowed","format":"double","minimum":0,"type":"number"},"min":{"description":"The minimum amount allowed","format":"double","minimum":0,"type":"number"}},"required":["currency","min"],"type":"object"},"ApprovalUrlLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["approvalUrl"],"type":"string"}},"required":["rel"],"type":"object"},"AstroPayCard":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"description":"AstroPay Card credentials object","properties":{"secret_key":{"description":"AstroPay Card secret key","format":"password","type":"string"},"x_login":{"description":"AstroPay Card login","type":"string"},"x_tran_key":{"description":"AstroPay Card transaction key","format":"password","type":"string"}},"required":["x_login","x_tran_key","secret_key"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"AstroPay Card config"},"Attachment":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/FileLink"},{"$ref":"#/components/schemas/AttachmentResourceLink"}]},"minItems":3,"readOnly":true,"type":"array"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Creation date/time"},"description":{"description":"The Attachment description","type":"string"},"fileId":{"description":"Linked File object id","type":"string"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"readOnly":true},"name":{"description":"The Original Attachment name","type":"string"},"relatedId":{"description":"Linked object Id","type":"string"},"relatedType":{"description":"Linked object type","enum":["customer","dispute","invoice","note","payment","plan","product","subscription","transaction"],"type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Latest update date/time"}},"required":["fileId","relatedId","relatedType"],"type":"object"},"AttachmentResourceLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["customer","dispute","invoice","note","payment","plan","product","subscription","transaction"],"type":"string"}},"required":["rel"],"type":"object"},"AuthTransactionLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["authTransaction"],"type":"string"}},"required":["rel"],"type":"object"},"AuthenticationOptions":{"properties":{"authTokenTtl":{"description":"The default lifetime of the auth-token in seconds","type":"integer"},"credentialTtl":{"description":"The default lifetime of the credential in seconds","type":"integer"},"passwordPattern":{"description":"Allowed password pattern","type":"string"},"resetTokenTtl":{"description":"The default lifetime of the reset-token in seconds","type":"integer"}},"type":"object"},"AuthenticationToken":{"properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"credentialId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The credential's ID","readOnly":true},"customerId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The token's customer ID","readOnly":true},"expiredTime":{"description":"Token's expired time","format":"date-time","type":"string"},"password":{"description":"The token's password (write-only)","format":"password","type":"string"},"token":{"description":"The token identifier string","readOnly":true,"type":"string"},"username":{"description":"The token's username","type":"string"}},"required":["username","password"],"type":"object"},"AuthorizeNet":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"apiLoginId":{"description":"AuthorizeNet Gateway api login ID","type":"string"},"transactionKey":{"description":"AuthorizeNet Gateway Transaction Key","format":"password","type":"string"}},"required":["apiLoginId","transactionKey"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"AuthorizeNet Gateway config"},"BankAccount":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/CustomerLink"}]},"minItems":1,"readOnly":true,"type":"array"},"accountNumber":{"description":"Bank's Account Number. Required if bank account is not created from Token. This field is write-only","type":"string"},"accountType":{"description":"Banks's Account type. Required if bank account is not created from Token","type":"string"},"address":{"allOf":[{"$ref":"#/components/schemas/ContactObject"}],"description":"The Address. Required if bank account is not created from Token"},"bankName":{"description":"Bank's name.","type":"string"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Bank Account created time"},"customFields":{"$ref":"#/components/schemas/ResourceCustomFields"},"customerId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The Customer's ID."},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The bank account identifier string","readOnly":true},"routingNumber":{"description":"Bank's Routing Number. Required if bank account is not created from Token. This field is write-only","type":"string"},"status":{"description":"Bank Account status","enum":["active","deactivated"],"type":"string"},"token":{"description":"Bank Account Token. Use without any other fields","type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Bank Account updated time"}},"type":"object"},"BankAccountLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["bankAccount"],"type":"string"}},"required":["rel"],"type":"object"},"Beanstream":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"apiPasscode":{"description":"Beanstream Gateway API Passcode","format":"password","type":"string"},"merchantId":{"description":"Beanstream Gateway merchant ID","type":"string"}},"required":["merchantId","apiPasscode"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Beanstream Gateway config"},"Blacklist":{"properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The blacklist created time"},"expiredTime":{"description":"The blacklist expired time","format":"date-time","type":"string"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The blacklist identifier string","readOnly":true},"type":{"description":"The blacklist type","enum":["payment-card-id","customer-id","email","ip-address","country","fingerprint","bin"],"type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The blacklist updated time"},"value":{"description":"The blacklist value","type":"string"}},"required":["type","value"],"type":"object"},"BraintreePayments":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"merchantAccountId":{"description":"BraintreePayments merchant account ID","format":"password","type":"string"},"merchantId":{"description":"BraintreePayments merchant ID","format":"password","type":"string"},"privateKey":{"description":"BraintreePayments Private Key","format":"password","type":"string"},"publicKey":{"description":"BraintreePayments Public Key","type":"string"}},"required":["publicKey","privateKey","merchantId","merchantAccountId"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"BraintreePayments Gateway config"},"CancelUrlLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["cancelUrl"],"type":"string"}},"required":["rel"],"type":"object"},"Cancellation":{"properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"appliedInvoiceId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The identifier of the invoice where the cancellation fees or credits are applied.","readOnly":true},"canceledBy":{"default":"customer","description":"Who did the cancellation","enum":["merchant","customer"],"type":"string"},"canceledTime":{"description":"The cancellation time (when the status is confirmed which is by default unless specified \"draft\").","format":"date-time","readOnly":true,"type":"string"},"churnTime":{"description":"The time when the subscription will be deactivated.","format":"date-time","type":"string"},"createdTime":{"description":"The time of resource creation (when it is posted).","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"Cancel reason description in free form","maxLength":255,"type":"string"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Cancellation identifier","readOnly":true},"lineItemSubtotal":{"description":"Subtotal of the line items which will be added after the subscription's cancellation","example":49.95,"readOnly":true,"type":"number"},"lineItems":{"description":"Items to be added to the new invoice. Proration item is generated and added automatically.","items":{"description":"Line item","properties":{"description":{"description":"Description of line item","type":"string"},"periodEndTime":{"description":"Date-time when the period ends for this item","format":"date-time","type":"string"},"periodStartTime":{"description":"Date-time when the period begins for this item","format":"date-time","type":"string"},"quantity":{"default":1,"description":"Quantity of line item","example":1,"type":"integer"},"type":{"description":"Type of line item","enum":["debit","credit"],"type":"string"},"unitPriceAmount":{"description":"Unit price of the line item","example":49.95,"format":"double","type":"number"},"unitPriceCurrency":{"description":"Currency ISO code","example":"USD","type":"string"}},"required":["type","unitPriceAmount","unitPriceCurrency"],"type":"object"},"type":"array"},"prorated":{"default":false,"description":"Defines if the customer gets a pro-rata credit for the time remaining between `churnTime` and\nsubscription's next renewal time.\n","type":"boolean"},"proratedInvoiceId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Identifier of the invoice on which the cancellation proration is calculated.","readOnly":true},"reason":{"default":"other","description":"Cancellation reason","enum":["did-not-use","did-not-want","missing-features","bugs-or-problems","do-not-remember","risk-warning","contract-expired","too-expensive","other","billing-failure"],"type":"string"},"status":{"default":"confirmed","description":"\"draft\" defines that the cancellation isn't applied on an invoice and subscription but\ncan be inspected to see the charge.\n\"confirmed\" will set a subscription to be canceled when the `churnTime` is reached.\n\"completed\" is a read-only status which is set by the system when the churnTime is reached.\nThe cancellation may not be changed or deleted when the status is \"completed\".\n","enum":["draft","confirmed","completed","revoked"],"type":"string"},"subscriptionId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Identifier of the canceled subscription"}},"required":["subscriptionId","churnTime"],"type":"object"},"CardinalCommerce":{"allOf":[{"$ref":"#/components/schemas/PayvisionMpis"},{"properties":{"merchantId":{"description":"Cardinal MerchantId","type":"string"},"processorId":{"description":"Cardinal ProcessorId","type":"string"},"transactionPwd":{"description":"Cardinal TransactionPwd","format":"password","type":"string"}},"required":["merchantId","processorId","transactionPwd"],"type":"object"}],"description":"CardinalCommerce Mpi Credentials"},"Cashflows":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"authId":{"description":"Cashflows Gateway auth ID","type":"string"},"authPassword":{"description":"Cashflows Gateway auth password","format":"password","type":"string"}},"required":["authPassword","authId"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Cashflows Gateway config"},"Cayan":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"merchantKey":{"description":"Cayan Gateway merchant key","format":"password","type":"string"},"merchantName":{"description":"Cayan Gateway merchant name","type":"string"},"merchantSiteId":{"description":"Cayan Gateway merchant site ID","type":"string"}},"required":["merchantSiteId","merchantName","merchantKey"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Cayan Gateway config"},"Chase":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"coNumber":{"description":"Chase Gateway CO Number used for delimited file reports","type":"string"},"divisionId":{"description":"Chase Gateway division ID","type":"string"},"partialAuth":{"default":false,"description":"Support for Partial Auths","type":"boolean"},"password":{"description":"Chase Gateway Net Connect password","format":"password","type":"string"},"username":{"description":"Chase Gateway Net Connect username","type":"string"}},"required":["username","password","coNumber","divisionId","partialAuth"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Chase Gateway config"},"CommonScheduleInstruction":{"description":"The calculation instruction of scheduled time","discriminator":{"propertyName":"method"},"properties":{"method":{"enum":["auto","immediately","date-interval","day-of-month","day-of-week"],"type":"string"}},"required":["method"],"type":"object"},"Condition":{"discriminator":{"propertyName":"op"},"properties":{"op":{"description":"The condition operation","enum":["and","or","not","between","equals","in","gt","gte","lt","lte"],"type":"string"}},"required":["op"],"type":"object"},"Contact":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/CustomerLink"}]},"minItems":1,"readOnly":true,"type":"array"},"address":{"description":"The contact street address","maxLength":60,"type":"string"},"address2":{"description":"The contact street address (second line)","maxLength":60,"type":"string"},"city":{"description":"The contact city","maxLength":45,"type":"string"},"country":{"description":"The contact country ISO Alpha-2 code","pattern":"^[A-Z]{2}$","type":"string"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The contact created time"},"customFields":{"$ref":"#/components/schemas/ResourceCustomFields"},"customerId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The contact customer ID"},"emails":{"$ref":"#/components/schemas/ContactEmails"},"firstName":{"description":"The contact first name","type":"string"},"hash":{"description":"A hash that can be used to compare multiple contacts for identical attribute values, excluding id, customer id, createdTime, updatedTime.","example":"056ae6d97c788b9e98b049ebafd7b229bf852221","maxLength":40,"type":"string"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The contact identifier string","readOnly":true},"lastName":{"description":"The contact last name","type":"string"},"organization":{"description":"The contact organization","type":"string"},"phoneNumbers":{"$ref":"#/components/schemas/ContactPhoneNumbers"},"postalCode":{"description":"The contact postal code","maxLength":10,"type":"string"},"region":{"description":"The contact region (state)","maxLength":45,"type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The contact updated time"}},"type":"object"},"ContactEmails":{"description":"The contact emails","items":{"properties":{"label":{"description":"The email label","type":"string"},"primary":{"description":"True if email is primary","type":"boolean"},"value":{"description":"The email value","type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"ContactObject":{"properties":{"address":{"description":"The contact street address","maxLength":60,"type":"string"},"address2":{"description":"The contact street address (second line)","maxLength":60,"type":"string"},"city":{"description":"The contact city","maxLength":45,"type":"string"},"country":{"description":"The contact country ISO Alpha-2 code","pattern":"^[A-Z]{2}$","type":"string"},"emails":{"$ref":"#/components/schemas/ContactEmails"},"firstName":{"description":"The contact first name","type":"string"},"hash":{"description":"A hash that can be used to compare multiple contacts for identical attribute values","example":"056ae6d97c788b9e98b049ebafd7b229bf852221","maxLength":40,"readOnly":true,"type":"string"},"lastName":{"description":"The contact last name","type":"string"},"organization":{"description":"The contact organization","type":"string"},"phoneNumbers":{"$ref":"#/components/schemas/ContactPhoneNumbers"},"postalCode":{"description":"The contact postal code","maxLength":10,"type":"string"},"region":{"description":"The contact region (state)","maxLength":45,"type":"string"}},"type":"object"},"ContactPhoneNumbers":{"description":"The contact phone numbers","items":{"properties":{"label":{"description":"The phone label","type":"string"},"primary":{"description":"True if phone is primary","type":"boolean"},"value":{"description":"The phone value","type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"Coupon":{"description":"Coupons and Discounts","properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Coupon created time"},"description":{"description":"Your coupon description. When it is not empty this is used for invoice discount item description,\notherwise the item's description uses coupon's redemptionCode like 'Coupon \"redemptionCode\"'\n","type":"string"},"discount":{"$ref":"#/components/schemas/Discount"},"expiredTime":{"description":"Coupon's expire time (end time)","format":"date-time","type":"string"},"issuedTime":{"description":"Coupon's issued time (start time)","format":"date-time","type":"string"},"redemptionCode":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Coupon's redemption code","readOnly":true},"redemptionsCount":{"description":"Coupon's redemptions count","minimum":0,"readOnly":true,"type":"integer"},"restrictions":{"description":"Coupon restrictions","items":{"$ref":"#/components/schemas/CouponRestriction"},"type":"array"},"status":{"description":"If coupon enabled","enum":["issued","expired"],"readOnly":true,"type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Coupon updated time."}},"required":["discount","issuedTime"],"type":"object"},"CouponExpiration":{"properties":{"expiredTime":{"description":"The coupon's expiry time, must be greater than the issued time. Null or empty string will immediately expire the coupon.","format":"date-time","type":"string"}},"required":["expiredTime"],"type":"object"},"CouponRedemption":{"description":"Coupons redemption log","properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"additionalRestrictions":{"description":"Additional restrictions for coupon's redemptions","items":{"$ref":"#/components/schemas/RedemptionRestriction"},"type":"array"},"canceledTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Coupon redemption canceled time","readOnly":true},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Coupon redeem time","readOnly":true},"customerId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Customer's ID"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"readOnly":true},"redemptionCode":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Coupon's redemption code"}},"type":"object"},"CouponRestriction":{"description":"Coupon restrictions","discriminator":{"propertyName":"type"},"properties":{"type":{"description":"Coupon's restriction type","enum":["discounts-per-redemption","minimum-order-amount","redemptions-per-customer","restrict-to-invoices","restrict-to-plans","restrict-to-subscriptions","total-redemptions"],"type":"string"}},"required":["type"],"type":"object"},"Credential":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/CustomerLink"}]},"minItems":1,"readOnly":true,"type":"array"},"customerId":{"description":"The credential's customer ID","type":"string"},"expiredTime":{"description":"The credential's expired time","format":"date-time","type":"string"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The credential identifier string","readOnly":true},"password":{"description":"The credential's password","format":"password","type":"string"},"username":{"description":"Credential's username","type":"string"}},"required":["username","password","customerId"],"type":"object"},"Credorax":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"merchantId":{"description":"Credorax Gateway merchant ID","type":"string"},"merchantMd5Signature":{"description":"Credorax Gateway md5 signature","format":"password","type":"string"}},"required":["merchantId","merchantMd5Signature"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Credorax Gateway config"},"CustomEventScheduleInstruction":{"description":"The calculation instruction of scheduled time","discriminator":{"propertyName":"method"},"properties":{"method":{"enum":["date-interval","day-of-month","day-of-week"],"type":"string"}},"required":["method"],"type":"object"},"CustomField":{"description":"A separate Custom Field schema","properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"additionalSchema":{"description":"Additional parameters which can be added according to type:\nParameter Name | Types | Description\n-------------- | ------------- | -------------\nallowedValues | string, array | List of allowed values\n"},"description":{"description":"The custom field description","type":"string"},"name":{"description":"The name of the custom field","type":"string"},"type":{"description":"Type value | Description\n------------- | -------------\narray | An array of strings up to 255 characters, maximum size is 1000 elements\nboolean | true or false\ndate | String of format \"full-date\" (YYYY-MM-DD) from RFC-3339 (full-date)\ndatetime | String of format \"date-time\" (YYYY-MM-DDTHH:MM:SSZ) from RFC-3339 (date-time)\ninteger | Cardinal value of -2^31..2^31-1\nnumber | Float value. It can take cardinal values also which are interpreted as float\nstring | Regular string up to 255 characters\nmonetary | A map of 3-letters currency code and amount, e.g. {\"currency\": \"EUR\", \"amount\": 25.30}\n","enum":["array","boolean","datetime","integer","number","string","monetary"],"type":"string"}},"required":["name","type"],"type":"object"},"Customer":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/NotesLink"},{"$ref":"#/components/schemas/DefaultPaymentInstrumentLink"},{"$ref":"#/components/schemas/LeadSourceLink"}]},"minItems":3,"readOnly":true,"type":"array"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The customer created time"},"customFields":{"$ref":"#/components/schemas/ResourceCustomFields"},"defaultPaymentInstrument":{"$ref":"#/components/schemas/PaymentInstrument"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The customer identifier string","readOnly":true},"invoiceCount":{"description":"An auto-incrementing number based on the sequence of invoices. If set to 0, then this record is a Lead, otherwise is a Customer","readOnly":true,"type":"integer"},"lifetimeRevenue":{"$ref":"#/components/schemas/CustomerLifetimeRevenue"},"primaryAddress":{"$ref":"#/components/schemas/ContactObject"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The customer updated time"}},"type":"object"},"CustomerLifetimeRevenue":{"properties":{"amount":{"description":"Revenue amount in Merchant's reporting currency","format":"double","type":"number"},"amountUsd":{"description":"Revenue amount in USD","format":"double","type":"number"},"currency":{"description":"Merchant's reporting currency","type":"string"}},"readOnly":true,"type":"object"},"CustomerLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["customer"],"type":"string"}},"required":["rel"],"type":"object"},"DataCash":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"client":{"description":"DataCash Gateway client","type":"string"},"delay":{"default":0,"description":"Auto Capture delay (in hours)","minimum":0,"type":"integer"},"password":{"description":"DataCash Gateway password","format":"password","type":"string"},"policy":{"default":2,"description":"Policy","maximum":7,"minimum":0,"type":"integer"}},"required":["client","password","policy","delay"],"type":"object"},"mpi":{"$ref":"#/components/schemas/DataCashMpis"}},"required":["gatewayConfig"],"type":"object"}],"description":"DataCash Gateway config"},"DataCashMpi":{"allOf":[{"$ref":"#/components/schemas/DataCashMpis"}],"description":"DataCash Integrated"},"DataCashMpis":{"description":"DataCash Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["DataCashMpi"]}},"required":["name"],"type":"object"},"DayOfWeek":{"enum":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"type":"string"},"DefaultPaymentInstrumentLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["defaultPaymentInstrument"],"type":"string"}},"required":["rel"],"type":"object"},"Dengi":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"projectId":{"description":"Dengi Gateway project ID","type":"string"},"publicKey":{"description":"Dengi Gateway public key","format":"password","type":"string"},"refundKey":{"description":"Dengi Gateway refund key","format":"password","type":"string"}},"required":["projectId","publicKey","refundKey"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Dengi Gateway config"},"Discount":{"discriminator":{"propertyName":"type"},"properties":{"type":{"description":"Discount type","enum":["fixed","percent"],"type":"string"}},"type":"object"},"Dispute":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/TransactionLink"}]},"minItems":1,"readOnly":true,"type":"array"},"acquirerReferenceNumber":{"description":"The dispute's acquirer reference number","type":"string"},"amount":{"description":"The dispute amount","format":"double","type":"number"},"category":{"description":"The dispute's category","enum":["fraud","unrecognized","product-not-received","product-unacceptable","product-not-refunded","duplicate","subscription-canceled","uncategorized"],"readOnly":true,"type":"string"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Dispute created time"},"currency":{"description":"The dispute currency ISO Alpha code","type":"string"},"customerId":{"description":"The dispute's customer ID","readOnly":true,"type":"string"},"deadlineTime":{"description":"Dispute deadline time","format":"date-time","type":"string"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The dispute identifier string","readOnly":true},"postedTime":{"description":"Dispute posted time","format":"date-time","type":"string"},"rawResponse":{"description":"Dispute raw response from gateway","readOnly":true,"type":"string"},"reasonCode":{"description":"The dispute's reason code","enum":["1000","12","2","30","31","35","37","40","41","42","46","47","49","50","53","54","55","57","59","60","62","7","70","71","72","73","74","75","76","77","79","8","80","81","82","83","85","86","93","00","63","A01","A02","A08","F10","F14","F22","F24","F29","C02","C04","C05","C08","C14","C18","C28","C31","C32","M10","M49","P01","P03","P04","P05","P07","P08","P22","P23","R03","R13","M01","FR1","FR4","FR6","AL","AP","AW","CA","CD","CR","DA","DP","DP1","EX","IC","IN","IS","LP","N","NA","NC","P","RG","RM","RN1","RN2","SV","TF","TNM","UA01","UA02","UA32","UA99","UA03","UA10","UA11","UA12","UA18","UA20","UA21","UA22","UA23","UA28","UA30","UA31","UA38","duplicate","fraudulent","subscription_canceled","product_unacceptable","product_not_received","unrecognized","credit_not_processed","customer_initiated","incorrect_account_details","insufficient_funds","bank_cannot_process","debit_not_authorized","general"],"type":"string"},"resolvedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Dispute resolved time"},"status":{"description":"The dispute's status","enum":["response-needed","under-review","forfeited","won","lost","unknown"],"type":"string"},"transactionId":{"description":"The dispute's transaction ID","type":"string"},"type":{"description":"The dispute's type","enum":["information-request","first-chargeback","second-chargeback","arbitration"],"type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Dispute updated time"}},"required":["currency","transactionId","postedTime","type","status","reasonCode"],"type":"object"},"DisputeEvidence":{"properties":{"accessLogs":{"description":"The id of a file upload with the access logs showing the customer activity.","type":"string"},"additionalFile":{"description":"Any additional evidence as a file upload id.","type":"string"},"customerCommunication":{"description":"The id of a file upload showing communication with the customer (for example emails).","type":"string"},"customerSignature":{"description":"The id of a file upload showing the signed contract or signed delivery receipt.","type":"string"},"deliveryProof":{"description":"The id of a file upload showing the proof of delivery.","type":"string"},"explanation":{"description":"An explanation relevant to the category of dispute.","type":"string"},"policy":{"description":"The id of a file upload with the policy materials (may include the cancellation policy, refund policy, and terms of use).","type":"string"}},"type":"object"},"DisputeLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["dispute"],"type":"string"}},"required":["rel"],"type":"object"},"Elavon":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"description":"Elavon credentials object","properties":{"ssl_merchant_id":{"description":"Elavon merchant ID","type":"string"},"ssl_pin":{"description":"Elavon pin","format":"password","type":"string"},"ssl_user_id":{"description":"Elavon user ID","type":"string"}},"required":["ssl_merchant_id","ssl_user_id","ssl_pin"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Elavon config"},"Error":{"properties":{"error":{"type":"string"},"status":{"maximum":600,"minimum":100,"type":"integer"}},"type":"object"},"EventType":{"description":"Rebilly event type","enum":["dispute-created","gateway-account-requested","transaction-processed","subscription-activated","subscription-canceled","subscription-created","subscription-renewed","payment-card-expired","invoice-past-due","transaction-declined","transaction-process-requested","risk-score-changed","transaction-discrepancy-found"],"readOnly":true,"type":"string"},"File":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/FileDownloadLink"},{"$ref":"#/components/schemas/SignedLinkLink"},{"$ref":"#/components/schemas/PermalinkLink"}]},"minItems":3,"readOnly":true,"type":"array"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The upload date/time"},"description":{"description":"The File description","type":"string"},"extension":{"description":"The File extension","type":"string"},"height":{"description":"Image height, applicable to images only","readOnly":true,"type":"integer"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"readOnly":true},"isPublic":{"description":"Is the file available publicly (without authentication). If true, the permalink in the _links section contains the public URL.","type":"boolean"},"mime":{"description":"The mime type","enum":["image/png","image/jpeg","image/gif","application/pdf","audio/mpeg"],"readOnly":true,"type":"string"},"name":{"description":"Original File name","type":"string"},"sha1":{"description":"Hash sum of the file","readOnly":true,"type":"string"},"size":{"description":"The File size in bytes","readOnly":true,"type":"integer"},"tags":{"description":"The tags list","items":{"type":"string"},"type":"array"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The latest update date/time"},"url":{"description":"Write-only. If defined on POST, this would be used as a file source.","type":"string"},"width":{"description":"Image width, applicable to images only","readOnly":true,"type":"integer"}},"type":"object"},"FileCreateRequest":{"properties":{"description":{"description":"The file description","example":"My file description","type":"string"},"file":{"description":"The file in base64 encoded format. This or `url` is required.","example":"R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=","type":"string"},"isPublic":{"description":"The File visibility. If public a permalink is provided.","example":false,"type":"boolean"},"name":{"description":"The file name used for downloading","example":"logo.png","type":"string"},"tags":{"description":"The tags list","example":["test","tags"],"items":{"type":"string"},"type":"array"},"url":{"description":"The URL of the file to upload. This or `file` is required.","example":"https://blog.rebilly.com/wp-content/uploads/2017/09/rb_LogoInverted_Small.png","type":"string"}},"required":["file","url"],"type":"object"},"FileDownloadLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["download"],"type":"string"}},"required":["rel"],"type":"object"},"FileLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["file"],"type":"string"}},"required":["rel"],"type":"object"},"Flexepin":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"apiKey":{"description":"Flexepin API Key","type":"string"},"apiSecret":{"description":"Flexepin API Secret","format":"password","type":"string"}},"required":["apiKey","apiSecret"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Flexepin Gateway config"},"Forte":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"accountId":{"description":"Forte Gateway account ID","type":"string"},"apiAccessId":{"description":"Forte Gateway api access ID","format":"password","type":"string"},"apiSecretKey":{"description":"Forte Gateway api secret key","format":"password","type":"string"},"locationId":{"description":"Forte Gateway location ID","type":"string"}},"required":["accountId","locationId","apiAccessId","apiSecretKey"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Forte Gateway config"},"FundSend":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"clientId":{"description":"FundSend Gateway client ID","type":"string"},"secretWord":{"description":"FundSend Gateway secret word","format":"password","type":"string"}},"required":["clientId","secretWord"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"FundSend Gateway config"},"GET":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"accountId":{"description":"GET Gateway account ID","type":"string"}},"required":["accountId"],"type":"object"},"mpi":{"$ref":"#/components/schemas/GETMpis"}},"required":["gatewayConfig"],"type":"object"}],"description":"GET Gateway config"},"GETMpis":{"description":"GET Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["PaayMpi","Other"]}},"required":["name"],"type":"object"},"GatewayAccount":{"discriminator":{"propertyName":"gatewayName"},"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/OnBoardingUrlLink"}]},"minItems":1,"readOnly":true,"type":"array"},"acceptedCurrencies":{"description":"Accepted currencies (array of the currency three letter code)","items":{"type":"string"},"type":"array"},"acquirerName":{"description":"The acquirer name","enum":["Alipay","AIB","ApcoPay","AstroPay Card","Ipay Options","B+S","Bambora","Bank of America","Bank of Moscow","Bank of Rebilly","Bank One","BMO Harris Bank","Borgun","BraintreePayments","Cardknox","Catalunya Caixa","Chase","ChinaUnionPay","CIM","Credorax","Cryptonator","EcorePay","Elavon","EMS","Fifth Third Bank","First Data Buypass","First Data Nashville","First Data North","First Data Omaha","FinTecSystems","Flexepin","Forte","FundSend","Global East","Gpaysafe","Heartland","HSBC","iCheque","Ilixium","Ingenico","Intuit","Jeton","Masapay","Merrick","Mission Valley Bank","Moneris","NATWEST","NMI","OchaPay","Other","Panamerican","ParamountEft","Panda Bank","PayPal","Payr","Payvision","Peoples Trust Company","Privatbank","QQPay","RBC","RBS WorldPay","RealTime","RebillyProcessor","Rotessa","Skrill","SMSVoucher","State Bank of Mauritius","Stripe","TBI","TrustPay","TSYS","UPayCard","Vantiv","VoicePay","WeChat Pay","Wells Fargo","Wing Hang Bank","Wirecard","WorldPay"],"type":"string"},"amountRestrictions":{"description":"Set restrictions on allowed amounts per currency","items":{"$ref":"#/components/schemas/AmountRestrictions"},"type":"array"},"cityField":{"description":"The gateway account's city field (also known as line 2 descriptor)","type":"string"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Gateway Account created time"},"dccMarkup":{"description":"Dynamic currency conversion markup in basis points","maximum":10000,"minimum":1,"type":"integer"},"descriptor":{"description":"The gateway account's descriptor","type":"string"},"dynamicDescriptor":{"description":"True, if Gateway Account allows dynamic descriptor","type":"boolean"},"excludedDccQuoteCurrencies":{"description":"Excluded Dynamic Currency Conversion Quote Currencies","items":{"type":"string"},"type":"array"},"gatewayName":{"description":"The payment gateway name","enum":["A1Gateway","AmexVPC","ApcoPay","AstroPay","AstroPayCard","AuthorizeNet","Bambora","BraintreePayments","Cardknox","Cashflows","Cayan","Chase","Credorax","Cryptonator","DataCash","Dengi","EcorePay","Elavon","eMerchantPay","Flexepin","FinTecSystems","FundSend","Forte","GET","GlobalOnePay","Gpaysafe","iCheque","Ilixium","Ingenico","Intuit","IpayOptions","JetPay","Jeton","Moneris","MtaPay","NMI","OchaPay","Panamerican","ParamountEft","PandaGateway","Payeezy","Payflow","PayPal","Payr","Paysafe","Payvision","Plugnpay","Realex","Realtime","RebillyProcessor","Redsys","Rotessa","RPN","Sagepay","Skrill","SMSVoucher","StaticGateway","Stripe","UPayCard","USAePay","VantivLitle","vegaaH","Walpay","Wirecard","Worldpay"],"type":"string"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The gateway identifier string","readOnly":true},"isDown":{"description":"True if gateway is currently in downtime period.","readOnly":true,"type":"boolean"},"merchantCategoryCode":{"description":"The gateway account's merchant category code","maximum":9950,"minimum":742,"type":"integer"},"method":{"$ref":"#/components/schemas/Method"},"monthlyLimit":{"description":"Monthly Limit","format":"double","minimum":0,"type":"number"},"organizationId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Organization ID"},"paymentCardSchemes":{"description":"Accepted payment card brands","items":{"enum":["Visa","MasterCard","American Express","Discover","Maestro","Solo","Electron","JCB","Voyager","Diners Club","Switch","Laser","China Unionpay"],"type":"string"},"type":"array"},"status":{"description":"The gateway account's status","enum":["active","inactive","pending"],"readOnly":true,"type":"string"},"threeDSecure":{"description":"True, if Gateway Account allows 3DSecure","type":"boolean"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Gateway Account updated time"},"websites":{"description":"Websites IDs","items":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Website ID"},"type":"array"}},"required":["gatewayName","acquirerName","merchantCategoryCode","websites","acceptedCurrencies","organizationId"],"type":"object"},"GatewayAccountLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["gatewayAccount"],"type":"string"}},"required":["rel"],"type":"object"},"GlobalCollect":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"apiKeyId":{"description":"GlobalCollect Gateway api key ID","type":"string"},"apiSecretKey":{"description":"GlobalCollect Gateway api secret key","format":"password","type":"string"},"merchantId":{"description":"GlobalCollect Gateway merchant ID","type":"string"},"skipFraudService":{"description":"GlobalCollect skip fraud service","type":"boolean"}},"required":["merchantId","apiKeyId","apiSecretKey"],"type":"object"},"mpi":{"$ref":"#/components/schemas/GlobalCollectMpis"}},"required":["gatewayConfig"],"type":"object"}],"description":"GlobalCollect Gateway config"},"GlobalCollectMpi":{"allOf":[{"$ref":"#/components/schemas/GlobalCollectMpis"}],"description":"GlobalCollect Integrated"},"GlobalCollectMpis":{"description":"GlobalCollect Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["GlobalCollectMpi"]}},"required":["name"],"type":"object"},"GlobalOne":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"sharedSecret":{"description":"GlobalOne Gateway shared secret","format":"password","type":"string"},"terminalId":{"description":"GlobalOne Gateway terminal ID","type":"string"}},"required":["terminalId","sharedSecret"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"GlobalOne Gateway config"},"Gpaysafe":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"apiKey":{"description":"Gpaysafe apiKey","type":"string"}},"required":["apiKey"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Gpaysafe Gateway config"},"Ilixium":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"accountId":{"description":"Ilixium Gateway account ID","type":"string"},"digestPassword":{"description":"Ilixium Gateway digest password","format":"password","type":"string"},"merchantId":{"description":"Ilixium Gateway merchant ID","type":"string"}},"required":["merchantId","accountId","digestPassword"],"type":"object"},"mpi":{"$ref":"#/components/schemas/IlixiumMpis"}},"required":["gatewayConfig"],"type":"object"}],"description":"Ilixium Gateway config"},"IlixiumMpi":{"allOf":[{"$ref":"#/components/schemas/IlixiumMpis"}],"description":"Ilixium Integrated"},"IlixiumMpis":{"description":"IlixiumMpis Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["IlixiumMpi"]}},"required":["name"],"type":"object"},"Intuit":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"clientId":{"description":"The Intuit client_id key","type":"string"},"clientSecret":{"description":"The Intuit client_secret key","format":"password","type":"string"}},"required":["clientId","clientSecret"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Intuit Gateway config"},"InvalidError":{"allOf":[{"$ref":"#/components/schemas/Error"},{"properties":{"details":{"items":{"type":"string"},"type":"array"}},"type":"object"}]},"Invoice":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/CustomerLink"},{"$ref":"#/components/schemas/WebsiteLink"},{"$ref":"#/components/schemas/OrganizationLink"},{"$ref":"#/components/schemas/LeadSourceLink"}]},"minItems":1,"readOnly":true,"type":"array"},"abandonedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Invoice abandoned time"},"amount":{"description":"The Invoice's amount","format":"double","readOnly":true,"type":"number"},"billingAddress":{"allOf":[{"$ref":"#/components/schemas/ContactObject"}],"description":"Invoice's billing address"},"collectionPeriod":{"description":"Collection Period - difference between paidTime and issuedTime in days.","readOnly":true,"type":"integer"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Invoice created time"},"currency":{"description":"The currency three letter code","type":"string"},"customerId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The customer's ID"},"delinquentCollectionPeriod":{"description":"Delinquent Collection Period - difference between paidTime and dueTime in days.","readOnly":true,"type":"integer"},"deliveryAddress":{"allOf":[{"$ref":"#/components/schemas/ContactObject"}],"description":"Invoice's delivery address"},"discounts":{"description":"Discounts applied","items":{"allOf":[{"$ref":"#/components/schemas/InvoiceDiscount"}]},"readOnly":true,"type":"array"},"dueTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Invoice due time"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The invoice identifier string","readOnly":true},"invoiceNumber":{"description":"An auto-incrementing number based on the sequence of invoices for any particular customer.","readOnly":true,"type":"integer"},"issuedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Invoice issued time"},"items":{"description":"Invoice items array","items":{"type":"string"},"readOnly":true,"type":"array"},"notes":{"description":"Notes for the customer which will display on the invoice","type":"string"},"organizationId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The organization's ID","readOnly":true},"paidTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Invoice paid time"},"shippingAmount":{"description":"The Invoice's shipping amount","format":"double","readOnly":true,"type":"number"},"status":{"description":"Invoice status.","enum":["draft","issued","past-due","paid","abandoned","voided"],"readOnly":true,"type":"string"},"subscriptionId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The related Subscription's ID if available, otherwise null","readOnly":true},"taxes":{"description":"Taxes applied to this invoice","items":{"allOf":[{"$ref":"#/components/schemas/InvoiceTax"}]},"readOnly":true,"type":"array"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Invoice updated time"},"voidedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Invoice voided time"},"websiteId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The website's ID"}},"required":["customerId","websiteId","currency"],"type":"object"},"InvoiceDiscount":{"properties":{"amount":{"description":"Total amount that was discounted by this Coupon","format":"double","type":"number"},"description":{"description":"Discount description","type":"string"},"redemptionCode":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Coupon's redemption code"},"redemptionId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Redemption ID"}},"readOnly":true,"type":"object"},"InvoiceIssue":{"properties":{"issuedTime":{"format":"date-time","type":"string"}},"type":"object"},"InvoiceItem":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/SubscriptionLink"}]},"minItems":1,"readOnly":true,"type":"array"},"description":{"description":"Invoice item's description","type":"string"},"discountAmount":{"description":"Invoice item discount amount","format":"double","readOnly":true,"type":"number"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The website identifier string","readOnly":true},"periodEndTime":{"description":"End time","format":"date-time","type":"string"},"periodStartTime":{"description":"Start time","format":"date-time","type":"string"},"productId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The product's ID"},"quantity":{"description":"Invoice item's quantity","type":"integer"},"type":{"description":"Invoice item's type","enum":["debit","credit"],"type":"string"},"unitPrice":{"description":"Invoice item's price","format":"double","type":"number"}},"required":["type","unitPrice"],"type":"object"},"InvoiceTax":{"properties":{"amount":{"description":"Tax amount","format":"double","type":"number"},"description":{"description":"Tax description","type":"string"}},"readOnly":true,"type":"object"},"IpayOptions":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"description":"Ipay Options credentials object","properties":{"rcode":{"description":"Ipay Options rcode","format":"password","type":"string"},"sid":{"description":"Ipay Options website ID","type":"string"}},"required":["sid","rcode"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Ipay Options config"},"ItemsLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["items"],"type":"string"}},"required":["rel"],"type":"object"},"JetPay":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"TerminalID":{"description":"JetPay Gateway terminal ID","type":"string"}},"required":["TerminalID"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"JetPay Gateway config"},"Jeton":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"apiKey":{"description":"Jeton apiKey","type":"string"}},"required":["apiKey"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Jeton Gateway config"},"KycDocument":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/FileLink"},{"$ref":"#/components/schemas/CustomerLink"}]},"minItems":3,"readOnly":true,"type":"array"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Creation date/time"},"customerId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Linked Customer object id"},"documentMatches":{"$ref":"#/components/schemas/KycDocumentMatches"},"documentType":{"description":"Document type submitted for validation, only identity-proof type is analyzed in an automated manner","enum":["identity-proof","address-proof"],"type":"string"},"fileId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Linked File object id"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"readOnly":true},"processedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Processing date/time"},"rejectionReason":{"$ref":"#/components/schemas/KycDocumentRejection"},"status":{"description":"Status of the validation","enum":["pending","in-progress","accepted","rejected"],"readOnly":true,"type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Latest update date/time"}},"required":["fileId","customerId","documentType","status"],"type":"object"},"KycDocumentMatches":{"properties":{"data":{"properties":{"containsImage":{"description":"Flag that indicates if there is an image that contains a face on it","example":true,"type":"boolean"},"dateOfBirth":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The date of birth found on the document, null if not found"},"expiryDate":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The expiry date found on the document, null if not found"},"firstName":{"description":"The customer first name if it was matched, null otherwise","example":"John","type":"string"},"hasMinimalAge":{"description":"Checks the minimal age, 21+ for USA and 18+ for all other countries. Null if dateOfBirth could not be determined.","example":true,"type":"boolean"},"isIdentityDocument":{"description":"Flag that indicates if this looks like and ID","example":true,"type":"boolean"},"isPublishedOnline":{"description":"If there is an exact match found online","example":false,"type":"boolean"},"issueDate":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The issued date found on the document, null if not found"},"lastName":{"description":"The customer last name if it was matched, null otherwise","example":"Doe","type":"string"}},"type":"object"},"score":{"description":"The calculated score that represents the % of confidence that this ID respresents the given customer","example":0.75,"format":"double","type":"number"}},"readOnly":true,"type":"object"},"KycDocumentRejection":{"properties":{"message":{"description":"The rejection message","example":"Provided document is unreadable","type":"string"},"type":{"enum":["document-unreadable","document-expired","document-not-matching","underage-person","other"],"type":"string"}},"readOnly":true,"type":"object"},"LeadSource":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/CustomerLink"}]},"minItems":1,"readOnly":true,"type":"array"},"affiliate":{"description":"Lead Source's affiliate (eg 123, Bob Smith)","type":"string"},"amount":{"description":"The amount that the lead cost","format":"double","type":"number"},"campaign":{"description":"Lead Source's campaign (eg go-big-123)","type":"string"},"clickId":{"description":"Lead Source's click id (may come from an ad server)","type":"string"},"content":{"description":"Lead Source's content (eg smiley faces)","type":"string"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"LeadSource created time"},"currency":{"description":"Currency (three letter ISO 4217 alpha code) (eg USD, EUR)","type":"string"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The lead source identifier string","readOnly":true},"medium":{"description":"Lead Source's medium (eg search, display)","type":"string"},"path":{"description":"Lead Source's path uri (eg www.example.com/some/landing/path)","type":"string"},"salesAgent":{"description":"Lead Source's sales agent (eg James Bond)","type":"string"},"source":{"description":"Lead Source's source (eg google, yahoo)","type":"string"},"subAffiliate":{"description":"Lead Source's sub-affiliate also called a sub-id or click id in some circles (eg 123456)","type":"string"},"term":{"description":"Lead Source's term (eg salt shakers)","type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"LeadSource updated time"}},"type":"object"},"LeadSourceLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["leadSource"],"type":"string"}},"required":["rel"],"type":"object"},"MatchedRule":{"properties":{"context":{"additionalProperties":{"type":"string"},"description":"Event's context","type":"object"},"description":{"description":"Rule's description","type":"string"},"event":{"$ref":"#/components/schemas/EventType"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Event tracking id","readOnly":true},"occurredTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Time when event occurred."},"processedRules":{"description":"Processed rules","properties":{"actions":{"description":"Rule actions applied","items":{"type":"string"},"type":"array"},"name":{"description":"Rule name","type":"string"},"result":{"description":"Rule result","type":"string"}},"type":"object"},"rulesVersion":{"description":"Rule version","type":"integer"}},"readOnly":true,"type":"object"},"Method":{"description":"The payment method","enum":["ach","cash","payment-card","paypal","Alipay","China UnionPay","Flexepin","Gpaysafe","Jeton","OchaPay","SMSVoucher","UPayCard","WeChat Pay","AstroPay Card","bank-transfer","bitcoin","Boleto","cash-deposit","echeck","instant-bank-transfer","invoice","miscellaneous","online-bank-transfer","phone","voucher","QQPay"],"type":"string"},"Moneris":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"apiToken":{"description":"Moneris Gateway api token","format":"password","type":"string"},"storeId":{"description":"Moneris Gateway store ID","type":"string"}},"required":["storeId","apiToken"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Moneris Gateway config"},"MpiName":{"description":"The Merchant plug-in Name","enum":["PayvisionMpi","WirecardMpi","IlixiumMpi","DataCashMpi","OptimalMpi","GlobalCollectMpi","CardinalCommerce","PaayMpi","Other"],"type":"string"},"MtaPay":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"accountId":{"description":"MTA Pay Gateway account ID","type":"string"},"goods":{"description":"MTA Pay Gateway goods","type":"string"},"md5key":{"description":"MTA Pay Gateway md5key","format":"password","type":"string"},"mobilePay":{"description":"MTA Pay Gateway mobile pay param","type":"string"},"partyId":{"description":"MTA Pay Gateway party ID","type":"string"}},"required":["accountId","partyId","goods","md5key","mobilePay"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"MTA Pay Gateway config"},"NMI":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"password":{"description":"NMI Gateway store ID","format":"password","type":"string"},"username":{"description":"NMI Gateway api token","type":"string"}},"required":["username","password"],"type":"object"},"mpi":{"$ref":"#/components/schemas/NMIMpis"}},"required":["gatewayConfig"],"type":"object"}],"description":"NMI Gateway config"},"NMIMpis":{"description":"NMI Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["PaayMpi","Other"]}},"required":["name"],"type":"object"},"NewLink":{"properties":{"href":{"description":"The link URL","type":"string"}},"required":["href"],"type":"object"},"NotesLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["notes"],"type":"string"}},"required":["rel"],"type":"object"},"OchaPay":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"apiPassword":{"description":"OchaPay Gateway api password","format":"password","type":"string"},"apiUsername":{"description":"OchaPay Gateway username","type":"string"},"secretWord":{"description":"OchaPay Gateway secret word","format":"password","type":"string"}},"required":["apiUsername","apiPassword","secretWord"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"OchaPay Gateway config"},"OnBoardingUrlLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["onBoardingUrl"],"type":"string"}},"required":["rel"],"type":"object"},"OnOff":{"default":"active","enum":["active","inactive"],"type":"string"},"Optimal":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"accountNum":{"description":"Optimal Gateway account number","type":"string"},"storeId":{"description":"Optimal Gateway store ID","type":"string"},"storePwd":{"description":"Optimal Gateway store password","format":"password","type":"string"}},"required":["storeId","storePwd","accountNum"],"type":"object"},"mpi":{"$ref":"#/components/schemas/OptimalMpis"}},"required":["gatewayConfig"],"type":"object"}],"description":"Optimal Gateway config"},"OptimalMpi":{"allOf":[{"$ref":"#/components/schemas/OptimalMpis"}],"description":"Optimal Integrated"},"OptimalMpis":{"description":"Optimal Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["OptimalMpi"]}},"required":["name"],"type":"object"},"OrganizationLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["organization"],"type":"string"}},"required":["rel"],"type":"object"},"Other":{"allOf":[{"$ref":"#/components/schemas/A1GatewayMpis"},{"$ref":"#/components/schemas/eMerchantPayMpis"},{"$ref":"#/components/schemas/GETMpis"},{"$ref":"#/components/schemas/NMIMpis"},{"$ref":"#/components/schemas/PayvisionMpis"},{"$ref":"#/components/schemas/VantivLitleMpis"},{"$ref":"#/components/schemas/WalpayMpis"},{"$ref":"#/components/schemas/WorldpayMpis"}],"description":"Other"},"PaayMpi":{"allOf":[{"$ref":"#/components/schemas/A1GatewayMpis"},{"$ref":"#/components/schemas/eMerchantPayMpis"},{"$ref":"#/components/schemas/GETMpis"},{"$ref":"#/components/schemas/NMIMpis"},{"$ref":"#/components/schemas/PayvisionMpis"},{"$ref":"#/components/schemas/VantivLitleMpis"},{"$ref":"#/components/schemas/WalpayMpis"},{"$ref":"#/components/schemas/WorldpayMpis"},{"properties":{"apiKey":{"description":"Paay ApiKey","type":"string"},"mpiUrl":{"description":"Paay MPI url","type":"string"},"sandboxMpiUrl":{"description":"Paay sandbox MPI url","type":"string"},"secret":{"description":"Paay secret","format":"password","type":"string"}},"required":["apiKey","secret","mpiUrl","sandboxMpiUrl"],"type":"object"}],"description":"Paay"},"PandaGateway":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"apiCode":{"description":"Panda Gateway api code","type":"string"},"merchantCode":{"description":"Panda Gateway merchant code","type":"string"},"signKey":{"description":"Panda Gateway sign key","format":"password","type":"string"}},"required":["merchantCode","apiCode","signKey"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Panda Gateway config"},"ParentTransactionLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["parentTransaction"],"type":"string"}},"required":["rel"],"type":"object"},"PayPal":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"merchantIdInPayPal":{"description":"PayPal Gateway merchant id","type":"string"},"redirectUrl":{"description":"PayPal Gateway redirect url","format":"url","type":"string"}},"required":["merchantIdInPayPal","redirectUrl"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"PayPal Gateway config"},"PayPalAccount":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/CustomerLink"},{"$ref":"#/components/schemas/ApprovalUrlLink"}]},"minItems":1,"readOnly":true,"type":"array"},"billingAddress":{"allOf":[{"$ref":"#/components/schemas/ContactObject"}],"description":"The Customer's Billing Address."},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"PayPal Account created time"},"customFields":{"$ref":"#/components/schemas/ResourceCustomFields"},"customerId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The Customer's ID."},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The PayPal identifier string","readOnly":true},"status":{"description":"PayPal Account status","enum":["inactive","active","deactivated"],"readOnly":true,"type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"PayPal Account updated time"},"username":{"description":"PayPal username.","type":"string"}},"required":["customerId","billingAddress"],"type":"object"},"Payeezy":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"apiKey":{"description":"API Key","type":"string"},"apiSecret":{"description":"API Secret","format":"password","type":"string"},"merchantId":{"description":"Payeezy Merchant ID","type":"string"},"merchantToken":{"description":"Merchant Token","format":"password","type":"string"}},"required":["merchantId","merchantToken","apiKey","apiSecret"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Payeezy Gateway config"},"Payflow":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"description":"Payflow credentials object","properties":{"password":{"description":"The password you defined while registering for the account.","format":"password","type":"string"},"user":{"description":"If you set up one or more additional users on the account, this value is the ID of the user authorized to process transactions. If, however, you have not set up additional users, USER has the same value as VENDOR","type":"string"},"vendor":{"description":"Your merchant login ID created when you registered for the account.","type":"string"}},"required":["user","vendor","password"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Payflow config"},"Payment":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/WebsiteLink"},{"$ref":"#/components/schemas/TransactionLink"},{"$ref":"#/components/schemas/ApprovalUrlLink"},{"$ref":"#/components/schemas/LeadSourceLink"}]},"minItems":1,"readOnly":true,"type":"array"},"amount":{"description":"The payment amount","format":"double","type":"number"},"billingAddress":{"allOf":[{"$ref":"#/components/schemas/ContactObject"}],"description":"Billing Address"},"createdBy":{"description":"The process that created this payment","type":"string"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Payment created time"},"currency":{"description":"The payment currency ISO Alpha code","type":"string"},"customFields":{"$ref":"#/components/schemas/ResourceCustomFields"},"customerId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The customer identifier string"},"description":{"description":"The payment description","maxLength":255,"type":"string"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The payment identifier string","readOnly":true},"invoiceIds":{"description":"The array of invoice identifiers","items":{"$ref":"#/components/schemas/ResourceId"},"type":"array"},"paymentInstrument":{"$ref":"#/components/schemas/PaymentInstrument"},"result":{"description":"Payment result","enum":["approved","declined","canceled","unknown"],"readOnly":true,"type":"string"},"retriedPaymentId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The retried payment ID","readOnly":true},"retryInstruction":{"$ref":"#/components/schemas/PaymentRetry"},"retryNumber":{"description":"The position in the sequence of retries","readOnly":true,"type":"integer"},"riskMetadata":{"allOf":[{"$ref":"#/components/schemas/RiskMetadata"}],"description":"Risk metadata"},"scheduledTime":{"description":"The time the payment is scheduled for collection","format":"date-time","type":"string"},"status":{"description":"Payment status","enum":["scheduled","queued","in-progress","incomplete","waiting-gateway","suspended","completed"],"readOnly":true,"type":"string"},"updatedBy":{"description":"The process that updated this payment","type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Payment updated time"},"websiteId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The website identifier string"}},"required":["websiteId","customerId","currency","amount"],"type":"object"},"PaymentCard":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/CustomerLink"},{"$ref":"#/components/schemas/AuthTransactionLink"}]},"minItems":1,"readOnly":true,"type":"array"},"bankCountry":{"description":"Payment Card bank country","readOnly":true,"type":"string"},"bankName":{"description":"Payment Card bank name","readOnly":true,"type":"string"},"billingAddress":{"allOf":[{"$ref":"#/components/schemas/ContactObject"}],"description":"The Billing Address. Required if card is creating not from Token"},"bin":{"description":"The card's bin (the PAN's first 6 digits)","format":"bin","readOnly":true,"type":"string"},"brand":{"description":"Payment Card brand","enum":["Visa","MasterCard","American Express","Discover","Maestro","Solo","Electron","JCB","Voyager","Diners Club","Switch","Laser","China UnionPay","AstroPay Card"],"readOnly":true,"type":"string"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Card created time"},"customFields":{"$ref":"#/components/schemas/ResourceCustomFields"},"customerId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The Customer's ID. Required if card is creating not from Token"},"cvv":{"description":"Card's cvv (card verification value). Required if card is creating not from Token","type":"string"},"expMonth":{"description":"Card's expiry month. Required if card is creating not from Token","type":"integer"},"expYear":{"description":"Card's expiry year. Required if card is creating not from Token","type":"integer"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The card identifier string","readOnly":true},"last4":{"description":"The PAN's last 4 digits","readOnly":true,"type":"string"},"pan":{"description":"The card PAN (Primary Account Number). Required if card is creating not from Token","type":"string"},"panFingerprint":{"description":"A unique value to identify the PAN regardless of expiry","readOnly":true,"type":"string"},"status":{"description":"Payment Card status","enum":["active","expired","inactive","deactivated","pending","verification-needed"],"readOnly":true,"type":"string"},"stickyGatewayAccountId":{"description":"Default Gateway Account ID used for transactions","readOnly":true,"type":"string"},"token":{"description":"PaymentCardToken. Use without any other fields","type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Card updated time"}},"type":"object"},"PaymentCardLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["paymentCard"],"type":"string"}},"required":["rel"],"type":"object"},"PaymentInstrument":{"discriminator":{"propertyName":"method"},"properties":{"method":{"$ref":"#/components/schemas/Method"}},"required":["method"],"type":"object"},"PaymentInstrumentValidation":{"properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"actionCode":{"description":"Action code","readOnly":true,"type":"string"},"avsResult":{"description":"Address verification result","readOnly":true,"type":"string"},"billingAddress":{"allOf":[{"$ref":"#/components/schemas/ContactObject"}],"description":"Billing address."},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Payment instrument validation created time."},"cvvResult":{"description":"CVV result","readOnly":true,"type":"string"},"expMonth":{"description":"Payment card's expiry month.","readOnly":true,"type":"integer"},"expYear":{"description":"Payment card's expiry year.","readOnly":true,"type":"integer"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Payment instrument validation ID","readOnly":true},"method":{"description":"Payment method","type":"string"},"paymentInstrumentId":{"description":"Payment instrument ID","type":"string"},"responseCode":{"description":"Response code","readOnly":true,"type":"string"}},"required":["method","paymentInstrumentId"],"type":"object"},"PaymentLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["payment"],"type":"string"}},"required":["rel"],"type":"object"},"PaymentRetry":{"properties":{"afterAttemptPolicy":{"description":"The policy on the attempt finishes","enum":["none","change-subscription-renewal-time"],"type":"string"},"afterRetryEndPolicy":{"description":"The policy on the retry ends","enum":["none","cancel-subscription"],"type":"string"},"attempts":{"items":{"properties":{"paymentInstruction":{"$ref":"#/components/schemas/AmountAdjustment"},"scheduleInstruction":{"$ref":"#/components/schemas/CommonScheduleInstruction"}},"required":["scheduleInstruction","paymentInstruction"],"type":"object"},"minItems":1,"type":"array"}},"required":["attempts","afterAttemptPolicy","afterRetryEndPolicy"],"type":"object"},"PaymentToken":{"properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"billingAddress":{"allOf":[{"$ref":"#/components/schemas/ContactObject"}],"description":"The Address. Required if bank account is not created from Token"},"fingerprint":{"description":"Device fingerprint hash","type":"string"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The token identifier string","readOnly":true},"leadSource":{"$ref":"#/components/schemas/LeadSource"},"method":{"description":"The payment method","enum":["payment-card","ach"],"type":"string"},"paymentInstrument":{"$ref":"#/components/schemas/PaymentTokenInstrument"}},"required":["method","paymentInstrument"],"type":"object"},"PaymentTokenInstrument":{"description":"Payment Token instrument object","properties":{"accountNumber":{"description":"AccountNumber, required if the method is `bank-account`","type":"integer"},"accountType":{"description":"Account Type","type":"string"},"bankName":{"description":"Bank name","type":"string"},"cvv":{"description":"The CVV/CVC of the payment card","type":"string"},"expMonth":{"description":"Card's expiry month, required if the method is `payment-card`","type":"integer"},"expYear":{"description":"Card's expiry year, required if the method is `payment-card`","type":"integer"},"pan":{"description":"The card PAN (Primary Account Number), required if the method is `payment-card`","type":"string"},"routingNumber":{"description":"Routing Number, required if the method is `bank-account`","type":"integer"}},"type":"object"},"Payr":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"clientId":{"description":"Payr Gateway client ID","type":"string"},"secretWord":{"description":"Payr Gateway secret word","format":"password","type":"string"}},"required":["clientId","secretWord"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Payr Gateway config"},"Payvision":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"avs":{"description":"Payvision Gateway avs","type":"boolean"},"delay":{"description":"Payvision Gateway delay","type":"integer"},"memberGuid":{"description":"Payvision Gateway member guid","format":"password","type":"string"},"memberId":{"description":"Payvision Gateway member id","type":"string"}},"required":["memberId","memberGuid","avs","delay"],"type":"object"},"mpi":{"$ref":"#/components/schemas/PayvisionMpis"}},"required":["gatewayConfig"],"type":"object"}],"description":"Payvision Gateway config"},"PayvisionMpi":{"allOf":[{"$ref":"#/components/schemas/PayvisionMpis"}],"description":"Payvision Integrated"},"PayvisionMpis":{"description":"Payvision Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["PayvisionMpi","CardinalCommerce","PaayMpi","Other"]}},"required":["name"],"type":"object"},"PermalinkLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["permalink"],"type":"string"}},"required":["rel"],"type":"object"},"Plan":{"properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Plan created time"},"currency":{"description":"Currency (three letter ISO 4217 code)","type":"string"},"currencySign":{"description":"Currency sign","readOnly":true,"type":"string"},"description":{"description":"The plan description (deprecated)","type":"string"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The plan identifier string","readOnly":true},"isActive":{"description":"If the plan is not active, customers cannot subscribe to the plan.","type":"boolean"},"name":{"description":"The plan name, displayed on invoices and receipts.","type":"string"},"pricing":{"$ref":"#/components/schemas/PlanPriceFormula"},"productId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The related product identifier string"},"productOptions":{"additionalProperties":{"type":"string"},"description":"Name-value pairs to specify the product options.","example":{"color":"red","size":"xxl"},"type":"object"},"recurringInterval":{"allOf":[{"$ref":"#/components/schemas/PlanPeriod"},{"properties":{"limit":{"description":"The number of invoices this subscription will generate (if 1, it will not generate any beyond the initial subscription creation). For example, set this property to `12`, when the `periodUnit` is month and the `periodLength` is 1, for a 1 year contract billed monthly.","type":"integer"}},"type":"object"}],"description":"The billing interval. For a one-time item, use `null`."},"richDescription":{"description":"The plan rich description - supports HTML (deprecated)","type":"string"},"setup":{"description":"The setup. Set `null` if no setup.","properties":{"price":{"description":"The price of a setup - 0 is a valid value (for free)","format":"double","type":"number"}},"required":["price"],"type":"object"},"trial":{"description":"The trial. Set `null` if no trial.","properties":{"period":{"$ref":"#/components/schemas/PlanPeriod"},"price":{"description":"The price of the trial. For a free trial, use `0`.","format":"double","type":"number"}},"required":["price","period"],"type":"object"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Plan updated time"}},"required":["name","currency","productId","pricing"],"type":"object"},"PlanLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["plan"],"type":"string"}},"required":["rel"],"type":"object"},"PlanPeriod":{"properties":{"length":{"description":"The length of time","type":"integer"},"unit":{"description":"The unit of time","enum":["day","week","month","year"],"type":"string"}},"required":["unit","length"],"type":"object"},"PlanPriceFormula":{"discriminator":{"propertyName":"formula"},"properties":{"formula":{"description":"The price formula determines what algorithm is used to calculate the invoice price based on a few factors,\n- the quantity in the subscription (which may be variable if usage pricing, otherwise determined when creating the subscription)\n- the price brackets data\n\nTo determine which formula is correct, please see the price formula documentation.\n","enum":["fixed-fee","flat-rate","stairstep","tiered","volume"],"type":"string"}},"required":["formula"],"type":"object"},"Plugnpay":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"publisher-name":{"description":"Plugnpay Gateway member id","type":"string"},"publisher-password":{"description":"Plugnpay Gateway avs","format":"password","type":"string"}},"required":["publisher-name","publisher-password"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Plugnpay Gateway config"},"PriceBasedShippingRate":{"properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"currency":{"description":"Currency (three letter ISO 4217 code)","type":"string"},"maxOrderSubtotal":{"description":"Maximum order subtotal for which this shipping rate is applicable (NULL if no maximum)","format":"double","type":"number"},"minOrderSubtotal":{"default":0,"description":"Minimum order subtotal for which this shipping rate is applicable, defaults to 0.00","format":"double","type":"number"},"name":{"description":"The shipping rate name","maxLength":255,"type":"string"},"price":{"description":"The shipping price - 0 is a valid value (for free)","format":"double","type":"number"}},"required":["name","currency","price"],"type":"object"},"Product":{"description":"Products include digital goods, services, and physical goods.\nProducts appear on invoice line items. If you set a tax category identifier,\ntaxes will be calculated upon invoice generation. If it is shippable,\nshipping will be calculated upon invoice generation. Pricing and \nvariations are set within Plans.\n","properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"accountingCode":{"description":"The product accounting code","example":4010,"type":"string"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The product created time"},"customFields":{"$ref":"#/components/schemas/ResourceCustomFields"},"description":{"description":"The product description","maxLength":512,"type":"string"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The product identifier string","example":"membership","readOnly":true},"name":{"description":"The product name","example":"Premium membership","maxLength":255,"type":"string"},"options":{"description":"The product options such as Color, Size, etc. The product options definition does not include option values. Those are defined within the Plans.","items":{"type":"string"},"type":"array"},"requiresShipping":{"description":"If the product requires shipping, shipping calculations will be applied","example":false,"type":"boolean"},"taxCategoryId":{"description":"The product's tax category identifier string","enum":[99999,20010,40030,51020,51010,31000,30070],"type":"string"},"unitLabel":{"default":"unit","description":"The unit label, such as per `seat` or per `unit`.","example":"seat","maxLength":50,"type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The product updated time"}},"required":["name"],"type":"object"},"RPN":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"key":{"description":"RPN Key","format":"password","type":"string"},"mid":{"description":"RPN MID","type":"string"}},"required":["mid","key"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"RPN Gateway config"},"Reactivation":{"properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"cancellationId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Identifier of the related cancellation","readOnly":true},"createdTime":{"description":"The time of resource creation (when it is posted).","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"Reactivation reason description in free form","maxLength":255,"type":"string"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Reactivation identifier","readOnly":true},"renewalTime":{"description":"The time of the next subscription renewal. If omitted then it is computed from the current time.\nIf the subscription is canceled but active it is ignored, so the next renewal will happen as scheduled.\n","format":"date-time","type":"string"},"subscriptionId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Identifier of the reactivated subscription"}},"required":["subscriptionId"],"type":"object"},"RealTime":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"clientId":{"description":"RealTime Gateway client ID","type":"string"},"secretWord":{"description":"RealTime Gateway secret word","format":"password","type":"string"}},"required":["clientId","secretWord"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"RealTime Gateway config"},"Realex":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"account":{"description":"Realex Gateway account","type":"string"},"merchantId":{"description":"Realex Gateway merchant id","type":"string"},"rebatePassword":{"description":"Realex Gateway rebate password","format":"password","type":"string"},"secretKey":{"description":"Realex Gateway secret key","format":"password","type":"string"}},"required":["merchantId","secretKey","rebatePassword","account"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Realex Gateway config"},"RebillyProcessor":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"mpi":{"$ref":"#/components/schemas/RebillyProcessorMpis"}},"type":"object"}],"description":"RebillyProcessor Gateway config"},"RebillyProcessorMpi":{"allOf":[{"$ref":"#/components/schemas/RebillyProcessorMpis"}],"description":"RebillyProcessor Integrated"},"RebillyProcessorMpis":{"description":"RebillyProcessorMpis Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["RebillySandboxMpi"]}},"required":["name"],"type":"object"},"RedemptionRestriction":{"description":"Redemption restrictions","discriminator":{"propertyName":"type"},"properties":{"type":{"description":"Redemption's additional restriction type","enum":["discounts-per-redemption","minimum-order-amount","restrict-to-invoices","restrict-to-plans","restrict-to-subscriptions"],"type":"string"}},"required":["type"],"type":"object"},"RedirectUrls":{"description":"The redirect URIs","properties":{"cancel":{"format":"url","type":"string"},"decline":{"format":"url","type":"string"},"error":{"format":"url","type":"string"},"success":{"format":"url","type":"string"}},"required":["error","success","decline","cancel"],"type":"object"},"Redsys":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"merchantCode":{"description":"Redsys Gateway merchant code","format":"password","type":"string"},"secretCode":{"description":"Redsys Gateway secret code","format":"password","type":"string"}},"required":["merchantCode","secretCode"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Redsys Gateway config"},"RefundUrlLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["refundUrl"],"type":"string"}},"required":["rel"],"type":"object"},"ResetPasswordToken":{"properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"credential":{"description":"Token's credential ID","type":"string"},"expiredTime":{"description":"Password expired time","format":"date-time","type":"string"},"password":{"description":"Token's password (only for POST)","format":"password","type":"string"},"token":{"description":"The token's identifier string","readOnly":true,"type":"string"},"username":{"description":"The token's username","type":"string"}},"required":["username","password"],"type":"object"},"ResourceCustomFields":{"description":"\"Custom Fields list as a map `{\"custom field name\": \"custom field value\", ...}\"`.\nThe format must follow the saved format (see Custom Fields section for the formats).\n","type":"object"},"ResourceId":{"description":"The resource ID. Defaults to UUID v4","example":"4f6cf35x-2c4y-483z-a0a9-158621f77a21","maxLength":50,"type":"string"},"RetriedTransactionLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["retriedTransaction"],"type":"string"}},"required":["rel"],"type":"object"},"RiskMetadata":{"properties":{"accuracyRadius":{"description":"Accuracy radius for specified ipAddress (kilometers)","readOnly":true,"type":"integer"},"city":{"description":"City for specified ipAddress","example":"New York","readOnly":true,"type":"string"},"country":{"description":"Country ISO Alpha-2 code for specified ipAddress","example":"US","maxLength":2,"readOnly":true,"type":"string"},"distance":{"description":"Distance between IP Address and Billing Address geolocation (kilometers)","readOnly":true,"type":"integer"},"fingerprint":{"description":"The fingerprint","type":"string"},"httpHeaders":{"additionalProperties":{"type":"string"},"description":"HTTP headers","example":{"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","User-Agent":"Mozilla/5.0"},"type":"object"},"ipAddress":{"description":"The customer's IP","format":"ipv4","type":"string"},"isHosting":{"description":"True if customer's ip address is related to hosting","readOnly":true,"type":"boolean"},"isProxy":{"description":"True if customer's ip address is related to proxy","readOnly":true,"type":"boolean"},"isTor":{"description":"True if customer's ip address is related to TOR","readOnly":true,"type":"boolean"},"isVpn":{"description":"True if customer's ip address is related to VPN","readOnly":true,"type":"boolean"},"isp":{"description":"Internet Service Provider name, if available","readOnly":true,"type":"string"},"latitude":{"description":"Latitude for specified ipAddress","format":"double","readOnly":true,"type":"number"},"longitude":{"description":"Longitude for specified ipAddress","format":"double","readOnly":true,"type":"number"},"postalCode":{"description":"Postal code for specified ipAddress","maxLength":10,"readOnly":true,"type":"string"},"score":{"description":"Risk score computed per all the factors","readOnly":true,"type":"integer"},"timeZone":{"description":"Time zone for specified ipAddress","example":"America/New_York","readOnly":true,"type":"string"},"vpnServiceName":{"description":"VPN service name, if available","readOnly":true,"type":"string"}},"type":"object"},"Rotessa":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"description":"Rotessa credentials object","properties":{"apiKey":{"description":"Rotessa api key","format":"password","type":"string"},"delay":{"description":"Rotessa Gateway time delay for them to process transaction","type":"integer"}},"required":["apiKey","delay"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Rotessa config"},"RuleSetHistoryLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["history"],"type":"string"}},"required":["rel"],"type":"object"},"RuleSetVersionLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["rules"],"type":"string"}},"required":["rel"],"type":"object"},"SMSVoucher":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"AppId":{"description":"SMSVoucher AppId","type":"string"}},"required":["AppId"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"SMSVoucher Gateway config"},"Sagepay":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"M_ID":{"description":"Sagepay Gateway merchant ID","type":"string"},"M_KEY":{"description":"Sagepay Gateway merchant key","format":"password","type":"string"}},"required":["M_ID","M_KEY"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Sagepay Gateway config"},"SelfLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["self"],"type":"string"}},"required":["rel"],"type":"object"},"ServerTimestamp":{"description":"Read-only timestamp, automatically assigned on back-end.","format":"date-time","readOnly":true,"type":"string"},"ShippingZone":{"properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"countries":{"description":"Countries covered by the shipping zone. A country can only belong to one shipping zone (no overlapping).\nThis property can be empty or null to create a default shipping zone for countries that were not specified in other zones.\n","items":{"description":"Country ISO Alpha-2 code","pattern":"^[A-Z]{2}$","type":"string"},"type":"array"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The shipping zone created time"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The shipping zone identifier string","readOnly":true},"isDefault":{"description":"Is this Shipping Zone default","readOnly":true},"name":{"description":"The shipping zone name","maxLength":255,"type":"string"},"rates":{"description":"Price-based shipping rate instructions","items":{"allOf":[{"$ref":"#/components/schemas/PriceBasedShippingRate"}],"description":"Price based shipping rate instruction"},"type":"array"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The shipping zone updated time"}},"required":["name"],"type":"object"},"SignedLinkLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["signedLink"],"type":"string"}},"required":["rel"],"type":"object"},"StaticGateway":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"type":"object"}],"description":"StaticGateway Gateway config"},"Stripe":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"redirectUrl":{"description":"Stripe Gateway redirect url","format":"url","type":"string"}},"required":["redirectUrl"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"Stripe Gateway config"},"Subscription":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/CustomerLink"},{"$ref":"#/components/schemas/PlanLink"},{"$ref":"#/components/schemas/WebsiteLink"},{"$ref":"#/components/schemas/LeadSourceLink"}]},"minItems":1,"readOnly":true,"type":"array"},"activationTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Subscription activation time"},"autopay":{"default":true,"description":"Autopay determines if a payment attempt will be automatic","type":"boolean"},"billingAddress":{"allOf":[{"$ref":"#/components/schemas/ContactObject"}],"description":"Billing address"},"cancelCategory":{"description":"Cancel category","enum":["billing-failure","did-not-use","did-not-want","missing-features","bugs-or-problems","do-not-remember","risk-warning","contract-expired","too-expensive","never-started","switched-plan","other"],"readOnly":true,"type":"string"},"cancelDescription":{"description":"Cancel reason description in free form","maxLength":255,"readOnly":true,"type":"string"},"canceledBy":{"description":"Canceled by","enum":["merchant","customer","rebilly"],"readOnly":true,"type":"string"},"canceledTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Subscription canceled time"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Subscription created time"},"customFields":{"$ref":"#/components/schemas/ResourceCustomFields"},"customerId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Unique id for each customer"},"deliveryAddress":{"allOf":[{"$ref":"#/components/schemas/ContactObject"}],"description":"Delivery address"},"endTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Subscription end time"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The Subscription identifier string","readOnly":true},"inTrial":{"description":"True if the subscription is currently in a trial period","readOnly":true,"type":"boolean"},"initialInvoiceId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Unique id for the initial invoice"},"items":{"items":{"properties":{"planId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Unique id for each plan"},"quantity":{"description":"Number of units of the product on the given plan","type":"integer"}},"required":["planId"],"type":"object"},"minItems":1,"type":"array"},"lineItemSubtotal":{"description":"Subtotal of line items in this subscription (signed value). If credits exceed debits, it will be a negative number.","example":49.95,"readOnly":true,"type":"number"},"lineItems":{"description":"Subscription line items which queue until the next renewal (or interim) invoice is issued for the subscription.","items":{"description":"Line item","properties":{"createdTime":{"description":"Date-time when the item was added to the subscription","format":"date-time","type":"string"},"description":{"description":"Description of line item","type":"string"},"periodEndTime":{"description":"Date-time when the period ends for this item","format":"date-time","type":"string"},"periodStartTime":{"description":"Date-time when the period begins for this item","format":"date-time","type":"string"},"quantity":{"description":"Quantity of line item","example":1,"type":"integer"},"type":{"description":"Type of line item","enum":["debit","credit"],"type":"string"},"unitPriceAmount":{"description":"Unit price in minor unit coins of the line item","example":4995,"type":"integer"},"unitPriceCurrency":{"description":"Currency ISO code","example":"USD","type":"string"}},"type":"object"},"readOnly":true,"type":"array"},"rebillNumber":{"description":"The current period number","readOnly":true,"type":"integer"},"renewalTime":{"description":"Subscription renewal time","format":"date-time","type":"string"},"riskMetadata":{"allOf":[{"$ref":"#/components/schemas/RiskMetadata"}],"description":"Risk metadata"},"startTime":{"description":"Subscription start time","format":"date-time","type":"string"},"status":{"description":"Subscription status is deprecated and the values will change to `active`, `canceled`.","enum":["Active","Will become active at a future date","Active but set to cancel at next rebill date","Cancelled","Inactive","Suspended"],"readOnly":true,"type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Subscription updated time"},"websiteId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Unique id for each website"}},"required":["customerId","items","websiteId"],"type":"object"},"SubscriptionChange":{"properties":{"effectiveTime":{"description":"The date from which the renewal time (for `reset` operations) and proration calculations are made. If omitted, it will default to the current time.","format":"date-time","type":"string"},"planId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The plan identifier string"},"preview":{"default":false,"description":"If set to true, it will not change the subscription. It allows for a way to preview the changes that would be made to a subscription.","type":"boolean"},"prorated":{"description":"Whether or not to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period.\nIn addition, if the `renewalTime` is retained (by setting the `renewalPolicy` to `retain`), then a pro rata debit will occur as well,\nfor the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period size.\n","type":"boolean"},"renewalPolicy":{"description":"The value determines whether the subscription retains its current `renewalTime` or resets it to a newly calculated `renewalTime`.","enum":["reset","retain"],"type":"string"}},"required":["planId","renewalPolicy","prorated"],"type":"object"},"SubscriptionInvoice":{"properties":{"transactionId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"If present, applies a payment to the invoice created. If the payment is for the invoice total, it would be marked as paid."}},"type":"object"},"SubscriptionLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["subscription"],"type":"string"}},"required":["rel"],"type":"object"},"ThreeDSecure":{"properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/SelfLink"},"minItems":1,"readOnly":true,"type":"array"},"amount":{"description":"Transaction amount","format":"double","type":"number"},"cavv":{"description":"The 3D Secure entry cardholder authentication verification value","type":"string"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The 3D Secure entry created time"},"currency":{"description":"The currency three letter code","type":"string"},"customerId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Related customer ID"},"eci":{"description":"The 3D Secure entry electronic commerce indicator","type":"integer"},"enrolled":{"description":"Is the cardholder enrolled in 3DSecure","enum":["Y","N","U"],"type":"string"},"enrollmentEci":{"description":"The 3D Secure entry enrollment eci","type":"string"},"gatewayAccountId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Related gateway account ID"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The 3D Secure entry identifier string","readOnly":true},"payerAuthResponseStatus":{"description":"The 3D Secure entry Auth Response Status","enum":["Y","N","U","A"],"type":"string"},"paymentCardId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Related payment card ID"},"signatureVerification":{"description":"If signature was verified","enum":["Y","N"],"type":"string"},"websiteId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Related Website ID"},"xid":{"description":"The 3D Secure entry transaction Id","type":"string"}},"required":["enrolled","enrollmentEci","customerId","gatewayAccountId","paymentCardId","websiteId","currency","amount"],"type":"object"},"ThreeDSecureResult":{"properties":{"authenticated":{"description":"The 3D Secure entry Auth Response Status","enum":["yes","no","not applicable","attempted"],"type":"string"},"enrolled":{"description":"Is the cardholder enrolled in 3D Secure","enum":["yes","no","invalid card/timeout","unavailable"],"type":"string"},"liability":{"enum":["protected","not protected","protected (attempt)"],"type":"string"}},"readOnly":true,"required":["enrolled","authenticated","liability"],"type":"object"},"Time":{"format":"date-time","pattern":"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](Z(\\+|\\-)([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9])?$","type":"string"},"TimeUnit":{"enum":["second","seconds","minute","minutes","hour","hours","day","days","month","months","year","years"],"type":"string"},"Transaction":{"properties":{"3ds":{"allOf":[{"$ref":"#/components/schemas/ThreeDSecureResult"}]},"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/WebsiteLink"},{"$ref":"#/components/schemas/CustomerLink"},{"$ref":"#/components/schemas/GatewayAccountLink"},{"$ref":"#/components/schemas/PaymentCardLink"},{"$ref":"#/components/schemas/ParentTransactionLink"},{"$ref":"#/components/schemas/RetriedTransactionLink"},{"$ref":"#/components/schemas/LeadSourceLink"},{"$ref":"#/components/schemas/ApprovalUrlLink"},{"$ref":"#/components/schemas/CancelUrlLink"},{"$ref":"#/components/schemas/RefundUrlLink"},{"$ref":"#/components/schemas/DisputeLink"}]},"minItems":1,"readOnly":true,"type":"array"},"acquirerName":{"allOf":[{"description":"The acquirer name","enum":["Alipay","AIB","ApcoPay","AstroPay Card","Ipay Options","B+S","Bambora","Bank of America","Bank of Moscow","Bank of Rebilly","Bank One","BMO Harris Bank","Borgun","BraintreePayments","Cardknox","Catalunya Caixa","Chase","ChinaUnionPay","CIM","Credorax","Cryptonator","EcorePay","Elavon","EMS","Fifth Third Bank","First Data Buypass","First Data Nashville","First Data North","First Data Omaha","FinTecSystems","Flexepin","Forte","FundSend","Global East","Gpaysafe","Heartland","HSBC","iCheque","Ilixium","Ingenico","Intuit","Jeton","Masapay","Merrick","Mission Valley Bank","Moneris","NATWEST","NMI","OchaPay","Other","Panamerican","ParamountEft","Panda Bank","PayPal","Payr","Payvision","Peoples Trust Company","Privatbank","QQPay","RBC","RBS WorldPay","RealTime","RebillyProcessor","Rotessa","Skrill","SMSVoucher","State Bank of Mauritius","Stripe","TBI","TrustPay","TSYS","UPayCard","Vantiv","VoicePay","WeChat Pay","Wells Fargo","Wing Hang Bank","Wirecard","WorldPay"],"type":"string"}],"description":"Acquirer name, available only when transaction use gateway, else null","readOnly":true},"amount":{"description":"The transactions's amount","format":"double","readOnly":true,"type":"number"},"billingAddress":{"allOf":[{"$ref":"#/components/schemas/ContactObject"}],"description":"Billing Address"},"bin":{"description":"Payment Card BIN","format":"bin","readOnly":true,"type":"string"},"childTransactions":{"description":"The child transaction IDs","items":{"$ref":"#/components/schemas/ResourceId"},"readOnly":true,"type":"array"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Transaction created time"},"currency":{"description":"The transactions's currency","readOnly":true,"type":"string"},"customFields":{"$ref":"#/components/schemas/ResourceCustomFields"},"customerId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Customer's ID","readOnly":true},"dcc":{"description":"Dynamic Currency Conversion detailed information. Null if hasDcc is false","properties":{"base":{"description":"Initial amount and currency to convert from","properties":{"amount":{"format":"double","type":"number"},"currency":{"type":"string"}},"type":"object"},"outcome":{"description":"Dynamic Currency Conversion outcome","enum":["rejected","selected","unknown"],"type":"string"},"quote":{"description":"Suggested amount and currency to convert to","properties":{"amount":{"format":"double","type":"number"},"currency":{"type":"string"}},"type":"object"},"usdMarkup":{"description":"The amount of markup translated to USD","format":"double","type":"number"}},"readOnly":true,"type":"object"},"description":{"description":"The payment description","maxLength":255,"type":"string"},"gateway":{"description":"The related gateway information","properties":{"avsResponse":{"description":"The AVS gateway's response","properties":{"code":{"description":"The response code","type":"string"},"message":{"description":"The response message","type":"string"},"originalCode":{"description":"The raw response code","type":"string"},"originalMessage":{"description":"The raw response message","type":"string"}},"type":"object"},"cvvResponse":{"description":"The CVV gateway's response","properties":{"code":{"description":"The response code","type":"string"},"message":{"description":"The response message","type":"string"},"originalCode":{"description":"The raw response code","type":"string"},"originalMessage":{"description":"The raw response message","type":"string"}},"type":"object"},"response":{"description":"The gateway's response","properties":{"code":{"description":"The gateway's response code","type":"string"},"message":{"description":"The gateway's response message","type":"string"},"originalCode":{"description":"The raw, unmapped gateway's response code","type":"string"},"originalMessage":{"description":"The raw, unmapped gateway's response message","type":"string"},"type":{"description":"The gateway's response type","type":"string"}},"type":"object"}},"readOnly":true,"type":"object"},"gatewayAccountId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The transactions's Gateway Account ID","readOnly":true},"gatewayName":{"allOf":[{"description":"The payment gateway name","enum":["A1Gateway","AmexVPC","ApcoPay","AstroPay","AstroPayCard","AuthorizeNet","Bambora","BraintreePayments","Cardknox","Cashflows","Cayan","Chase","Credorax","Cryptonator","DataCash","Dengi","EcorePay","Elavon","eMerchantPay","Flexepin","FinTecSystems","FundSend","Forte","GET","GlobalOnePay","Gpaysafe","iCheque","Ilixium","Ingenico","Intuit","IpayOptions","JetPay","Jeton","Moneris","MtaPay","NMI","OchaPay","Panamerican","ParamountEft","PandaGateway","Payeezy","Payflow","PayPal","Payr","Paysafe","Payvision","Plugnpay","Realex","Realtime","RebillyProcessor","Redsys","Rotessa","RPN","Sagepay","Skrill","SMSVoucher","StaticGateway","Stripe","UPayCard","USAePay","VantivLitle","vegaaH","Walpay","Wirecard","Worldpay"],"type":"string"}],"description":"Payment Gateway name, available only when transaction use gateway, else null","readOnly":true},"gatewayTransactionId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The gateway's transaction ID","readOnly":true},"hadDiscrepancy":{"description":"True if the transaction has been updated due to a disprepancy with its source of truth","readOnly":true,"type":"boolean"},"has3ds":{"readOnly":true,"type":"boolean"},"hasDcc":{"description":"True if transaction has Dynamic Currency Conversion applied","readOnly":true,"type":"boolean"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The transaction identifier string","readOnly":true},"invoiceIds":{"description":"The invoice IDs related to transaction","items":{"$ref":"#/components/schemas/ResourceId"},"readOnly":true,"type":"array"},"isDisputed":{"description":"True if transaction is disputed","readOnly":true,"type":"boolean"},"isRebill":{"readOnly":true,"type":"boolean"},"isReconciled":{"description":"True if the transaction has been verified with gateway batch data","readOnly":true,"type":"boolean"},"isRetry":{"description":"True if this transaction is retry.","readOnly":true,"type":"boolean"},"method":{"allOf":[{"$ref":"#/components/schemas/Method"}],"description":"Payment Method"},"orderId":{"description":"The transactions's order ID","type":"string"},"parentTransactionId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The transactions's parent ID","readOnly":true},"paymentInstrument":{"$ref":"#/components/schemas/PaymentInstrument"},"planIds":{"description":"The plan IDs related to transaction's subscription(s)","items":{"$ref":"#/components/schemas/ResourceId"},"readOnly":true,"type":"array"},"processedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Transaction processed time"},"rebillNumber":{"description":"The transactions's rebill number","readOnly":true,"type":"integer"},"redirectUrls":{"$ref":"#/components/schemas/RedirectUrls"},"result":{"description":"Transaction result","enum":["abandoned","approved","canceled","declined","unknown"],"readOnly":true,"type":"string"},"retriedTransactionId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The retried transaction ID","readOnly":true},"retriesResult":{"description":"Retries sequence result","enum":["approved","canceled","declined","scheduled"],"readOnly":true,"type":"string"},"retryInstruction":{"$ref":"#/components/schemas/PaymentRetry"},"retryNumber":{"description":"The position in the sequence of retries","readOnly":true,"type":"integer"},"riskMetadata":{"allOf":[{"$ref":"#/components/schemas/RiskMetadata"}],"description":"Risk metadata"},"riskScore":{"description":"The transactions's risk score","readOnly":true,"type":"integer"},"scheduledTime":{"description":"The time the transaction is scheduled for collection","format":"date-time","type":"string"},"status":{"description":"Transaction status","enum":["completed","connection-error","never-sent","pending","sending","suspended","timeout","waiting-capture","waiting-refund"],"readOnly":true,"type":"string"},"subscriptionIds":{"description":"The subscription IDs related to transaction's invoice(s)","items":{"$ref":"#/components/schemas/ResourceId"},"readOnly":true,"type":"array"},"type":{"description":"Transaction type","enum":["authorize","capture","credit","refund","sale","void"],"readOnly":true,"type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Transaction updated time"},"velocity":{"description":"The number of transactions by the same customer in the past 24 hours","type":"integer"},"websiteId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"Website's ID","readOnly":true}},"type":"object"},"TransactionGatewayLog":{"properties":{"_links":{"description":"The links related to resource","items":{"$ref":"#/components/schemas/TransactionLink"},"minItems":1,"type":"array"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"The log entry created time"},"duration":{"description":"The request time, msec","type":"integer"},"headers":{"description":"The request headers","items":{"type":"string"},"type":"array"},"request":{"description":"The request body","type":"string"},"response":{"description":"The response body","type":"string"},"url":{"description":"The request URL","type":"string"}},"readOnly":true,"type":"object"},"TransactionLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["transaction"],"type":"string"}},"required":["rel"],"type":"object"},"TransactionRefund":{"properties":{"amount":{"description":"Refund amount","format":"double","type":"number"}},"required":["amount"],"type":"object"},"UPayCard":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"key":{"description":"merchant key","format":"password","type":"string"},"receiver_account":{"description":"merchant receiver account","type":"string"},"secret":{"description":"merchant secret","format":"password","type":"string"}},"required":["receiver_account","key","secret"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"UPayCard Gateway config"},"USAePay":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"pin":{"description":"USAePay Gateway pin","format":"password","type":"string"},"sourceKey":{"description":"USAePay Gateway source key","format":"password","type":"string"}},"required":["sourceKey","pin"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"USAePay Gateway config"},"UpdatePassword":{"properties":{"currentPassword":{"description":"Current user's password - used when requesting password change","format":"password","type":"string"},"newPassword":{"description":"New user's password - used when requesting password change","format":"password","type":"string"}},"type":"object"},"VantivLitle":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"merchantId":{"description":"VantivLitle Gateway merchant ID","type":"string"},"password":{"description":"VantivLitle Gateway password","format":"password","type":"string"},"username":{"description":"VantivLitle Gateway username","type":"string"}},"required":["username","password","merchantId"],"type":"object"},"mpi":{"$ref":"#/components/schemas/VantivLitleMpis"}},"required":["gatewayConfig"],"type":"object"}],"description":"VantivLitle Gateway config"},"VantivLitleMpis":{"description":"VantivLitle Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["PaayMpi","Other"]}},"required":["name"],"type":"object"},"Walpay":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"merchantName":{"description":"Walpay Gateway merchant name","type":"string"},"merchantPin":{"description":"Walpay Gateway merchant pin","format":"password","type":"string"}},"required":["merchantName","merchantPin"],"type":"object"},"mpi":{"$ref":"#/components/schemas/WalpayMpis"}},"required":["gatewayConfig"],"type":"object"}],"description":"Walpay Gateway config"},"WalpayMpis":{"description":"WalpayMpis Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["PaayMpi","Other"]}},"required":["name"],"type":"object"},"Website":{"properties":{"_links":{"description":"The links related to resource","items":{"anyOf":[{"$ref":"#/components/schemas/SelfLink"},{"$ref":"#/components/schemas/NotesLink"}]},"minItems":1,"readOnly":true,"type":"array"},"createdTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Website created time"},"customFields":{"$ref":"#/components/schemas/ResourceCustomFields"},"id":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The website identifier string","readOnly":true},"name":{"description":"The website's name","type":"string"},"serviceEmail":{"description":"The website's customer service email address","format":"email","type":"string"},"servicePhone":{"description":"The website's customer service phone number","type":"string"},"updatedTime":{"allOf":[{"$ref":"#/components/schemas/ServerTimestamp"}],"description":"Website updated time"},"url":{"description":"The website's domain address","type":"string"}},"required":["name","url","servicePhone","serviceEmail"],"type":"object"},"WebsiteLink":{"allOf":[{"$ref":"#/components/schemas/NewLink"}],"properties":{"rel":{"description":"The link type","enum":["website"],"type":"string"}},"required":["rel"],"type":"object"},"Wirecard":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"businessSignature":{"description":"Wirecard Gateway merchant business case signature","format":"password","type":"string"},"delay":{"description":"Wirecard Gateway delay","type":"integer"},"merchantPassword":{"description":"Wirecard Gateway merchant password","format":"password","type":"string"},"merchantUsername":{"description":"Wirecard Gateway merchant username","type":"string"}},"required":["merchantUsername","merchantPassword","businessSignature","delay"],"type":"object"},"mpi":{"$ref":"#/components/schemas/WirecardMpis"}},"required":["gatewayConfig"],"type":"object"}],"description":"Wirecard Gateway config"},"WirecardMpi":{"allOf":[{"$ref":"#/components/schemas/WirecardMpis"}],"description":"Wirecard Integrated"},"WirecardMpis":{"description":"Wirecard Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["WirecardMpi"]}},"required":["name"],"type":"object"},"Worldpay":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"merchantCode":{"description":"Worldpay Gateway merchant code","format":"password","type":"string"},"merchantPassword":{"description":"Worldpay Gateway merchant password","format":"password","type":"string"}},"required":["merchantCode","merchantPassword"],"type":"object"},"mpi":{"$ref":"#/components/schemas/WorldpayMpis"}},"required":["gatewayConfig"],"type":"object"}],"description":"Worldpay Gateway config"},"WorldpayMpis":{"description":"Worldpay Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["PaayMpi","Other"]}},"required":["name"],"type":"object"},"ach":{"allOf":[{"$ref":"#/components/schemas/PaymentInstrument"},{"properties":{"bankAccountId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The bank account identifier string"},"gatewayAccountId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The payment gateway identifier string"}},"required":["bankAccountId"],"type":"object"}],"description":"ACH payment instrument object"},"and":{"allOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/logical"}],"description":"Logical AND","type":"object"},"auto":{"allOf":[{"$ref":"#/components/schemas/CommonScheduleInstruction"}]},"between":{"allOf":[{"$ref":"#/components/schemas/Condition"},{"properties":{"max":{"type":"string"},"min":{"type":"string"},"path":{"type":"string"}},"required":["path","min","max"],"type":"object"}],"description":"Between condition","type":"object"},"cash":{"allOf":[{"$ref":"#/components/schemas/PaymentInstrument"},{"properties":{"receivedBy":{"description":"The receiver's name","type":"string"}},"type":"object"}],"description":"Cash payment instrument object"},"compare":{"properties":{"path":{"type":"string"},"value":{"type":"string"}},"required":["path","value"],"type":"object"},"date-interval":{"allOf":[{"$ref":"#/components/schemas/CommonScheduleInstruction"},{"$ref":"#/components/schemas/CustomEventScheduleInstruction"},{"properties":{"duration":{"description":"The number of the units","minimum":1,"type":"integer"},"unit":{"$ref":"#/components/schemas/TimeUnit"}},"required":["duration","unit"],"type":"object"}]},"day-of-month":{"allOf":[{"$ref":"#/components/schemas/CommonScheduleInstruction"},{"$ref":"#/components/schemas/CustomEventScheduleInstruction"},{"properties":{"day":{"description":"The day of the month when event will be scheduled.\nBe aware if the month has less days,\nthe last day of the month will be selected.\n","maximum":31,"minimum":1,"type":"integer"},"time":{"$ref":"#/components/schemas/Time"}},"required":["day"],"type":"object"}]},"day-of-week":{"allOf":[{"$ref":"#/components/schemas/CommonScheduleInstruction"},{"$ref":"#/components/schemas/CustomEventScheduleInstruction"},{"properties":{"day":{"$ref":"#/components/schemas/DayOfWeek"},"time":{"$ref":"#/components/schemas/Time"},"week":{"default":"next","enum":["next","first-in-month","last-in-month"],"type":"string"}},"required":["day"],"type":"object"}]},"discount":{"allOf":[{"$ref":"#/components/schemas/AmountAdjustment"},{"properties":{"type":{"description":"The payment amount discount type","enum":["percent","fixed"],"type":"string"},"value":{"description":"The payment amount discount","format":"float","type":"number"}},"required":["value","type"],"type":"object"}]},"discounts-per-redemption":{"allOf":[{"$ref":"#/components/schemas/CouponRestriction"},{"$ref":"#/components/schemas/RedemptionRestriction"},{"properties":{"quantity":{"description":"Restriction quantity","type":"integer"}},"required":["quantity"],"type":"object"}],"description":"discounts-per-redemption restrictions"},"eMerchantPay":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"apiKey":{"description":"eMerchantPay Gateway api key","format":"password","type":"string"},"clientId":{"description":"eMerchantPay Gateway client ID","type":"string"}},"required":["clientId","apiKey"],"type":"object"},"mpi":{"$ref":"#/components/schemas/eMerchantPayMpis"}},"required":["gatewayConfig"],"type":"object"}],"description":"eMerchantPay Gateway config"},"eMerchantPayMpis":{"description":"eMerchantPay Mpis","discriminator":{"propertyName":"name"},"properties":{"name":{"allOf":[{"$ref":"#/components/schemas/MpiName"}],"enum":["PaayMpi","Other"]}},"required":["name"],"type":"object"},"equals":{"allOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/compare"}],"description":"Equals condition","type":"object"},"fixed":{"allOf":[{"$ref":"#/components/schemas/Discount"},{"properties":{"amount":{"description":"Discount amount","format":"double","type":"number"},"currency":{"description":"Discount currency","type":"string"}},"required":["amount","currency"],"type":"object"}],"description":"Coupon fixed amount discount"},"fixed-fee":{"allOf":[{"$ref":"#/components/schemas/PlanPriceFormula"},{"properties":{"price":{"description":"For the very simple price when it's fixed and does not depend on the quantity chosen by customer.\n\nIf the price is 0, it's free.\n","example":99.95,"format":"double","type":"number"}},"required":["price"],"type":"object"}]},"flat-rate":{"allOf":[{"$ref":"#/components/schemas/PlanPriceFormula"},{"properties":{"maxQuantity":{"description":"If the value is `null`, it's assumed to be infinite.","example":1,"type":"integer"},"price":{"description":"Flat-rate pricing is represented in a simple price per unit.\nSome examples:\n\n- $30 per unit\n- $0.10 per transaction\n- $50 per period\n\nIf the price is 0, it's free.\n","example":99.95,"format":"double","type":"number"}},"required":["price"],"type":"object"}]},"gt":{"allOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/compare"}],"description":"Greater than condition","type":"object"},"gte":{"allOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/compare"}],"description":"Greater than or equals condition","type":"object"},"iCheque":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"clientId":{"description":"iCheque Gateway client ID","type":"string"},"secretWord":{"description":"iCheque Gateway secret word","format":"password","type":"string"}},"required":["clientId","secretWord"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"iCheque Gateway config"},"immediately":{"allOf":[{"$ref":"#/components/schemas/CommonScheduleInstruction"}]},"in":{"allOf":[{"$ref":"#/components/schemas/Condition"},{"properties":{"path":{"type":"string"},"values":{"items":{"type":"string"},"type":"array"}},"required":["path","values"],"type":"object"}],"description":"In condition","type":"object"},"logical":{"properties":{"conditions":{"items":{"$ref":"#/components/schemas/Condition"},"minItems":2,"type":"array"}},"required":["conditions"],"type":"object"},"logical-not":{"example":{"condition":{"operation":"equals","path":"/name","value":"John Dou"},"operation":"not"},"properties":{"condition":{"$ref":"#/components/schemas/Condition"}},"required":["condition"],"type":"object"},"lt":{"allOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/compare"}],"description":"Less than condition","type":"object"},"lte":{"allOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/compare"}],"description":"Less than or equals condition","type":"object"},"minimum-order-amount":{"allOf":[{"$ref":"#/components/schemas/CouponRestriction"},{"$ref":"#/components/schemas/RedemptionRestriction"},{"properties":{"amount":{"description":"Minimum order quantity","type":"integer"},"currency":{"description":"Minimum order currency","type":"string"}},"required":["amount","currency"],"type":"object"}],"description":"minimum-order-amount restrictions"},"not":{"allOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/logical-not"}],"description":"Logical NOT","type":"object"},"or":{"allOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/logical"}],"description":"Logical OR","type":"object"},"partial":{"allOf":[{"$ref":"#/components/schemas/AmountAdjustment"},{"properties":{"type":{"description":"The payment amount type","enum":["percent","fixed"],"type":"string"},"value":{"description":"The payment amount","format":"float","type":"number"}},"required":["value","type"],"type":"object"}]},"payment-card":{"allOf":[{"$ref":"#/components/schemas/PaymentInstrument"},{"properties":{"gatewayAccountId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The payment gateway identifier string"},"paymentCardId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The payment card identifier string"}},"required":["paymentCardId"],"type":"object"}],"description":"Payment card payment instrument object"},"paypal":{"allOf":[{"$ref":"#/components/schemas/PaymentInstrument"},{"properties":{"gatewayAccountId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The payment gateway identifier string"},"payPalAccountId":{"allOf":[{"$ref":"#/components/schemas/ResourceId"}],"description":"The PayPal account identifier string"}},"required":["payPalAccountId"],"type":"object"}],"description":"PayPal payment instrument object"},"percent":{"allOf":[{"$ref":"#/components/schemas/Discount"},{"properties":{"value":{"description":"Discount percent","format":"double","type":"number"}},"required":["value"],"type":"object"}],"description":"Coupon percent discount"},"redemptions-per-customer":{"allOf":[{"$ref":"#/components/schemas/CouponRestriction"},{"$ref":"#/components/schemas/RedemptionRestriction"},{"properties":{"quantity":{"description":"Restriction value","type":"integer"}},"required":["quantity"],"type":"object"}],"description":"Quantity per Customer restrictions"},"restrict-to-invoices":{"allOf":[{"$ref":"#/components/schemas/CouponRestriction"},{"$ref":"#/components/schemas/RedemptionRestriction"},{"properties":{"invoiceIds":{"description":"Invoice IDs coupon can be applied to","items":{"type":"string"},"type":"array"}},"required":["invoiceIds"],"type":"object"}],"description":"restrict-to-invoices restrictions"},"restrict-to-plans":{"allOf":[{"$ref":"#/components/schemas/CouponRestriction"},{"$ref":"#/components/schemas/RedemptionRestriction"},{"properties":{"planIds":{"description":"Plan IDs coupon can be applied to","items":{"type":"string"},"type":"array"}},"required":["planIds"],"type":"object"}],"description":"restrict-to-plans restrictions"},"restrict-to-subscriptions":{"allOf":[{"$ref":"#/components/schemas/CouponRestriction"},{"$ref":"#/components/schemas/RedemptionRestriction"},{"properties":{"subscriptionIds":{"description":"Subscription IDs coupon can be applied to","items":{"type":"string"},"type":"array"}},"required":["subscriptionIds"],"type":"object"}],"description":"restrict-to-subscriptions restrictions"},"stairstep":{"allOf":[{"$ref":"#/components/schemas/PlanPriceFormula"},{"properties":{"brackets":{"description":"The price backets, along with the price formula,\nis used to calculate the amount to charge for the product on this plan on the invoice.\n\nThe \"stairstep\" example:\n\nPrice total | Max quantity | Description\n------------|--------------|------------\n$5 | 1 | 1\n$13 | 5 | 2 to 5\n$30 | null | 6 or more\n\nIf someone bought 1 apple, it would be $5.\n\nIf someone bought 2 apples, it would be $13. For 2 to 5 apples, the price is $13 in any case.\n","items":{"properties":{"maxQuantity":{"description":"If the value is `null`, it's assumed to be infinite. It starts at the end of the previous bracket.\nIf there is no previous bracket, it starts at 1.\n","example":1,"type":"integer"},"price":{"description":"If the price is 0, it's free.","example":99.95,"format":"double","type":"number"}},"type":"object"},"minItems":1,"type":"array"}},"required":["brackets"],"type":"object"}]},"tiered":{"allOf":[{"$ref":"#/components/schemas/PlanPriceFormula"},{"properties":{"brackets":{"description":"The price backets, along with the price formula,\nis used to calculate the amount to charge for the product on this plan on the invoice.\n\nThe \"tiered\" example:\n\nPrice per apple | Max quantity | Description\n----------------|--------------|------------\n$5 | 1 | 1\n$4 | 5 | 2 to 5\n$3 | null | 6 or more\n\nIf someone bought 1 apple, it would be $5.\n\nIf someone bought 2 apples, it would be $9. $5 per apple for the first apple, then $4 per apple for the 2nd to 5th apple.\n","items":{"properties":{"maxQuantity":{"description":"If the value is `null`, it's assumed to be infinite. It starts at the end of the previous bracket.\nIf there is no previous bracket, it starts at 1.\n","example":1,"type":"integer"},"price":{"description":"If the price is 0, it's free.","example":99.95,"format":"double","type":"number"}},"type":"object"},"minItems":1,"type":"array"}},"required":["brackets"],"type":"object"}]},"total-redemptions":{"allOf":[{"$ref":"#/components/schemas/CouponRestriction"},{"$ref":"#/components/schemas/RedemptionRestriction"},{"properties":{"quantity":{"description":"Total redemptions quantity","type":"integer"}},"required":["quantity"],"type":"object"}],"description":"total-redemptions restrictions"},"vegaaH":{"allOf":[{"$ref":"#/components/schemas/GatewayAccount"},{"properties":{"gatewayConfig":{"properties":{"password":{"description":"vegaaH Gateway password","format":"password","type":"string"},"terminalId":{"description":"vegaaH Gateway terminal ID","type":"string"}},"required":["terminalId","password"],"type":"object"}},"required":["gatewayConfig"],"type":"object"}],"description":"vegaaH Gateway config"},"volume":{"allOf":[{"$ref":"#/components/schemas/PlanPriceFormula"},{"properties":{"brackets":{"description":"The price backets, along with the price formula,\nis used to calculate the amount to charge for the product on this plan on the invoice.\n\nThe \"volume\" example:\n\nPrice per apple | Max quantity | Description\n----------------|--------------|------------\n$5 | 1 | 1\n$4 | 5 | 2 to 5\n$3 | null | 6 or more\n\nIf someone bought 1 apple, it would be $5.\n\nIf someone bought 2 apples, it would be $8. For 2 to 5 apples, the price is $4 per apple.\n","items":{"properties":{"maxQuantity":{"description":"If the value is `null`, it's assumed to be infinite. It starts at the end of the previous bracket.\nIf there is no previous bracket, it starts at 1.\n","example":1,"type":"integer"},"price":{"description":"If the price is 0, it's free.","example":99.95,"format":"double","type":"number"}},"type":"object"},"minItems":1,"type":"array"}},"required":["brackets"],"type":"object"}]}}}}
\No newline at end of file