redoc/playground/openapi/rebilly.yaml
Alex Varchuk c01c6876f2
feat: initialize release candidate for v3.0.0
Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>
Co-authored-by: Alex Varchuk <olexandr.varchuk@gmail.com>
Co-authored-by: Oprysk Vyacheslav <vyacheslav@redocly.com>
Co-authored-by: Ivan Kropyvnytskyi <130547411+ivankropyvnytskyi@users.noreply.github.com>
Co-authored-by: Yevhen Pylyp <yevhen.pylyp@redocly.com>
Co-authored-by: Vladyslav Makarenko <vladyslav.makarenko@redocly.com>
Co-authored-by: Yevhenii Medviediev <yevhenii.medviediev@redocly.com>
Co-authored-by: Oleksii Horbachevskyi <oleksii.horbachevskyi@redocly.com>
Co-authored-by: volodymyr-rutskyi <rutskyi.v@gmail.com>
Co-authored-by: Adam Altman <adam@redoc.ly>
Co-authored-by: Andrew Tatomyr <andrew.tatomyr@redocly.com>
Co-authored-by: Anastasiia Derymarko <anastasiia@redocly.com>
Co-authored-by: Roman Marshevskyy <roman.marshevskyy@redoc.ly>
Co-authored-by: Lorna Mitchell <lorna.mitchell@redocly.com>
Co-authored-by: Taylor Krusen <taylor.krusen@redocly.com>
2025-10-24 17:40:43 +02:00

40137 lines
1.2 MiB

openapi: 3.1.0
info:
version: latest
title: Core APIs
contact:
name: Rebilly API Support
url: https://www.rebilly.com/contact/
email: integrations@rebilly.com
license:
name: Rebilly
url: https://www.rebilly.com/api-license/
termsOfService: https://www.rebilly.com/terms-of-use/
x-logo:
url: https://rebilly-core.redoc.ly/rb_apiLogo.svg
backgroundColor: '#0044d4'
description: >
# Introduction
[comment]: <> (x-product-description-placeholder)
The Rebilly API is built on HTTP and is RESTful.
It has predictable resource URLs and returns HTTP response codes to indicate
errors.
It also accepts and returns JSON in the HTTP body.
Use your favorite HTTP/REST library in your programming language when using
this API,
or use one of the Rebilly SDKs,
which are available in [PHP](https://github.com/Rebilly/rebilly-php) and
[JavaScript](https://github.com/Rebilly/rebilly-js-sdk).
Every action in the [Rebilly UI](https://app.rebilly.com) is supported by an
API which is documented and available for use, so that you may automate any
necessary workflows or processes.
This API reference documentation contains the most commonly integrated
resources.
# Authentication
This topic describes the different forms of authentication that are
available in the Rebilly API, and how to use them.
Rebilly offers four forms of authentication: secret key, publishable key,
JSON Web Tokens, and public signature key.
- Secret API key: Use to make requests from the server side. Never share
these keys. Keep them guarded and secure.
- Publishable API key: Use in your client-side code to tokenize payment
information.
- JWT: Use to make short-life tokens that expire after a set period of time.
<!-- ReDoc-Inject: <security-definitions> -->
## Manage API keys
To create or manage API keys, select one of the following:
- Use the Rebilly UI: see [Manage API
keys](https://www.rebilly.com/docs/dev-docs/api-keys/#manage-api-keys)
- Use the Rebilly API: see the [API key
operations](https://www.rebilly.com/catalog/all/api-keys).
For more information on API keys, see [API
keys](https://www.rebilly.com/docs/concepts-and-features/concept/api-keys).
# Errors
Rebilly follows the error response format proposed in [RFC
9457](https://tools.ietf.org/html/rfc9457), which is also known as Problem
Details for HTTP APIs. As with any API responses, your client must be
prepared to gracefully handle additional members of the response.
# SDKs
Rebilly provides a JavaScript SDK and a PHP SDK to help interact with the
Rebilly API.
However, no SDK is required to use the API.
Rebilly also provides
[FramePay](https://www.rebilly.com/docs/developer-docs/framepay/),
a client-side iFrame-based solution, to help create payment tokens while
minimizing PCI DSS compliance burdens
and maximizing your customization ability.
[FramePay](https://www.rebilly.com/docs/developer-docs/framepay/) interacts
with the [payment tokens creation
operation](https://www.rebilly.com/catalog/all/payment-tokens/posttoken).
## JavaScript SDK
For installation and usage instructions, see
[SDKs](https://www.rebilly.com/docs/dev-docs/sdks/).
All JavaScript SDK code examples are included in the API reference
documentation.
## PHP SDK
For installation and usage instructions, see
[SDKs](https://www.rebilly.com/docs/dev-docs/sdks/).
All SDK code examples are included in the API reference documentation.
To use them, you must configure the `$client` as follows:
```php
$client = new Rebilly\Client([
'apiKey' => 'YourApiKeyHere',
'baseUrl' => 'https://api.rebilly.com',
]);
```
# Get started
The full [Rebilly API](https://www.rebilly.com/catalog/all/) has over 500
operations.
This is likely more than you may need to implement your use cases.
If you would like to implement a particular use case,
[contact Rebilly](https://www.rebilly.com/support/) for guidance and
feedback on the best API operations to use for the task.
To integrate Rebilly, and learn about related resources and concepts,
see [Get started](https://www.rebilly.com/docs/dev-docs/get-started/).
security:
- SecretApiKey: []
- JWT: []
servers:
- url: https://api-sandbox.rebilly.com/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
components:
securitySchemes:
JWT:
description: >-
JWT is a short lifetime token that can be assigned a specific expiration
time.
Usage format: `Bearer <JWT>`.
type: http
scheme: bearer
bearerFormat: JWT
ApplicationJWT:
description: >-
Applications in the Rebilly App Store can create a JSON Web Token (JWT)
by fetching an user's instance.
For more information, see [Retrieve an application
instance](https://www.rebilly.com/catalog/all/application-owners/getapplicationinstancebyorganization/).
Usage format: `Bearer <JWT>`.
type: http
scheme: bearer
bearerFormat: JWT
PublishableApiKey:
description: >-
This authentication method is applicable to specific operations.
To create a publishable API key, see [Create an API
key](https://www.rebilly.com/catalog/all/api-keys/postapikey).
name: Authorization
type: apiKey
in: header
SecretApiKey:
description: |-
Never share your secret keys.
Keep them guarded and secure.
Use your secret API key only to make requests from the server side.
To authenticate, provide your secret key in the request header.
name: REB-APIKEY
type: apiKey
in: header
CustomerJWT:
description: >-
To create a JSON Web Token (JWT) using Storefront authentication,
see [Create a session with username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin).
Usage format: `Bearer <JWT>`.
type: http
scheme: bearer
bearerFormat: JWT
parameters:
collectionLimit:
name: limit
in: query
description: Limits the number of collection items to be returned.
schema:
type: integer
minimum: 0
maximum: 1000
collectionOffset:
name: offset
in: query
description: >-
Specifies the starting point within the collection of items to be
returned.
schema:
type: integer
minimum: 0
maximum: 1000
collectionSort:
name: sort
in: query
description: >-
Sorts and orders the collection of items. To sort in descending
order, prefix with `-`. Multiple fields can be sorted by separating each
with `,`.
style: form
explode: false
schema:
type: array
items:
type: string
collectionFilter:
name: filter
in: query
description: >-
Filters the collection items. This field requires
a special format. Use `,` for multiple allowed values. Use `;` for
multiple fields.
For more information, see
[Using filter with
collections](https://www.rebilly.com/docs/dev-docs/search-filters).
schema:
type: string
collectionQuery:
name: q
in: query
description: Use this field to perform a partial search of text fields.
schema:
type: string
resourceId:
name: id
in: path
description: ID of the resource.
required: true
schema:
type: string
maxLength: 50
pattern: ^[@~\-\.\w]+$
collectionExpand:
name: expand
in: query
description: >-
Expands a request to include embedded objects within the `_embedded`
property of the response. This field accepts a comma-separated list of
objects.
For more information, see
[Expand to include embedded
objects](https://www.rebilly.com/docs/dev-docs/expand-embedded-resources).
schema:
type: string
collectionFields:
name: fields
in: query
description: >-
Limits the returned fields to the specified list, each field separated
by a comma.
The ID value is always returned.
schema:
type: string
customFieldResource:
name: resource
in: path
description: Type of resource schema.
required: true
schema:
type: string
enum:
- customers
- payment-instruments
- subscriptions
- transactions
- websites
- products
- plans
- bump-offers
- gateway-accounts
- deposit-requests
externalIdentifierResource:
name: resource
in: path
description: Type of the resource.
required: true
schema:
type: string
enum:
- customers
- invoices
- invoice-items
- transactions
- journal-accounts
- journal-entries
externalIdentifierResourceId:
name: resourceId
in: path
description: ID of the resource.
required: true
schema:
type: string
maxLength: 50
pattern: ^[@~\-\.\w]+$
externalIdentifierService:
name: service
in: path
description: Name of the service.
required: true
schema:
type: string
enum:
- quickbooks-online
imageSize:
name: imageSize
in: query
description: >-
Resize image to specified size.
Supports any sizes from 10x10 to 2000x2000, in the following format:
`{width}x{height}`.
If the value is invalid, the image returns the original size.
This parameter is ignored for non-image files.
schema:
type: string
example: 700x700
pattern: ^[1-9]{1}[0-9]{1,3}x[1-9]{1}[0-9]{1,3}$
applicationId:
name: applicationId
in: path
description: ID of the application.
required: true
schema:
type: string
maxLength: 50
pattern: ^[@~\-\.\w]+$
organizationId:
name: organizationId
in: path
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
required: true
schema:
type: string
maxLength: 50
pattern: ^[@~\-\.\w]+$
mediaTypeJsonPdf:
name: Accept
in: header
description: Type of response media.
schema:
type: string
enum:
- application/json
- application/pdf
default: application/json
journalRecordId:
name: journalRecordId
in: path
description: ID of the journal record.
required: true
schema:
type: string
maxLength: 50
pattern: ^[@~\-\.\w]+$
subscriptionExpand:
name: expand
in: query
description: >-
Expand a response to receive a full related object in the `_embedded`
path.
To expand multiple objects, use a comma-separated list.
Example: `expand=recentInvoice,initialInvoice`.
Available arguments are:
- `customer`
- `leadSource`
- `website`
- `shippingRate`
- `initialInvoice`
- `recentInvoice`
- `upcomingInvoice`
- `paymentInstrument`
For more information, see [Expand to include embedded
objects](https://www.rebilly.com/docs/dev-docs/expand-embedded-resources).
schema:
type: string
tag:
name: tag
in: path
description: Name of the tag.
required: true
schema:
type: string
pattern: ^[@~\-\.\w\s]+$
customerId:
name: customerId
in: path
description: ID of the customer.
required: true
schema:
type: string
maxLength: 50
pattern: ^[@~\-\.\w]+$
kycDocumentId:
name: kycDocumentId
in: path
description: ID of the KYC document.
required: true
schema:
type: string
maxLength: 50
pattern: ^[@~\-\.\w]+$
credentialType:
name: type
in: path
description: Type of service credential.
required: true
schema:
type: string
enum:
- smtp
- webhook
- mailgun
- sendgrid
- aws-ses
- oauth2
- postmark
- experian
- taxjar
- avalara
- plaid
token:
name: token
in: path
description: Token string.
required: true
schema:
type: string
systemEventType:
name: eventType
in: path
description: Type of event.
required: true
schema:
type: string
rulesVersion:
name: version
in: path
required: true
description: >-
Version of the ruleset.
To retrieve the full related object instead of the ID, expand the
response.
For more information, see [Expand to include embedded
objects](#section/Expand-to-include-embedded-objects).
schema:
type: integer
minimum: 1
integrationLabel:
name: label
in: path
description: Label of the integration.
required: true
schema:
type: string
enum:
- google-sheets
- keap-infusionsoft
- intuit-quickbooks
storefrontCustomFieldResource:
name: resource
in: path
description: Type of resource schema.
required: true
schema:
type: string
enum:
- customers
- payment-instruments
- subscriptions
- transactions
headers:
Pagination-Total:
description: Total number of items.
schema:
type: integer
example: 332
Pagination-Limit:
description: Maximum number of items per page.
schema:
type: integer
example: 100
Pagination-Offset:
description: |-
Specifies the starting point within the
collection of resource results. For example, a request with
`limit=20` retrieves and displays the first 20 results on a page. A
following request with `limit=20` and `offset=20`, retrieves the next
page of 20 results.
schema:
type: integer
example: 2
Location:
description: Location of the related resource.
schema:
type: string
format: uri
example: https://api.rebilly.com/example
schemas:
CreatedTime:
type: string
description: Date and time which is set automatically when the resource is created.
format: date-time
readOnly: true
x-sortable: true
x-label: Creation Time
UpdatedTime:
type: string
description: Date and time which updates automatically when the resource is updated.
format: date-time
readOnly: true
x-sortable: true
x-label: Last Update Time
ResourceId:
type: string
description: Unique resource ID.
maxLength: 50
example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
SelfLink:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
Tag:
type: object
description: >-
Use tags to organize and categorize customers or KYC documents based on
keywords.
For more information, see
[Tags](https://www.rebilly.com/docs/dev-docs/api/tags/).
required:
- name
- type
properties:
id:
description: ID of the tag.
readOnly: true
$ref: '#/components/schemas/ResourceId'
name:
description: |-
Unique name for the tag.
Tag names are not case-sensitive.
type: string
maxLength: 255
pattern: ^[@~\-\.\w\s]+$
example: New
type:
description: >-
Type of tag.
Tags of a specific type can only be assigned to corresponding entity
types.
For example, you can only use customer tags on customers.
type: string
enum:
- customer
- kyc-document
- aml-check
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
AML:
type: object
properties:
firstName:
type: string
description: First name of the individual, or name of entity.
readOnly: true
example: Benjamin
lastName:
type:
- string
- 'null'
description: >-
Last name of the individual. Returns a `null` value for single-named
entities.
readOnly: true
example: Franklin
source:
type: string
readOnly: true
description: Describes which list the result is from.
sourceType:
readOnly: true
description: Describes the categories of the individual or entity.
type: array
example:
- sanctions
- enforcements
items:
type: string
enum:
- pep
- sanctions
- adverse-media
- enforcements
- state-owned-enterprise
gender:
type:
- string
- 'null'
readOnly: true
description: >-
If `type`=`individual`, this field describes the gender of the
individual.
title:
type:
- array
- 'null'
readOnly: true
description: Individual's job title.
example:
- Postmaster General
- Ambassador to France
- Ambassador to Sweden
- Supreme Executive Council of Commonwealth of Pennsylvania
items:
type: string
type:
type: string
readOnly: true
description: Describes whether the source is an individual or an entity.
enum:
- individual
- entity
legalBasis:
type: array
readOnly: true
description: List of references to legal documents, if they exist.
items:
type: string
regime:
type:
- string
- 'null'
readOnly: true
description: Describes the government, administration, or political entity.
example: United States Government
confidence:
type: string
description: Degree of confidence in the source list information.
readOnly: true
enum:
- weak
- medium
- strong
- very-strong
nationality:
type: string
readOnly: true
description: Nationality of the individual or entity.
address:
type: array
readOnly: true
description: Addresses associated with the individual or entity.
items:
type: object
properties:
address:
type:
- string
- 'null'
readOnly: true
description: Street address line 1.
address2:
type:
- string
- 'null'
readOnly: true
description: Street address line 2.
city:
type:
- string
- 'null'
readOnly: true
description: City.
region:
type:
- string
- 'null'
readOnly: true
description: State, province, or region.
country:
type:
- string
- 'null'
readOnly: true
description: Country.
birthplace:
type: boolean
default: false
readOnly: true
description: Individual's place of birth.
dob:
type: array
readOnly: true
description: One or more possible dates of birth.
items:
type: string
readOnly: true
description: Date of birth.
format: date
example: '1706-01-17'
aliases:
type: array
readOnly: true
description: List of aliases, if any.
items:
type: object
properties:
firstName:
type: string
description: First name of alias.
readOnly: true
lastName:
type: string
description: Last name of alias.
readOnly: true
authenticity:
type: string
description: Degree of confidence in the alias.
readOnly: true
enum:
- strong
- weak
- unknown
passport:
type: array
readOnly: true
description: Individual's passport information.
items:
type: object
properties:
number:
type: string
readOnly: true
description: Passport number.
registrationDate:
type: string
format: date
readOnly: true
description: Passport registration date.
comments:
type:
- string
- 'null'
readOnly: true
description: Additional information. This content varies per list.
_links:
$ref: '#/components/schemas/SelfLink'
AmlCheck:
type: object
readOnly: true
description: AML check result.
properties:
id:
type: string
description: Unique resource ID.
maxLength: 50
example: aml_chk_0YV8XJT2ZWDR398Q8NFEM7DEPM
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
websiteId:
type: string
description: Website ID associated with the customer.
maxLength: 50
example: web_0YV7DE4Z26DQSA1AC92FBJ7SEG
reviewerId:
type:
- string
- 'null'
maxLength: 50
description: User ID of the person who reviewed the AML check.
example: 44433322-2c4y-483z-a0a9-158621f77a21
reviewerName:
type:
- string
- 'null'
description: First and last name of the person who reviewed the AML check.
reviewStartTime:
type:
- string
- 'null'
format: date-time
description: Date and time when the AML check review is started.
reviewTime:
type:
- string
- 'null'
format: date-time
description: Date and time when the AML check review is completed.
priority:
type:
- string
- 'null'
default: null
description: Highest matched priority of all hits within an AML check.
source:
type: string
description: Source of the AML check.
enum:
- sign-up
- recurring
- purchase
status:
type: string
description: Status of the AML check.
readOnly: true
enum:
- pending-review
- in-review
- no-match
- confirmed-match
- false-positive
x-enumDescriptions:
pending-review: Possible AML match detected and waiting to be manually reviewed.
in-review: A manual AML match review is in progress.
no-match: No possible AML match detected.
confirmed-match: Possible AML match manually reviewed and marked as confirmed.
false-positive: Possible AML match manually reviewed and marked as false positive.
customer:
type: object
properties:
id:
description: ID of the customer.
$ref: '#/components/schemas/ResourceId'
primaryAddress:
type: object
description: Customer's data at the time of the AML check.
properties:
firstName:
type: string
maxLength: 45
description: Customer's first name at the time of the AML check.
lastName:
type: string
maxLength: 45
description: Customer's last name at the time of the AML check.
dob:
type:
- string
- 'null'
format: date
description: Customer's date of birth.
example: '1971-02-14'
address:
description: >-
First line of the customer's street address at the time of
the AML check.
type:
- string
- 'null'
pattern: ^[\w\s\-\/\p{L},.#;:()'&]+$
maxLength: 60
example: 36 Craven St
address2:
description: >-
Second line of the customer's street address at the time of
the AML check.
type:
- string
- 'null'
pattern: ^[\w\s\-\/\p{L},.#;:()'&]+$
maxLength: 60
city:
description: Customer's city of residence at the time of the AML check.
type:
- string
- 'null'
pattern: ^[\w\s\-\p{L},.']+$
maxLength: 45
example: Austin
region:
description: Customer's region of residence at the time of the AML check.
type:
- string
- 'null'
pattern: ^[\w\s\-\/\p{L},.#;:()']+$
maxLength: 45
example: Texas
country:
type:
- string
- 'null'
description: >-
Customer's country of residence at the time of the AML
check.
postalCode:
description: Customer's postal code at the time of the AML check.
type:
- string
- 'null'
pattern: ^[\w\s\-]+$
maxLength: 10
example: WC2N 5NF
tags:
description: List of tags that have been assigned to the customer.
type: array
items:
$ref: '#/components/schemas/Tag'
organizationId:
type: string
description: ID of the customer's organization.
maxLength: 50
example: org_0YVDM8RC7GDADADSBSMW124JA8
hits:
description: List of hits returned during the AML check.
type: array
items:
$ref: '#/components/schemas/AML'
tags:
description: List of AML check tags.
readOnly: true
type: array
items:
$ref: '#/components/schemas/Tag'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
BaseProblem:
type: object
additionalProperties: true
minProperties: 1
description: >-
RFC-7807 [problem details](https://tools.ietf.org/html/rfc7807) JSON
object.
properties:
type:
type: string
description: >-
Problem type in the form of a
[URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be
"about:blank".
format: uri
title:
type: string
description: >-
Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change
from occurrence to occurrence of the problem.
detail:
type: string
description: >-
Human-readable explanation that is specific to this occurrence of
the problem.
instance:
type: string
description: >-
URI reference that identifies the specific occurrence of the
problem.
It may or may not yield further information if dereferenced.
Unauthorized:
allOf:
- title: Unauthorized
- type: object
properties:
status:
type: integer
description: HTTP status code.
minimum: 401
maximum: 401
- $ref: '#/components/schemas/BaseProblem'
Forbidden:
allOf:
- title: Forbidden
- type: object
properties:
status:
type: integer
description: HTTP status code.
minimum: 403
maximum: 403
- $ref: '#/components/schemas/BaseProblem'
NotFound:
allOf:
- type: object
properties:
status:
type: integer
description: HTTP status code.
minimum: 404
maximum: 404
- $ref: '#/components/schemas/BaseProblem'
ValidationError:
allOf:
- title: Validation error
- type: object
properties:
status:
type: integer
description: HTTP status code.
minimum: 422
maximum: 422
- $ref: '#/components/schemas/BaseProblem'
- type: object
properties:
invalidFields:
description: Invalid field details.
type: array
items:
type: object
properties:
field:
type: string
description: |-
Name of the field.
Dot notation is used for nested object field names.
message:
description: Message field.
type: string
example:
- field: field1
message: field1 is invalid
- field: subObject.field2
message: field2 is invalid
- field: subObject.field2
message: another error in the field2
AmlCheckReview:
type: object
description: AML check review.
properties:
tag:
type: string
description: AML-related customer tag.
enum:
- aml-match-confirmed
- aml-match-false-positive
AmlConfidence:
type:
- string
- 'null'
description: Degree of confidence to assign.
enum:
- weak
- medium
- strong
- very-strong
AmlCompoundConfidence:
type: object
properties:
addressMatch:
type: object
description: Match for the customer's city or region, or both, is found.
properties:
matchingCountry:
$ref: '#/components/schemas/AmlConfidence'
mismatchingCountry:
$ref: '#/components/schemas/AmlConfidence'
noCountry:
$ref: '#/components/schemas/AmlConfidence'
addressMismatch:
type: object
description: Match for the customer's city or region, or both, is not found.
properties:
matchingCountry:
$ref: '#/components/schemas/AmlConfidence'
mismatchingCountry:
$ref: '#/components/schemas/AmlConfidence'
noCountry:
$ref: '#/components/schemas/AmlConfidence'
noAddress:
type: object
description: No city and no region is available to match against.
properties:
matchingCountry:
$ref: '#/components/schemas/AmlConfidence'
mismatchingCountry:
$ref: '#/components/schemas/AmlConfidence'
noCountry:
$ref: '#/components/schemas/AmlConfidence'
AmlPriority:
type:
- string
- 'null'
description: Priority level of matched AML customer information.
default: null
enum:
- p0
- p1
- p2
- p3
AmlSettings:
type: object
description: Settings for AML checking.
properties:
confidence:
type: object
description: Confidence level settings for AML matches.
properties:
dob:
type: object
description: >-
Confidence level settings for AML matches based on date of
birth.
properties:
exactMatch:
description: >-
Exact match of the customer's date of birth and name is
found.
$ref: '#/components/schemas/AmlCompoundConfidence'
inexactMatch:
description: >-
Exact match of the customer's date of birth and a fuzzy, or
inexact, name match is found.
$ref: '#/components/schemas/AmlCompoundConfidence'
noDob:
type: object
description: >-
Confidence level settings for AML matches based on a missing
date of birth.
properties:
exactMatch:
description: >-
Exact match of the customer's name is found, but a date of
birth is not.
$ref: '#/components/schemas/AmlCompoundConfidence'
inexactMatch:
description: >-
Fuzzy, or inexact match of the customer's name is found, but
a date of birth is not.
$ref: '#/components/schemas/AmlCompoundConfidence'
weakMatch:
description: >-
Weak match of the customer's name is found, but a date of
birth is not.
$ref: '#/components/schemas/AmlCompoundConfidence'
yob:
type: object
description: >-
Confidence level settings for AML matches based on year of
birth.
properties:
exactMatch:
description: >-
Exact match of the customer's year of birth and exact name
is found.
$ref: '#/components/schemas/AmlCompoundConfidence'
inexactMatch:
description: >-
Exact match of the customer's year of birth and a fuzzy, or
inexact, name match is found.
$ref: '#/components/schemas/AmlCompoundConfidence'
inexactYob:
type: object
description: >-
Confidence level settings for AML matches based on a near match
of year of birth.
properties:
exactMatch:
description: >-
Near match of the customer's year of birth and an exact name
match is found.
$ref: '#/components/schemas/AmlCompoundConfidence'
inexactMatch:
description: >-
Near match of the customer's year of birth and a fuzzy, or
inexact, name match is found.
$ref: '#/components/schemas/AmlCompoundConfidence'
priority:
type: object
description: |-
Priority level settings for AML source matches. \
`p0` is critical priority level, and `p3` is low priority level.
properties:
pep:
type: object
description: Priorities for the `pep` source type.
properties:
veryStrong:
$ref: '#/components/schemas/AmlPriority'
strong:
$ref: '#/components/schemas/AmlPriority'
medium:
$ref: '#/components/schemas/AmlPriority'
weak:
$ref: '#/components/schemas/AmlPriority'
enforcements:
type: object
description: Priorities for the `enforcement` source type.
properties:
veryStrong:
$ref: '#/components/schemas/AmlPriority'
strong:
$ref: '#/components/schemas/AmlPriority'
medium:
$ref: '#/components/schemas/AmlPriority'
weak:
$ref: '#/components/schemas/AmlPriority'
stateOwnedEnterprise:
type: object
description: Priorities for the `state-owned-enterprise` source type.
properties:
veryStrong:
$ref: '#/components/schemas/AmlPriority'
strong:
$ref: '#/components/schemas/AmlPriority'
medium:
$ref: '#/components/schemas/AmlPriority'
weak:
$ref: '#/components/schemas/AmlPriority'
sanctions:
type: object
description: Priorities for the `sanctions` source type.
properties:
veryStrong:
$ref: '#/components/schemas/AmlPriority'
strong:
$ref: '#/components/schemas/AmlPriority'
medium:
$ref: '#/components/schemas/AmlPriority'
weak:
$ref: '#/components/schemas/AmlPriority'
adverseMedia:
type: object
description: Priorities for the `adverse-media` source type.
properties:
veryStrong:
$ref: '#/components/schemas/AmlPriority'
strong:
$ref: '#/components/schemas/AmlPriority'
medium:
$ref: '#/components/schemas/AmlPriority'
weak:
$ref: '#/components/schemas/AmlPriority'
Attachment:
type: object
required:
- fileId
- relatedId
- relatedType
properties:
id:
type: string
readOnly: true
description: ID of the attachment.
maxLength: 50
example: att_0YV7J787J0DW0918MQQMDHWA7M
fileId:
type: string
description: ID of the linked file object.
maxLength: 50
example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
relatedType:
description: Linked object type.
type: string
enum:
- customer
- customer-timeline-comment
- customer-edd-timeline-comment
- dispute
- gateway-timeline-comment
- invoice
- invoice-timeline-comment
- order-timeline-comment
- organization
- payment
- plan
- product
- subscription
- transaction
- transaction-timeline-comment
relatedId:
description: ID of the linked object.
type: string
name:
description: Name of original attachment.
type: string
description:
description: Description of the attachment.
type: string
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- file
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
file:
type: object
Conflict:
allOf:
- title: Conflict
- type: object
properties:
status:
type: integer
description: HTTP status code.
minimum: 409
maximum: 409
- $ref: '#/components/schemas/BaseProblem'
AuthenticationOptions:
type: object
properties:
passwordPattern:
description: Allowed password pattern.
type:
- string
- 'null'
example: /^[0-9]+$/
credentialTtl:
description: Default credential lifetime, in seconds.
type: integer
authTokenTtl:
description: Default auth-token lifetime, in seconds.
type: integer
resetTokenTtl:
description: Default reset-token lifetime, in seconds.
type: integer
otpRequired:
description: >-
Specifies if a One-Time Password (OTP) is required to exchange a
token.
type: boolean
_links:
$ref: '#/components/schemas/SelfLink'
CustomerId:
type: string
description: ID of the customer resource.
maxLength: 50
example: cus_0YV7DDSDD1C8DA64KHH2W33CPF
x-basic: true
AuthenticationTokenResponse:
type: object
title: Authentication token
required:
- username
properties:
username:
description: >-
Username of the customer who is associated with the authentication
token.
type: string
customerId:
readOnly: true
allOf:
- $ref: '#/components/schemas/CustomerId'
token:
description: ID of the authentication token.
type: string
readOnly: true
otpRequired:
description: >-
Specifies if a One-Time Password (OTP) is required to exchange the
authentication token.
type: boolean
credentialId:
description: ID of the user associated with the authentication token.
readOnly: true
$ref: '#/components/schemas/ResourceId'
expiredTime:
description: Date and time when the token expired.
type:
- string
- 'null'
format: date-time
_links:
$ref: '#/components/schemas/SelfLink'
AuthenticationTokenPasswordMode:
type: object
required:
- username
- password
properties:
username:
description: Username associated with the authentication token.
type: string
password:
description: Password associated with the authentication token.
type: string
format: password
writeOnly: true
mode:
type: string
description: >-
Specifies the authentication verification method.
The `password` token requires the user to enter a password to log
in.
The `passwordless` token, requires a secret API key to log in.
To obtain an API key, see [Manage API
keys](https://www.rebilly.com/docs/dev-docs/api-keys/#manage-api-keys).
writeOnly: true
enum:
- password
customerId:
readOnly: true
allOf:
- $ref: '#/components/schemas/CustomerId'
token:
description: ID of the authentication token.
type: string
readOnly: true
otpRequired:
description: >-
Specifies if a One-Time Password (OTP) is required to exchange the
authentication token.
type: boolean
credentialId:
description: ID of the user associated with the authentication token.
readOnly: true
$ref: '#/components/schemas/ResourceId'
expiredTime:
description: Date and time when the token expired.
type: string
format: date-time
_links:
$ref: '#/components/schemas/SelfLink'
AuthenticationTokenPasswordlessMode:
type: object
required:
- customerId
properties:
customerId:
$ref: '#/components/schemas/CustomerId'
mode:
type: string
description: >-
Specifies the authentication verification method.
The `password` token requires the user to enter a password to log
in.
The `passwordless` token, requires a secret API key to log in.
To obtain an API key, see [Manage API
keys](https://www.rebilly.com/docs/dev-docs/api-keys/#manage-api-keys).
writeOnly: true
enum:
- passwordless
token:
description: ID of the authentication token.
type: string
readOnly: true
otpRequired:
description: >-
Specifies if a One-Time Password (OTP) is required to exchange the
authentication token.
type: boolean
credentialId:
description: ID of the user associated with the authentication token.
readOnly: true
$ref: '#/components/schemas/ResourceId'
expiredTime:
description: Date and time when the token expired.
type: string
format: date-time
_links:
$ref: '#/components/schemas/SelfLink'
AuthenticationToken:
type: object
discriminator:
propertyName: mode
mapping:
password: '#/components/schemas/AuthenticationTokenPasswordMode'
passwordless: '#/components/schemas/AuthenticationTokenPasswordlessMode'
oneOf:
- $ref: '#/components/schemas/AuthenticationTokenPasswordMode'
- $ref: '#/components/schemas/AuthenticationTokenPasswordlessMode'
ApiKeyScope:
type: object
properties:
organizationId:
description: Array of account IDs.
type: array
items:
$ref: '#/components/schemas/ResourceId'
productId:
description: Array of product IDs.
type: array
items:
type: string
description: Unique resource ID.
maxLength: 50
example: prod_0YV7DES3WPC5J8JD8QTVNZBZNZ
planId:
description: Array of plan IDs.
type: array
items:
type: string
description: Unique resource ID.
maxLength: 50
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
customFieldName:
description: Array of custom field names.
type: array
items:
type: string
maxLength: 60
pattern: ^[\w-]+$
example:
organizationId:
- organizationId-id-1
AclPermissions:
type: array
items:
type: string
format: operationId
example:
- PostFile
- StorefrontGetAccount
- StorefrontGetWebsite
- StorefrontGetKycDocumentCollection
- StorefrontGetKycDocument
- StorefrontPostKycDocument
Acl:
type: array
description: Access Control List (ACL) information.
items:
type: object
required:
- scope
- permissions
properties:
scope:
description: Scope of the API key.
$ref: '#/components/schemas/ApiKeyScope'
permissions:
description: >-
If you are creating a restricted API key, use this field to
specify individual permissions.
Use the wildcard character `*` to provide full access.
$ref: '#/components/schemas/AclPermissions'
CustomerJWT:
type: object
properties:
id:
type: string
description: ID of the session.
maxLength: 50
example: jwt_0YV7DEJX80CDRAKVTV478ZNJDR
readOnly: true
type:
description: Type of session.
type: string
readOnly: true
enum:
- customer
token:
description: Token used for authentication.
type: string
readOnly: true
invalidate:
description: >-
Specifies whether to invalidate a token after an exchange is
performed.
type: boolean
default: true
example: true
writeOnly: true
oneTimePassword:
description: >-
One time password that sent by email. This value must contain digits
only.
type: string
pattern: ^[0-9]{6}$
example: '123456'
writeOnly: true
customerId:
readOnly: true
allOf:
- $ref: '#/components/schemas/CustomerId'
acl:
$ref: '#/components/schemas/Acl'
customClaims:
type: object
additionalProperties: true
example:
documents:
- identity-proof
- address-proof
redirectUrl: https://mywebsite.com
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
expiredTime:
description: |-
Date and time when the session expires.
The default value is one hour after the `createdTime` value.
type: string
format: date-time
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- customer
Blocklist:
type: object
required:
- type
- value
properties:
id:
type: string
description: ID of the blocklist.
readOnly: true
maxLength: 50
example: blkl_0YV8XTSH9MD578386XQDWSEBNF
type:
description: Type of blocklist.
type: string
enum:
- payment-card
- bank-account
- customer-id
- email
- email-domain
- ip-address
- country
- fingerprint
- bin
- address
value:
description: Value of the blocklist.
type: string
expirationTime:
description: Date and time when the blocklist expires.
type:
- string
- 'null'
format: date-time
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
CouponRestrictionDiscountPerRedemption:
type: object
description: |-
Restricts the number of times that the coupon can be applied by one
redemption. For example, use this restriction to configure a coupon
that can only be applied to the first subscription renewal of a
particular product.
required:
- type
- quantity
properties:
type:
description: Type of coupon restriction.
type: string
enum:
- discounts-per-redemption
quantity:
type: integer
description: Permitted number of discounts per redemption.
CurrencyCode:
type: string
description: Currency code in ISO 4217 format.
minLength: 3
maxLength: 3
example: USD
x-label: Currency
x-sortable: true
CouponRestrictionMinimumOrderAmount:
type: object
description: |-
Specifies a minimum order amount for a coupon application. For
example, if the restriction amount is $20, the coupon is only
applied to invoices with a total amount of $20 or more.
required:
- type
- amount
- currency
properties:
type:
type: string
description: Type of coupon restriction.
enum:
- minimum-order-amount
amount:
type: integer
description: Minimum order quantity that is required to apply the coupon.
currency:
$ref: '#/components/schemas/CurrencyCode'
CouponRestrictionPaidByTime:
type: object
description: >-
Specifies a date and time at which a coupon redemption expires if the
invoice is not paid.
required:
- type
- time
properties:
type:
description: Type of coupon restriction.
type: string
enum:
- paid-by-time
time:
type: string
format: date-time
description: >-
Date and time when a coupon redemption is no longer valid, and the
coupon is removed from unpaid invoices if applied.
> **Note:** This date-time cannot be changed.
CouponRestrictionRestrictToInvoices:
type: object
description: Restricts a coupon to specific invoices.
required:
- type
- invoiceIds
properties:
type:
type: string
description: Type of coupon restriction.
enum:
- restrict-to-invoices
invoiceIds:
type: array
description: Invoice IDs on which a coupon can be applied.
items:
type: string
CouponRestrictionRestrictToPlans:
type: object
description: Restricts a coupon to specific pricing plans.
required:
- type
- planIds
properties:
type:
type: string
description: Type of coupon restriction.
enum:
- restrict-to-plans
planIds:
type: array
description: Plan IDs on which a coupon can be applied.
items:
type: string
minimumQuantity:
type: integer
default: 1
description: >-
Minimum quantity that is required to apply the restriction and
subsequent discount.
CouponRestrictionRestrictToProducts:
type: object
description: Restricts a coupon to specific products.
required:
- type
- productIds
properties:
type:
type: string
description: Type of coupon restriction.
enum:
- restrict-to-products
productIds:
type: array
description: Product IDs on which a coupon can be applied.
items:
type: string
minimumQuantity:
type: integer
default: 1
description: >-
Minimum quantity that is required to apply the restriction and
subsequent discount.
CouponRestrictionRestrictToSubscriptions:
type: object
description: Restricts a coupon to specific order subscriptions.
required:
- type
- subscriptionIds
properties:
type:
type: string
description: Type of coupon restriction.
enum:
- restrict-to-subscriptions
subscriptionIds:
type: array
description: Subscription IDs on which a coupon can be applied.
items:
type: string
RedemptionRestriction:
description: Redemption restrictions.
type: object
discriminator:
propertyName: type
mapping:
discounts-per-redemption: '#/components/schemas/CouponRestrictionDiscountPerRedemption'
minimum-order-amount: '#/components/schemas/CouponRestrictionMinimumOrderAmount'
paid-by-time: '#/components/schemas/CouponRestrictionPaidByTime'
restrict-to-invoices: '#/components/schemas/CouponRestrictionRestrictToInvoices'
restrict-to-plans: '#/components/schemas/CouponRestrictionRestrictToPlans'
restrict-to-products: '#/components/schemas/CouponRestrictionRestrictToProducts'
restrict-to-subscriptions: '#/components/schemas/CouponRestrictionRestrictToSubscriptions'
anyOf:
- $ref: '#/components/schemas/CouponRestrictionDiscountPerRedemption'
- $ref: '#/components/schemas/CouponRestrictionMinimumOrderAmount'
- $ref: '#/components/schemas/CouponRestrictionPaidByTime'
- $ref: '#/components/schemas/CouponRestrictionRestrictToInvoices'
- $ref: '#/components/schemas/CouponRestrictionRestrictToPlans'
- $ref: '#/components/schemas/CouponRestrictionRestrictToProducts'
- $ref: '#/components/schemas/CouponRestrictionRestrictToSubscriptions'
CouponRedemption:
type: object
description: Coupon redemption log.
properties:
id:
type: string
readOnly: true
description: Unique resource ID.
maxLength: 50
example: cpn_rdm_0YVCNKF81GD778N4YNVGDJK558
couponId:
type: string
description: ID of the coupon.
maxLength: 50
example: cpn_0YVCNKF81GD778N4YNVGDJK558
customerId:
$ref: '#/components/schemas/CustomerId'
additionalRestrictions:
description: Additional coupon redemption restrictions.
type: array
items:
$ref: '#/components/schemas/RedemptionRestriction'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
canceledTime:
description: Date and time when the coupon is canceled.
readOnly: true
x-sortable: true
type:
- string
- 'null'
format: date-time
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
- coupon
DiscountContext:
type: string
description: Context in which the discount applies.
default: items
x-label: Context
x-sortable: true
x-basic: true
x-enumDescriptions:
items: items (less discounts)
shipping: shipping (less discounts)
items-and-shipping: items and shipping (less discounts)
enum:
- items
- shipping
- items-and-shipping
DiscountFixed:
type: object
description: Coupon fixed amount discount.
required:
- amount
- currency
- type
properties:
amount:
description: Amount of discount.
type: number
format: double
minimum: 0.01
currency:
$ref: '#/components/schemas/CurrencyCode'
type:
type: string
enum:
- fixed
x-label: Type
x-sortable: true
x-basic: true
context:
$ref: '#/components/schemas/DiscountContext'
DiscountPercent:
type: object
description: Coupon percent discount.
required:
- value
- type
properties:
value:
description: Percentage of discount.
type: number
format: double
minimum: 0.01
maximum: 100
type:
type: string
enum:
- percent
x-label: Type
x-sortable: true
x-basic: true
context:
$ref: '#/components/schemas/DiscountContext'
Discount:
type: object
description: Coupon discount.
discriminator:
propertyName: type
mapping:
fixed: '#/components/schemas/DiscountFixed'
percent: '#/components/schemas/DiscountPercent'
oneOf:
- $ref: '#/components/schemas/DiscountFixed'
- $ref: '#/components/schemas/DiscountPercent'
CouponRestrictionRedemptionsPerCustomer:
type: object
description: |-
Restricts the number of times that a coupon can be redeemed by one
customer. For example, use this restriction to limit the number of
redemptions to one per customer.
required:
- type
- quantity
properties:
type:
type: string
description: Type of coupon restriction.
enum:
- redemptions-per-customer
quantity:
type: integer
description: Permitted number of redemptions per customer.
CouponRestrictionRestrictToBxgy:
type: object
description: >-
Provides "buy X get Y" promotions.
These promotions incentivize new customers to buy and also reward
existing customers.
This restriction type enables you to add discounted plans to an invoice
when a certain quantity of other plans are purchased.
For example, if a customer buys two or more books, they get one free
bookmark.
required:
- type
- buy
- get
properties:
type:
type: string
description: Type of coupon restriction.
enum:
- restrict-to-bxgy
buy:
type: array
description: >-
One or more plan and quantity definitions that must be purchased to
receive all plans and quantities that are defined in the `get`
instruction.
minItems: 1
items:
type: object
required:
- planId
- quantity
properties:
planId:
type: string
description: Plan ID of the item being purchased.
maxLength: 50
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
quantity:
type: integer
minimum: 1
description: >-
Total quantity of the associated plan ID that must be
purchased for this restriction to apply.
get:
type: array
description: >-
One or more plan and quantity definitions that are added to a
purchase if all definitions in the `buy` condition are met.
minItems: 1
items:
type: object
required:
- planId
- quantity
properties:
planId:
type: string
description: Plan ID of the item that is to be received by the customer.
maxLength: 50
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
quantity:
type: integer
minimum: 1
description: >-
Total quantity of the associated plan ID that is to be
received by the customer.
CouponRestrictionRestrictToCountries:
type: object
description: Restricts a coupon for use in specific countries.
required:
- type
- countries
properties:
type:
type: string
description: Type of coupon restriction.
enum:
- restrict-to-countries
countries:
type: array
description: >-
Countries where the coupon can be applied, in ISO Alpha-2 code
format.
For examples, see
[ISO.org](https://www.iso.org/obp/ui/#search/code/).
items:
type: string
pattern: ^[A-Z]{2}$
CouponRestrictionRestrictToCustomerTags:
type: object
description: Restricts a coupon to customers with specific tags.
required:
- type
- tags
- requireAllTags
properties:
type:
type: string
description: Type of coupon restriction.
enum:
- restrict-to-customer-tags
tags:
type: array
description: Customer tags on which a coupon can be applied.
items:
type: string
requireAllTags:
type: boolean
description: Determines the behavior for checking customer tags.
enum:
- true
- false
x-enumDescriptions:
'true': Customer must have all listed tags to redeem a coupon.
'false': >-
Customer must have at least one of the listed tags to redeem a
coupon.
CouponRestrictionRestrictToCustomers:
type: object
description: Restricts a coupon to specific customers.
required:
- type
- customerIds
properties:
type:
type: string
description: Type of coupon restriction.
enum:
- restrict-to-customers
customerIds:
type: array
description: Customer IDs on which a coupon can be applied.
items:
type: string
CouponRestrictionExclusiveApplication:
type: object
description: >-
Restricts a coupon so that it cannot be used in combination with other
coupons.
If more than one coupon is active, a coupon with this restriction is
only applied if it provides a larger discount than the other coupons
combined.
If a coupon with this restriction is applied, all other coupons are
removed.
required:
- type
properties:
type:
type: string
description: Type of coupon restriction.
enum:
- restrict-to-exclusive-application
CouponRestrictionTotalRedemptions:
type: object
description: >-
Restricts the number of times a coupon can be redeemed by different
customers.
required:
- type
- quantity
properties:
type:
type: string
description: Type of coupon restriction.
enum:
- total-redemptions
quantity:
type: integer
description: Permitted total number of redemptions.
CouponRestriction:
description: Coupon restrictions.
type: object
discriminator:
propertyName: type
mapping:
discounts-per-redemption: '#/components/schemas/CouponRestrictionDiscountPerRedemption'
minimum-order-amount: '#/components/schemas/CouponRestrictionMinimumOrderAmount'
paid-by-time: '#/components/schemas/CouponRestrictionPaidByTime'
redemptions-per-customer: '#/components/schemas/CouponRestrictionRedemptionsPerCustomer'
restrict-to-bxgy: '#/components/schemas/CouponRestrictionRestrictToBxgy'
restrict-to-countries: '#/components/schemas/CouponRestrictionRestrictToCountries'
restrict-to-customer-tags: '#/components/schemas/CouponRestrictionRestrictToCustomerTags'
restrict-to-customers: '#/components/schemas/CouponRestrictionRestrictToCustomers'
restrict-to-exclusive-application: '#/components/schemas/CouponRestrictionExclusiveApplication'
restrict-to-invoices: '#/components/schemas/CouponRestrictionRestrictToInvoices'
restrict-to-plans: '#/components/schemas/CouponRestrictionRestrictToPlans'
restrict-to-products: '#/components/schemas/CouponRestrictionRestrictToProducts'
restrict-to-subscriptions: '#/components/schemas/CouponRestrictionRestrictToSubscriptions'
total-redemptions: '#/components/schemas/CouponRestrictionTotalRedemptions'
anyOf:
- $ref: '#/components/schemas/CouponRestrictionDiscountPerRedemption'
- $ref: '#/components/schemas/CouponRestrictionExclusiveApplication'
- $ref: '#/components/schemas/CouponRestrictionMinimumOrderAmount'
- $ref: '#/components/schemas/CouponRestrictionPaidByTime'
- $ref: '#/components/schemas/CouponRestrictionRedemptionsPerCustomer'
- $ref: '#/components/schemas/CouponRestrictionRestrictToBxgy'
- $ref: '#/components/schemas/CouponRestrictionRestrictToCountries'
- $ref: '#/components/schemas/CouponRestrictionRestrictToCustomerTags'
- $ref: '#/components/schemas/CouponRestrictionRestrictToCustomers'
- $ref: '#/components/schemas/CouponRestrictionRestrictToInvoices'
- $ref: '#/components/schemas/CouponRestrictionRestrictToPlans'
- $ref: '#/components/schemas/CouponRestrictionRestrictToProducts'
- $ref: '#/components/schemas/CouponRestrictionRestrictToSubscriptions'
- $ref: '#/components/schemas/CouponRestrictionTotalRedemptions'
Coupon:
type: object
description: Coupons and discounts.
required:
- discount
- issuedTime
properties:
id:
type: string
description: >-
ID of the coupon. This value is also known as the coupon redemption
code.
readOnly: true
maxLength: 50
example: cpn_0YVCNKF81GD778N4YNVGDJK558
discount:
$ref: '#/components/schemas/Discount'
restrictions:
description: Coupon restrictions.
type: array
items:
$ref: '#/components/schemas/CouponRestriction'
redemptionsCount:
type: integer
description: Total number of times that a coupon is redeemed.
minimum: 0
readOnly: true
status:
type: string
description: Specifies the current status of the coupon.
readOnly: true
enum:
- draft
- issued
- expired
description:
type: string
x-basic: true
description: >-
Description of the coupon. Use this field to provide an invoice
discount item description.
If this field is empty, the invoice discount item description uses
the related coupon ID, in the following format:
`Coupon "COUPON-ID"`.
issuedTime:
description: |-
Date and time when the coupon is issued.
This value may also be described as start time of the coupon.
type: string
x-label: Valid from
x-sortable: true
x-basic: true
format: date-time
expiredTime:
description: Date and time when the coupon expires.
type:
- string
- 'null'
x-label: Valid until
x-sortable: true
x-basic: true
format: date-time
revision:
description: |-
Number of times the coupon data has been modified.
Use the revision number when analyzing webhook data to
determine if a change should take precedence over the current
representation.
type: integer
readOnly: true
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
CouponExpiration:
type: object
required:
- expiredTime
properties:
expiredTime:
description: >-
Date and time when the coupon expires.
This value must be greater than the `issuedTime` value.
If this field contains a null or empty string, the coupon expires
immediately.
type: string
format: date-time
BlankProblem:
description: >-
Problem Details JSON Object
[[RFC7807](https://tools.ietf.org/html/rfc7807)].
type: object
minProperties: 1
additionalProperties: true
properties:
status:
type: integer
description: HTTP status code.
minimum: 400
maximum: 599
title:
type: string
description: >-
Short, human-readable summary of the problem type.
It SHOULD NOT change from occurrence to occurrence of the problem,
except for purposes of localization.
DocumentedProblem:
type: object
allOf:
- properties:
type:
type: string
description: >-
URI reference [[RFC3986](https://tools.ietf.org/html/rfc3986)]
that identifies the problem type.
It should provide human-readable documentation for the problem
type.
When this member is not present, its value is assumed to be
"about:blank".
format: uri
example: https://www.rebilly.com/docs/
- $ref: '#/components/schemas/BlankProblem'
DetailedProblem:
type: object
allOf:
- $ref: '#/components/schemas/BlankProblem'
- properties:
detail:
type: string
description: >-
Human-readable explanation specific to this occurrence of the
problem.
Problem:
type: object
allOf:
- $ref: '#/components/schemas/DocumentedProblem'
- $ref: '#/components/schemas/DetailedProblem'
Error:
type: object
allOf:
- $ref: '#/components/schemas/Problem'
- properties:
error:
deprecated: true
type: string
CustomerCredential:
type: object
required:
- username
- password
- customerId
properties:
id:
type: string
description: ID of the credential.
readOnly: true
maxLength: 50
example: cus_crd_0YV9Y706QGCB39FQD380G1ZHZH
username:
description: Username associated with the credential.
type: string
password:
description: Password associated with the credential.
type: string
format: password
writeOnly: true
customerId:
$ref: '#/components/schemas/CustomerId'
expiredTime:
description: Date and time when the credential expires.
type:
- string
- 'null'
format: date-time
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
ArrayCustomField:
type: object
required:
- type
properties:
name:
description: Name of the custom field.
type: string
readOnly: true
type:
description: >-
Describes the data type. Custom field type value cannot be changed.
Array of strings with up to 255 characters. Maximum size is 1000
elements.
type: string
enum:
- array
description:
description: Description of the custom field.
type:
- string
- 'null'
additionalSchema:
type:
- object
- 'null'
description: Additional schema which adds additional values constrains.
properties:
allowedValues:
description: List of allowed values.
type: array
items:
type: string
required:
description: >-
Specifies whether this value is required.
This value can be combined with any parameter and is available
for custom fields of any type.
type: boolean
default:
description: Default value.
type: array
items:
type: string
_links:
$ref: '#/components/schemas/SelfLink'
BooleanCustomField:
type: object
required:
- type
properties:
name:
description: Name of the custom field.
type: string
readOnly: true
type:
description: |-
Describes the data type. Custom field type value cannot be changed.
Specifies a `true` or `false` value.
type: string
enum:
- boolean
description:
description: Description of the custom field.
type:
- string
- 'null'
additionalSchema:
type:
- object
- 'null'
description: Additional schema which adds additional values constrains.
properties:
required:
description: Specifies whether this value is required.
type: boolean
default:
description: Default value.
type: boolean
_links:
$ref: '#/components/schemas/SelfLink'
DateCustomField:
type: object
required:
- type
properties:
name:
description: Name of the custom field.
type: string
readOnly: true
type:
description: >-
Describes the data type. Custom field type value cannot be changed.
String in [full-date](https://www.rfc-editor.org/rfc/rfc3339) format
(YYYY-MM-DD).
type: string
enum:
- date
description:
description: Description of the custom field.
type:
- string
- 'null'
additionalSchema:
type:
- object
- 'null'
description: Additional schema which adds additional values constrains.
properties:
required:
description: Specifies whether this value is required.
type: boolean
default:
description: Default value.
type: string
format: date
_links:
$ref: '#/components/schemas/SelfLink'
DateTimeCustomField:
type: object
required:
- type
properties:
name:
description: Name of the custom field.
type: string
readOnly: true
type:
description: >-
Describes the data type. Custom field type value cannot be changed.
String in [date-time](https://www.rfc-editor.org/rfc/rfc3339) format
(YYYY-MM-DDTHH:MM:SSZ).
type: string
enum:
- datetime
description:
description: Description of the custom field.
type:
- string
- 'null'
additionalSchema:
type:
- object
- 'null'
description: Additional schema which adds additional values constrains.
properties:
required:
description: Specifies whether this value is required.
type: boolean
default:
description: Default value.
type: string
format: date-time
_links:
$ref: '#/components/schemas/SelfLink'
IntegerCustomField:
type: object
required:
- type
properties:
name:
description: Name of the custom field.
type: string
readOnly: true
type:
description: |-
Describes the data type. Custom field type value cannot be changed.
Cardinal value of between `-2^31` and `2^31-1`.
type: string
enum:
- integer
description:
description: Description of the custom field.
type:
- string
- 'null'
additionalSchema:
type:
- object
- 'null'
description: Additional schema which adds additional values constrains.
properties:
minimum:
description: |-
Minimum allowed integer.
This value can be combined with the `maximum` parameter.
type: integer
maximum:
description: |-
Maximum allowed integer.
This value can be combined with the `minimum` parameter.
type: integer
required:
description: Specifies whether this value is required.
type: boolean
default:
description: Default value.
type: integer
_links:
$ref: '#/components/schemas/SelfLink'
NumberCustomField:
type: object
required:
- type
properties:
name:
description: Name of the custom field.
type: string
readOnly: true
type:
description: >-
Describes the data type. Custom field type value cannot be changed.
Float value. This field also accepts cardinal values which are
interpreted as float.
type: string
enum:
- number
description:
description: Description of the custom field.
type:
- string
- 'null'
additionalSchema:
type:
- object
- 'null'
description: Additional schema which adds additional values constrains.
properties:
minimum:
description: |-
Minimum allowed number.
This value can be combined with the `maximum` parameter.
type: number
format: double
maximum:
description: |-
Maximum allowed number.
This value can be combined with the `minimum` parameter.
type: number
format: double
required:
description: Specifies whether this value is required.
type: boolean
default:
description: Default value.
type: number
format: double
_links:
$ref: '#/components/schemas/SelfLink'
StringCustomField:
type: object
required:
- type
properties:
name:
description: Name of the custom field.
type: string
readOnly: true
type:
description: |-
Describes the data type. Custom field type value cannot be changed.
Regular string of up to 255 characters.
type: string
enum:
- string
description:
description: Description of the custom field.
type:
- string
- 'null'
additionalSchema:
type:
- object
- 'null'
description: Additional schema which adds additional values constrains.
properties:
allowedValues:
description: List of allowed values.
type: array
items:
type: string
maxLength:
description: |-
Maximum allowed string length .
A maximum length of 4000 characters can be configured.
By default, this value is set to 255.
type: integer
pattern:
description: Allowed regular expression of a string.
type: string
example: /^[0-9]+$/
required:
description: Specifies whether this value is required.
type: boolean
default:
description: Default value.
type: string
_links:
$ref: '#/components/schemas/SelfLink'
MonetaryCustomField:
type: object
required:
- type
properties:
name:
description: Name of the custom field.
type: string
readOnly: true
type:
description: |-
Describes the data type. Custom field type value cannot be changed.
A map of 3-letter currency, code, and amount.
Example: `{"currency": "EUR", "amount": 25.30}`.
type: string
enum:
- monetary
description:
description: Description of the custom field.
type:
- string
- 'null'
additionalSchema:
type:
- object
- 'null'
description: Additional schema which adds additional values constrains.
properties:
required:
description: Specifies whether this value is required.
type: boolean
default:
description: Default value.
type: object
properties:
currency:
$ref: '#/components/schemas/CurrencyCode'
amount:
type: number
format: double
_links:
$ref: '#/components/schemas/SelfLink'
CustomField:
description: Separate custom field schema.
type: object
discriminator:
propertyName: type
mapping:
array: '#/components/schemas/ArrayCustomField'
boolean: '#/components/schemas/BooleanCustomField'
date: '#/components/schemas/DateCustomField'
datetime: '#/components/schemas/DateTimeCustomField'
integer: '#/components/schemas/IntegerCustomField'
number: '#/components/schemas/NumberCustomField'
string: '#/components/schemas/StringCustomField'
monetary: '#/components/schemas/MonetaryCustomField'
oneOf:
- $ref: '#/components/schemas/ArrayCustomField'
- $ref: '#/components/schemas/BooleanCustomField'
- $ref: '#/components/schemas/DateCustomField'
- $ref: '#/components/schemas/DateTimeCustomField'
- $ref: '#/components/schemas/IntegerCustomField'
- $ref: '#/components/schemas/NumberCustomField'
- $ref: '#/components/schemas/StringCustomField'
- $ref: '#/components/schemas/MonetaryCustomField'
WebsiteId:
type: string
description: >-
ID of the website.
A website is where an organization obtains a customer.
For more information, see [Obtain an organization ID and website
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
maxLength: 50
example: web_0YV7DE4Z26DQSA1AC92FBJ7SEG
PaymentMethod:
type: string
description: Payment method.
enum:
- payment-card
- ach
- cash
- check
- paypal
- AdvCash
- Aircash
- Airpay
- Alfa-click
- Alipay
- AmazonPay
- Apple Pay
- AstroPay Card
- AstroPay-GO
- BankSEND
- BankReferenced
- bank-transfer
- bank-transfer-2
- bank-transfer-3
- bank-transfer-4
- bank-transfer-5
- bank-transfer-6
- bank-transfer-7
- bank-transfer-8
- bank-transfer-9
- Baloto
- Beeline
- Belfius-direct-net
- bitcoin
- Bizum
- Blik
- Boleto
- Boleto-2
- Boleto-3
- cash-deposit
- CASHlib
- CashToCode
- CCAvenue
- China UnionPay
- Cleo
- CODVoucher
- Conekta-oxxo
- Conekta-spei
- cryptocurrency
- Cupon-de-pagos
- CyberSource
- Dimoco-pay-smart
- Directa24Card
- domestic-cards
- Efecty
- echeck
- ecoPayz
- ecoVoucher
- EPS
- ePay.bg
- Ethereum
- e-wallet
- ezyEFT
- eZeeWallet
- FasterPay
- Flexepin
- Giropay
- Google Pay
- Gpaysafe
- iDebit
- iDEAL
- ING-homepay
- INOVAPAY-pin
- INOVAPAY-wallet
- InstaDebit
- InstantPayments
- instant-bank-transfer
- Interac-online
- Interac-eTransfer
- Interac-express-connect
- Interac
- invoice
- iWallet
- Jeton
- jpay
- KakaoPay
- Khelocard
- Klarna
- KNOT
- Litecoin
- loonie
- LPG-online
- LPG-payment-card
- Matrix
- MaxiCash
- Megafon
- MercadoPago
- MiFinity-eWallet
- miscellaneous
- MobilePay
- Multibanco
- Bancontact
- Bancontact-mobile
- MTS
- MuchBetter
- MyFatoorah
- Neosurf
- Netbanking
- Neteller
- Nordea-Solo
- NordikCoin
- OchaPay
- online-bank-transfer
- Onlineueberweisen
- oriental-wallet
- OXXO
- P24
- Pagadito
- PagoEffectivo
- Pagsmile-lottery
- Pagsmile-deposit-express
- PayCash
- Payco
- Payeer
- PaymentAsia-crypto
- Paysafecard
- PayTabs
- Pay4Fun
- Paynote
- Paymero
- Paymero-QR
- PayU
- PayULatam
- Perfect-money
- Piastrix
- PIX
- PinPay
- phone
- PhonePe
- POLi
- PostFinance-card
- PostFinance-e-finance
- QIWI
- QPay
- QQPay
- rapyd-checkout
- rebilly-hosted-payment-form
- Resurs
- SafetyPay
- Samsung Pay
- SEPA
- Siirto
- Skrill
- Skrill Rapid Transfer
- SMSVoucher
- Sofort
- SparkPay
- SPEI
- swift-dbt
- Tele2
- Telr
- Terminaly-RF
- Tether
- ToditoCash-card
- Trustly
- Tupay
- TWINT
- UniCrypt
- UPayCard
- UPI
- USD-coin
- VCreditos
- VegaWallet
- VenusPoint
- voucher
- voucher-2
- voucher-3
- voucher-4
- Wallet88
- Webmoney
- Webpay
- Webpay-2
- Webpay Card
- WeChat Pay
- XPay-P2P
- XPay-QR
- Yandex-money
- Zotapay
- Zimpler
VaultedInstrument:
title: Vaulted payment instrument
description: >-
Vaulted payment instrument.
To use this payment instrument for automatic subscription renewals,
and for transactions when no specific payment instrument is provided by
the user,
set this as the default payment instrument.
required:
- method
- paymentInstrumentId
properties:
method:
description: >-
Payment method supported vault.
For more information, see [Payment
instrument](https://www.rebilly.com/catalog/all/payment-instruments).
type: string
enum:
- payment-card
- ach
- paypal
allOf:
- $ref: '#/components/schemas/PaymentMethod'
paymentInstrumentId:
type: string
description: ID of the payment instrument.
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
AlternativePaymentInstrument:
title: Alternative instrument
description: >-
Alternative payment method instrument.
To use this payment instrument for automatic subscription renewals,
and for transactions when no specific payment instrument is provided by
the user,
set this as the default payment instrument.
type: object
required:
- method
properties:
method:
$ref: '#/components/schemas/PaymentMethod'
paymentInstrumentId:
type: string
description: ID of the payment instrument.
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
CashInstrument:
title: Cash
description: >-
Cash payment instrument object.
To use this payment instrument for automatic subscription renewals,
and for transactions when no specific payment instrument is provided by
the user,
set this as the default payment instrument.
type: object
required:
- method
properties:
method:
type: string
enum:
- cash
receivedBy:
description: Individual or entity that received the payment.
type: string
CheckInstrument:
title: Check
description: >-
Check payment instrument object.
To use this payment instrument for automatic subscription renewals,
and for transactions when no specific payment instrument is provided by
the user,
set this as the default payment instrument.
type: object
required:
- method
properties:
method:
type: string
enum:
- check
reference:
description: Reference data.
type: string
ResourceCustomFields:
description: >-
Use custom fields to extend a resource scheme to include custom data
that is not provided as a common field.
For more information, see [Custom
fields](https://www.rebilly.com/catalog/all/custom-fields).
type: object
default: {}
example:
foo: bar
ContactPhoneNumbers:
description: List of phone numbers associated with the contact.
type: array
items:
type: object
required:
- label
- value
properties:
label:
description: Phone number label or name.
type: string
maxLength: 45
example: main
value:
description: Phone number value.
type: string
maxLength: 50
example: 512-710-1640
primary:
description: >-
Specifies if the phone number is the contact's primary phone
number.
type: boolean
example: true
ContactEmails:
description: List of email addresses associated with the contact.
type: array
items:
type: object
required:
- label
- value
properties:
label:
description: Email label or name.
type: string
maxLength: 45
example: main
value:
description: Email address value.
type: string
format: email
maxLength: 255
example: rebilly@example.com
primary:
description: >-
Specifies if the email address is the contact's primary email
address.
type: boolean
example: true
ContactObject:
type: object
description: Contact's information.
properties:
firstName:
description: Contact's first name.
type:
- string
- 'null'
pattern: ^[\w\s\-\p{L},.']+$
maxLength: 45
example: Benjamin
lastName:
description: Contact's last name.
type:
- string
- 'null'
pattern: ^[\w\s\-\p{L},.']+$
maxLength: 45
example: Franklin
organization:
description: Contact's organization.
type:
- string
- 'null'
pattern: ^[\w\s\-\p{L},.'&]+$
maxLength: 255
example: Rebilly
address:
description: First line of the contact's street address.
type:
- string
- 'null'
pattern: ^[\w\s\-\/\p{L},.#;:()'&]+$
maxLength: 60
example: 36 Craven St
address2:
description: Second line of the contact's street address.
type:
- string
- 'null'
pattern: ^[\w\s\-\/\p{L},.#;:()'&]+$
maxLength: 60
city:
description: Contact's city of residence.
type:
- string
- 'null'
pattern: ^[\w\s\-\p{L},.']+$
maxLength: 45
example: Austin
region:
description: Contact's region of residence.
type:
- string
- 'null'
pattern: ^[\w\s\-\/\p{L},.#;:()']+$
maxLength: 45
example: Texas
country:
description: >-
Contact's country of residence in ISO 3166 alpha-2 country code.
For examples, see
[ISO.org](https://www.iso.org/obp/ui/#search/code/).
type:
- string
- 'null'
pattern: ^[A-Z]{2}$
maxLength: 2
example: GB
postalCode:
description: Contact's postal code.
type:
- string
- 'null'
pattern: ^[\w\s\-]+$
maxLength: 10
example: WC2N 5NF
phoneNumbers:
$ref: '#/components/schemas/ContactPhoneNumbers'
emails:
$ref: '#/components/schemas/ContactEmails'
dob:
description: Contact's date of birth in ISO-8601 `YYYY-MM-DD` format.
type:
- string
- 'null'
format: date
example: '1980-04-01'
jobTitle:
description: Contact's job title.
type:
- string
- 'null'
pattern: ^[\w\s\-\/\p{L},.#;:()']+$
maxLength: 255
example: CEO
hash:
description: Use this value to compare contacts for identical attribute values.
type: string
maxLength: 40
example: 056ae6d97c788b9e98b049ebafd7b229bf852221
readOnly: true
Company:
type:
- object
- 'null'
description: >-
Company information that is associated with the customer's primary email
address domain.
This is a paid feature, to enable it [contact
Rebilly](https://www.rebilly.com/support/).
readOnly: true
properties:
name:
type:
- string
- 'null'
description: Name of the company.
domain:
type: string
description: Website domain of the company.
yearFounded:
type:
- number
- 'null'
description: Founding year of the company.
format: integer
industry:
type:
- string
- 'null'
description: Industry the company is associated with.
employeesCount:
type:
- number
- 'null'
description: Number of employees in the company.
format: integer
country:
type:
- string
- 'null'
description: Country where the company is based.
locality:
type:
- string
- 'null'
description: Locality or region where the company is based.
_links:
type: array
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- linkedin
CustomerAverageValue:
type: object
readOnly: true
description: Average customer value.
properties:
currency:
description: Merchant's reporting currency.
$ref: '#/components/schemas/CurrencyCode'
amount:
x-type: Money
x-label: Average Value
x-sortable: true
x-basic: true
description: Average approved payment amount in merchant's reporting currency.
type: number
format: double
amountUsd:
description: Average approved payment amount in USD.
type: number
format: double
CustomerLifetimeRevenue:
type: object
readOnly: true
description: Customer's lifetime revenue.
properties:
currency:
description: Merchant's reporting currency.
$ref: '#/components/schemas/CurrencyCode'
amount:
x-type: Money
x-label: Lifetime Revenue
x-sortable: true
x-basic: true
description: Revenue amount in the merchant's reporting currency.
type: number
format: double
amountUsd:
description: Revenue amount in USD.
type: number
format: double
OrganizationId:
type: string
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
maxLength: 50
example: org_0YVDM8RC7GDADADSBSMW124JA8
TaxNumber:
type: object
required:
- type
- value
properties:
type:
type: string
description: Type of the tax number.
enum:
- eu-vat
- other
example: eu-vat
value:
type: string
description: Value of the tax number.
example: GB980780684
isDefault:
type: boolean
description: >-
Determines if the tax number is selected as default to display on
invoices.
example: true
isValid:
type:
- boolean
- 'null'
description: >-
Determines if the tax number passed the EU official [VIES
validation](https://ec.europa.eu/taxation_customs/vies/#/vat-validation).
example: true
readOnly: true
Customer:
type: object
description: Customer information.
properties:
id:
type: string
description: ID of the customer.
readOnly: true
example: cus_0YV7DDSDD1C8DA64KHH2W33CPF
maxLength: 50
email:
description: Customer's email address.
type:
- string
- 'null'
format: email
readOnly: true
x-sortable: true
x-basic: true
firstName:
description: Customer's first name.
type:
- string
- 'null'
x-basic: true
readOnly: true
lastName:
description: Customer's last name.
type:
- string
- 'null'
x-sortable: true
x-basic: true
readOnly: true
websiteId:
x-sortable: true
allOf:
- $ref: '#/components/schemas/WebsiteId'
paymentToken:
type: string
writeOnly: true
description: >-
Write-only payment token.
If supplied, the token is converted into a payment instrument and
set as the `defaultPaymentInstrument` value.
If both are supplied, the value of this property overrides the
`defaultPaymentInstrument` value.
The token expires after first use.
defaultPaymentInstrument:
anyOf:
- $ref: '#/components/schemas/VaultedInstrument'
- $ref: '#/components/schemas/AlternativePaymentInstrument'
- $ref: '#/components/schemas/CashInstrument'
- $ref: '#/components/schemas/CheckInstrument'
- type: 'null'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
primaryAddress:
description: Customer's primary address.
oneOf:
- $ref: '#/components/schemas/ContactObject'
- type: 'null'
company:
$ref: '#/components/schemas/Company'
averageValue:
$ref: '#/components/schemas/CustomerAverageValue'
paymentCount:
x-label: Payments
x-sortable: true
x-basic: true
description: Total number of approved payments made by the customer.
readOnly: true
type: integer
lastPaymentTime:
x-label: Last Payment
x-sortable: true
x-basic: true
description: Time and date of the customer's last approved payment.
type:
- string
- 'null'
format: date-time
readOnly: true
lifetimeRevenue:
$ref: '#/components/schemas/CustomerLifetimeRevenue'
invoiceCount:
x-sortable: true
description: >-
Total number of invoices issued to the customer.
This value is auto-incrementing.
If this value is `0`, the record relates to a lead.
A lead is a customer who has not made a payment yet.
If this value is greater than or equal to `1` the record relates to
a customer.
readOnly: true
type: integer
tags:
description: List of customer tags.
readOnly: true
type: array
items:
$ref: '#/components/schemas/Tag'
revision:
description: >-
Number of times the customer's data has been modified.
Use this value when analyzing webhook data to determine if a change
must take precedence over the current representation.
type: integer
readOnly: true
isEddRequired:
description: >-
Specifies if Enhanced Due Diligence (EDD) is enabled for this
customer.
For more information, see [Enhanced Due
Diligence](https://www.rebilly.com/docs/kyc-and-aml/edd/).
type: boolean
default: false
hasFulfilledKyc:
description: >-
Specifies if the customer has accepted and reviewed identity and
address documents, or an accepted credit file document.
type: boolean
readOnly: true
organizationId:
readOnly: true
allOf:
- $ref: '#/components/schemas/OrganizationId'
taxNumbers:
type:
- array
- 'null'
description: Tax numbers of the customer.
items:
$ref: '#/components/schemas/TaxNumber'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- attachments
- defaultPaymentInstrument
- leadSource
- website
_embedded:
type: object
description: >-
Embedded objects that are requested using the `expand` query string
parameter.
readOnly: true
properties:
leadSource:
type: object
CustomerTimelineCustomEvent:
type: object
required:
- name
properties:
id:
type: string
description: ID of the customer timeline custom event.
readOnly: true
maxLength: 50
example: tmln_0YV8Q9WEF5DTA8HFXS27D1G6GC
name:
description: |-
Name of the customer timeline custom event type.
This value must not conflict with any system event name.
type: string
minLength: 1
maxLength: 255
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
LeadSourceData:
type: object
description: Lead source information.
properties:
medium:
description: >-
Category of the lead source traffic.
For example, the medium could be organic search, Google ads, Display
ads, and so on.
type:
- string
- 'null'
maxLength: 512
source:
description: Domain, platform, or channel from which the lead source originates.
type:
- string
- 'null'
maxLength: 512
campaign:
description: Campaign name of the lead source.
type:
- string
- 'null'
maxLength: 512
term:
description: Term associated with a lead source.
type:
- string
- 'null'
maxLength: 512
content:
description: |-
Content contained in the lead source content.
For example, content could be graphics, video, and so on.
type:
- string
- 'null'
maxLength: 512
affiliate:
description: Individual or entity that is affiliated with the lead source.
type:
- string
- 'null'
maxLength: 512
subAffiliate:
description: >-
Individual or entity that is associated with a lead source
affiliate.
In other products, this field may also be referred to as sub ID or
click ID in some.
type:
- string
- 'null'
maxLength: 512
salesAgent:
description: Name of the sales agent associated with the lead source.
type:
- string
- 'null'
maxLength: 512
clickId:
description: >-
ID of the lead source click.
This value is passed in the ad click URL for tracking and campaign
attribution.
type:
- string
- 'null'
maxLength: 512
path:
description: URL from which the lead source originates.
type:
- string
- 'null'
maxLength: 512
referrer:
description: >-
Lead source [`referrer`
URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer).
type:
- string
- 'null'
format: url
maxLength: 2083
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
LeadSource:
allOf:
- $ref: '#/components/schemas/LeadSourceData'
- type: object
properties:
original:
readOnly: true
allOf:
- $ref: '#/components/schemas/LeadSourceData'
RedemptionCancelTimelineAction:
description: Cancel redemption.
type: object
readOnly: true
properties:
action:
type: string
enum:
- redemption-cancel
redemptionId:
$ref: '#/components/schemas/ResourceId'
ResendEmailTimelineAction:
type: object
description: Resend email action.
readOnly: true
properties:
action:
type: string
enum:
- resend-email
messageId:
$ref: '#/components/schemas/ResourceId'
RulesetRestoreTimelineAction:
type: object
description: Restore ruleset version.
readOnly: true
properties:
action:
type: string
enum:
- ruleset-restore
version:
type: integer
description: Version of the ruleset to restore.
ShowEddSearchLogsTimelineAction:
type: object
description: Show Enhanced Due Diligence (EDD) search logs action.
readOnly: true
properties:
action:
type: string
enum:
- show-edd-search-logs
searchLogId:
$ref: '#/components/schemas/ResourceId'
type:
type: string
enum:
- arrest
- bankruptcy
- fraud
- occupation
TimelineAction:
type: object
discriminator:
propertyName: action
mapping:
redemption-cancel: '#/components/schemas/RedemptionCancelTimelineAction'
resend-email: '#/components/schemas/ResendEmailTimelineAction'
ruleset-restore: '#/components/schemas/RulesetRestoreTimelineAction'
show-edd-search-logs: '#/components/schemas/ShowEddSearchLogsTimelineAction'
oneOf:
- $ref: '#/components/schemas/RedemptionCancelTimelineAction'
- $ref: '#/components/schemas/ResendEmailTimelineAction'
- $ref: '#/components/schemas/RulesetRestoreTimelineAction'
- $ref: '#/components/schemas/ShowEddSearchLogsTimelineAction'
TimelineTable:
type: object
description: Additional timeline message information.
discriminator:
propertyName: type
mapping:
three-columns: '#/components/schemas/ThreeColumnsTimelineTable'
two-columns: '#/components/schemas/TwoColumnsTimelineTable'
one-column: '#/components/schemas/OneColumnTimelineTable'
list: '#/components/schemas/ListTimelineTable'
properties:
type:
type: string
enum:
- list
- one-columns
- two-columns
- three-columns
title:
type: string
description: Data table title.
footer:
type: string
description: Data table footer.
ThreeColumnsTimelineTable:
allOf:
- $ref: '#/components/schemas/TimelineTable'
- type: object
properties:
data:
type: array
description: Table data. Each array element represents a table row.
items:
type: object
properties:
attribute:
type: string
previousValue:
type: string
newValue:
type: string
example:
attribute: Descriptor
previousValue: test.com
newValue: new-test.com
TwoColumnsTimelineTable:
allOf:
- $ref: '#/components/schemas/TimelineTable'
- type: object
properties:
data:
type: array
description: Table data. Each array element represents a table row.
items:
type: object
properties:
attribute:
type: string
value:
type: string
example:
attribute: Who
value: John Doe
OneColumnTimelineTable:
allOf:
- $ref: '#/components/schemas/TimelineTable'
- type: object
properties:
data:
type: array
description: Table data. Each array element represents a table row.
items:
type: object
properties:
attribute:
type: string
value:
type: string
example:
attribute: Who
value: John Doe
ListTimelineTable:
allOf:
- $ref: '#/components/schemas/TimelineTable'
- type: object
properties:
data:
type: array
description: Table data. Each array element represents a line.
items:
type: string
TimelineExtraData:
type: object
description: Additional data.
readOnly: true
properties:
actions:
description: |-
Actions available for a timeline message.
If no actions are available, this field is empty.
type: array
minItems: 0
items:
$ref: '#/components/schemas/TimelineAction'
tables:
description: Table data that is attached to the timeline message.
type: array
minItems: 0
items:
$ref: '#/components/schemas/TimelineTable'
author:
type: object
description: Author of the timeline message.
properties:
userFullName:
description: Author's full name.
type: string
userId:
description: Author's user ID.
type: string
maxLength: 50
example: usr_0YVCEENYJ3D7Q9EN6BN16HA0G4
mentions:
description: User mentions, or tags, in a timeline.
type: object
additionalProperties:
type: string
example:
'@test@mail.com': userId-1
links:
description: Links that are attached to a timeline message.
type: array
items:
type: object
properties:
resourceType:
type: string
enum:
- kyc-document
- invoice
- subscription
- transaction
- email-message
- dispute
- coupon
- external
resourceId:
$ref: '#/components/schemas/ResourceId'
placeholder:
type: string
example: KYC document
externalUrl:
type: string
example: http://example.com
ServerTimestamp:
type: string
description: Read-only timestamp in ISO 8601 date-time format.
format: date-time
readOnly: true
CustomerTimeline:
type: object
properties:
id:
type: string
description: ID of the customer timeline custom event.
readOnly: true
maxLength: 50
example: tmln_0YV8Q9WEF5DTA8HFXS27D1G6GC
type:
description: Type of timeline message.
type: string
enum:
- account-password-reset-requested
- account-verification-requested
- aml-list-was-possibly-matched
- deposit-request-completed
- deposit-request-created
- deposit-request-expired
- deposit-request-started
- coupon-applied
- coupon-redeemed
- coupon-redemption-canceled
- custom-event
- custom-event-processed
- custom-fields-changed
- customer-bank-account-blocked
- customer-blocked
- customer-comment-created
- customer-created
- customer-merged
- customer-payment-card-blocked
- customer-requested-otp
- customer-tagged
- customer-untagged
- default-payment-instrument-changed
- email-message-sent
- experian-check-performed
- invoice-abandoned
- invoice-created
- invoice-disputed
- invoice-issued
- invoice-paid
- invoice-partially-paid
- invoice-partially-refunded
- invoice-past-due
- invoice-refunded
- invoice-reissued
- invoice-revenue-recognized
- invoice-voided
- kyc-document-accepted
- kyc-document-created
- kyc-document-modified
- kyc-document-rejected
- kyc-document-reviewed
- kyc-request-fulfilled
- lead-source-changed
- order-activated
- order-canceled
- order-churned
- order-completed
- order-created
- order-downgraded
- order-paid-early
- order-reactivated
- order-renewed
- order-upgraded
- payment-card-expiration-was-modified
- payment-card-expired
- payment-instrument-created
- payment-instrument-deactivated
- primary-address-changed
- quickbooks-customer-created
- quickbooks-customer-task-failed
- quote-canceled
- quote-created
- quote-expired
- quote-issued
- quote-order-attached
- quote-recalled
- quote-rejected
- quote-updated
- refund-was-reflected-in-invoices
- subscription-paused
- subscription-resumed
- subscription-trial-end-changed
- transaction-abandoned
- transaction-amount-discrepancy-found
- transaction-approved
- transaction-canceled
- transaction-declined
- transaction-discrepancy-found
- transaction-disputed
- transaction-reconciled
- transaction-refunded
- transaction-voided
- transaction-waiting-gateway
customEventType:
description: >-
Timeline custom event type.
Used with `custom-event` type.
This value must be defined using the [Create customer timeline
custom event type](../PostCustomerTimeline) operation.
type:
- string
- 'null'
minLength: 1
maxLength: 255
customData:
description: |-
Timeline custom event data.
Used with `custom-event` type.
Transforms to `extraData` two-column table in response.
type: object
writeOnly: true
example:
customAttribute: customValue
otherAttribute: otherValue
triggeredBy:
description: Specifies who, or what, triggered the timeline event.
type: string
readOnly: true
enum:
- rebilly
- app
- direct-api
message:
description: Detailed message description.
type: string
extraData:
$ref: '#/components/schemas/TimelineExtraData'
occurredTime:
description: Date and time when the timeline message occurred.
$ref: '#/components/schemas/ServerTimestamp'
_links:
$ref: '#/components/schemas/SelfLink'
Dispute:
type: object
properties:
id:
type: string
description: ID of the dispute.
readOnly: true
maxLength: 50
example: dp_0YVCE8J5F2DE58FV0S8YASW4HK
customerId:
description: ID of the customer who is disputing a transaction.
type:
- string
- 'null'
readOnly: true
maxLength: 50
example: cus_0YV7DDSDD1C8DA64KHH2W33CPF
transactionId:
description: ID of the disputed transaction.
type:
- string
- 'null'
maxLength: 50
example: txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0
currency:
$ref: '#/components/schemas/CurrencyCode'
amount:
description: Dispute amount.
type: number
format: double
acquirerReferenceNumber:
description: Acquirer reference number for the dispute.
type:
- string
- 'null'
caseId:
description: Case ID of the dispute.
type:
- string
- 'null'
reasonCode:
description: >-
Code used in the chargeback that describes the reason for the
dispute.
type:
- string
- 'null'
maxLength: 255
reasonDescription:
description: Description of the reason for the dispute.
type:
- string
- 'null'
maxLength: 512
readOnly: true
category:
description: Category of dispute.
type: string
readOnly: true
enum:
- fraud
- authorization
- processing-errors
- consumer-disputes
- uncategorized
- bank-return
type:
description: Type of dispute.
type: string
enum:
- information-request
- first-chargeback
- second-chargeback
- arbitration
- fraud
- ethoca-alert
- verifi-alert
- bank-return
- paypal-claim
status:
description: Status of the dispute.
type: string
enum:
- response-needed
- under-review
- forfeited
- won
- lost
- unknown
postedTime:
description: Date and time when the dispute is posted.
type: string
format: date-time
deadlineTime:
description: >-
Latest date and time by when a merchant must submit a representment
for a dispute.
If the deadline is missed, the merchant loses the dispute.
type:
- string
- 'null'
format: date-time
rawResponse:
description: >-
Raw response from the payment gateway that processed the disputed
transaction.
type:
- string
- 'null'
readOnly: true
resolvedTime:
type:
- string
- 'null'
format: date-time
description: Date and time when the dispute is resolved.
readOnly: true
source:
description: Source of the dispute.
type:
- string
- 'null'
readOnly: true
enum:
- null
- api
- manual
- sftp
- webhook
revision:
description: |-
Number of times the dispute data has been modified.
Use the revision number when analyzing webhook data to
determine if a change should take precedence over the current
representation.
type: integer
readOnly: true
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- transaction
- attachments
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
transaction:
type: object
TransactionId:
type: string
description: ID of the transaction.
maxLength: 50
example: txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0
File:
type: object
properties:
id:
type: string
description: ID of the file.
readOnly: true
maxLength: 50
example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
name:
description: Original file name.
type: string
extension:
description: File extension.
type: string
description:
description: Description of the file.
type: string
sourceType:
description: Source of the file.
type:
- string
- 'null'
enum:
- upload
- camera
- organization-export
- organization-closure-export
- null
example: upload
tags:
description: List of tags associated with the file.
type: array
items:
type: string
mime:
description: MIME type of the file.
type: string
readOnly: true
enum:
- image/png
- image/jpeg
- image/gif
- application/pdf
size:
description: File size, in bytes.
type: integer
readOnly: true
width:
description: Image width. This field applicable to images only.
type: integer
readOnly: true
height:
description: Image height. This field applicable to images only.
type: integer
readOnly: true
sha1:
description: Hash sum of the file.
type: string
readOnly: true
exifData:
description: >-
Collection of EXIF tags contained in the image metadata. This field
applicable to images only.
type:
- object
- 'null'
readOnly: true
example:
FileSize: 120
Software: GIMP 2.4.5
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
isPublic:
description: >-
Specifies if the file is available publicly without authentication.
If this value is `true`, the permalink in the `_links` section
contains the public URL.
type: boolean
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- download
- signedLink
- permalink
FileCreateFromInline:
type: object
required:
- file
properties:
file:
description: File in base64 encoded format.
type: string
example: R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=
isPublic:
description: >-
Specifies if the file is available publicly without authentication.
If this value is `true`, the permalink in the `_links` section
contains the public URL.
type: boolean
example: false
name:
description: File name used for downloading.
type: string
example: logo.png
description:
description: Description of the file.
type: string
example: My file description
sourceType:
description: Source of the file.
type:
- string
- 'null'
enum:
- upload
- camera
example: upload
tags:
description: List of tags associated with the file.
type: array
items:
type: string
example:
- test
- tags
FileCreateFromUrl:
type: object
required:
- url
properties:
url:
description: URL of the file to upload.
type: string
example: >-
https://blog.rebilly.com/wp-content/uploads/2017/09/rb_LogoInverted_Small.png
isPublic:
description: >-
Specifies if the file is available publicly without authentication.
If this value is `true`, the permalink in the `_links` section
contains the public URL.
type: boolean
example: false
name:
description: File name used for downloading.
type: string
example: logo.png
description:
description: Description of the file.
type: string
example: My file description
sourceType:
description: Source of the file.
type:
- string
- 'null'
enum:
- upload
- camera
example: upload
tags:
description: List of tags associated with the file.
type: array
items:
type: string
example:
- test
- tags
ManualShipping:
description: Manually set shipping amount.
type: object
required:
- amount
- calculator
properties:
amount:
x-type: Money
type: number
format: double
description: Shipping amount.
calculator:
description: Shipping calculator.
type: string
enum:
- manual
RebillyShipping:
description: Rebilly-based shipping which is calculated by shipping rates.
type: object
required:
- calculator
properties:
calculator:
description: Shipping calculator.
type: string
enum:
- rebilly
rateId:
description: >-
ID of the shipping rate. If unset the cheapest applicable shipping
rate is chosen.
type:
- string
- 'null'
maxLength: 50
example: shipping-123-456
amount:
type: number
format: double
readOnly: true
description: >-
Shipping amount which is calculated from [Shipping
rates](https://www.rebilly.com/catalog/all/shipping-rates).
Shipping:
description: Shipping settings.
type: object
discriminator:
propertyName: calculator
mapping:
manual: '#/components/schemas/ManualShipping'
rebilly: '#/components/schemas/RebillyShipping'
anyOf:
- $ref: '#/components/schemas/ManualShipping'
- $ref: '#/components/schemas/RebillyShipping'
TaxItem:
type: object
required:
- amount
- description
properties:
amount:
description: Amount of the tax.
type: number
format: double
description:
type: string
description: Description of the tax.
rate:
description: >-
Overall sales tax rate which includes state, county, city and
district tax.
type:
- number
- 'null'
format: double
readOnly: true
stateAmount:
description: Amount of sales tax to collect for the state.
type:
- number
- 'null'
format: double
example: 0.94
readOnly: true
countyAmount:
description: Amount of sales tax to collect for the county.
type:
- number
- 'null'
format: double
example: 0.04
readOnly: true
cityAmount:
description: Amount of sales tax to collect for the city.
type:
- number
- 'null'
format: double
example: 0
readOnly: true
specialDistrictAmount:
description: Amount of sales tax to collect for the special district.
type:
- number
- 'null'
format: double
example: 0.38
readOnly: true
stateRate:
description: State sales tax rate for given location.
type:
- number
- 'null'
format: double
readOnly: true
countyRate:
description: County sales tax rate for given location.
type:
- number
- 'null'
format: double
readOnly: true
cityRate:
description: City sales tax rate for given location.
type:
- number
- 'null'
format: double
readOnly: true
specialDistrictRate:
description: Special district sales tax rate for given location.
type:
- number
- 'null'
format: double
readOnly: true
jurisdictions:
description: Jurisdiction names for the invoice.
type:
- object
- 'null'
readOnly: true
properties:
country:
description: Two-letter ISO country code for the provided location.
type:
- string
- 'null'
example: US
readOnly: true
state:
description: Postal abbreviated state name for the provided location.
type:
- string
- 'null'
example: CA
readOnly: true
county:
description: County name for the provided location.
type:
- string
- 'null'
example: LOS ANGELES
readOnly: true
city:
description: City name for the provided location.
type:
- string
- 'null'
example: LOS ANGELES
readOnly: true
ManualTax:
type: object
description: Manual tax calculator.
required:
- calculator
- items
properties:
calculator:
description: Type of tax calculator.
type: string
enum:
- manual
amount:
type: integer
x-type: Money
x-sortable: true
description: Total amount of taxes.
readOnly: true
items:
type: array
description: Taxes applied.
items:
$ref: '#/components/schemas/TaxItem'
RebillyTaxJarTax:
type: object
description: TaxJar tax calculator.
required:
- calculator
properties:
calculator:
description: Type of tax calculator.
type: string
enum:
- rebilly-taxjar
amount:
type: integer
x-type: Money
x-sortable: true
description: Total amount of taxes.
readOnly: true
items:
type: array
description: >-
Taxes applied and calculated based on the `taxCategoryId` of the
related product.
items:
$ref: '#/components/schemas/TaxItem'
RebillyAvalaraTax:
type: object
description: Avalara tax calculator.
required:
- calculator
properties:
calculator:
description: Type of tax calculator.
type: string
enum:
- rebilly-avalara
amount:
type: integer
x-type: Money
x-sortable: true
description: Total amount of taxes.
readOnly: true
items:
type: array
description: >-
Taxes applied and calculated based on the `taxCategoryId` of the
related product.
items:
$ref: '#/components/schemas/TaxItem'
Taxes:
description: Taxes.
type: object
discriminator:
propertyName: calculator
mapping:
manual: '#/components/schemas/ManualTax'
rebilly-taxjar: '#/components/schemas/RebillyTaxJarTax'
rebilly-avalara: '#/components/schemas/RebillyAvalaraTax'
anyOf:
- $ref: '#/components/schemas/ManualTax'
- $ref: '#/components/schemas/RebillyTaxJarTax'
- $ref: '#/components/schemas/RebillyAvalaraTax'
InvoiceItem:
type: object
required:
- type
- unitPrice
properties:
id:
type: string
description: ID of the invoice item.
readOnly: true
maxLength: 50
example: ii_0YVFDEQS2KCFTBN9HXWJFY55GV
type:
description: Type of invoice item.
type: string
x-basic: true
enum:
- debit
- credit
description:
description: Description of the invoice item.
type: string
maxLength: 1000
unitPrice:
description: Unit price of the invoice item.
type: number
format: double
quantity:
description: Quantity of the invoice item.
type: integer
price:
description: Total price of the invoice item.
type: number
format: double
readOnly: true
productId:
type:
- string
- 'null'
description: ID of the product.
maxLength: 50
example: prod_0YV7DES3WPC5J8JD8QTVNZBZNZ
planId:
type:
- string
- 'null'
description: ID of the plan.
maxLength: 50
readOnly: true
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
subscriptionId:
type:
- string
- 'null'
description: ID of the order.
maxLength: 50
readOnly: true
example: sub_01HRF27SATGE4Z6PBJE6PD8328
discountAmount:
description: Discount amount applied to the invoice item.
type: number
format: double
readOnly: true
periodStartTime:
description: Date and time when the billing period starts.
type:
- string
- 'null'
format: date-time
periodEndTime:
description: Date and time when the billing period ends.
type:
- string
- 'null'
format: date-time
periodNumber:
description: >-
Billing period number that is associated with the invoice item.
For example, an invoice item for a service is included in billing
period number 3.
The invoice item is only applied to billing period number 3.
type:
- integer
- 'null'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
tax:
description: Invoice item tax.
readOnly: true
oneOf:
- $ref: '#/components/schemas/TaxItem'
- type: 'null'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- product
- subscription
- plan
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
product:
type: object
plan:
type: object
GatewayName:
description: Payment gateway name.
type:
- string
- 'null'
enum:
- A1Gateway
- ACI
- Adyen
- Aircash
- Airpay
- Airwallex
- AmazonPay
- AmexVPC
- ApcoPay
- AsiaPaymentGateway
- AstroPayCard
- AuthorizeNet
- Awepay
- Bambora
- BankSEND
- BitPay
- BlueSnap
- BraintreePayments
- Buckaroo
- BVNK
- Cardknox
- Cashflows
- CASHlib
- Cashterminal
- CashToCode
- CauriPayment
- Cayan
- CCAvenue
- Chase
- CheckoutCom
- Chillstock
- Circle
- Citadel
- Clearhaus
- Cleo
- CODVoucher
- Coinbase
- CoinGate
- CoinPayments
- Conekta
- Coppr
- Credorax
- Cryptonator
- CyberSource
- DataCash
- Dengi
- Dimoco
- Directa24
- dLocal
- Dragonphoenix
- Dropayment
- EasyPayDirect
- EBANX
- ecoPayz
- EcorePay
- Elavon
- Euteller
- eMerchantPay
- EMS
- ePay
- EPG
- EPro
- Ezeebill
- eZeeWallet
- ezyEFT
- FasterPay
- Finrax
- Flexepin
- FinTecSystems
- FundSend
- Forte
- GET
- Gigadat
- GlobalOnePay
- Gooney
- Gpaysafe
- Greenbox
- HiPay
- iCanPay
- ICEPAY
- iCheque
- iDebit
- Ilixium
- Ingenico
- INOVAPAY
- Inovio
- Intuit
- InstaDebit
- IpayOptions
- JetPay
- Jeton
- JPMOrbital
- Khelocard
- Klarna
- Konnektive
- LaCore
- loonie
- LPG
- MaxiCash
- MercadoPago
- MiFinity
- MobilePay
- Moneris
- MtaPay
- MuchBetter
- MuchBetterGateway
- MyFatoorah
- Neosurf
- Netbanking
- Neteller
- NGenius
- NinjaWallet
- NMI
- NordikCoin
- NOWPayments
- NuaPay
- OchaPay
- Onlineueberweisen
- OnRamp
- Orbital
- Pagadito
- Pagsmile
- Panamerican
- ParamountCommerce
- ParamountEft
- ParamountInterac
- PandaGateway
- Pay4Fun
- PayCash
- PayClub
- PayEcards
- Payeezy
- Payflow
- Paynote
- PaymentAsia
- PaymenTechnologies
- PaymentsOS
- Paymero
- PayPal
- Payper
- Payr
- PayRedeem
- PayRetailers
- Paysafe
- Paysafecard
- Paysafecash
- PayTabs
- PayULatam
- Payvision
- PharosPayments
- Piastrix
- Pin4Pay
- Plugnpay
- PostFinance
- PPRO
- Prosa
- PSiGate
- Rapyd
- Realex
- Realtime
- Redsys
- Rotessa
- RPN
- Safecharge
- SaltarPay
- Sagepay
- SeamlessChex
- SecureTrading
- SecurionPay
- Skrill
- SmartInvoice
- SMSVoucher
- Sofort
- SparkPay
- StaticGateway
- STPMexico
- Stripe
- Telr
- TestProcessor
- ToditoCash
- Truevo
- TrustsPay
- Trustly
- TWINT
- Unlimit
- UPayCard
- USAePay
- VantivLitle
- vegaaH
- VCreditos
- VegaWallet
- Wallet88
- Walpay
- WesternUnion
- Wirecard
- WorldlineAtosFrankfurt
- Worldpay
- XPay
- Zimpler
- Zotapay
AcquirerName:
description: Acquirer name.
type:
- string
- 'null'
enum:
- Adyen
- ACI
- Alipay
- AIB
- Aircash
- Airpay
- AmazonPay
- ApcoPay
- AsiaPaymentGateway
- AstroPay Card
- Awepay
- Ipay Options
- B+S
- Bambora
- BitPay
- Bank of America
- Bank of Moscow
- Bank of Rebilly
- Bank One
- BankSEND
- BMO Harris Bank
- Borgun
- BraintreePayments
- Buckaroo
- BVNK
- Cardknox
- CASHlib
- Cashterminal
- CashToCode
- Catalunya Caixa
- CCAvenue
- Chase
- CheckoutCom
- Chillstock
- ChinaUnionPay
- CIM
- Circle
- Citadel
- Clearhaus
- Cleo
- CODVoucher
- Coinbase
- CoinGate
- CoinPayments
- Conekta
- Coppr
- Credorax
- Cryptonator
- CyberSource
- Dimoco
- dLocal
- Dragonphoenix
- Dropayment
- EasyPayDirect
- EBANX
- ecoPayz
- EcorePay
- Elavon
- EMS
- ePay
- EPG
- Euteller
- Ezeebill
- eZeeWallet
- ezyEFT
- Fifth Third Bank
- Finrax
- First Data Buypass
- First Data Nashville
- First Data North
- First Data Omaha
- FinTecSystems
- Flexepin
- Forte
- FundSend
- Gigadat
- Global East
- Gooney
- Gpaysafe
- Heartland
- HiPay
- HSBC
- iCanPay
- ICEPAY
- iCheque
- Ilixium
- Ingenico
- INOVAPAY
- Intuit
- Jeton
- JPMOrbital
- Khelocard
- Klarna
- Konnektive
- loonie
- LPG
- Masapay
- MaxiCash
- MercadoPago
- Merrick
- Mission Valley Bank
- MiFinity
- MobilePay
- Moneris
- MuchBetter
- MuchBetterGateway
- MyFatoorah
- NATWEST
- Neosurf
- Netbanking
- Neteller
- NinjaWallet
- NMI
- NordikCoin
- NOWPayments
- NuaPay
- Nuvei
- OchaPay
- Onlineueberweisen
- OnRamp
- Orbital
- Other
- Panamerican
- Panda Bank
- Paramount
- ParamountCommerce
- ParamountEft
- ParamountInterac
- Pay4fun
- PayCash
- PayClub
- PayEcards
- PaymentAsia
- PaymenTechnologies
- PaymentsOS
- Paymero
- Paynetics
- PayPal
- Payper
- Payr
- PayRedeem
- PayRetailers
- PayTabs
- PayULatam
- Payvision
- PharosPayments
- Piastrix
- Pin4Pay
- Peoples Trust Company
- PostFinance
- PPRO
- Privatbank
- Prosa
- PSiGate
- QQPay
- Rapyd
- RBC
- RBS WorldPay
- RealTime
- Rotessa
- Safecharge
- SaltarPay
- SecureTrading
- SecurionPay
- Skrill
- SmartInvoice
- SMSVoucher
- Sofort
- SparkPay
- State Bank of Mauritius
- STPMexico
- Stripe
- TBI
- Telr
- TestProcessor
- ToditoCash
- Truevo
- Trustly
- TrustPay
- TrustsPay
- TSYS
- TWINT
- UPayCard
- Vantiv
- VCreditos
- VegaWallet
- VoicePay
- Wallet88
- WeChat Pay
- Wells Fargo
- Wing Hang Bank
- Wirecard
- WorldPay
- XPay
- Zimpler
- Zotapay
MoneyAmount:
type: number
format: double
example: 10
x-type: Money
Money:
type: object
required:
- amount
- currency
properties:
amount:
$ref: '#/components/schemas/MoneyAmount'
currency:
$ref: '#/components/schemas/CurrencyCode'
LanguageIsoCode:
type: string
description: Language in ISO 639-1 code format.
pattern: '[a-zA-Z]{2}'
example: US
PurchaseBumpOffer:
type:
- object
- 'null'
description: Purchase bump offer.
required:
- offerId
- offerType
- bumpAmount
properties:
offerId:
description: ID of the bump offer.
type: string
offerType:
description: Type of bump offer.
type: string
example: bonus
bumpAmount:
description: Amount of the bump offer.
$ref: '#/components/schemas/MoneyAmount'
bumpAmountInUsd:
description: Amount of the bump offer in USD.
readOnly: true
allOf:
- $ref: '#/components/schemas/MoneyAmount'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
HttpHeaders:
type: object
description: HTTP headers.
additionalProperties:
type: string
example:
Content-Type: application/json
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
x-is-free-form: true
RiskMetadata:
type: object
title: Risk metadata
description: Risk metadata used for 3D Secure and risk scoring.
properties:
ipAddress:
description: Customer's IP address.
type:
- string
- 'null'
format: ipv4 or ipv6
example: 93.92.91.90
fingerprint:
description: >-
Customer's device fingerprint.
A device fingerprint is a unique token that is used to identify the
customer.
The device fingerprint is generated based on device attributes, such
as: hardware,
software, IP address, language, browser, and more.
type:
- string
- 'null'
maxLength: 50
example: pIUt3xbgX3l9g3YDiLbx
httpHeaders:
oneOf:
- $ref: '#/components/schemas/HttpHeaders'
- type: 'null'
browserData:
type:
- object
- 'null'
description: Browser data used for 3D Secure and risk scoring.
required:
- colorDepth
- isJavaEnabled
- language
- screenWidth
- screenHeight
- timeZoneOffset
properties:
colorDepth:
description: >-
Browser color depth in bits per pixel. This value is obtained
using the `screen.colorDepth` property.
type: integer
minimum: 1
maximum: 48
example: 24
isJavaEnabled:
description: >-
Specifies if Java is enabled in a browser. This value is
obtained from the `navigator.javaEnabled` property.
type: boolean
language:
description: >-
Browser language settings. This value is obtained from the
`navigator.language` property.
type: string
example: en-US
maxLength: 8
screenWidth:
description: >-
Width of the browser screen. This value is obtained from the
`screen.width` property.
type: integer
minimum: 0
maximum: 65535
example: 1920
screenHeight:
description: >-
Height of the browser screen. This value is obtained from the
`screen.height` property.
type: integer
minimum: 0
maximum: 65535
example: 1080
timeZoneOffset:
description: >-
Browser time zone offset in minutes from UTC.
A positive offset indicates that the local time is behind UTC.
A negative offset indicates that the local time is ahead of UTC.
You can find this value using the `(new
Date()).getTimezoneOffset()` property.
type: integer
minimum: -1410
maximum: 1410
example: 300
isAdBlockEnabled:
description: >-
Specifies if the usage of ad block has been detected in the
browser.
type: boolean
extraData:
type:
- object
- 'null'
description: Third-party data used for risk scoring.
properties:
kountFraudSessionId:
description: Alpha-numeric `fraudSessionId` as provided by the Kount SDK.
type: string
minimum: 10
maximum: 32
example: abcdefg12345abababab123456789012
payPalMerchantSessionId:
description: >-
PayPal `MerchantSessionID` as generated by the PayPal Fraudnet
SDK.
type: string
minimum: 1
maximum: 64
example: dd65ratxc5qv15iph3vyoq7l6davuowa
threatMetrixSessionId:
description: >-
Temporary identifier that is unique to the visitor's session and
passed to ThreatMetrix.
pattern: '[a-zA-Z0-9_-]+'
type: string
minimum: 1
maximum: 128
example: dd65ratxc5qv15iph3vyoq7l6davuowadd65ratxc5qv15iph3vyoq7l6davuowa
isProxy:
description: Specifies if the customer's IP address is related to a proxy.
type: boolean
readOnly: true
isVpn:
description: Specifies if the customer's IP address is related to a VPN.
type: boolean
readOnly: true
isTor:
description: Specifies if the customer's IP address is related to TOR.
type: boolean
readOnly: true
isHosting:
description: Specifies if the customer's IP address is related to hosting.
type: boolean
readOnly: true
hostingName:
description: Name of the data center or hosting provider, if available.
type:
- string
- 'null'
readOnly: true
isp:
description: Internet Service Provider (ISP) name, if available.
type:
- string
- 'null'
readOnly: true
country:
description: Country ISO Alpha-2 code of the specified IP address.
maxLength: 2
type:
- string
- 'null'
readOnly: true
example: US
region:
description: Region of the specified IP address.
type:
- string
- 'null'
readOnly: true
example: NY
city:
description: City of the specified IP address.
type:
- string
- 'null'
readOnly: true
example: New York
latitude:
description: Latitude of the specified IP address.
type: number
format: double
readOnly: true
longitude:
description: Longitude of the specified IP address.
type:
- number
- 'null'
format: double
readOnly: true
postalCode:
description: Postal code of the specified IP address.
type:
- string
- 'null'
maxLength: 10
readOnly: true
timeZone:
description: Time zone of the specified IP address.
type:
- string
- 'null'
readOnly: true
example: America/New_York
accuracyRadius:
description: Accuracy radius of the specified IP address, in kilometers.
type:
- integer
- 'null'
readOnly: true
distance:
description: >-
Distance between the customer's IP address and the billing address
geolocation, in kilometers.
type:
- integer
- 'null'
readOnly: true
hasMismatchedBillingAddressCountry:
description: >-
Specifies if the customer's billing address country and geo-IP
address are not the same.
type: boolean
readOnly: true
hasMismatchedBankCountry:
description: >-
Specifies if the customer's bank country and geo-IP address are not
the same.
type: boolean
readOnly: true
hasMismatchedTimeZone:
description: >-
Specifies if the customer's browser time zone and the IP address
associated time zone are not the same.
type: boolean
readOnly: true
hasMismatchedHolderName:
description: >-
Specifies if the customer's billing address name and primary address
name are not the same.
type: boolean
readOnly: true
hasFakeName:
description: Specifies if the holder name seems fake.
type: boolean
readOnly: true
isHighRiskCountry:
description: >-
Specifies if the geo-IP country, or the customer's billing country,
is considered a high risk country.
type: boolean
readOnly: true
paymentInstrumentVelocity:
description: >-
Number of transactions for this payment instrument, based on
fingerprint, in the last 24 hours.
type: integer
readOnly: true
declinedPaymentInstrumentVelocity:
description: >-
Number of declined transactions for this payment instrument
fingerprint in the last 24 hours.
type: integer
readOnly: true
deviceVelocity:
description: >-
Number of transactions for this device, based on fingerprint, in the
last 24 hours.
type: integer
readOnly: true
ipVelocity:
description: Number of transactions for this IP address in the last 24 hours.
type: integer
readOnly: true
emailVelocity:
description: Number of transactions for this email address in the last 24 hours.
type: integer
readOnly: true
billingAddressVelocity:
description: >-
Number of transactions for this billing address in the last 24
hours.
type: integer
readOnly: true
paymentInstrumentApprovedTransactionCount:
description: Number of approved transactions for this payment instrument.
type: integer
readOnly: true
score:
description: |-
Computed risk score based on IP risk data,
such as: `isVpn`, `isTor`, and `isProxy`.
type: integer
readOnly: true
TransactionLimitAmount:
type:
- object
- 'null'
title: LimitAmount
description: Transaction amount limit information.
properties:
amount:
type: number
format: double
example: 275.35
description: Limit amount.
currency:
$ref: '#/components/schemas/CurrencyCode'
resetTime:
type:
- string
- 'null'
format: date-time
description: |-
Date and time in which the limit amount resets.
This value may be used for user interfaces.
Transaction:
type: object
description: Transaction information.
properties:
id:
readOnly: true
$ref: '#/components/schemas/TransactionId'
websiteId:
readOnly: true
allOf:
- $ref: '#/components/schemas/WebsiteId'
customerId:
x-basic: true
x-sortable: true
allOf:
- $ref: '#/components/schemas/CustomerId'
type:
description: Type of transaction.
type: string
x-basic: true
readOnly: true
enum:
- 3ds-authentication
- authorize
- capture
- credit
- refund
- sale
- setup
- void
status:
description: Status of the transaction.
type: string
readOnly: true
enum:
- completed
- conn-error
- disputed
- never-sent
- offsite
- partially-refunded
- pending
- refunded
- sending
- timeout
- voided
- waiting-approval
- waiting-capture
- waiting-gateway
- waiting-refund
result:
description: Result of the transaction.
type: string
x-basic: true
readOnly: true
enum:
- abandoned
- approved
- canceled
- declined
- unknown
amount:
x-type: Money
x-sortable: true
x-basic: true
description: Total amount of the transaction.
type: number
format: double
readOnly: true
currency:
readOnly: true
$ref: '#/components/schemas/CurrencyCode'
purchaseAmount:
description: >-
Amount by which the purchase is completed.
If an adjustment occurs, the purchased amount may differ from the
requested amount.
type: number
format: double
x-type: Money
x-currency-field: purchaseCurrency
x-sortable: true
readOnly: true
purchaseCurrency:
readOnly: true
$ref: '#/components/schemas/CurrencyCode'
requestAmount:
description: |-
Amount of the payment request.
If an adjustment occurs,
the purchase amount may differ from the billing amount.
type: number
x-type: Money
x-currency-field: requestCurrency
format: double
readOnly: true
requestCurrency:
readOnly: true
$ref: '#/components/schemas/CurrencyCode'
parentTransactionId:
description: ID of the parent transaction.
type:
- string
- 'null'
$ref: '#/components/schemas/TransactionId'
childTransactions:
description: IDs of child transactions.
readOnly: true
type: array
items:
$ref: '#/components/schemas/ResourceId'
invoiceIds:
description: Related invoice IDs.
readOnly: true
type: array
items:
$ref: '#/components/schemas/ResourceId'
subscriptionIds:
description: Subscription IDs of invoices that are related to the transaction.
readOnly: true
type: array
items:
$ref: '#/components/schemas/ResourceId'
planIds:
description: Plan IDs of orders that are related to the transaction.
readOnly: true
type: array
items:
$ref: '#/components/schemas/ResourceId'
isRebill:
description: >-
Specifies if the transaction is one of a number of recurring
payments in a subscription, excluding trials or setup fees.
type: boolean
readOnly: true
rebillNumber:
description: >-
Rebill number of the transaction.
A rebill number is the number of recurring payments in a
subscription, excluding trials or setup fees.
type: integer
readOnly: true
x-sortable: true
billingAddress:
description: Billing address.
$ref: '#/components/schemas/ContactObject'
has3ds:
description: Specifies if the transaction uses 3D Secure.
type: boolean
readOnly: true
3ds:
type: object
description: Authentication object.
readOnly: true
properties:
server:
description: Name of the 3D Secure server.
type: string
version:
description: Version of 3D Secure.
type: string
enum:
- 1.0.2
- 2.1.0
- 2.2.0
enrolled:
description: Specifies if the cardholder is enrolled in 3D Secure.
type: string
enum:
- 'yes'
- 'no'
- invalid card/timeout
- unavailable
authenticated:
description: Authentication response status for 3D Secure.
type: string
enum:
- 'yes'
- 'no'
- not applicable
- attempted
liability:
type: string
enum:
- protected
- not protected
- protected (attempt)
flow:
description: Authentication flow for 3D Secure 2.
type: string
enum:
- frictionless
- challenge
isDowngraded:
description: >-
Specifies if 3D Secure 2 is attempted and downgraded to 3D
Secure 1.
type: boolean
default: false
deprecated: true
redirectUrl:
description: >-
URL where the end-user is redirected to when an offsite transaction
is completed.
The default value is the website URL.
type:
- string
- 'null'
format: uri
retryNumber:
type: integer
readOnly: true
description: Position of the transaction in the sequence of retries.
x-sortable: true
isRetry:
type: boolean
readOnly: true
description: Specifies if a transaction is a retry.
billingDescriptor:
type:
- string
- 'null'
readOnly: true
description: >-
Billing descriptor that appears on the periodic billing statement.
For a credit card statement, this field commonly contains 12 or
fewer characters.
description:
type: string
description: Description of the payment.
maxLength: 255
requestId:
description: >-
Request ID of the transaction. This ID must be unique within a 24
hour period.
Use this field to prevent duplicated transactions.
type: string
x-sortable: true
hasAmountAdjustment:
description: Specifies if the transaction has amount adjustment.
type: boolean
readOnly: true
gatewayName:
readOnly: true
description: >-
Name of the payment gateway that processed, or is selected to
process, the transaction.
This value is only available after a gateway is selected for the
transaction.
x-label: Gateway
x-basic: true
allOf:
- $ref: '#/components/schemas/GatewayName'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
processedTime:
description: Date and time when the transaction is processed.
x-sortable: true
x-basic: true
$ref: '#/components/schemas/ServerTimestamp'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
gatewayAccountId:
type:
- string
- 'null'
description: ID of the gateway account that processed the transaction.
maxLength: 50
example: gw_acc_0YVCXMF26DDNKAERE5NW727S34
readOnly: true
gatewayTransactionId:
description: ID of the gateway transaction.
readOnly: true
type:
- string
- 'null'
maxLength: 50
example: txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0
gateway:
type: object
description: Related gateway information.
readOnly: true
properties:
response:
description: Gateway response.
type: object
properties:
code:
description: Gateway response code.
type:
- string
- 'null'
message:
description: Gateway response message.
type:
- string
- 'null'
type:
description: Gateway response type.
type:
- string
- 'null'
originalCode:
description: Raw, unmapped gateway response code.
type:
- string
- 'null'
originalMessage:
description: Raw, unmapped gateway response message.
type:
- string
- 'null'
avsResponse:
description: Gateway Address Verification System (AVS) response.
type: object
properties:
code:
description: Response code.
type:
- string
- 'null'
message:
description: Response message.
type:
- string
- 'null'
originalCode:
description: Raw response code.
type:
- string
- 'null'
originalMessage:
description: Raw response message.
type:
- string
- 'null'
cvvResponse:
description: Gateway Card Verification Value (CVV) response.
type: object
properties:
code:
description: Response code.
type:
- string
- 'null'
message:
description: Response message.
type:
- string
- 'null'
originalCode:
description: Raw response code.
type:
- string
- 'null'
originalMessage:
description: Raw response message.
type:
- string
- 'null'
acquirerName:
readOnly: true
description: >-
Acquirer name.
This value is only available when a transaction uses a payment
gateway.
If a transaction does not use a payment gateway, this value is
`null`.
allOf:
- $ref: '#/components/schemas/AcquirerName'
method:
deprecated: true
description: |-
Payment method.
>**Note:** Use `paymentInstrument.method` instead.
allOf:
- $ref: '#/components/schemas/PaymentMethod'
velocity:
description: Number of transactions by the same customer in the past 24 hours.
type: integer
revision:
description: >-
Number of times the transaction data has been modified.
This revision number is useful when analyzing webhook data to
determine if the change takes precedence over the current
representation.
type: integer
readOnly: true
referenceData:
description: Transaction reference data.
type:
- object
- 'null'
additionalProperties:
type: string
example:
gatewayTransactionId: GAT123
readOnly: true
bin:
description: Payment card Bank Identification Number (BIN).
x-label: BIN
type:
- string
- 'null'
format: bin
readOnly: true
paymentInstrument:
type: object
anyOf:
- $ref: '#/components/schemas/VaultedInstrument'
- $ref: '#/components/schemas/AlternativePaymentInstrument'
- $ref: '#/components/schemas/CashInstrument'
- $ref: '#/components/schemas/CheckInstrument'
hasDcc:
description: >-
Specifies if Dynamic Currency Conversion (DCC) applies to the
transaction.
type: boolean
readOnly: true
dcc:
description: |-
Detailed Dynamic currency conversion (DCC).
If DCC is not applied to the transaction, this value is `null`.
type:
- object
- 'null'
readOnly: true
properties:
base:
description: Initial amount and currency to convert from.
$ref: '#/components/schemas/Money'
quote:
description: Suggested amount and currency to convert to.
$ref: '#/components/schemas/Money'
usdMarkup:
description: Markup amount converted to USD.
$ref: '#/components/schemas/MoneyAmount'
outcome:
type: string
description: Dynamic currency conversion outcome.
enum:
- rejected
- selected
- unknown
hasBumpOffer:
description: >-
Specifies if the transaction has a bump offer.
A bump offer is a discount, purchase bonus, deal, that is offered to
the customer during checkout.
type: boolean
readOnly: true
bumpOffer:
description: >-
Bump offer information.
If the transaction does not have an associated bump offer, this
value is `null`.
type:
- object
- 'null'
readOnly: true
properties:
order:
description: Initial amount and currency.
$ref: '#/components/schemas/Money'
version:
type: string
description: |-
Name of the version selected.
This field is useful to measure split tests.
language:
description: |-
Language in which the bump offer displays to the user.
This field in useful to find translation issues.
$ref: '#/components/schemas/LanguageIsoCode'
outcome:
type: string
readOnly: true
description: Status of the bump offer.
enum:
- presented
- rejected
- selected
- unknown
presentedOffers:
type: array
readOnly: true
description: Offers presented to a customer.
minItems: 1
items:
$ref: '#/components/schemas/PurchaseBumpOffer'
selectedOffer:
readOnly: true
description: |-
Offer selected by a customer.
If a bump offer outcome is not `selected`, this value is `null`.
allOf:
- $ref: '#/components/schemas/PurchaseBumpOffer'
riskScore:
description: Risk score for the transaction.
type: integer
readOnly: true
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
notificationUrl:
description: >-
URL where a server-to-server POST notification is sent.
This notification is sent when the transaction result is finalized
after a timeout or an offsite interaction.
Do not interpret this notification as a confirmation,
complete a `GET` request to confirm the result of the transaction.
To ensure the request is not reattempted,
when the result is confirmed, respond with a `2xx` HTTP status code.
The following placeholders are available to use in this URI: `{id}`
and `{result}`.
These placeholders are replaced the with the transaction ID and
result accordingly.
type:
- string
- 'null'
format: uri
isDisputed:
description: Specifies if a transaction is disputed.
type: boolean
readOnly: true
disputeTime:
description: |-
Date and time when the dispute is created.
If the transaction is not disputed, this value is `null`.
type:
- string
- 'null'
format: date-time
readOnly: true
x-sortable: true
disputeStatus:
description: Status of the dispute.
type:
- string
- 'null'
readOnly: true
enum:
- null
- response-needed
- under-review
- forfeited
- won
- lost
- unknown
isReconciled:
description: Specifies if the transaction is verified with gateway batch data.
type: boolean
readOnly: true
isProcessedOutside:
description: Specifies if the transaction is processed outside of Rebilly.
type: boolean
isMerchantInitiated:
description: Specifies if the transaction is initiated by the merchant.
type: boolean
hadDiscrepancy:
description: >-
Specifies if the transaction is updated due to a discrepancy with
its source of truth.
type: boolean
readOnly: true
orderId:
deprecated: true
description: |-
Order ID of the transaction.
This ID must be unique within a 24 hour period.
> **Note:** Use the `requestId` field instead.
type: string
x-sortable: true
arn:
x-label: ARN
type:
- string
- 'null'
readOnly: true
description: Acquirer reference number.
example: '74836950144358910018150'
reportAmount:
description: >-
Transaction amount converted to the report currency of the
organization.
type: number
x-type: Money
x-sortable: true
x-currency-field: reportCurrency
format: double
readOnly: true
reportCurrency:
readOnly: true
$ref: '#/components/schemas/CurrencyCode'
settlementTime:
type:
- string
- 'null'
description: >-
Date and time when the transaction is settled by the banking
institution.
format: date-time
readOnly: true
x-sortable: true
discrepancyTime:
type:
- string
- 'null'
description: Date and time of the most recent discrepancy on the transaction.
format: date-time
readOnly: true
x-sortable: true
limits:
$ref: '#/components/schemas/TransactionLimitAmount'
organizationId:
readOnly: true
allOf:
- $ref: '#/components/schemas/OrganizationId'
depositRequestId:
readOnly: true
type:
- string
- 'null'
description: >-
ID of the deposit request if applicable. The created transaction is
based on the properties of this deposit request.
maxLength: 50
example: dep_req_0YVJ65BSGYC3EAT58SEX8KY6J7
payoutRequestId:
readOnly: true
type:
- string
- 'null'
description: >-
ID of the payout request if applicable. The created transaction is
based on the properties of this payout request.
maxLength: 50
example: pout_req_0YVJ65BSGYC3EAT58SEX8KY6J7
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- attachments
- website
- customer
- gatewayAccount
- paymentCard
- parentTransaction
- leadSource
- approvalUrl
- refundUrl
- updateUrl
- disputes
- invoices
- queryUrl
- redirectUrl
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
parentTransaction:
type: object
childTransactions:
type: array
maxItems: 10
description: Most recent child transactions.
gatewayAccount:
type: object
customer:
type: object
leadSource:
type: object
website:
type: object
invoices:
type: array
maxItems: 10
description: Most recent related invoices.
organization:
type: object
dispute:
type: object
paymentCard:
type: object
bankAccount:
type: object
TimeUnit:
type: string
enum:
- second
- minute
- hour
- day
- month
- year
TimePluralUnit:
type: string
enum:
- seconds
- minutes
- hours
- days
- months
- years
TimeIso8601Extended:
description: Extended ISO-8601 format of time.
type: string
format: time
pattern: >-
^(([01][0-9]|2[0-3]):([0-5][0-9])(?::([0-5][0-9]))?)((?:[+-](?:0[0-9]|1[12])(?::?[0-5][0-9])?)|Z)?$
SchedulingMethodDayOfMonth:
type: object
properties:
method:
type: string
enum:
- day-of-month
day:
type: integer
minimum: 1
maximum: 31
description: |-
Day of the month in which the event occurs.
If the month has less days, the last day of the month is selected.
time:
$ref: '#/components/schemas/TimeIso8601Extended'
required:
- day
- method
SchedulingMethodDayOfWeek:
type: object
properties:
method:
type: string
enum:
- day-of-week
day:
description: Day of the week when the event occurs.
type: string
enum:
- Sunday
- Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
week:
type: string
enum:
- next
- first-in-month
- last-in-month
time:
$ref: '#/components/schemas/TimeIso8601Extended'
required:
- day
- week
- method
PeriodAnchor:
type: object
description: Instruction for calculating the period anchor.
discriminator:
propertyName: method
mapping:
day-of-month: '#/components/schemas/SchedulingMethodDayOfMonth'
day-of-week: '#/components/schemas/SchedulingMethodDayOfWeek'
anyOf:
- $ref: '#/components/schemas/SchedulingMethodDayOfMonth'
- $ref: '#/components/schemas/SchedulingMethodDayOfWeek'
SchedulingMethodDateInterval:
type: object
properties:
method:
type: string
enum:
- date-interval
duration:
type: integer
description: Number of time units.
minimum: 1
unit:
description: Unit of time.
oneOf:
- $ref: '#/components/schemas/TimeUnit'
- $ref: '#/components/schemas/TimePluralUnit'
anchor:
$ref: '#/components/schemas/PeriodAnchor'
required:
- duration
- unit
- method
SchedulingMethodImmediately:
type: object
required:
- method
properties:
method:
type: string
enum:
- immediately
SchedulingMethodIntelligent:
type: object
properties:
method:
type: string
enum:
- intelligent
duration:
type: integer
description: >-
Latest point in time at which the event should occur.
The event occurs at a random time between the initial time and
duration time.
minimum: 1
unit:
description: Unit of time.
oneOf:
- $ref: '#/components/schemas/TimeUnit'
- $ref: '#/components/schemas/TimePluralUnit'
required:
- duration
- unit
- method
InvoiceRetryScheduleInstruction:
type: object
description: Specifies when the payment retry instruction is performed.
discriminator:
propertyName: method
mapping:
date-interval: '#/components/schemas/SchedulingMethodDateInterval'
day-of-month: '#/components/schemas/SchedulingMethodDayOfMonth'
day-of-week: '#/components/schemas/SchedulingMethodDayOfWeek'
immediately: '#/components/schemas/SchedulingMethodImmediately'
intelligent: '#/components/schemas/SchedulingMethodIntelligent'
anyOf:
- $ref: '#/components/schemas/SchedulingMethodDateInterval'
- $ref: '#/components/schemas/SchedulingMethodDayOfMonth'
- $ref: '#/components/schemas/SchedulingMethodDayOfWeek'
- $ref: '#/components/schemas/SchedulingMethodImmediately'
- $ref: '#/components/schemas/SchedulingMethodIntelligent'
AmountAdjustmentPoliciesNone:
title: None
type: object
properties:
method:
type: string
enum:
- none
description: No payment amount adjustment.
AmountAdjustmentPoliciesDiscountAmountRemaining:
title: Discount remaining amount
type: object
properties:
method:
type: string
enum:
- discount-amount-remaining
description: Discount the remaining amount on the invoice.
AmountAdjustmentInstructionPartial:
type: object
required:
- method
- value
- type
properties:
method:
type: string
enum:
- partial
value:
description: Amount of the payment.
type: number
format: float
type:
description: Payment amount type.
type: string
enum:
- percent
- fixed
afterApprovalPolicy:
description: >-
After an approved payment retry for an adjusted amount, this field
specifies whether to discount the remaining invoice amount.
discriminator:
propertyName: method
mapping:
none: '#/components/schemas/AmountAdjustmentPoliciesNone'
discount-amount-remaining: >-
#/components/schemas/AmountAdjustmentPoliciesDiscountAmountRemaining
oneOf:
- $ref: '#/components/schemas/AmountAdjustmentPoliciesNone'
- $ref: >-
#/components/schemas/AmountAdjustmentPoliciesDiscountAmountRemaining
AmountAdjustmentInstructionNone:
type: object
required:
- method
properties:
method:
type: string
enum:
- none
InvoiceRetryAmountAdjustmentInstruction:
type: object
description: Specifies if the payment amount must be adjusted for the retry.
discriminator:
propertyName: method
mapping:
partial: '#/components/schemas/AmountAdjustmentInstructionPartial'
none: '#/components/schemas/AmountAdjustmentInstructionNone'
oneOf:
- $ref: '#/components/schemas/AmountAdjustmentInstructionPartial'
- $ref: '#/components/schemas/AmountAdjustmentInstructionNone'
Invoice:
required:
- customerId
- currency
- websiteId
properties:
id:
type: string
description: ID of the invoice.
readOnly: true
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
websiteId:
$ref: '#/components/schemas/WebsiteId'
invoiceNumber:
description: >-
Auto-incrementing number based on the sequence of invoices for any
particular customer.
readOnly: true
type: integer
x-basic: true
orderId:
description: ID of the order (experimental).
readOnly: true
example: ord_01GYJPRKHBD6ZYHH897QCJMBS4
type:
- string
- 'null'
subscriptionId:
type: string
description: |-
ID of the related subscription order, if available.
This field is `null` if there are no related subscription orders.
readOnly: true
maxLength: 50
example: sub_01HRF27SATGE4Z6PBJE6PD8328
quoteId:
type:
- string
- 'null'
description: |-
ID of the related quote, if available.
This field is `null` if there are no related quotes.
readOnly: true
maxLength: 50
example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ
currency:
x-sortable: true
x-basic: true
$ref: '#/components/schemas/CurrencyCode'
amount:
description: Amount of the invoice.
type: number
x-type: Money
x-sortable: true
x-basic: true
format: double
readOnly: true
amountDue:
description: Amount that is due on the invoice.
type: number
x-type: Money
x-sortable: true
format: double
readOnly: true
subtotalAmount:
description: Subtotal amount of the invoice.
type: number
x-type: Money
format: double
readOnly: true
discountAmount:
description: Discount amount that is applied to the invoice.
type: number
x-type: Money
format: double
readOnly: true
shipping:
$ref: '#/components/schemas/Shipping'
tax:
$ref: '#/components/schemas/Taxes'
organizationTaxIdNumber:
description: Organization tax ID number that is displayed on the invoice.
type:
- object
- 'null'
required:
- type
- value
properties:
type:
type: string
description: Type of the tax ID number.
enum:
- eu-vat
- other
example: eu-vat
value:
type: string
description: Value of the tax ID number.
example: GB980780684
customerTaxIdNumber:
description: Customer tax ID number that is displayed on the invoice.
type:
- object
- 'null'
required:
- type
- value
properties:
type:
type: string
description: Type of the tax ID number.
enum:
- eu-vat
- other
example: eu-vat
value:
type: string
description: Value of the tax ID number.
example: GB980780684
billingAddress:
description: Billing address of the invoice.
$ref: '#/components/schemas/ContactObject'
deliveryAddress:
description: Delivery address of the invoice.
$ref: '#/components/schemas/ContactObject'
poNumber:
description: Purchase order number that is displayed on the invoice.
type:
- string
- 'null'
example: PO123456
maxLength: 50
notes:
description: Notes for the customer that are displayed on the invoice.
type: string
maxLength: 65535
items:
type: array
description: Invoice items array.
readOnly: true
items:
$ref: '#/components/schemas/InvoiceItem'
discounts:
type: array
description: Discounts applied.
readOnly: true
items:
type: object
readOnly: true
properties:
couponId:
type: string
description: ID of the coupon.
maxLength: 50
example: cpn_0YVCNKF81GD778N4YNVGDJK558
redemptionId:
description: ID of the redemption.
$ref: '#/components/schemas/ResourceId'
amount:
description: Total amount discounted by this coupon.
type: number
format: double
description:
type: string
description: Description of the discount.
context:
$ref: '#/components/schemas/DiscountContext'
autopayScheduledTime:
description: Date and time when an automatic payment (autopay) is scheduled.
type:
- string
- 'null'
x-sortable: true
format: date-time
autopayRetryNumber:
description: >-
Number of times that an automatic payment (autopay) has been
attempted on an invoice.
readOnly: true
type: integer
x-sortable: true
minimum: 0
default: 0
status:
type: string
description: Status of the invoice.
x-basic: true
readOnly: true
enum:
- draft
- quotation
- unpaid
- paid
- partially-paid
- past-due
- abandoned
- voided
- partially-refunded
- refunded
- disputed
delinquentCollectionPeriod:
type: integer
description: >-
Length of time, in days, between when the invoice is due and when
the invoice is paid.
x-sortable: true
readOnly: true
collectionPeriod:
type: integer
x-sortable: true
description: >-
Length of time, in days, between when the invoice is issued and when
the invoice is paid.
readOnly: true
abandonedTime:
description: Date and time when the invoice is abandoned.
x-sortable: true
type:
- string
- 'null'
format: date-time
readOnly: true
voidedTime:
description: Date and time when the invoice is voided.
x-sortable: true
type:
- string
- 'null'
format: date-time
readOnly: true
paidTime:
x-label: Payment Date
x-sortable: true
x-basic: true
description: Date and time when the invoice is paid.
type:
- string
- 'null'
format: date-time
readOnly: true
dueTime:
description: Date and time when the invoice is due for payment.
type: string
x-sortable: true
format: date-time
issuedTime:
description: Date and time when the invoice is issued.
x-label: Date Issued
x-sortable: true
x-basic: true
$ref: '#/components/schemas/ServerTimestamp'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
paymentFormUrl:
type:
- string
- 'null'
readOnly: true
format: url
description: |-
URL where the customer is redirected to pay the invoice
using one of the methods which are available to the customer.
This is an alternative to creating a new transaction with empty
`methods`.
customerId:
x-basic: true
allOf:
- $ref: '#/components/schemas/CustomerId'
transactions:
type: array
description: Invoice transactions array.
maxItems: 10
readOnly: true
items:
$ref: '#/components/schemas/Transaction'
retryInstruction:
description: >-
Invoice payment retry instruction.
This object specifies how to proceed if a payment related to the
invoice fails.
type:
- object
- 'null'
properties:
attempts:
type: array
description: Describes the retry instruction.
minItems: 1
items:
type: object
properties:
scheduleInstruction:
$ref: '#/components/schemas/InvoiceRetryScheduleInstruction'
amountAdjustmentInstruction:
$ref: >-
#/components/schemas/InvoiceRetryAmountAdjustmentInstruction
tryBackupInstruments:
description: >-
Specifies whether to use backup payment instruments on an
invoice payment retry.
type: boolean
default: false
required:
- scheduleInstruction
afterAttemptPolicies:
description: >-
Describes the action to take when a payment attempt concludes,
and payment is not collected.
type: array
items:
type: string
enum:
- change-subscription-renewal-time
afterRetryEndPolicies:
description: >-
Describes the action to take when all scheduled payment retries,
in a retry instruction, have concluded and payment is not
collected.
type: array
items:
type: string
enum:
- abandon-invoice
- cancel-subscription
required:
- attempts
- afterAttemptPolicies
- afterRetryEndPolicies
revision:
description: |-
Number of times the invoice data has been modified.
Use the revision number when analyzing webhook data to
determine if a change should take precedence over the current
representation.
type: integer
readOnly: true
type:
description: Type of invoice.
type: string
enum:
- initial
- renewal
- interim
- cancellation
- one-time
- refund
- charge
- one-time-sale
readOnly: true
dueReminderTime:
description: Date and time when a past due reminder event is triggered.
type:
- string
- 'null'
format: date-time
readOnly: true
dueReminderNumber:
description: Number of past due reminder events that have been triggered.
type:
- integer
- 'null'
readOnly: true
organizationId:
readOnly: true
allOf:
- $ref: '#/components/schemas/OrganizationId'
delinquencyTime:
description: >-
Date and time when the related order is considered delinquent, and
is canceled.
If this value is `null`, no delinquency time is configured.
If the `dueTime` of the order becomes greater than the
`delinquencyTime` value,
the `delinquencyTime` value becomes equal to `dueTime`.
If an invoice is not related to an order, this field can only be
`null`.
type:
- string
- 'null'
format: date-time
default: null
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- website
- customer
- organization
- attachments
- leadSource
- transactionAllocations
- recalculateInvoice
- subscription
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
website:
type: object
organization:
type: object
leadSource:
type: object
shippingRate:
type: object
InvoiceIssue:
type: object
properties:
issuedTime:
description: >-
Date and time when the invoice is issued.
If this field is `null` or omitted, the invoice is issued
immediately.
type:
- string
- 'null'
format: date-time
dueTime:
description: >-
Date and time when the invoice is due for payment.
If this field is `null` or omitted, this value is set to the
`issuedTime` value.
type:
- string
- 'null'
format: date-time
InvoiceReissue:
type: object
properties:
dueTime:
description: >-
Date and time when the invoice is due for payment.
If this field is `null` or omitted, this value is set to the current
date-time.
type:
- string
- 'null'
format: date-time
InvoiceTransactionAllocation:
type: object
properties:
invoiceId:
type: string
description: Unique resource ID.
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
transactionId:
$ref: '#/components/schemas/TransactionId'
amount:
type: number
format: double
currency:
$ref: '#/components/schemas/CurrencyCode'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- invoice
- transaction
InvoiceTransaction:
type: object
required:
- transactionId
properties:
transactionId:
description: ID of the transaction to apply to the invoice.
$ref: '#/components/schemas/TransactionId'
amount:
description: >-
Amount to be applied to the invoice. This value must not exceed the
transaction amount.
If omitted, the lesser of the unused transaction amount or the
invoice due amount is used.
type: number
format: double
InvoiceTimeline:
type: object
properties:
id:
type: string
description: ID of the timeline message.
readOnly: true
maxLength: 50
example: tmln_0YV8Q9WEF5DTA8HFXS27D1G6GC
type:
description: Type of timeline message.
type: string
readOnly: true
enum:
- coupon-applied
- email-message-sent
- invoice-abandoned
- invoice-disputed
- invoice-issued
- invoice-paid
- invoice-partially-paid
- invoice-partially-refunded
- invoice-past-due
- invoice-refunded
- invoice-reissued
- invoice-renewal-payment-declined
- invoice-revenue-recognized
- invoice-tax-calculation-failed
- invoice-voided
- quickbooks-credit-memo-created
- quickbooks-credit-memo-voided
- quickbooks-invoice-created
- quickbooks-invoice-task-failed
- quickbooks-invoice-updated
- quickbooks-invoice-voided
- quickbooks-revenue-recognition-created
- timeline-comment-created
- transaction-abandoned
- transaction-approved
- transaction-canceled
- transaction-declined
- transaction-initiated
- transaction-refunded
- transaction-voided
triggeredBy:
description: Specifies who, or what, triggered the timeline event.
type: string
readOnly: true
enum:
- rebilly
- app
- direct-api
message:
description: Describes the message details.
type: string
extraData:
$ref: '#/components/schemas/TimelineExtraData'
occurredTime:
description: Date and time when the timeline message occurred.
readOnly: true
$ref: '#/components/schemas/ServerTimestamp'
_links:
$ref: '#/components/schemas/SelfLink'
CreditMemoTaxItem:
type: object
required:
- amount
- description
properties:
amount:
description: Amount of the tax.
type: number
format: double
description:
type: string
description: Description of the tax.
rate:
description: >-
Overall sales tax rate which includes state, county, city and
district tax.
type:
- number
- 'null'
format: double
stateAmount:
description: Amount of sales tax to collect for the state.
type:
- number
- 'null'
format: double
example: 0.94
countyAmount:
description: Amount of sales tax to collect for the county.
type:
- number
- 'null'
format: double
example: 0.04
cityAmount:
description: Amount of sales tax to collect for the city.
type:
- number
- 'null'
format: double
example: 0
specialDistrictAmount:
description: Amount of sales tax to collect for the special district.
type:
- number
- 'null'
format: double
example: 0.38
stateRate:
description: State sales tax rate for given location.
type:
- number
- 'null'
format: double
countyRate:
description: County sales tax rate for given location.
type:
- number
- 'null'
format: double
cityRate:
description: City sales tax rate for given location.
type:
- number
- 'null'
format: double
specialDistrictRate:
description: Special district sales tax rate for given location.
type:
- number
- 'null'
format: double
jurisdictions:
description: Jurisdiction names for the invoice.
type:
- object
- 'null'
properties:
country:
description: Two-letter ISO country code for the provided location.
type:
- string
- 'null'
example: US
state:
description: Postal abbreviated state name for the provided location.
type:
- string
- 'null'
example: CA
county:
description: County name for the provided location.
type:
- string
- 'null'
example: LOS ANGELES
city:
description: City name for the provided location.
type:
- string
- 'null'
example: LOS ANGELES
CreditMemo:
type: object
description: Credit memo object.
required:
- customerId
- currency
properties:
id:
type: string
description: ID of the credit memo.
readOnly: true
maxLength: 50
example: crmm_0YVCNN22TWC3G8H82QNPNVZCHG
number:
description: >-
Auto-incrementing number based on the sequence of credit memos for
any particular customer.
readOnly: true
type: integer
allocations:
type: object
description: Allocations reduce the unused amount of a credit memo.
properties:
transactions:
type: array
description: >-
List of transactions (typically refunds, credits, and
chargebacks) that are allocated to reduce the unused amount of a
credit memo.
- To delete transaction allocations, send an empty transaction allocation array in the request.
- To modify transaction allocations, send a modified transaction allocation array in the request.
- If you do not want to modify or delete transaction allocations, do not send a transaction allocation array in the request.
items:
type: object
properties:
transactionId:
description: >-
ID of the transaction to which the credit memo is
allocated.
$ref: '#/components/schemas/TransactionId'
amount:
description: >-
Amount of credit that is allocated from the credit memo to
the transaction.
If the `amount` value is not supplied or exceeds the
unused amount of the credit memo or the transaction
amount, the lesser of the following two values is used:
- The unused amount of the credit memo.
- The transaction amount.
type: number
format: double
currency:
readOnly: true
$ref: '#/components/schemas/CurrencyCode'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
invoices:
type: array
description: >-
List of invoices that the credit memo is allocated to.
- To delete invoice allocations, send an empty invoice
allocation array in the request.
Only `unpaid`, `partially-paid`, and `past-due` invoices can be deleted.
- To modify invoice allocations, send a modified invoice
allocation array in the request.
Only `unpaid`, `partially-paid`, and `past-due` invoices can be modified.
- If you do not want to modify or delete invoice allocations, do
not send an invoice allocation array in the request.
items:
type: object
properties:
invoiceId:
type: string
description: ID of invoice to which the credit memo is allocated.
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
amount:
description: >-
Amount of credit that is allocated from the credit memo to
the invoice.
If the `amount` value is not supplied or exceeds the
unused amount of the credit memo or the invoice due
amount, the lesser of the following two values is used:
- The unused amount of the credit memo.
- The invoice due amount.
type: number
format: double
currency:
readOnly: true
$ref: '#/components/schemas/CurrencyCode'
createdTime:
description: Date and time at which a credit memo is allocated.
$ref: '#/components/schemas/ServerTimestamp'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
items:
type: array
description: Items of the credit memo.
items:
type: object
required:
- unitPrice
- quantity
properties:
id:
type: string
description: ID of the credit memo item.
readOnly: true
maxLength: 50
example: crmm_itm_0YVCNN22TWC3G8H82QNPNVZCHG
invoiceItemId:
description: ID of the invoice item to which the credit item is referenced.
type:
- string
- 'null'
maxLength: 50
example: ii_0YVFDEQS2KCFTBN9HXWJFY55GV
description:
description: Description of the credit memo item.
type: string
unitPrice:
description: Price of the credit memo item.
type: number
format: double
quantity:
description: Quantity of the credit memo item.
type: integer
price:
description: Total price of the credit memo item.
type: number
format: double
readOnly: true
productId:
type:
- string
- 'null'
description: ID of the related product.
maxLength: 50
example: prod_0YV7DES3WPC5J8JD8QTVNZBZNZ
planId:
description: ID of the related plan.
type:
- string
- 'null'
maxLength: 50
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
tax:
description: Credit memo item tax.
oneOf:
- $ref: '#/components/schemas/CreditMemoTaxItem'
- type: 'null'
status:
type: string
description: Status of the credit memo.
readOnly: true
enum:
- issued
- applied
- partially-applied
- voided
x-enumDescriptions:
issued: The credit memo is available with a full amount to be applied.
applied: >-
The full amount of the credit memo has been applied. No more
credit can be created from it.
partially-applied: |-
A partial amount of the credit memo has been applied.
A credit can be created from the remaining amount.
voided: Credit memo has been voided and cannot be used anymore.
reason:
description: Reason for the credit memo.
type: string
enum:
- return
- product-unsatisfactory
- order-change
- order-cancellation
- chargeback
- write-off
- waiver
- customer-credit
- other
description:
type: string
x-basic: true
description: >-
Public description, that is visible to customers, which describes
the purpose of the credit memo.
shippingAmount:
description: Shipping amount of an invoice to credit.
type: number
format: double
default: 0
x-type: Money
taxAmount:
description: Sum of items tax amount of an invoice to credit.
readOnly: true
type: number
format: double
default: 0
x-type: Money
totalAmount:
description: >-
Total amount of all credits in the credit memo, including items,
shipping, and tax.
readOnly: true
type: number
format: double
default: 0
x-type: Money
unusedAmount:
description: Unused credit memo amount that has not been allocated.
readOnly: true
type: number
format: double
default: 0
x-type: Money
revision:
type: integer
readOnly: true
description: Number of times the credit memo has been modified.
customerId:
readOnly: true
$ref: '#/components/schemas/CustomerId'
currency:
readOnly: true
$ref: '#/components/schemas/CurrencyCode'
invoiceId:
type:
- string
- 'null'
description: ID of the invoice to which the credit memo is issued.
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
- invoice
PatchCreditMemo:
type: object
description: Patch credit memo object.
properties:
allocations:
type: object
description: Allocations reduce the unused amount of a credit memo.
properties:
transactions:
type: array
description: >-
List of transactions (typically refunds, credits, and
chargebacks) that are allocated to reduce the unused amount of a
credit memo.
- To delete transaction allocations, send an empty transaction allocation array in the request.
- To modify transaction allocations, send a modified transaction allocation array in the request.
- If you do not want to modify or delete transaction allocations, do not send a transaction allocation array in the request.
items:
type: object
properties:
transactionId:
description: >-
ID of the transaction to which the credit memo is
allocated.
$ref: '#/components/schemas/TransactionId'
amount:
description: >-
Amount of credit that is allocated from the credit memo to
the transaction.
If the `amount` value is not supplied or exceeds the
unused amount of the credit memo or the transaction
amount, the lesser of the following two values is used:
- The unused amount of the credit memo.
- The transaction amount.
type: number
format: double
currency:
readOnly: true
$ref: '#/components/schemas/CurrencyCode'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
invoices:
type: array
description: >-
List of invoices that the credit memo is allocated to.
- To delete invoice allocations, send an empty invoice
allocation array in the request.
Only `unpaid`, `partially-paid`, and `past-due` invoices can be deleted.
- To modify invoice allocations, send a modified invoice
allocation array in the request.
Only `unpaid`, `partially-paid`, and `past-due` invoices can be modified.
- If you do not want to modify or delete invoice allocations, do
not send an invoice allocation array in the request.
items:
type: object
properties:
invoiceId:
type: string
description: ID of invoice to which the credit memo is allocated.
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
amount:
description: >-
Amount of credit that is allocated from the credit memo to
the invoice.
If the `amount` value is not supplied or exceeds the
unused amount of the credit memo or the invoice due
amount, the lesser of the following two values is used:
- The unused amount of the credit memo.
- The invoice due amount.
type: number
format: double
currency:
readOnly: true
$ref: '#/components/schemas/CurrencyCode'
createdTime:
description: Date and time at which a credit memo is allocated.
$ref: '#/components/schemas/ServerTimestamp'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
items:
type: array
description: Items of the credit memo.
items:
type: object
required:
- unitPrice
- quantity
properties:
id:
type: string
description: ID of the credit memo item.
readOnly: true
maxLength: 50
example: crmm_itm_0YVCNN22TWC3G8H82QNPNVZCHG
invoiceItemId:
description: ID of the invoice item to which the credit item is referenced.
type:
- string
- 'null'
maxLength: 50
example: ii_0YVFDEQS2KCFTBN9HXWJFY55GV
description:
description: Description of the credit memo item.
type: string
unitPrice:
description: Price of the credit memo item.
type: number
format: double
quantity:
description: Quantity of the credit memo item.
type: integer
price:
description: Total price of the credit memo item.
type: number
format: double
readOnly: true
productId:
type:
- string
- 'null'
description: ID of the related product.
maxLength: 50
example: prod_0YV7DES3WPC5J8JD8QTVNZBZNZ
planId:
description: ID of the related plan.
type:
- string
- 'null'
maxLength: 50
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
tax:
description: Credit memo item tax.
oneOf:
- $ref: '#/components/schemas/CreditMemoTaxItem'
- type: 'null'
reason:
description: Reason for the credit memo.
type: string
enum:
- return
- product-unsatisfactory
- order-change
- order-cancellation
- chargeback
- write-off
- waiver
- customer-credit
- other
description:
type: string
x-basic: true
description: >-
Public description, that is visible to customers, which describes
the purpose of the credit memo.
shippingAmount:
description: Shipping amount of an invoice to credit.
type: number
format: double
default: 0
x-type: Money
CreditMemoTimeline:
type: object
properties:
id:
type: string
description: ID of the timeline message.
readOnly: true
maxLength: 50
example: tmln_0YV8Q9WEF5DTA8HFXS27D1G6GC
type:
description: Type of timeline message.
type: string
readOnly: true
enum:
- credit-memo-created
- credit-memo-applied
- credit-memo-partially-applied
- credit-memo-voided
triggeredBy:
description: Specifies who, or what, triggered the timeline event.
type: string
readOnly: true
enum:
- rebilly
- app
- direct-api
message:
description: Content of the timeline message.
type: string
extraData:
$ref: '#/components/schemas/TimelineExtraData'
occurredTime:
description: Date and time when the timeline message occurred.
readOnly: true
$ref: '#/components/schemas/ServerTimestamp'
_links:
$ref: '#/components/schemas/SelfLink'
JournalAccount:
type: object
required:
- name
properties:
id:
type: string
description: ID of the journal account.
readOnly: true
maxLength: 50
example: jrn_acc_0YVCXS791DD8JAK1WV3VHM70ZQ
name:
type: string
description: Name of the journal account.
example: Unearned revenue
description:
type:
- string
- 'null'
createdTime:
description: Date and time when the journal record is created.
$ref: '#/components/schemas/ServerTimestamp'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
JournalEntry:
type: object
required:
- period
- currency
properties:
id:
type: string
description: ID of the journal entry.
readOnly: true
maxLength: 50
example: jrn_ent_0YVCXSFCF2DJX99NBBSJCEVETB
period:
type: object
properties:
startDate:
type: string
format: date
example: '2022-09-01'
endDate:
type: string
format: date
example: '2022-09-30'
currency:
description: Currency of the journal record revenue.
$ref: '#/components/schemas/CurrencyCode'
description:
type: string
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
JournalRecord:
type: object
required:
- type
- journalEntryId
- customerId
- invoiceId
- invoiceItemId
- debitAccountId
- creditAccountId
properties:
id:
type: string
description: Unique resource ID.
maxLength: 50
example: jrn_rec_0YVCXV2HE5DBT89QV7RXSJEZQ4
journalEntryId:
description: ID of the journal entry.
readOnly: true
type: string
customerId:
description: ID of the customer.
type: string
maxLength: 50
example: cus_0YV7DDSDD1C8DA64KHH2W33CPF
invoiceId:
type: string
description: ID of the invoice.
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
invoiceItemId:
type: string
description: ID of the invoice item.
maxLength: 50
example: ii_0YVFDEQS2KCFTBN9HXWJFY55GV
type:
type: string
readOnly: true
enum:
- automated
- manual
estimatedAmount:
description: >-
Amount of revenue estimated to be recognized at the schedule date.
This value is ignored when updating a journal record with a `type`
of `automated`.
type:
- number
- 'null'
format: double
recognizedAmount:
description: Amount of revenue recognized at the journal period end.
type:
- number
- 'null'
format: double
debitAccountId:
description: ID of the debit journal account.
type:
- string
- 'null'
creditAccountId:
description: ID of the credit journal account.
type:
- string
- 'null'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
invoice:
type: object
invoiceItem:
type: object
debitAccount:
type: object
creditAccount:
type: object
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
- invoice
- invoiceItem
- journalEntry
- creditAccount
- debitAccount
KycDocumentTypes:
type: string
enum:
- identity-proof
- address-proof
- funds-proof
- purchase-proof
- credit-file-proof
KycDocumentSubtypes:
type:
- string
- 'null'
enum:
- passport
- id-card
- driver-license
- birth-certificate
- utility-bill
- rental-receipt
- lease-agreement
- copy-credit-card
- credit-card-statement
- bank-statement
- inheritance-documentation
- tax-return
- salary-slip
- sale-of-assets
- public-health-card
- proof-of-age-card
- reverse-of-id
- public-service
- ewallet-holder-details
- ewallet-transaction-statement
- marriage-certificate
- firearms-license
- insurance-letter
- income-statement
- debtors-letter
- other
- null
KycRequestDocument:
type: object
required:
- type
properties:
type:
description: Type of document to request from the customer.
$ref: '#/components/schemas/KycDocumentTypes'
subtypes:
description: Permitted document subtype.
type:
- array
- 'null'
items:
$ref: '#/components/schemas/KycDocumentSubtypes'
maxAttempts:
description: |-
Total number of allowed document upload attempts.
Use `0` to allow unlimited upload attempts.
type: integer
default: 3
minimum: 0
maximum: 100
faceProofRequired:
description: >-
Specifies if the customer must upload a photo of their face (selfie)
that matches a provided KYC document.
type: boolean
faceLivenessRequired:
description: >-
Specifies if the customer must use the face liveness feature when
uploading a selfie.
For more information, see [Facial recognition and identity
verification](https://www.rebilly.com/docs/kyc-and-aml/kyc-and-aml/#facial-recognition-identity-verification).
type: boolean
KycRequest:
type: object
description: KYC request information.
required:
- customerId
- documents
properties:
id:
type: string
readOnly: true
description: ID of the KYC request.
maxLength: 50
example: kyc_req_0YV7JMJ3DBCGRBR7K9D4HVGPP5
customerId:
$ref: '#/components/schemas/CustomerId'
documents:
type: array
description: Documents to request from the customer.
minItems: 1
items:
$ref: '#/components/schemas/KycRequestDocument'
status:
description: Status of the request.
type: string
readOnly: true
enum:
- gathering
- attempted
- partial
- pending-review
- fulfilled
- failed
- abandoned
- expired
x-enumDescriptions:
gathering: |-
No documents have been provided yet.
This is a temporary state.
attempted: >-
At least one document has been provided but none were assigned the
`accepted` status.
This is a temporary state.
partial: >-
At least one requested document has the `accepted` status,
but not all requested documents have been assigned the `accepted`
status.
This is a temporary state.
pending-review: >-
At least one requested document has the `pending` status,
and no requested documents have been assigned the `accepted`
status.
This is a temporary state, until the document is reviewed,
or another `accepted` document is provided.
fulfilled: >-
All requested documents are provided and have been assigned the
`accepted` status.
This is a permanent state.
failed: >-
At least one requested document has exhausted all attempts,
and has not been assigned a `accepted`, `pending`, or
`in-progress` status.
This is a permanent state.
abandoned: |-
One or more documents provided but the request expired.
This is a permanent state.
expired: |-
No documents were provided and the request expired.
This is a permanent state.
redirectUrl:
description: >-
URL where the customer is redirected when a KYC document upload is
complete.
When the customer is redirected,
Rebilly appends an `info` query parameter that has one of the
following values:
- `back`: Customer clicked the `back to website` link.
- `token_expired`: Customer's token expired.
- `success`: Customer uploaded KYC documents that have been analyzed.
- `manual`: Customer uploaded KYC documents that require a manual review.
This is because the analyzer rejected the documents or could not process them.
- `partial`: Some of the customer's KYC documents have been analyzed,
but other documents have not.
For example, this may occur when a proof of address document is analyzed but proof of ID is not.
Example: `https://example.com?info=success`.
type:
- string
- 'null'
format: uri
reason:
description: Reason for uploading.
example: spend limit
type:
- string
- 'null'
matchLevel:
description: |-
Tolerance level setting for document matches.
The value of `1` is more tolerant and `2` is strict.
type: integer
minimum: 1
maximum: 2
default: 2
revision:
description: >-
Number of times the KYC request data has been modified.
Use this value when analyzing webhook data to determine if a change
must take precedence over the current representation.
type: integer
readOnly: true
expirationTime:
description: |-
Date and time when the request expires.
The default value is one hour in the future.
type: string
format: date-time
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- documents
- gatherer
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
documents:
type: array
KycDocumentRejectionReasonTypes:
description: Reason the document is rejected.
type: string
enum:
- document-unreadable
- document-expired
- document-not-matching
- document-duplicate
- document-invalid
- document-not-open
- underage-person
- third-party-or-mismatch
- expiration-date-missing
- issue-date-missing
- dob-mismatch
- name-mismatch
- critical-info-missing
- old-address-on-id
- tampered-document
- other
KycDocumentRejection:
description: Reason the document is rejected.
type:
- object
- 'null'
readOnly: true
properties:
type:
$ref: '#/components/schemas/KycDocumentRejectionReasonTypes'
message:
description: KYC document rejection message.
type: string
example: Provided document is unreadable
KycIdentityMatches:
type: object
description: Matched identity data.
properties:
containsImage:
description: Specifies if the document includes an image that contains a face.
type: boolean
example: true
isIdentityDocument:
description: Specifies if the document resembles an ID.
type: boolean
example: true
isPublishedOnline:
description: Specifies if an exact match of the document has been found online.
type: boolean
example: false
matchingImages:
description: URLs where matching images have been found online.
type: array
readOnly: true
maxItems: 3
items:
type: string
firstName:
description: |-
First name of the customer.
This value is null if no match is found.
type:
- string
- 'null'
example: John
lastName:
description: |-
Last name of the customer.
This value is null if no match is found.
type:
- string
- 'null'
example: Doe
dateOfBirth:
description: |-
Date of birth detected on the document.
This value is null if no match is detected.
type:
- string
- 'null'
format: date-time
expirationDate:
description: |-
Expiration date detected on the document.
This value is null if no expiration date is detected.
type:
- string
- 'null'
format: date-time
issueDate:
description: |-
Issue date detected on the document.
This value is null if no issue date is detected.
type:
- string
- 'null'
format: date-time
hasMinimalAge:
description: |-
Specifies that the individual is older than the minimal age limit.
The minimal age is 21+ the for USA and 18+ for all other countries.
This value is null if `dateOfBirth` is not determined.
type:
- boolean
- 'null'
readOnly: true
example: true
nationality:
description: |-
Nationality detected on a passport or citizenship document.
This value is null if no nationality is detected.
type:
- string
- 'null'
example: US
maxLength: 3
issuanceCountry:
description: Country that issued the document.
type:
- string
- 'null'
example: CA
minLength: 2
maxLength: 2
issuanceRegion:
description: Region, state, province, or territory that issued the document.
type:
- string
- 'null'
example: Ontario
documentNumber:
description: |-
Unique number on the identity document.
This value may contain alphanumeric characters.
type:
- string
- 'null'
example: '1234567890'
documentSubtype:
description: Interpreted subtype of the uploaded document.
type:
- string
- 'null'
$ref: '#/components/schemas/KycDocumentSubtypes'
hasMatchingFaceProof:
description: Specifies if an identity document has matching face proof.
type: boolean
example: false
isTampered:
description: Specifies if an identity document has been tampered with.
type: boolean
example: false
expiryDate:
description: Use `expirationDate` field instead.
type:
- string
- 'null'
format: date-time
deprecated: true
KycSettingsIdentity:
type: object
description: Identity proof settings.
properties:
weights:
type: object
description: >-
Property weights that are used for the KYC document verification
process.
All KYC documents start the verification process with a score of
100.
If a check fails, the score is reduced by the corresponding weight.
For example, if the `firstName` check weight is set to `5`, and the
check fails,
the KYC document score becomes `95`.
properties:
containsImage:
type: integer
minimum: 0
maximum: 100
description: >-
Weight added if the document does not include an image that
contains a face.
isIdentityDocument:
type: integer
minimum: 0
maximum: 100
description: Weight added if the document does not resemble an ID.
isPublishedOnline:
type: integer
minimum: 0
maximum: 100
description: >-
Weight added if an exact match of the document is not found
online.
firstName:
type: integer
minimum: 0
maximum: 100
description: Weight added if the customer's first name is not matched.
lastName:
type: integer
minimum: 0
maximum: 100
description: Weight added if the customer's last name is not matched.
expirationDate:
type: integer
minimum: 0
maximum: 100
description: >-
Weight added if an expiration date is not detected on the
document.
dateOfBirth:
type: integer
minimum: 0
maximum: 100
description: Weight added if a date of birth is not detected on the document.
matchesDateOfBirth:
type: integer
minimum: 0
maximum: 100
description: >-
Weight added if an identity document does not have a matching
date of birth.
issueDate:
type: integer
minimum: 0
maximum: 100
description: Weight added if an issue date is not detected on the document.
hasMinimalAge:
type: integer
minimum: 0
maximum: 100
description: >-
Weight added if the document does not verify the minimal age
limit.
Minimal age is 21+ the for USA and 18+ for all other countries.
hasMatchingFaceProof:
type: integer
minimum: 0
maximum: 100
description: >-
Weight added if an identity document does not have matching face
proof.
nationality:
type: integer
minimum: 0
maximum: 100
description: Weight added if a nationality is not detected on the document.
documentSubtype:
type: integer
minimum: 0
maximum: 100
description: >-
Weight added if the document is not one of the recognized
document subtypes.
isTampered:
type: integer
minimum: 0
maximum: 100
description: Weight added if the document has been tampered with.
thresholds:
type: object
description: >-
Pass and fail threshold definition for the document verification
process.
properties:
rejectBelow:
type: integer
minimum: 0
maximum: 100
description: >-
Overall score by which an identity proof document fails the
verification process.
acceptAbove:
type: integer
minimum: 0
maximum: 100
description: >-
Overall score by which an identity proof document passes the
verification process.
ProofOfIdentityKycDocument:
title: KYC documents.
type: object
required:
- customerId
- documentType
- status
- fileIds
properties:
id:
type: string
readOnly: true
description: ID of the KYC document.
maxLength: 50
example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
fileIds:
description: >-
IDs of linked file objects.
Uploaded `identity-proof` files must have the following tags
attached to be used for KYC purposes:
`['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc',
'face-proof']`.
type: array
items:
type: string
maxLength: 50
example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
documentType:
description: >-
Document type submitted for validation.
Only the `identity-proof` and `address-proof` types are analyzed
automatically.
$ref: '#/components/schemas/KycDocumentTypes'
documentSubtype:
description: Document subtype submitted for validation.
$ref: '#/components/schemas/KycDocumentSubtypes'
status:
description: Status of the validation.
type: string
readOnly: true
enum:
- pending
- in-progress
- accepted
- rejected
- archived
x-enumDescriptions:
pending: Waiting to be reviewed or analyzed.
in-progress: Being analyzed by the Rebilly AI.
accepted: Accepted by AI or a human.
rejected: Rejected by AI or a human.
archived: Archived by the Rebilly AI.
rejectionReason:
$ref: '#/components/schemas/KycDocumentRejection'
requestId:
readOnly: true
type:
- string
- 'null'
description: ID of the KYC request.
maxLength: 50
example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
processedTime:
description: Date and time when the KYC document is processed.
type:
- string
- 'null'
format: date-time
readOnly: true
customerId:
$ref: '#/components/schemas/CustomerId'
reviewerId:
description: ID of the KYC document reviewer.
type:
- string
- 'null'
readOnly: true
maxLength: 50
example: 44433322-2c4y-483z-a0a9-158621f77a21
reviewerName:
description: First and last name of the KYC document reviewer.
type:
- string
- 'null'
readOnly: true
reviewStartTime:
description: Date and time when the manual review starts.
type:
- string
- 'null'
format: date-time
readOnly: true
reviewTime:
description: Date and time of manual review.
type:
- string
- 'null'
format: date-time
readOnly: true
notes:
description: Reviewer notes.
type:
- string
- 'null'
tags:
description: List of KYC document tags.
readOnly: true
type: array
items:
$ref: '#/components/schemas/Tag'
reason:
description: Reason for uploading.
type:
- string
- 'null'
matchLevel:
description: Tolerance level setting for document matches.
type: integer
minimum: 1
maximum: 2
example: 2
revision:
description: >-
Number of times the KYC document data has been modified.
Use this value when analyzing webhook data to determine if a change
must take precedence over the current representation.
type: integer
readOnly: true
documentMatches:
type:
- object
- 'null'
readOnly: true
description: Proof of identity document matches.
properties:
score:
description: >-
Calculated score that represents the percentage of confidence
that this ID represents the customer.
type: number
format: double
example: 0.75
data:
$ref: '#/components/schemas/KycIdentityMatches'
parsedData:
type:
- object
- 'null'
readOnly: true
description: Parsed data.
properties:
score:
description: >-
Calculated score that represents the percentage of confidence
that this ID represents the customer.
type: number
format: double
example: 0.75
data:
$ref: '#/components/schemas/KycIdentityMatches'
settings:
description: Settings used to score the document.
readOnly: true
oneOf:
- $ref: '#/components/schemas/KycSettingsIdentity'
- type: 'null'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
files:
type: array
maxItems: 3
description: Linked files.
KycAddressMatches:
type: object
description: Matched address data.
properties:
firstName:
description: |-
First name of the customer.
This value is null if no match is found.
type:
- string
- 'null'
example: John
lastName:
description: |-
Last name of the customer.
This value is null if no match is found.
type:
- string
- 'null'
example: Doe
line1:
description: |-
Address of the customer's residence.
This value is null if no match is found.
type:
- string
- 'null'
example: 36 Craven St
city:
description: |-
Customer's city of residence.
This value is null if no match is found.
type:
- string
- 'null'
example: London
region:
description: |-
Customer's region of residence.
This value is null if no match is found.
type:
- string
- 'null'
example: London
postalCode:
description: |-
Postal code of the customer's residence.
This value is null if no match is found.
type:
- string
- 'null'
example: WC2N 5NF
wordCount:
description: Total number of words in the document.
type: integer
example: 350
uniqueWords:
description: Total number of unique words in the document.
type: integer
example: 175
date:
description: |-
Date detected on the document.
Use this field to determine if the document is recent.
type:
- string
- 'null'
format: date
example: '2021-01-01'
phone:
description: Phone number of the company or agency that issued the document.
type:
- string
- 'null'
example: (123) 456-7890
documentSubtype:
description: Interpreted subtype of the uploaded document.
type:
- string
- 'null'
$ref: '#/components/schemas/KycDocumentSubtypes'
isTampered:
description: Specifies if an address proof document has been tampered with.
type: boolean
example: false
KycSettingsAddress:
type: object
description: Address proof settings.
properties:
weights:
type: object
description: >-
Property weights that are used for the KYC document verification
process.
All KYC documents start the verification process with a score of
100.
If a check fails, the score is reduced by the corresponding weight.
For example, if the `firstName` check weight is set to `5`, and the
check fails,
the KYC document score becomes `95`.
properties:
firstName:
type: integer
minimum: 0
maximum: 100
description: Weight added if the customer's first name is not matched.
lastName:
type: integer
minimum: 0
maximum: 100
description: Weight added if the customer's last name is not matched.
line1:
type: integer
minimum: 0
maximum: 100
description: Weight added if the customer's address is not matched.
city:
type: integer
minimum: 0
maximum: 100
description: Weight added if the customer's city is not matched.
region:
type: integer
minimum: 0
maximum: 100
description: Weight added if the customer's region is not matched.
postalCode:
type: integer
minimum: 0
maximum: 100
description: Weight added if the customer's postal code is not matched.
date:
type: integer
minimum: 0
maximum: 100
description: Weight added if a date is not detected on the document.
phone:
type: integer
minimum: 0
maximum: 100
description: Weight added if a phone number is not detected on the document.
documentSubtype:
type: integer
minimum: 0
maximum: 100
description: >-
Weight added if the document is not one of the recognized
document subtypes.
isTampered:
type: integer
minimum: 0
maximum: 100
description: Weight added if the document has been tampered with.
thresholds:
type: object
description: >-
Pass and fail threshold definition for the document verification
process.
properties:
rejectBelow:
type: integer
minimum: 0
maximum: 100
description: >-
Overall score by which an identity proof document fails the
verification process.
acceptAbove:
type: integer
minimum: 0
maximum: 100
description: >-
Overall score by which an identity proof document passes the
verification process.
ProofOfAddressKycDocument:
title: KYC documents.
type: object
required:
- customerId
- documentType
- status
- fileIds
properties:
id:
type: string
readOnly: true
description: ID of the KYC document.
maxLength: 50
example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
fileIds:
description: >-
IDs of linked file objects.
Uploaded `identity-proof` files must have the following tags
attached to be used for KYC purposes:
`['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc',
'face-proof']`.
type: array
items:
type: string
maxLength: 50
example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
documentType:
description: >-
Document type submitted for validation.
Only the `identity-proof` and `address-proof` types are analyzed
automatically.
$ref: '#/components/schemas/KycDocumentTypes'
documentSubtype:
description: Document subtype submitted for validation.
$ref: '#/components/schemas/KycDocumentSubtypes'
status:
description: Status of the validation.
type: string
readOnly: true
enum:
- pending
- in-progress
- accepted
- rejected
- archived
x-enumDescriptions:
pending: Waiting to be reviewed or analyzed.
in-progress: Being analyzed by the Rebilly AI.
accepted: Accepted by AI or a human.
rejected: Rejected by AI or a human.
archived: Archived by the Rebilly AI.
rejectionReason:
$ref: '#/components/schemas/KycDocumentRejection'
requestId:
readOnly: true
type:
- string
- 'null'
description: ID of the KYC request.
maxLength: 50
example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
processedTime:
description: Date and time when the KYC document is processed.
type:
- string
- 'null'
format: date-time
readOnly: true
customerId:
$ref: '#/components/schemas/CustomerId'
reviewerId:
description: ID of the KYC document reviewer.
type:
- string
- 'null'
readOnly: true
maxLength: 50
example: 44433322-2c4y-483z-a0a9-158621f77a21
reviewerName:
description: First and last name of the KYC document reviewer.
type:
- string
- 'null'
readOnly: true
reviewStartTime:
description: Date and time when the manual review starts.
type:
- string
- 'null'
format: date-time
readOnly: true
reviewTime:
description: Date and time of manual review.
type:
- string
- 'null'
format: date-time
readOnly: true
notes:
description: Reviewer notes.
type:
- string
- 'null'
tags:
description: List of KYC document tags.
readOnly: true
type: array
items:
$ref: '#/components/schemas/Tag'
reason:
description: Reason for uploading.
type:
- string
- 'null'
matchLevel:
description: Tolerance level setting for document matches.
type: integer
minimum: 1
maximum: 2
example: 2
revision:
description: >-
Number of times the KYC document data has been modified.
Use this value when analyzing webhook data to determine if a change
must take precedence over the current representation.
type: integer
readOnly: true
documentMatches:
type:
- object
- 'null'
readOnly: true
properties:
score:
description: >-
Calculated score that represents the percentage of confidence
that this proof of address represents the customer.
type: number
format: double
example: 0.75
data:
$ref: '#/components/schemas/KycAddressMatches'
parsedData:
type:
- object
- 'null'
readOnly: true
properties:
score:
description: >-
Calculated score that represents the percentage of confidence
that this proof of address represents the customer.
type: number
format: double
example: 0.75
data:
$ref: '#/components/schemas/KycAddressMatches'
settings:
description: Settings used to score the document.
readOnly: true
oneOf:
- $ref: '#/components/schemas/KycSettingsAddress'
- type: 'null'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
files:
type: array
maxItems: 3
description: Linked files.
FundsMatches:
type: object
properties:
firstName:
description: |-
First name of the customer.
This value is null if no match is found.
type:
- string
- 'null'
example: John
lastName:
description: |-
Last name of the customer.
This value is null if no match is found.
type:
- string
- 'null'
example: Doe
documentSubtype:
description: Interpreted subtype of the uploaded document.
type:
- string
- 'null'
$ref: '#/components/schemas/KycDocumentSubtypes'
ProofOfFundsKycDocument:
title: KYC documents.
type: object
required:
- customerId
- documentType
- status
- fileIds
properties:
id:
type: string
readOnly: true
description: ID of the KYC document.
maxLength: 50
example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
fileIds:
description: >-
IDs of linked file objects.
Uploaded `identity-proof` files must have the following tags
attached to be used for KYC purposes:
`['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc',
'face-proof']`.
type: array
items:
type: string
maxLength: 50
example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
documentType:
description: >-
Document type submitted for validation.
Only the `identity-proof` and `address-proof` types are analyzed
automatically.
$ref: '#/components/schemas/KycDocumentTypes'
documentSubtype:
description: Document subtype submitted for validation.
$ref: '#/components/schemas/KycDocumentSubtypes'
status:
description: Status of the validation.
type: string
readOnly: true
enum:
- pending
- in-progress
- accepted
- rejected
- archived
x-enumDescriptions:
pending: Waiting to be reviewed or analyzed.
in-progress: Being analyzed by the Rebilly AI.
accepted: Accepted by AI or a human.
rejected: Rejected by AI or a human.
archived: Archived by the Rebilly AI.
rejectionReason:
$ref: '#/components/schemas/KycDocumentRejection'
requestId:
readOnly: true
type:
- string
- 'null'
description: ID of the KYC request.
maxLength: 50
example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
processedTime:
description: Date and time when the KYC document is processed.
type:
- string
- 'null'
format: date-time
readOnly: true
customerId:
$ref: '#/components/schemas/CustomerId'
reviewerId:
description: ID of the KYC document reviewer.
type:
- string
- 'null'
readOnly: true
maxLength: 50
example: 44433322-2c4y-483z-a0a9-158621f77a21
reviewerName:
description: First and last name of the KYC document reviewer.
type:
- string
- 'null'
readOnly: true
reviewStartTime:
description: Date and time when the manual review starts.
type:
- string
- 'null'
format: date-time
readOnly: true
reviewTime:
description: Date and time of manual review.
type:
- string
- 'null'
format: date-time
readOnly: true
notes:
description: Reviewer notes.
type:
- string
- 'null'
tags:
description: List of KYC document tags.
readOnly: true
type: array
items:
$ref: '#/components/schemas/Tag'
reason:
description: Reason for uploading.
type:
- string
- 'null'
matchLevel:
description: Tolerance level setting for document matches.
type: integer
minimum: 1
maximum: 2
example: 2
settings:
description: Settings used to score the document.
type:
- object
- 'null'
revision:
description: >-
Number of times the KYC document data has been modified.
Use this value when analyzing webhook data to determine if a change
must take precedence over the current representation.
type: integer
readOnly: true
documentMatches:
type:
- object
- 'null'
readOnly: true
description: Proof of funds document matches.
properties:
data:
$ref: '#/components/schemas/FundsMatches'
parsedData:
type:
- object
- 'null'
readOnly: true
properties:
data:
$ref: '#/components/schemas/FundsMatches'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
files:
type: array
maxItems: 3
description: Linked files.
PurchaseMatches:
type: object
properties:
firstName:
description: |-
First name of the customer if it is matched.
This value is null if no match is found.
type:
- string
- 'null'
example: John
lastName:
description: |-
Last name of the customer if it is matched.
This value is null if no match is found.
type:
- string
- 'null'
example: Doe
paymentInstrumentId:
type:
- string
- 'null'
description: |-
ID of the payment instrument related to the document.
This value is null if no match is found.
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
documentSubtype:
description: Interpreted subtype of the uploaded document.
type:
- string
- 'null'
$ref: '#/components/schemas/KycDocumentSubtypes'
ProofOfPurchaseKycDocument:
title: KYC documents.
type: object
required:
- customerId
- documentType
- status
- fileIds
properties:
id:
type: string
readOnly: true
description: ID of the KYC document.
maxLength: 50
example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
fileIds:
description: >-
IDs of linked file objects.
Uploaded `identity-proof` files must have the following tags
attached to be used for KYC purposes:
`['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc',
'face-proof']`.
type: array
items:
type: string
maxLength: 50
example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
documentType:
description: >-
Document type submitted for validation.
Only the `identity-proof` and `address-proof` types are analyzed
automatically.
$ref: '#/components/schemas/KycDocumentTypes'
documentSubtype:
description: Document subtype submitted for validation.
$ref: '#/components/schemas/KycDocumentSubtypes'
status:
description: Status of the validation.
type: string
readOnly: true
enum:
- pending
- in-progress
- accepted
- rejected
- archived
x-enumDescriptions:
pending: Waiting to be reviewed or analyzed.
in-progress: Being analyzed by the Rebilly AI.
accepted: Accepted by AI or a human.
rejected: Rejected by AI or a human.
archived: Archived by the Rebilly AI.
rejectionReason:
$ref: '#/components/schemas/KycDocumentRejection'
requestId:
readOnly: true
type:
- string
- 'null'
description: ID of the KYC request.
maxLength: 50
example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
processedTime:
description: Date and time when the KYC document is processed.
type:
- string
- 'null'
format: date-time
readOnly: true
customerId:
$ref: '#/components/schemas/CustomerId'
reviewerId:
description: ID of the KYC document reviewer.
type:
- string
- 'null'
readOnly: true
maxLength: 50
example: 44433322-2c4y-483z-a0a9-158621f77a21
reviewerName:
description: First and last name of the KYC document reviewer.
type:
- string
- 'null'
readOnly: true
reviewStartTime:
description: Date and time when the manual review starts.
type:
- string
- 'null'
format: date-time
readOnly: true
reviewTime:
description: Date and time of manual review.
type:
- string
- 'null'
format: date-time
readOnly: true
notes:
description: Reviewer notes.
type:
- string
- 'null'
tags:
description: List of KYC document tags.
readOnly: true
type: array
items:
$ref: '#/components/schemas/Tag'
reason:
description: Reason for uploading.
type:
- string
- 'null'
matchLevel:
description: Tolerance level setting for document matches.
type: integer
minimum: 1
maximum: 2
example: 2
settings:
description: Settings used to score the document.
type:
- object
- 'null'
revision:
description: >-
Number of times the KYC document data has been modified.
Use this value when analyzing webhook data to determine if a change
must take precedence over the current representation.
type: integer
readOnly: true
documentMatches:
type:
- object
- 'null'
readOnly: true
description: Proof of purchase document matches.
properties:
data:
$ref: '#/components/schemas/PurchaseMatches'
parsedData:
type:
- object
- 'null'
readOnly: true
description: Parsed data.
properties:
data:
$ref: '#/components/schemas/PurchaseMatches'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
- paymentInstrument
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
files:
type: array
maxItems: 3
description: Linked files.
CreditFileCommonDecisionData:
readOnly: true
type: object
properties:
lastNameMatch:
description: Last name match.
type: string
readOnly: true
example: 'Y'
firstNameMatch:
description: First name match.
type: string
readOnly: true
example: 'Y'
civicNumberMatch:
description: Civic number match.
type: string
readOnly: true
example: 'Y'
streetNameMatch:
description: Street name match.
type: string
readOnly: true
example: 'Y'
cityMatch:
description: City match.
type: string
readOnly: true
example: 'Y'
postalCodeMatch:
description: Postal code match.
type: string
readOnly: true
example: 'Y'
provinceMatch:
description: Province match.
type: string
readOnly: true
example: 'Y'
dateOfBirthMatch:
description: Date of birth match.
type: string
readOnly: true
example: 'Y'
ageOfCreditFileThreeOrMoreYearsOld:
description: Age of credit file is three or more years old.
type: string
readOnly: true
example: 'Y'
addressAsReported:
description: Address as reported.
type: string
readOnly: true
example: 'Y'
nameAsReported:
description: Name as reported.
type: string
readOnly: true
example: 'Y'
dateOfBirthAsReported:
description: Date of birth as reported.
type: string
readOnly: true
example: 'Y'
CreditFileMatches:
type: object
properties:
creditBureau:
description: Credit bureau from which the credit file data is sourced.
type: string
readOnly: true
enum:
- equifax
- experian
- transunion
- test-bureau
creditFileNumber:
description: Credit file number from the credit bureau.
type: string
readOnly: true
name:
description: Name of the person to consult about the credit file.
type: string
readOnly: true
consultedDate:
description: Date to consult with the credit bureau about the credit file.
type: string
format: date-time
readOnly: true
decision:
description: >-
Specifies if the credit file is used in a single source, or as part
of a dual source, proof of identity decision.
type: string
enum:
- single-source
- dual-source
- other
x-enumDescriptions:
single-source: >-
Credit file used as a single source of proof for an identity
decisions.
dual-source: >-
Credit file used as a source of proof where the credit bureau
agency found two reliable trade sources.
At least two sources are required for a dual-source proof of
identity decision.
other: Credit file cannot be used for KYC decisions.
readOnly: true
trades:
description: Contains information to support the dual process.
type: array
items:
type: object
properties:
name:
type: string
description: Trade name.
example: Rogers
accountNumber:
type: string
example: 123-ABC-123
dateOpened:
type: string
format: date
readOnly: true
referenceData:
description: Extra data from the credit bureau.
readOnly: true
type: object
properties:
singleSourceHit:
description: Single source hit.
type: string
readOnly: true
example: 'Y'
dualSourceHit:
description: Dual source hit.
type: string
readOnly: true
example: 'Y'
waterfallProcess:
description: Waterfall process.
type: string
readOnly: true
example: 'Y'
creditFileCreatedDate:
description: Date when the credit file is created.
type: string
readOnly: true
numberOfTradesOnFile:
description: Number of trades on file.
type: string
readOnly: true
example: '001'
singleDecision:
description: Data related to a single source decision.
type: object
allOf:
- $ref: '#/components/schemas/CreditFileCommonDecisionData'
dualDecision:
description: Data related to a dual source decision.
type:
- array
- 'null'
items:
allOf:
- $ref: '#/components/schemas/CreditFileCommonDecisionData'
ProofOfCreditFileKycDocument:
title: KYC documents.
type: object
required:
- customerId
- documentType
- status
- fileIds
properties:
id:
type: string
readOnly: true
description: ID of the KYC document.
maxLength: 50
example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
fileIds:
description: >-
IDs of linked file objects.
Uploaded `identity-proof` files must have the following tags
attached to be used for KYC purposes:
`['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc',
'face-proof']`.
type: array
items:
type: string
maxLength: 50
example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
documentType:
description: >-
Document type submitted for validation.
Only the `identity-proof` and `address-proof` types are analyzed
automatically.
$ref: '#/components/schemas/KycDocumentTypes'
documentSubtype:
description: Document subtype submitted for validation.
$ref: '#/components/schemas/KycDocumentSubtypes'
status:
description: Status of the validation.
type: string
readOnly: true
enum:
- pending
- in-progress
- accepted
- rejected
- archived
x-enumDescriptions:
pending: Waiting to be reviewed or analyzed.
in-progress: Being analyzed by the Rebilly AI.
accepted: Accepted by AI or a human.
rejected: Rejected by AI or a human.
archived: Archived by the Rebilly AI.
rejectionReason:
$ref: '#/components/schemas/KycDocumentRejection'
requestId:
readOnly: true
type:
- string
- 'null'
description: ID of the KYC request.
maxLength: 50
example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
processedTime:
description: Date and time when the KYC document is processed.
type:
- string
- 'null'
format: date-time
readOnly: true
customerId:
$ref: '#/components/schemas/CustomerId'
reviewerId:
description: ID of the KYC document reviewer.
type:
- string
- 'null'
readOnly: true
maxLength: 50
example: 44433322-2c4y-483z-a0a9-158621f77a21
reviewerName:
description: First and last name of the KYC document reviewer.
type:
- string
- 'null'
readOnly: true
reviewStartTime:
description: Date and time when the manual review starts.
type:
- string
- 'null'
format: date-time
readOnly: true
reviewTime:
description: Date and time of manual review.
type:
- string
- 'null'
format: date-time
readOnly: true
notes:
description: Reviewer notes.
type:
- string
- 'null'
tags:
description: List of KYC document tags.
readOnly: true
type: array
items:
$ref: '#/components/schemas/Tag'
reason:
description: Reason for uploading.
type:
- string
- 'null'
matchLevel:
description: Tolerance level setting for document matches.
type: integer
minimum: 1
maximum: 2
example: 2
settings:
description: Settings used to score the document.
type:
- object
- 'null'
revision:
description: >-
Number of times the KYC document data has been modified.
Use this value when analyzing webhook data to determine if a change
must take precedence over the current representation.
type: integer
readOnly: true
documentMatches:
description: Proof of credit document matches.
type:
- object
- 'null'
readOnly: true
properties:
data:
$ref: '#/components/schemas/CreditFileMatches'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
files:
type: array
maxItems: 3
description: Linked files.
KycDocument:
type: object
description: KYC document information.
discriminator:
propertyName: documentType
mapping:
identity-proof: '#/components/schemas/ProofOfIdentityKycDocument'
address-proof: '#/components/schemas/ProofOfAddressKycDocument'
funds-proof: '#/components/schemas/ProofOfFundsKycDocument'
purchase-proof: '#/components/schemas/ProofOfPurchaseKycDocument'
credit-file-proof: '#/components/schemas/ProofOfCreditFileKycDocument'
oneOf:
- $ref: '#/components/schemas/ProofOfIdentityKycDocument'
- $ref: '#/components/schemas/ProofOfAddressKycDocument'
- $ref: '#/components/schemas/ProofOfFundsKycDocument'
- $ref: '#/components/schemas/ProofOfPurchaseKycDocument'
- $ref: '#/components/schemas/ProofOfCreditFileKycDocument'
KycSettings:
type: object
description: Settings for KYC score calculation.
properties:
identityProof:
$ref: '#/components/schemas/KycSettingsIdentity'
addressProof:
$ref: '#/components/schemas/KycSettingsAddress'
ResetPasswordToken:
type: object
required:
- username
properties:
token:
description: ID of the token.
type: string
readOnly: true
username:
description: Username associated with the token.
type: string
credentialId:
description: Credential ID associated with the token.
type: string
readOnly: true
expiredTime:
description: Date and time when the password expires.
type:
- string
- 'null'
format: date-time
_links:
$ref: '#/components/schemas/SelfLink'
PaymentCardBrand:
description: Brand of payment card.
type: string
enum:
- Visa
- MasterCard
- American Express
- Discover
- Maestro
- Solo
- Electron
- JCB
- Voyager
- Diners Club
- Switch
- Laser
- China UnionPay
- AstroPay Card
UseAsBackup:
description: >-
Specifies if this payment instrument can be used as a backup for invoice
payment retries.
type: boolean
default: false
PaymentCard:
type: object
description: Payment card information.
title: Payment card
required:
- method
properties:
id:
type: string
description: ID of the payment instrument.
readOnly: true
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
customerId:
$ref: '#/components/schemas/CustomerId'
method:
description: Method of payment instrument.
type: string
readOnly: true
enum:
- payment-card
status:
type: string
description: >-
Status of the payment instrument.
An `active` status means that a payment instrument has been used at
least once for an approved transaction.
To remove an instrument from use, set this value to `deactivated`.
For more information, see [Deactivate a payment
instrument](./PostPaymentInstrumentDeactivation).
enum:
- active
- inactive
- expired
- deactivated
- verification-needed
fingerprint:
description: |-
Unique value that is used to identify the payment instrument.
This value is generated from the `bin` and the `last4` values.
This value contains alphanumeric characters.
type: string
readOnly: true
bin:
description: >-
Bank Identification Number (BIN) of the payment card.
This value is the same as the first 6 digits of the associated
Primary Account Number (PAN).
type: string
format: bin
readOnly: true
last4:
description: Last 4 digits of the associated Primary Account Number (PAN).
type: string
readOnly: true
pan:
description: Primary Account Number (PAN) of the payment card.
type: string
writeOnly: true
expYear:
description: Expiration year of the payment card.
type: integer
expMonth:
description: Expiration month of the payment card.
type: integer
cvv:
description: Card Verification Value (CVV) of the payment card.
type: string
writeOnly: true
brand:
readOnly: true
allOf:
- $ref: '#/components/schemas/PaymentCardBrand'
bankCountry:
description: Bank country of the payment instrument.
type:
- string
- 'null'
readOnly: true
bankName:
description: Bank name of the payment instrument.
type: string
readOnly: true
billingAddress:
description: Contact's billing address.
$ref: '#/components/schemas/ContactObject'
useAsBackup:
$ref: '#/components/schemas/UseAsBackup'
billingPortalUrl:
description: URL of the billing portal where the card can be updated.
type: string
readOnly: true
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
stickyGatewayAccountId:
description: >-
ID of the sticky gateway account.
All future payments are processed by this gateway account.
For more information,
see [Gateway
routing](https://www.rebilly.com/docs/settings/intelligent-payment-routing/#sticky-gateway-accounts).
type:
- string
- 'null'
readOnly: true
expirationReminderTime:
description: Date and time when an expiration reminder event is triggered.
type:
- string
- 'null'
format: date-time
readOnly: true
expirationReminderNumber:
description: Number of expiration reminder events that have triggered.
type:
- integer
- 'null'
readOnly: true
referenceData:
description: Payment instrument reference data.
type: object
additionalProperties:
type: string
example:
gatewayTransactionId: GAT123
digitalWallet:
readOnly: true
description: Digital wallet type.
type:
- string
- 'null'
enum:
- Apple Pay
- Google Pay
- null
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
revision:
description: >-
Number of times the payment instrument data has been modified.
Use this value when analyzing webhook data to determine if a change
must take precedence over the current representation.
type: integer
readOnly: true
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
- authTransaction
- approvalUrl
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
authTransaction:
type: object
customer:
type: object
BankAccount:
type: object
title: Bank account
required:
- method
properties:
id:
type: string
description: ID of the payment instrument.
readOnly: true
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
customerId:
$ref: '#/components/schemas/CustomerId'
method:
description: Method of payment instrument.
type: string
readOnly: true
enum:
- ach
bankName:
description: Name of the bank.
type: string
routingNumber:
description: Bank routing number.
type: string
accountNumberType:
description: >-
Type of bank account number.
A valid value is a Basic Bank Account Number (BBAN) or an
International Bank Account Number (IBAN).
type: string
default: BBAN
enum:
- BBAN
- IBAN
accountType:
description: Type of bank account.
type: string
enum:
- checking
- savings
- other
bic:
description: Bank Identifier Code (BIC).
type:
- string
- 'null'
billingAddress:
description: Customer's billing address.
$ref: '#/components/schemas/ContactObject'
fingerprint:
description: |-
Unique value which identifies the bank account.
This value contains alphanumeric characters.
Depending on the type of bank account number,
a bank account fingerprint is generated using one of the following:
- BBAN: `last4` and `routingNumber` values.
- IBAN: First 8 characters of the IBAN and the `last4` value.
type: string
readOnly: true
last4:
description: Last 4 digits of the bank account number.
type: string
readOnly: true
status:
description: Status of the bank account.
type: string
readOnly: true
enum:
- active
- deactivated
stickyGatewayAccountId:
description: >-
ID of the sticky gateway account.
All future payments are processed by this gateway account.
For more information, see [Gateway
routing](https://www.rebilly.com/docs/settings/intelligent-payment-routing/#sticky-gateway-accounts).
type:
- string
- 'null'
readOnly: true
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
useAsBackup:
$ref: '#/components/schemas/UseAsBackup'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
revision:
description: >-
Number of times the payment instrument data has been modified.
Use this value when analyzing webhook data to determine if a change
must take precedence over the current representation.
type: integer
readOnly: true
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
PayPalAccount:
type: object
title: PayPal account
required:
- method
- customerId
- billingAddress
properties:
id:
type: string
description: ID of the payment instrument.
readOnly: true
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
customerId:
$ref: '#/components/schemas/CustomerId'
method:
description: Method of payment instrument.
type: string
enum:
- paypal
billingAddress:
description: Billing address.
$ref: '#/components/schemas/ContactObject'
username:
description: PayPal username.
type: string
readOnly: true
status:
description: PayPal account status.
type: string
readOnly: true
enum:
- inactive
- active
- deactivated
useAsBackup:
$ref: '#/components/schemas/UseAsBackup'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
stickyGatewayAccountId:
description: >-
ID of the sticky gateway account.
All future payments are processed by this gateway account.
For more information, see [Gateway
routing](https://www.rebilly.com/docs/settings/intelligent-payment-routing/#sticky-gateway-accounts).
type:
- string
- 'null'
readOnly: true
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
revision:
description: >-
Number of times the payment instrument data has been modified.
Use this value when analyzing webhook data to determine if a change
must take precedence over the current representation.
type: integer
readOnly: true
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
- authTransaction
- approvalUrl
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
authTransaction:
type: object
customer:
type: object
KhelocardCard:
type: object
title: Khelocard card
required:
- method
properties:
id:
type: string
description: ID of the payment instrument.
readOnly: true
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
customerId:
$ref: '#/components/schemas/CustomerId'
method:
description: Method of payment instrument.
type: string
enum:
- Khelocard
fingerprint:
description: >-
Unique value which identifies the payment instrument.
This value contains alphanumeric characters.
This value is generated from the card number, CVV, and expiration
date.
type: string
number:
description: Khelocard card masked number.
type: string
last4:
description: Last 4 digits of the number.
type: string
expYear:
description: Khelocard card expiration year.
type: integer
expMonth:
description: Khelocard card expiration month.
type: integer
billingAddress:
description: Billing address.
$ref: '#/components/schemas/ContactObject'
status:
description: Payment instrument status.
type: string
enum:
- active
- deactivated
useAsBackup:
$ref: '#/components/schemas/UseAsBackup'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
stickyGatewayAccountId:
description: >-
ID of the sticky gateway account.
All future payments are processed by this gateway account.
For more information,
see [Gateway
routing](https://www.rebilly.com/docs/settings/intelligent-payment-routing/#sticky-gateway-accounts).
type:
- string
- 'null'
readOnly: true
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
revision:
description: >-
Number of times the payment instrument data has been modified.
Use this value when analyzing webhook data to determine if a change
must take precedence over the current representation.
type: integer
readOnly: true
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
AlternativePaymentMethods:
type: string
description: Payment method.
enum:
- cash
- check
- paypal
- AdvCash
- Aircash
- Alfa-click
- Alipay
- AstroPay Card
- AstroPay-GO
- BankReferenced
- bank-transfer
- bank-transfer-2
- bank-transfer-3
- bank-transfer-4
- bank-transfer-5
- bank-transfer-6
- bank-transfer-7
- bank-transfer-8
- bank-transfer-9
- Baloto
- Beeline
- Belfius-direct-net
- bitcoin
- Bizum
- Boleto
- cash-deposit
- CASHlib
- CashToCode
- China UnionPay
- Cleo
- CODVoucher
- Conekta-oxxo
- Cupon-de-pagos
- cryptocurrency
- domestic-cards
- Directa24Card
- echeck
- ecoPayz
- ecoVoucher
- Efecty
- EPS
- ePay.bg
- eZeeWallet
- FasterPay
- Flexepin
- Giropay
- Gpaysafe
- Google Pay
- iDebit
- iDEAL
- ING-homepay
- INOVAPAY-pin
- INOVAPAY-wallet
- InstaDebit
- instant-bank-transfer
- InstantPayments
- Interac
- Interac-online
- Interac-eTransfer
- invoice
- iWallet
- Jeton
- jpay
- KakaoPay
- Khelocard
- Klarna
- KNOT
- loonie
- Matrix
- MaxiCash
- Megafon
- MercadoPago
- MiFinity-eWallet
- miscellaneous
- MobilePay
- Bancontact
- Bancontact-mobile
- MTS
- MuchBetter
- Multibanco
- Neosurf
- Netbanking
- Neteller
- Nordea-Solo
- OchaPay
- online-bank-transfer
- Onlineueberweisen
- oriental-wallet
- OXXO
- P24
- Pagadito
- PagoEffectivo
- Pagsmile-deposit-express
- Pagsmile-lottery
- PayCash
- Payco
- Payeer
- PaymentAsia-crypto
- Paymero
- Perfect-money
- Piastrix
- PIX
- plaid-account
- PayTabs
- Paysafecard
- Paysafecash
- Pay4Fun
- Paynote
- PinPay
- phone
- PhonePe
- POLi
- PostFinance-card
- PostFinance-e-finance
- QIWI
- QPay
- QQPay
- rapyd-checkout
- Resurs
- SafetyPay
- Samsung Pay
- SEPA
- Skrill
- Skrill Rapid Transfer
- SMSVoucher
- Sofort
- SparkPay
- swift-dbt
- Tele2
- Terminaly-RF
- ToditoCash-card
- Trustly
- Tupay
- UPayCard
- UPI
- USD-coin
- VCreditos
- VenusPoint
- voucher
- voucher-2
- voucher-3
- voucher-4
- Wallet88
- Webmoney
- Webpay
- Webpay-2
- Webpay Card
- WeChat Pay
- wire
- XPay-P2P
- XPay-QR
- Yandex-money
- Zotapay
- Zimpler
AlternativeInstrument:
type: object
title: Alternative instrument
required:
- method
- customerId
- billingAddress
properties:
id:
type: string
description: ID of the payment instrument.
readOnly: true
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
customerId:
$ref: '#/components/schemas/CustomerId'
method:
description: Payment method of the payment instrument.
allOf:
- $ref: '#/components/schemas/AlternativePaymentMethods'
- not:
enum:
- payment-card
- paypal
- ach
- echeck
- Khelocard
billingAddress:
description: >-
Billing address of the user that is associated with the payment
instrument.
$ref: '#/components/schemas/ContactObject'
status:
description: Payment instrument status.
type: string
readOnly: true
enum:
- active
- deactivated
useAsBackup:
$ref: '#/components/schemas/UseAsBackup'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
stickyGatewayAccountId:
description: >-
ID of the sticky gateway account.
All future payments are processed by this gateway account.
For more information,
see [Gateway
routing](https://www.rebilly.com/docs/settings/intelligent-payment-routing/#sticky-gateway-accounts).
type:
- string
- 'null'
readOnly: true
referenceData:
description: Payment instrument reference data.
type: object
additionalProperties:
type: string
example:
gatewayTransactionId: GAT123
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
revision:
description: >-
Number of times the payment instrument data has been modified.
Use this value when analyzing webhook data to determine if a change
must take precedence over the current representation.
type: integer
readOnly: true
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- customer
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
PaymentInstrument:
discriminator:
propertyName: method
mapping:
payment-card: '#/components/schemas/PaymentCard'
ach: '#/components/schemas/BankAccount'
paypal: '#/components/schemas/PayPalAccount'
Khelocard: '#/components/schemas/KhelocardCard'
cash: '#/components/schemas/AlternativeInstrument'
check: '#/components/schemas/AlternativeInstrument'
AdvCash: '#/components/schemas/AlternativeInstrument'
Alfa-click: '#/components/schemas/AlternativeInstrument'
Alipay: '#/components/schemas/AlternativeInstrument'
AstroPay Card: '#/components/schemas/AlternativeInstrument'
AstroPay-GO: '#/components/schemas/AlternativeInstrument'
BankReferenced: '#/components/schemas/AlternativeInstrument'
bank-transfer: '#/components/schemas/AlternativeInstrument'
bank-transfer-2: '#/components/schemas/AlternativeInstrument'
bank-transfer-3: '#/components/schemas/AlternativeInstrument'
bank-transfer-4: '#/components/schemas/AlternativeInstrument'
bank-transfer-5: '#/components/schemas/AlternativeInstrument'
bank-transfer-6: '#/components/schemas/AlternativeInstrument'
bank-transfer-7: '#/components/schemas/AlternativeInstrument'
bank-transfer-8: '#/components/schemas/AlternativeInstrument'
bank-transfer-9: '#/components/schemas/AlternativeInstrument'
Baloto: '#/components/schemas/AlternativeInstrument'
Beeline: '#/components/schemas/AlternativeInstrument'
Belfius-direct-net: '#/components/schemas/AlternativeInstrument'
bitcoin: '#/components/schemas/AlternativeInstrument'
Bizum: '#/components/schemas/AlternativeInstrument'
Boleto: '#/components/schemas/AlternativeInstrument'
cash-deposit: '#/components/schemas/AlternativeInstrument'
CASHlib: '#/components/schemas/AlternativeInstrument'
CashToCode: '#/components/schemas/AlternativeInstrument'
China UnionPay: '#/components/schemas/AlternativeInstrument'
Cleo: '#/components/schemas/AlternativeInstrument'
CODVoucher: '#/components/schemas/AlternativeInstrument'
Conekta-oxxo: '#/components/schemas/AlternativeInstrument'
Cupon-de-pagos: '#/components/schemas/AlternativeInstrument'
cryptocurrency: '#/components/schemas/AlternativeInstrument'
domestic-cards: '#/components/schemas/AlternativeInstrument'
ecoPayz: '#/components/schemas/AlternativeInstrument'
ecoVoucher: '#/components/schemas/AlternativeInstrument'
Efecty: '#/components/schemas/AlternativeInstrument'
EPS: '#/components/schemas/AlternativeInstrument'
ePay.bg: '#/components/schemas/AlternativeInstrument'
eZeeWallet: '#/components/schemas/AlternativeInstrument'
FasterPay: '#/components/schemas/AlternativeInstrument'
Flexepin: '#/components/schemas/AlternativeInstrument'
Giropay: '#/components/schemas/AlternativeInstrument'
Gpaysafe: '#/components/schemas/AlternativeInstrument'
Google Pay: '#/components/schemas/AlternativeInstrument'
iDebit: '#/components/schemas/AlternativeInstrument'
iDEAL: '#/components/schemas/AlternativeInstrument'
ING-homepay: '#/components/schemas/AlternativeInstrument'
INOVAPAY-pin: '#/components/schemas/AlternativeInstrument'
INOVAPAY-wallet: '#/components/schemas/AlternativeInstrument'
InstaDebit: '#/components/schemas/AlternativeInstrument'
instant-bank-transfer: '#/components/schemas/AlternativeInstrument'
InstantPayments: '#/components/schemas/AlternativeInstrument'
Interac: '#/components/schemas/AlternativeInstrument'
Interac-online: '#/components/schemas/AlternativeInstrument'
Interac-eTransfer: '#/components/schemas/AlternativeInstrument'
invoice: '#/components/schemas/AlternativeInstrument'
iWallet: '#/components/schemas/AlternativeInstrument'
Jeton: '#/components/schemas/AlternativeInstrument'
jpay: '#/components/schemas/AlternativeInstrument'
Klarna: '#/components/schemas/AlternativeInstrument'
KNOT: '#/components/schemas/AlternativeInstrument'
loonie: '#/components/schemas/AlternativeInstrument'
Matrix: '#/components/schemas/AlternativeInstrument'
MaxiCash: '#/components/schemas/AlternativeInstrument'
Megafon: '#/components/schemas/AlternativeInstrument'
MiFinity-eWallet: '#/components/schemas/AlternativeInstrument'
miscellaneous: '#/components/schemas/AlternativeInstrument'
Bancontact: '#/components/schemas/AlternativeInstrument'
Bancontact-mobile: '#/components/schemas/AlternativeInstrument'
MTS: '#/components/schemas/AlternativeInstrument'
MuchBetter: '#/components/schemas/AlternativeInstrument'
Multibanco: '#/components/schemas/AlternativeInstrument'
Neosurf: '#/components/schemas/AlternativeInstrument'
Netbanking: '#/components/schemas/AlternativeInstrument'
Neteller: '#/components/schemas/AlternativeInstrument'
Nordea-Solo: '#/components/schemas/AlternativeInstrument'
OchaPay: '#/components/schemas/AlternativeInstrument'
online-bank-transfer: '#/components/schemas/AlternativeInstrument'
Onlineueberweisen: '#/components/schemas/AlternativeInstrument'
oriental-wallet: '#/components/schemas/AlternativeInstrument'
OXXO: '#/components/schemas/AlternativeInstrument'
P24: '#/components/schemas/AlternativeInstrument'
Pagadito: '#/components/schemas/AlternativeInstrument'
PagoEffectivo: '#/components/schemas/AlternativeInstrument'
Pagsmile-deposit-express: '#/components/schemas/AlternativeInstrument'
Pagsmile-lottery: '#/components/schemas/AlternativeInstrument'
PayCash: '#/components/schemas/AlternativeInstrument'
Payeer: '#/components/schemas/AlternativeInstrument'
PaymentAsia-crypto: '#/components/schemas/AlternativeInstrument'
Paymero: '#/components/schemas/AlternativeInstrument'
Perfect-money: '#/components/schemas/AlternativeInstrument'
Piastrix: '#/components/schemas/AlternativeInstrument'
plaid-account: '#/components/schemas/AlternativeInstrument'
PayTabs: '#/components/schemas/AlternativeInstrument'
Paysafecard: '#/components/schemas/AlternativeInstrument'
Paysafecash: '#/components/schemas/AlternativeInstrument'
Pay4Fun: '#/components/schemas/AlternativeInstrument'
Paynote: '#/components/schemas/AlternativeInstrument'
PinPay: '#/components/schemas/AlternativeInstrument'
phone: '#/components/schemas/AlternativeInstrument'
PhonePe: '#/components/schemas/AlternativeInstrument'
POLi: '#/components/schemas/AlternativeInstrument'
PostFinance-card: '#/components/schemas/AlternativeInstrument'
PostFinance-e-finance: '#/components/schemas/AlternativeInstrument'
QIWI: '#/components/schemas/AlternativeInstrument'
QPay: '#/components/schemas/AlternativeInstrument'
QQPay: '#/components/schemas/AlternativeInstrument'
rapyd-checkout: '#/components/schemas/AlternativeInstrument'
Resurs: '#/components/schemas/AlternativeInstrument'
SafetyPay: '#/components/schemas/AlternativeInstrument'
SEPA: '#/components/schemas/AlternativeInstrument'
Skrill: '#/components/schemas/AlternativeInstrument'
Skrill Rapid Transfer: '#/components/schemas/AlternativeInstrument'
SMSVoucher: '#/components/schemas/AlternativeInstrument'
Sofort: '#/components/schemas/AlternativeInstrument'
SparkPay: '#/components/schemas/AlternativeInstrument'
swift-dbt: '#/components/schemas/AlternativeInstrument'
Tele2: '#/components/schemas/AlternativeInstrument'
Terminaly-RF: '#/components/schemas/AlternativeInstrument'
ToditoCash-card: '#/components/schemas/AlternativeInstrument'
Trustly: '#/components/schemas/AlternativeInstrument'
UPayCard: '#/components/schemas/AlternativeInstrument'
UPI: '#/components/schemas/AlternativeInstrument'
USD-coin: '#/components/schemas/AlternativeInstrument'
VCreditos: '#/components/schemas/AlternativeInstrument'
VenusPoint: '#/components/schemas/AlternativeInstrument'
voucher: '#/components/schemas/AlternativeInstrument'
voucher-2: '#/components/schemas/AlternativeInstrument'
voucher-3: '#/components/schemas/AlternativeInstrument'
voucher-4: '#/components/schemas/AlternativeInstrument'
Webmoney: '#/components/schemas/AlternativeInstrument'
Webpay: '#/components/schemas/AlternativeInstrument'
Webpay-2: '#/components/schemas/AlternativeInstrument'
Webpay Card: '#/components/schemas/AlternativeInstrument'
WeChat Pay: '#/components/schemas/AlternativeInstrument'
XPay-P2P: '#/components/schemas/AlternativeInstrument'
XPay-QR: '#/components/schemas/AlternativeInstrument'
Yandex-money: '#/components/schemas/AlternativeInstrument'
Zotapay: '#/components/schemas/AlternativeInstrument'
Zimpler: '#/components/schemas/AlternativeInstrument'
anyOf:
- $ref: '#/components/schemas/PaymentCard'
- $ref: '#/components/schemas/BankAccount'
- $ref: '#/components/schemas/PayPalAccount'
- $ref: '#/components/schemas/KhelocardCard'
- $ref: '#/components/schemas/AlternativeInstrument'
PaymentInstrumentCreateToken:
title: Payment token
type: object
required:
- customerId
- token
properties:
customerId:
$ref: '#/components/schemas/CustomerId'
token:
description: ID of the payment token.
type: string
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
useAsBackup:
$ref: '#/components/schemas/UseAsBackup'
PaymentCardCreatePlain:
title: Payment card
type: object
required:
- method
- customerId
- pan
- expYear
- expMonth
- billingAddress
properties:
method:
description: Method of the payment instrument.
type: string
enum:
- payment-card
customerId:
$ref: '#/components/schemas/CustomerId'
pan:
description: Primary Account Number (PAN) of the payment card.
type: string
writeOnly: true
expYear:
description: Expiration year of the payment card.
type: integer
expMonth:
description: Expiration month of the payment card.
type: integer
cvv:
description: Card Verification Value (CVV) of the payment card.
type: string
writeOnly: true
billingAddress:
description: Billing address.
$ref: '#/components/schemas/ContactObject'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
riskMetadata:
$ref: '#/components/schemas/RiskMetadata'
useAsBackup:
$ref: '#/components/schemas/UseAsBackup'
BankAccountCreatePlain:
title: Bank account
type: object
required:
- accountNumberType
discriminator:
propertyName: accountNumberType
mapping:
BBAN: '#/components/schemas/BBANType'
IBAN: '#/components/schemas/IBANType'
properties:
accountNumberType:
type: string
enum:
- IBAN
- BBAN
BBANType:
type: object
description: BBAN type object.
required:
- accountNumberType
- method
- customerId
- accountNumber
- routingNumber
- accountType
- billingAddress
allOf:
- $ref: '#/components/schemas/BankAccountCreatePlain'
- properties:
method:
description: Payment method of the payment instrument.
type: string
enum:
- ach
customerId:
$ref: '#/components/schemas/CustomerId'
accountNumberType:
description: >-
Bank account number type.
A valid value is a Basic Bank Account Number (BBAN) or an
International Bank Account Number (IBAN).
type: string
default: BBAN
enum:
- IBAN
- BBAN
accountNumber:
description: >-
Customer's bank account number.
Detailed information on all ISO 13616-compliant national IBAN
formats is available in the [SWIFT IBAN
Registry](https://www.swift.com/standards/data-standards/iban).
type: string
pattern: ^[0-9]+$
routingNumber:
description: Bank routing number.
type: string
pattern: ^[0-9]+$
accountType:
description: Bank account type.
type: string
enum:
- checking
- savings
- other
bankName:
description: Bank name.
type: string
bic:
description: Bank Identifier Code (BIC).
type: string
billingAddress:
description: Customer's billing address.
$ref: '#/components/schemas/ContactObject'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
riskMetadata:
$ref: '#/components/schemas/RiskMetadata'
useAsBackup:
$ref: '#/components/schemas/UseAsBackup'
IBANType:
type: object
required:
- accountNumberType
- method
- customerId
- accountNumber
- billingAddress
description: IBAN type object.
allOf:
- $ref: '#/components/schemas/BankAccountCreatePlain'
- properties:
method:
description: Payment method of the payment instrument.
type: string
enum:
- ach
customerId:
$ref: '#/components/schemas/CustomerId'
accountNumberType:
description: >-
Customer's bank account number type.
A valid value is a Basic Bank Account Number (BBAN) or an
International Bank Account Number (IBAN).
type: string
default: BBAN
enum:
- IBAN
- BBAN
accountNumber:
description: >-
Customer's bank account number.
Detailed information on all ISO 13616-compliant national IBAN
formats is available in the [SWIFT IBAN
Registry](https://www.swift.com/standards/data-standards/iban).
type: string
bankName:
description: Bank name.
type: string
bic:
description: Bank Identifier Code (BIC).
type: string
billingAddress:
description: Customer's billing address.
$ref: '#/components/schemas/ContactObject'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
riskMetadata:
$ref: '#/components/schemas/RiskMetadata'
useAsBackup:
$ref: '#/components/schemas/UseAsBackup'
PaymentInstrumentUpdateToken:
type: object
properties:
token:
description: ID of the payment token.
type: string
billingAddress:
description: >-
Customer's billing address.
If this value is supplied it overrides the billing address that is
supplied with the token.
$ref: '#/components/schemas/ContactObject'
stickyGatewayAccountId:
description: >-
ID of the sticky gateway account.
All future payments are processed by this gateway account.
To remove the sticky gateway account from a payment instrument, set
this value to `null`.
For more information,
see [Gateway
routing](https://www.rebilly.com/docs/settings/intelligent-payment-routing/#sticky-gateway-accounts).
type:
- string
- 'null'
maxLength: 50
example: gw_acc_0YVCXMF26DDNKAERE5NW727S34
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
useAsBackup:
$ref: '#/components/schemas/UseAsBackup'
PaymentCardUpdatePlain:
type: object
properties:
cvv:
description: Card Verification Value (CVV) of the payment card.
type: string
expMonth:
description: Expiration month of the payment card.
type: integer
expYear:
description: Expiration year of the payment card.
type: integer
billingAddress:
description: Billing address.
$ref: '#/components/schemas/ContactObject'
stickyGatewayAccountId:
description: >-
ID of the sticky gateway account.
All future payments are processed by this gateway account.
For more information,
see [Gateway
routing](https://www.rebilly.com/docs/settings/intelligent-payment-routing/#sticky-gateway-accounts).
$ref: '#/components/schemas/ResourceId'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
useAsBackup:
$ref: '#/components/schemas/UseAsBackup'
BankAccountUpdatePlain:
type: object
properties:
bankName:
description: Name of the bank.
type: string
accountType:
description: Bank account type.
type: string
enum:
- checking
- savings
- other
billingAddress:
description: Billing address.
$ref: '#/components/schemas/ContactObject'
stickyGatewayAccountId:
description: >-
ID of the sticky gateway account.
All future payments are processed by this gateway account.
For more information,
see [Gateway
routing](https://www.rebilly.com/docs/settings/intelligent-payment-routing/#sticky-gateway-accounts).
$ref: '#/components/schemas/ResourceId'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
useAsBackup:
$ref: '#/components/schemas/UseAsBackup'
PlanFormulaFixedFee:
title: Fixed-fee
description: >-
Fixed-fee pricing details.
Use this formula for subscriptions that involve the same price,
number of units, and reoccur over a fixed period of time.
For more information, see [Fixed-fee per
period](https://www.rebilly.com/docs/settings/pricing-formulas/#fixed-fee-per-period).
type: object
required:
- price
- formula
properties:
formula:
type: string
description: >-
Price formula that determines which algorithm is used to calculate
the invoice price based on the following factors:
- Quantity in the order.
This value may be variable if you are charging based on usage.
If you are not charging based on usage,
this value is determined when an order is created.
- Price of the quantity range.
Some formulas set a price based on defined product quantity ranges.
For more information, see [Price
formulas](https://www.rebilly.com/docs/billing/pricing-formulas/).
enum:
- fixed-fee
price:
description: >-
Use this formula to charge for subscriptions that have a fixed
price,
number of units, and reoccur over a fixed period of time,
such as every: day, week, month, year, or number of years.
For example, a streaming company charges customers $13.99 each month
for subscription period that is 6 months in duration.
The quantity of movies that a customer streams each month does not
impact the price.
type: number
format: double
example: 99.95
PlanFormulaFlatRate:
title: Flat rate
description: >-
Flat rate pricing details.
Use this formula to charge a flat fee per unit.
For example, $0.10 per transaction or $4 per unit.
For more information, see [Flat rate
pricing](https://www.rebilly.com/docs/billing/pricing-formulas/#flat-rate-pricing).
type: object
required:
- price
- formula
properties:
formula:
type: string
description: >-
Price formula that determines which algorithm is used to calculate
the invoice price based on the following factors:
- Quantity in the order.
This value may be variable if you are charging based on usage.
If you are not charging based on usage,
this value is determined when an order is created.
- Price of the quantity range.
Some formulas set a price based on defined product quantity ranges.
For more information, see [Price
formulas](https://www.rebilly.com/docs/billing/pricing-formulas/).
enum:
- flat-rate
price:
description: |-
Use this formula to charge a flat fee per unit.
For example, $0.10 for each transaction or $4 per unit.
If the value of this field is `0`, the product is free.
type: number
format: double
example: 99.95
minQuantity:
description: |-
Minimum permitted unit quantity.
If this value is `null`, no limit is in place.
type:
- integer
- 'null'
default: null
example: 1
minimum: 1
maximum: 65535
maxQuantity:
description: |-
Maximum permitted unit quantity.
If this value is `null`, no limit is in place.
type:
- integer
- 'null'
example: 1
minimum: 1
maximum: 65535
PlanFormulaStairstep:
title: Stair-step
description: >-
Stair-step pricing details.
Use this formula to charge for units that are sold in specific
quantities.
For more information, see
[Stair-step](https://www.rebilly.com/docs/billing/pricing-formulas/#stair-step).
type: object
required:
- brackets
- formula
properties:
formula:
type: string
description: >-
Price formula that determines which algorithm is used to calculate
the invoice price based on the following factors:
- Quantity in the order.
This value may be variable if you are charging based on usage.
If you are not charging based on usage,
this value is determined when an order is created.
- Price of the quantity range.
Some formulas set a price based on defined product quantity ranges.
For more information, see [Price
formulas](https://www.rebilly.com/docs/billing/pricing-formulas/).
enum:
- stairstep
brackets:
description: >-
Use this formula to charge for units that are sold in specific
quantity ranges.
For example, a bank charges a merchant based on the number of
transactions they complete each month.
Price total | Max quantity | Description
------------|--------------|------------
$50 | 1000 | Up to 1000 transactions
$100 | 1500 | Between 1000 and 1500 transactions
$200 | 3000 | Between 1500 and 3000 transactions
$500 | null | More than 3000 transactions
- If the merchant completes 900 transaction in a month, they are
charged $50.
- If the merchant completes 1001 transaction in a month, they are
charged $100.
- If the merchant completes 2500 transaction in a month, they are
charged $200.
- If the merchant completes more than 3000 transaction in a month,
they are charged $500.
type: array
minItems: 1
items:
type: object
properties:
price:
description: |-
Price of the quantity range.
If the value of this field is `0`, the product is free.
type: number
format: double
example: 99.95
maxQuantity:
description: |-
Maximum permitted unit quantity.
If this value is `null`, no limit is in place.
This value starts from the end of the previous quantity range.
If there are no previous quantity ranges,
this value starts at 1.
type:
- integer
- 'null'
example: 1
minimum: 1
maximum: 65535
minQuantity:
description: |-
Minimum permitted unit quantity.
If this value is `null`, no limit is in place.
type:
- integer
- 'null'
default: null
example: 1
minimum: 1
maximum: 65535
PlanFormulaTiered:
title: Tiered
description: >-
Tiered pricing details.
Use this formula to charge for units that are sold within defined
quantity ranges, or tiers.
For more information, see
[Tiered](https://www.rebilly.com/docs/settings/pricing-formulas/#tiered).
type: object
required:
- brackets
- formula
properties:
formula:
type: string
description: >-
Price formula that determines which algorithm is used to calculate
the invoice price based on the following factors:
- Quantity in the order.
This value may be variable if you are charging based on usage.
If you are not charging based on usage,
this value is determined when an order is created.
- Price of the quantity range.
Some formulas set a price based on defined product quantity ranges.
For more information, see [Price
formulas](https://www.rebilly.com/docs/billing/pricing-formulas/).
enum:
- tiered
brackets:
description: >-
Use this formula to charge for units that are sold within defined
quantity ranges, or tiers.
If a customer buys a number of units that span more than one tier,
the total cost is calculated based on the cost of the units in each
tier.
For example, a software company sells user licenses based on the
following:
Tier | Price per user | Max quantity | Description
-----|----------------|--------------|------------
1 | $40 | 3 | 1 to 3 user licenses
2 | $30 | 5 | 5 to 8 user licenses
3 | $15 | null | 9 or more user licenses
If a customer buys 10 user licenses, the pricing is as follows:
- 3 licenses at tier 1 (3 x $40) is 120
- 5 licenses at tier 2 (5 x $30) is 150
- 2 licenses at tier 3 (2 x $15) is 30
Total cost = $330
Formula: `(price for the tier x quantity within the tier)` + `(price
for next tier x quantity in next tier)` + `...` = final price.
type: array
minItems: 1
items:
type: object
properties:
price:
description: |-
Price of the quantity range.
If the value of this field is `0`, the product is free.
type: number
format: double
example: 99.95
maxQuantity:
description: |-
Maximum permitted unit quantity.
If this value is `null`, no limit is in place.
This value starts from the end of the previous quantity range.
If there are no previous quantity ranges,
this value starts at 1.
type:
- integer
- 'null'
example: 1
minimum: 1
maximum: 65535
minQuantity:
description: |-
Minimum permitted unit quantity.
If this value is `null`, no limit is in place.
type:
- integer
- 'null'
default: null
example: 1
minimum: 1
maximum: 65535
PlanFormulaVolume:
title: Volume
description: >-
Volume pricing details.
Use this formula to charge for units that are sold in bulk,
or volume ranges. In general,
this formula means that a customer pays less per unit when they buy a
large volume of units.
For more information, see
[Volume](https://www.rebilly.com/docs/settings/pricing-formulas/#volume).
type: object
required:
- brackets
- formula
properties:
formula:
type: string
description: >-
Price formula that determines which algorithm is used to calculate
the invoice price based on the following factors:
- Quantity in the order.
This value may be variable if you are charging based on usage.
If you are not charging based on usage,
this value is determined when an order is created.
- Price of the quantity range.
Some formulas set a price based on defined product quantity ranges.
For more information, see [Price
formulas](https://www.rebilly.com/docs/billing/pricing-formulas/).
enum:
- volume
brackets:
description: >-
Use this formula to charge for units that are sold in bulk, or
volume ranges.
This formula enables customers to pays less per unit when they buy a
large volume of units.
Unit cost is based on the highest volume range, and does not include
lower volume range pricing.
For example, a company sells t-shirts in the following volume
ranges:
Price per unit| Max quantity | Description
--------------|--------------|------------
$10 | 1 | 1 t-shirt
$8 | 5 | 2 to 5 t-shirts
$4 | null | 6 or more t-shirts
- If a customer buys 1 unit, they pay $10.
- If a customer buys 3 units, they pay $24 per unit, which is $8 per
unit.
- If a customer buys 10 units, they pay $40, which is $4 per unit.
type: array
minItems: 1
items:
type: object
properties:
price:
description: |-
Price of the quantity range.
If the value of this field is `0`, the product is free.
type: number
format: double
example: 99.95
maxQuantity:
description: |-
Maximum permitted unit quantity.
If this value is `null`, no limit is in place.
This value starts from the end of the previous quantity range.
If there are no previous quantity ranges,
this value starts at 1.
type:
- integer
- 'null'
example: 1
minimum: 1
maximum: 65535
minQuantity:
description: |-
Minimum permitted unit quantity.
If this value is `null`, no limit is in place.
type:
- integer
- 'null'
default: null
example: 1
minimum: 1
maximum: 65535
PlanPriceFormula:
description: Pricing details.
type: object
discriminator:
propertyName: formula
mapping:
fixed-fee: '#/components/schemas/PlanFormulaFixedFee'
flat-rate: '#/components/schemas/PlanFormulaFlatRate'
stairstep: '#/components/schemas/PlanFormulaStairstep'
tiered: '#/components/schemas/PlanFormulaTiered'
volume: '#/components/schemas/PlanFormulaVolume'
oneOf:
- $ref: '#/components/schemas/PlanFormulaFixedFee'
- $ref: '#/components/schemas/PlanFormulaFlatRate'
- $ref: '#/components/schemas/PlanFormulaStairstep'
- $ref: '#/components/schemas/PlanFormulaTiered'
- $ref: '#/components/schemas/PlanFormulaVolume'
PlanSetup:
type:
- object
- 'null'
description: Set up information of the plan.
required:
- price
properties:
price:
description: |-
Price of setting up the plan.
If your service charges a set up fee, specify it here.
To charge no set up fee, set this value to `0`.
type: number
format: double
OneTimeSalePlan:
type: object
description: >-
Details of the one-time sale plan. Use this plan for non-recurring,
one-time, sales.
required:
- name
- currency
- productId
- pricing
properties:
name:
description: |-
Name of the plan.
This name is displayed on invoices and receipts.
type: string
maxLength: 255
description:
type: string
description: |-
Plain-text description of the plan.
This field accepts plain-text only.
maxLength: 65535
richDescription:
type: string
description: >-
Rich-text description of the plan.
This field accepts rich text formatting, such as: bold, underline,
italic, and hyperlinks.
maxLength: 65535
productId:
type: string
description: ID of the related product.
maxLength: 50
example: prod_0YV7DES3WPC5J8JD8QTVNZBZNZ
productOptions:
type:
- object
- 'null'
description: Name-value pairs that specify the product options.
additionalProperties:
type: string
example:
color: red
size: xxl
currency:
$ref: '#/components/schemas/CurrencyCode'
currencySign:
description: Currency sign.
readOnly: true
type: string
pricing:
$ref: '#/components/schemas/PlanPriceFormula'
setup:
$ref: '#/components/schemas/PlanSetup'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
isActive:
type: boolean
description: Specifies if the plan is active.
default: true
revision:
type: integer
readOnly: true
description: >-
Number of times the plan is modified.
Compare this value with materialized subscription item revision
values.
isTrialOnly:
type: boolean
description: >-
Specifies if a plan is a trial that does not have recurring
instructions.
readOnly: true
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- attachments
ServicePeriodAnchorInstruction:
type: object
description: |-
Instruction for calculating the service period anchor.
The service period anchor is used, in conjunction with the subscription
start time, to calculate when the service period starts and ends.
discriminator:
propertyName: method
mapping:
day-of-month: '#/components/schemas/SchedulingMethodDayOfMonth'
day-of-week: '#/components/schemas/SchedulingMethodDayOfWeek'
immediately: '#/components/schemas/SchedulingMethodImmediately'
default:
method: immediately
anyOf:
- $ref: '#/components/schemas/SchedulingMethodDayOfMonth'
- $ref: '#/components/schemas/SchedulingMethodDayOfWeek'
- $ref: '#/components/schemas/SchedulingMethodImmediately'
PlanTrial:
type:
- object
required:
- price
- period
properties:
price:
description: |-
Price of setting up a trial.
If your service charges a fee for a trial, specify it here.
To charge no trial fee, set this value to `0`.
type: number
format: double
period:
type: object
description: Period information.
required:
- unit
- length
properties:
unit:
description: Unit of time.
type: string
enum:
- day
- week
- month
- year
length:
description: Length of time.
type: integer
minimum: 1
InvoiceTimeShift:
type:
- object
- 'null'
description: >-
Use invoice time shift to control the billing time.
Invoice time shift adjusts the invoice issue and due date when billing
must occur before the service period changes.
Use invoice time shift in conjunction with `billingTiming` to:
- Bill immediately when the service period starts.
- Bill immediately after the service period ends.
- Bill at an interval of time before the service period starts.
- Bill at an interval of time after the service period starts.
- Bill at an interval of time before the service period ends.
- Bill at an interval of time after the service period ends.
properties:
issueTimeShift:
type: object
description: >-
Calculation instruction of the billing time.
This is used in conjunction with the service period anchor to
calculate
the time at which the invoice is issued. For more information, see
[Service period anchor, billing timing, and invoice time
shift](https://www.rebilly.com/docs/dev-docs/concepts/#service-period-anchor-and-billing-timing-and-invoice-time-shift).
required:
- chronology
- duration
- unit
properties:
chronology:
type: string
description: >-
Sequential order of the billing time relative to the start of
the service period.
enum:
- before
duration:
type: integer
description: Amount of time by which to move the invoice issue time or date.
minimum: 1
unit:
description: Unit of time.
oneOf:
- $ref: '#/components/schemas/TimeUnit'
- $ref: '#/components/schemas/TimePluralUnit'
dueTimeShift:
type: object
required:
- duration
- unit
description: >-
Calculation instruction of the invoice due time.
This is used in conjunction with the billing anchor to calculate
when
an invoice is due for payment. For more information, see
[Service period anchor, billing timing, and invoice time
shift](https://www.rebilly.com/docs/dev-docs/concepts/#service-period-anchor-and-billing-timing-and-invoice-time-shift).
The sequential order of due time shift is always after the due date.
default:
duration: 1
unit: hour
properties:
duration:
type: integer
description: Amount of time by which to move the invoice due time or date.
minimum: 1
unit:
description: Unit of time.
oneOf:
- $ref: '#/components/schemas/TimeUnit'
- $ref: '#/components/schemas/TimePluralUnit'
SubscriptionPlan:
description: >-
Details of the subscription order plan. Use this plan for subscriptions
or sales that reoccur over a period of time.
type: object
required:
- name
- currency
- productId
- pricing
- recurringInterval
properties:
name:
description: |-
Name of the plan.
This name is displayed on invoices and receipts.
type: string
maxLength: 255
description:
type: string
description: |-
Plain-text description of the plan.
This field accepts plain-text only.
maxLength: 65535
richDescription:
type: string
description: >-
Rich-text description of the plan.
This field accepts rich text formatting, such as: bold, underline,
italic, and hyperlinks.
maxLength: 65535
productId:
type: string
description: ID of the related product.
maxLength: 50
example: prod_0YV7DES3WPC5J8JD8QTVNZBZNZ
productOptions:
type:
- object
- 'null'
description: Name-value pairs that specify the product options.
additionalProperties:
type: string
example:
color: red
size: xxl
currency:
$ref: '#/components/schemas/CurrencyCode'
currencySign:
description: Currency sign.
readOnly: true
type: string
pricing:
$ref: '#/components/schemas/PlanPriceFormula'
setup:
$ref: '#/components/schemas/PlanSetup'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
isActive:
type: boolean
description: Specifies if the plan is active.
default: true
revision:
type: integer
readOnly: true
description: >-
Number of times the plan is modified.
Compare this value with materialized subscription item revision
values.
isTrialOnly:
type: boolean
description: >-
Specifies if a plan is a trial that does not have recurring
instructions.
readOnly: true
recurringInterval:
description: |-
Service interval settings.
For a one-time sale, set this value to `null`.
type: object
properties:
periodAnchorInstruction:
$ref: '#/components/schemas/ServicePeriodAnchorInstruction'
unit:
description: Unit of time.
type: string
enum:
- day
- week
- month
- year
length:
description: Length of time.
type: integer
minimum: 1
limit:
description: >-
Number of invoices the subscription order generates.
If this value is `1`, only the initial order creation is
generated.
Example: For a 1 year contract that is billed monthly,
where the `periodUnit` is `month` and the `periodDuration` is
`1`,
set this field to `12`.
type:
- integer
- 'null'
minimum: 1
maximum: 65535
billingTiming:
type: string
default: prepaid
description: >-
Billing timing in relation to the service period.
For `prepaid` plans the customer pays when the service period
starts,
whereas, for `postpaid` plans, the customer pays when the
service period ends.
enum:
- prepaid
- postpaid
trial:
description: |-
Trial configuration setting.
If you do not want to offer a trial, set this value to `null`.
oneOf:
- $ref: '#/components/schemas/PlanTrial'
- type: 'null'
meteredBilling:
type:
- object
- 'null'
required:
- strategy
description: >-
Use metered billing when an exact quantity is unknown.
Report usage during a service period and charge customers
afterwards.
Metered billing plans must be postpaid.
properties:
strategy:
type: string
enum:
- sum
- last
x-enumDescriptions:
sum: Total amount of reported invoice item quantity usage.
last: Last reported invoice item quantity usage.
min:
description: >-
Minimum quantity that is charged at the end of a service period
regardless of reported usage.
type:
- number
- 'null'
format: float
minimum: 0.01
max:
description: >-
Maximum quantity that is charged at the end of a service period
regardless of reported usage.
type:
- number
- 'null'
format: float
minimum: 0.01
invoiceTimeShift:
$ref: '#/components/schemas/InvoiceTimeShift'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- attachments
TrialOnlyPlan:
description: |-
Details of the trial-only plan.
Use this plan for limited-time product trials.
Trials may have a reduced fee, or may be free.
type: object
required:
- name
- currency
- productId
- pricing
- trial
properties:
name:
description: |-
Name of the plan.
This name is displayed on invoices and receipts.
type: string
maxLength: 255
description:
type: string
description: |-
Plain-text description of the plan.
This field accepts plain-text only.
maxLength: 65535
richDescription:
type: string
description: >-
Rich-text description of the plan.
This field accepts rich text formatting, such as: bold, underline,
italic, and hyperlinks.
maxLength: 65535
productId:
type: string
description: ID of the related product.
maxLength: 50
example: prod_0YV7DES3WPC5J8JD8QTVNZBZNZ
productOptions:
type:
- object
- 'null'
description: Name-value pairs that specify the product options.
additionalProperties:
type: string
example:
color: red
size: xxl
currency:
$ref: '#/components/schemas/CurrencyCode'
currencySign:
description: Currency sign.
readOnly: true
type: string
pricing:
$ref: '#/components/schemas/PlanPriceFormula'
setup:
$ref: '#/components/schemas/PlanSetup'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
isActive:
type: boolean
description: Specifies if the plan is active.
default: true
revision:
type: integer
readOnly: true
description: >-
Number of times the plan is modified.
Compare this value with materialized subscription item revision
values.
isTrialOnly:
type: boolean
description: >-
Specifies if a plan is a trial that does not have recurring
instructions.
readOnly: true
trial:
description: Trial configuration settings.
$ref: '#/components/schemas/PlanTrial'
invoiceTimeShift:
description: >-
Use invoice time shift to adjust the invoice issue and due date when
billing must occur before the service period changes.
For example, rent must be paid in advance,
so the invoice must be in advance of the billing date.
For more information, see [Service period anchor, and billing
timing, and invoice time
shift](https://www.rebilly.com/docs/dev-docs/concepts/#service-period-anchor-and-billing-timing-and-invoice-time-shift).
$ref: '#/components/schemas/InvoiceTimeShift'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- attachments
Plan:
allOf:
- type: object
properties:
id:
type: string
description: ID of the plan.
maxLength: 50
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
readOnly: true
- anyOf:
- $ref: '#/components/schemas/OneTimeSalePlan'
- $ref: '#/components/schemas/SubscriptionPlan'
- $ref: '#/components/schemas/TrialOnlyPlan'
Product:
type: object
required:
- name
description: >-
Products are the items that your business sells.
Products include digital goods, services, and physical goods.
Products appear on invoice line items.
If you set a tax category identifier, taxes are calculated at invoice
generation.
If the product is shippable, shipping costs are calculated at invoice
generation.
Pricing and variations are set within plans.
For more information, see
[Plans](https://www.rebilly.com/docs/dev-docs/api/plans/).
properties:
id:
type: string
description: ID of the product.
readOnly: true
maxLength: 50
example: prod_0YV7DES3WPC5J8JD8QTVNZBZNZ
name:
description: Name of the product.
type: string
maxLength: 255
example: Premium membership
unitLabel:
description: Unit label, such as per `seat` or per `unit`.
type: string
maxLength: 50
example: seat
default: unit
description:
description: Description of the product.
type:
- string
- 'null'
maxLength: 512
requiresShipping:
description: |-
Specifies if the product requires shipping.
If this value is `true`, shipping calculations are applied.
type: boolean
example: false
default: false
options:
description: >-
Product options such as color, size, and so forth.
Product option values are defined in plans.
For more information, see
[Plans](https://www.rebilly.com/docs/dev-docs/api/plans/).
type: array
items:
type: string
taxCategoryId:
description: >-
Tax category of the product.
For a complete list of supported tax categories, see [TaxJar sales
tax API
reference](https://developers.taxjar.com/api/reference/#get-list-tax-categories).
If none of the tax categories from the list are applicable for your
product, use the general tax category `00000`.
type:
- string
- 'null'
example: '00000'
accountingCode:
description: Accounting code of the product.
type:
- string
- 'null'
example: '4010'
recognition:
type:
- object
- 'null'
properties:
debitAccountId:
description: ID of the debit journal account.
type:
- string
- 'null'
creditAccountId:
description: ID of the credit journal account.
type:
- string
- 'null'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
OriginalPlan:
type: object
description: >-
Use an existing plan without changes for the current order.
To create a new plan, see [Create a
plan](https://www.rebilly.com/catalog/all/plans/postplan).
required:
- id
properties:
id:
description: ID of the plan.
$ref: '#/components/schemas/ResourceId'
FlexiblePlan:
allOf:
- type: object
required:
- id
properties:
id:
type: string
description: ID of the plan.
maxLength: 50
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
- anyOf:
- $ref: '#/components/schemas/OneTimeSalePlan'
- $ref: '#/components/schemas/SubscriptionPlan'
- $ref: '#/components/schemas/TrialOnlyPlan'
QuoteCreateOrder:
type: object
title: QuoteCreateOrder
required:
- websiteId
- customerId
- items
- action
properties:
id:
readOnly: true
description: ID of the quote.
type: string
maxLength: 50
example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ
type:
description: |-
Specifies the type of the quote.
A quote can be a subscription or a one-time purchase.
type: string
readOnly: true
enum:
- subscription-order
- one-time-order
action:
description: >-
Action of the quote.
When a quote is accepted, a new order is created.
The `subscriptionId` value is filled with a new generated value from
the order.
type: string
enum:
- create
example: create
acceptanceConditions:
type: array
writeOnly: true
description: >-
Conditions that must be met for the quote to be automatically
accepted.
items:
type: string
enum:
- customer
- payment
x-enumDescriptions:
customer: Quote can be accepted by customer.
payment: Related invoice must be paid in full.
example:
- payment
default:
- customer
acceptanceFulfillment:
type: array
readOnly: true
description: List of `acceptanceConditions` with fulfillment status.
items:
type: object
properties:
condition:
type: string
enum:
- customer
- payment
- organization
isFulfilled:
type: boolean
subscriptionId:
description: ID of the related subscription or one-time purchase.
readOnly: true
type:
- string
- 'null'
maxLength: 50
example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ
invoiceId:
type: string
description: ID of the payment invoice.
readOnly: true
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
status:
description: Status of the quote.
type: string
readOnly: true
enum:
- draft
- issued
- accepted
- rejected
- canceled
- expired
x-enumDescriptions:
draft: Quote can be edited. This quote cannot be sent to a customer.
issued: Quote cannot be edited. This quote can be sent to a customer.
accepted: Customer accepted the quote and created an order.
rejected: Customer rejected the quote.
canceled: Organization canceled the quote.
expired: Expired before customer or organization interaction.
websiteId:
$ref: '#/components/schemas/WebsiteId'
customerId:
$ref: '#/components/schemas/CustomerId'
items:
type: array
description: Items included in the quote.
minItems: 1
items:
type: object
required:
- plan
- quantity
properties:
id:
description: ID of the quote item.
readOnly: true
type: string
example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ
quantity:
description: Number of product units in the specified plan.
type: integer
minimum: 1
plan:
description: Plan details.
oneOf:
- $ref: '#/components/schemas/OriginalPlan'
- $ref: '#/components/schemas/FlexiblePlan'
description:
type: string
description: Description of the quote item.
example: Charge per approved transaction with DCC
default: ''
maxLength: 255
priceDescription:
type: string
description: |-
Price description of the quote item.
This value is only used for metered billing items.
example: 50% of the markup for approved transactions
default: ''
maxLength: 255
usageLimits:
type:
- object
- 'null'
default: null
description: >-
Specifies the soft and hard usage limit thresholds for an item
with a metered billing plan.
This value is ignored when the plan is not metered.
properties:
softLimit:
type: object
description: >-
Defines thresholds for notification purposes.
For example, to notify the customer that their usage is
near the hard limit of their metered billing plan.
This notification informs the customer so that they can
upgrade their plan before the hard limit is reached.
When the reported usage reaches 75%, 90%, and 100% of the
configured limit a specific event is fired.
To notify the customer, a webhook and notification can be
configured for this event.
This field is useful for accounting and customer success
purposes.
The usage of metered billing plans can still be reported
if the soft limit is reached.
minProperties: 1
maxProperties: 1
properties:
quantity:
type: integer
description: Usage limit quantity.
minimum: 1
amount:
type: number
format: double
description: Usage limit amount in the currency of the order.
minimum: 0.01
hardLimit:
type: object
description: >-
Defines a limit where the customer can no longer use the
service.
Hard limits are used in addition to soft limits.
When a soft limit is reached,
a customer may receive a notification
but the service can still be provided up to the hard limit
value so that the customer can upgrade their plan.
When the reported usage reaches the configured limit,
a specific event is triggered.
To notify the customer in the merchant system,
or block a service,
a webhook and notification can be configured for this
event.
When the total usage reaches the hard limit quantity,
or amount values,
metered billing plan usages can no longer be reported.
minProperties: 1
maxProperties: 1
properties:
quantity:
type: integer
description: Usage limit quantity.
minimum: 1
amount:
type: number
format: double
description: Usage limit amount in the currency of the order.
minimum: 0.01
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_embedded:
type: object
description: >-
Embedded objects that are requested by the `expand` query
parameter.
readOnly: true
properties:
product:
type: object
deliveryAddress:
description: Delivery address of the order.
oneOf:
- $ref: '#/components/schemas/ContactObject'
- type: 'null'
billingAddress:
description: Billing address of the order.
oneOf:
- $ref: '#/components/schemas/ContactObject'
- type: 'null'
invoicePreview:
type: object
description: Preview of the quote invoice.
readOnly: true
properties:
currency:
description: Currency of the invoice.
$ref: '#/components/schemas/CurrencyCode'
initialAmounts:
type: object
description: Total amounts of the initial invoice.
properties:
amount:
description: Amount of the invoice.
type: number
x-type: Money
format: double
subtotalAmount:
description: Subtotal amount of the invoice.
type: number
x-type: Money
format: double
discountAmount:
description: Discount amount that is applied to the invoice.
type: number
x-type: Money
format: double
shippingAmount:
description: Shipping amount that is applied to the invoice.
type: number
x-type: Money
format: double
taxAmount:
description: Tax amount that is applied to the invoice.
type: number
x-type: Money
format: double
recurringAmounts:
type:
- object
- 'null'
description: >-
Total amounts of the recurring invoice.
This includes recurring items only.
If the quote does not have recurring items, the value of this
field is `null`.
properties:
amount:
description: Amount of the invoice.
type: number
x-type: Money
format: double
subtotalAmount:
description: Subtotal amount of the invoice.
type: number
x-type: Money
format: double
discountAmount:
description: Discount amount that is applied to the invoice.
type: number
x-type: Money
format: double
shippingAmount:
description: Shipping amount that is applied to the invoice.
type: number
x-type: Money
format: double
taxAmount:
description: Tax amount that is applied to the invoice.
type: number
x-type: Money
format: double
items:
type: array
description: Invoice items.
items:
type: object
properties:
quoteItemId:
description: ID of the related quote item.
type: string
example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ
type:
type: string
description: Type of the invoice item.
x-basic: true
enum:
- debit
- credit
name:
description: Name of the invoice item.
type: string
maxLength: 1000
description:
description: Description of the invoice item.
type: string
example: Charge per approved transaction with DCC
maxLength: 255
priceDescription:
type: string
description: Price description of the invoice item.
example: 50% of the markup for approved transactions
maxLength: 255
unitPrice:
description: Unit price of the invoice item.
type:
- number
- 'null'
format: double
quantity:
description: Quantity of the invoice item.
type: integer
period:
description: Date interval of the invoice item.
type:
- string
- 'null'
setupUnitPrice:
description: Unit price of the invoice item.
type:
- number
- 'null'
format: double
trialUnitPrice:
description: Unit price of the invoice item.
type:
- number
- 'null'
format: double
trialPeriod:
description: Date interval of the invoice item trial.
type:
- string
- 'null'
taxAmount:
description: Tax amount of the invoice item.
type:
- number
- 'null'
format: double
setupTaxAmount:
description: Tax amount of the setup that is applied to the invoice.
type:
- number
- 'null'
format: double
trialTaxAmount:
description: Tax amount of the trial that is applied to the invoice.
type:
- number
- 'null'
format: double
autopay:
type: boolean
default: false
description: >-
Specifies if payment attempts for the related subscription are made
automatically.
If autopay is enabled, the payment is retrieved from the customer on
the renewal date using the payment instrument that is set at
`paymentInstrumentId`,
or the default payment instrument on the subscription.
paymentTerms:
description: Payment terms for the customer which are displayed on the quote.
type: string
expirationTime:
description: >-
Date and time when the quote expires.
The default expiration time is one month from the time the quote is
issued.
In a `draft` state, this field may be `null`.
type:
- string
- 'null'
format: date-time
issuedTime:
description: Date and time when the quote is issued.
type:
- string
- 'null'
readOnly: true
format: date-time
acceptedTime:
description: Date and time when the quote is accepted.
type:
- string
- 'null'
readOnly: true
format: date-time
rejectedTime:
description: Date and time when the quote is rejected.
type:
- string
- 'null'
readOnly: true
format: date-time
canceledTime:
description: Date and time when the quote is canceled.
type:
- string
- 'null'
readOnly: true
format: date-time
redirectUrl:
description: |-
URL to redirect the customer to when a quote is rejected.
The default value is the website URL.
type: string
format: uri
signature:
type: object
description: Written signature and printed organization name.
properties:
showWrittenSignatureLines:
type: boolean
default: false
description: Specifies whether to show written signature lines.
organizationPrintedName:
type:
- string
- 'null'
description: Printed name of the organization.
default: null
shipping:
$ref: '#/components/schemas/Shipping'
tax:
$ref: '#/components/schemas/Taxes'
couponIds:
type:
- array
- 'null'
description: >-
List of coupons to redeem on the customer and apply to the related
invoice.
For more information, see
[Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/).
items:
type: string
description: Coupon ID.
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: >-
Type of link.
If the quote is issued, a customer can be redirected to the
`invoicePaymentFormUrl` value
to pay the related invoice using one of the methods which are
available to the customer.
type: string
enum:
- self
- quoteAcceptanceFormUrl
- invoicePaymentFormUrl
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
website:
type: object
subscription:
type: object
invoice:
type: object
QuoteChangeOrder:
type: object
title: QuoteChangeOrder
required:
- websiteId
- customerId
- items
- action
- subscriptionId
properties:
id:
readOnly: true
description: ID of the quote.
type: string
maxLength: 50
example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ
type:
description: |-
Specifies the type of the quote.
A quote can be a subscription or a one-time purchase.
type: string
readOnly: true
enum:
- subscription-order
- one-time-order
action:
description: >-
Action of the quote for change order items.
When a quote is accepted, quote items are applied to the related
order.
type: string
enum:
- change
example: change
acceptanceConditions:
type: array
writeOnly: true
description: >-
Conditions that must be met for the quote to be automatically
accepted.
items:
type: string
enum:
- customer
- payment
x-enumDescriptions:
customer: Quote can be accepted by customer.
payment: Related invoice must be paid in full.
example:
- payment
default:
- customer
acceptanceFulfillment:
type: array
readOnly: true
description: List of `acceptanceConditions` with fulfillment status.
items:
type: object
properties:
condition:
type: string
enum:
- customer
- payment
- organization
isFulfilled:
type: boolean
subscriptionId:
description: ID of the related subscription.
type: string
maxLength: 50
example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ
invoiceId:
type: string
description: ID of the payment invoice.
readOnly: true
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
status:
description: Status of the quote.
type: string
readOnly: true
enum:
- draft
- issued
- accepted
- rejected
- canceled
- expired
x-enumDescriptions:
draft: Quote can be edited. This quote cannot be sent to a customer.
issued: Quote cannot be edited. This quote can be sent to a customer.
accepted: >-
Customer accepted the quote and the related order item changes are
applied.
rejected: Customer rejected the quote.
canceled: Organization canceled the quote.
expired: Expired before customer or organization interaction.
websiteId:
$ref: '#/components/schemas/WebsiteId'
customerId:
$ref: '#/components/schemas/CustomerId'
items:
type: array
description: Items included in the quote.
minItems: 1
items:
type: object
required:
- plan
- quantity
properties:
id:
description: ID of the quote item.
readOnly: true
type: string
example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ
quantity:
description: Number of product units in the specified plan.
type: integer
minimum: 1
plan:
description: Plan details.
oneOf:
- $ref: '#/components/schemas/OriginalPlan'
- $ref: '#/components/schemas/FlexiblePlan'
description:
type: string
description: Description of the quote item.
example: Charge per approved transaction with DCC
default: ''
maxLength: 255
priceDescription:
type: string
description: |-
Price description of the quote item.
This value is only used for metered billing items.
example: 50% of the markup for approved transactions
default: ''
maxLength: 255
usageLimits:
type:
- object
- 'null'
default: null
description: >-
Specifies the soft and hard usage limit thresholds for an item
with a metered billing plan.
This value is ignored when the plan is not metered.
properties:
softLimit:
type: object
description: >-
Defines thresholds for notification purposes.
For example, to notify the customer that their usage is
near the hard limit of their metered billing plan.
This notification informs the customer so that they can
upgrade their plan before the hard limit is reached.
When the reported usage reaches 75%, 90%, and 100% of the
configured limit a specific event is fired.
To notify the customer, a webhook and notification can be
configured for this event.
This field is useful for accounting and customer success
purposes.
The usage of metered billing plans can still be reported
if the soft limit is reached.
minProperties: 1
maxProperties: 1
properties:
quantity:
type: integer
description: Usage limit quantity.
minimum: 1
amount:
type: number
format: double
description: Usage limit amount in the currency of the order.
minimum: 0.01
hardLimit:
type: object
description: >-
Defines a limit where the customer can no longer use the
service.
Hard limits are used in addition to soft limits.
When a soft limit is reached,
a customer may receive a notification
but the service can still be provided up to the hard limit
value so that the customer can upgrade their plan.
When the reported usage reaches the configured limit,
a specific event is triggered.
To notify the customer in the merchant system,
or block a service,
a webhook and notification can be configured for this
event.
When the total usage reaches the hard limit quantity,
or amount values,
metered billing plan usages can no longer be reported.
minProperties: 1
maxProperties: 1
properties:
quantity:
type: integer
description: Usage limit quantity.
minimum: 1
amount:
type: number
format: double
description: Usage limit amount in the currency of the order.
minimum: 0.01
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_embedded:
type: object
description: >-
Embedded objects that are requested by the `expand` query
parameter.
readOnly: true
properties:
product:
type: object
renewalPolicy:
description: >-
Specifies if the subscription retains its current `renewalTime` or
resets it to a newly calculated `renewalTime`.
type: string
enum:
- reset
- retain
prorated:
description: >-
Specifies whether to give a pro rata credit for the amount of time
remaining between the `effectiveTime` and the end of the current
period.
In addition, if the `renewalTime` is retained, by setting the
`renewalPolicy` to `retain`,
a pro rata debit occurs for the amount between the `effectiveTime`
and the `renewalTime` as a percentage of the normal period length.
type: boolean
effectiveTime:
description: >-
Date from which the renewal time for `reset` operations and
proration calculations are made.
If this field is omitted, this value defaults to the time of quote
acceptance.
type:
- string
- 'null'
format: date-time
keepTrial:
description: |-
Specifies if the subscription order must retain its active trial.
This field is only applicable if `renewalPolicy` is set to `retain`.
type: boolean
default: false
interimOnly:
type: boolean
default: true
description: |-
Specifies if the quotation invoice must include interim items only.
If this value is set to `false`, all upcoming items are included.
usageSettings:
type: array
default: []
description: Usage settings for items with metered billing.
items:
type: object
properties:
planId:
type: string
description: ID of the plan from which usages are transferred.
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
policy:
type: string
enum:
- reset
- transfer
description: Policy for removed items that have a metered billing plan.
x-enumDescriptions:
reset: Delete existing usages.
transfer: >-
Transfer usages from removed plans to existing plans that
are in the same subscription, using the `transferTo` field.
transferTo:
type:
- string
- 'null'
default: null
description: >-
ID of the plan to which usages are transferred.
If an item with a specified plan does not exist, or does not
have a metered billing plan, this transfer is ignored.
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0Y
invoicePreview:
type: object
description: Preview of the quote invoice.
readOnly: true
properties:
currency:
description: Currency of the invoice.
$ref: '#/components/schemas/CurrencyCode'
initialAmounts:
type: object
description: Total amounts of the initial invoice.
properties:
amount:
description: Amount of the invoice.
type: number
x-type: Money
format: double
subtotalAmount:
description: Subtotal amount of the invoice.
type: number
x-type: Money
format: double
discountAmount:
description: Discount amount that is applied to the invoice.
type: number
x-type: Money
format: double
shippingAmount:
description: Shipping amount that is applied to the invoice.
type: number
x-type: Money
format: double
taxAmount:
description: Tax amount that is applied to the invoice.
type: number
x-type: Money
format: double
recurringAmounts:
type:
- object
- 'null'
description: >-
Total amounts of the recurring invoice.
This includes recurring items only.
If the quote does not have recurring items, the value of this
field is `null`.
properties:
amount:
description: Amount of the invoice.
type: number
x-type: Money
format: double
subtotalAmount:
description: Subtotal amount of the invoice.
type: number
x-type: Money
format: double
discountAmount:
description: Discount amount that is applied to the invoice.
type: number
x-type: Money
format: double
shippingAmount:
description: Shipping amount that is applied to the invoice.
type: number
x-type: Money
format: double
taxAmount:
description: Tax amount that is applied to the invoice.
type: number
x-type: Money
format: double
items:
type: array
description: Invoice items.
items:
type: object
properties:
quoteItemId:
description: ID of the related quote item.
type: string
example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ
type:
type: string
description: Type of the invoice item.
x-basic: true
enum:
- debit
- credit
name:
description: Name of the invoice item.
type: string
maxLength: 1000
description:
description: Description of the invoice item.
type: string
example: Charge per approved transaction with DCC
maxLength: 255
priceDescription:
type: string
description: Price description of the invoice item.
example: 50% of the markup for approved transactions
maxLength: 255
unitPrice:
description: Unit price of the invoice item.
type:
- number
- 'null'
format: double
quantity:
description: Quantity of the invoice item.
type: integer
period:
description: Date interval of the invoice item.
type:
- string
- 'null'
setupUnitPrice:
description: Unit price of the invoice item.
type:
- number
- 'null'
format: double
trialUnitPrice:
description: Unit price of the invoice item.
type:
- number
- 'null'
format: double
trialPeriod:
description: Date interval of the invoice item trial.
type:
- string
- 'null'
taxAmount:
description: Tax amount of the invoice item.
type:
- number
- 'null'
format: double
setupTaxAmount:
description: Tax amount of the setup that is applied to the invoice.
type:
- number
- 'null'
format: double
trialTaxAmount:
description: Tax amount of the trial that is applied to the invoice.
type:
- number
- 'null'
format: double
autopay:
type:
- boolean
- 'null'
description: >-
Specifies if payment attempts for the related subscription are made
automatically.
If autopay is enabled, the payment is retrieved from the customer on
the renewal date using the payment instrument that is set at
`paymentInstrumentId`,
or the default payment instrument on the subscription.
paymentTerms:
description: Payment terms for the customer which are displayed on the quote.
type: string
expirationTime:
description: >-
Date and time when the quote expires.
The default expiration time is one month from the time the quote is
issued.
In a `draft` state, this field may be `null`.
type:
- string
- 'null'
format: date-time
issuedTime:
description: Date and time when the quote is issued.
type:
- string
- 'null'
readOnly: true
format: date-time
acceptedTime:
description: Date and time when the quote is accepted.
type:
- string
- 'null'
readOnly: true
format: date-time
rejectedTime:
description: Date and time when the quote is rejected.
type:
- string
- 'null'
readOnly: true
format: date-time
canceledTime:
description: Date and time when the quote is canceled.
type:
- string
- 'null'
readOnly: true
format: date-time
redirectUrl:
description: |-
URL to redirect the customer to when a quote is rejected.
The default value is the website URL.
type: string
format: uri
signature:
type: object
description: Written signature and printed organization name.
properties:
showWrittenSignatureLines:
type: boolean
default: false
description: Specifies whether to show written signature lines.
organizationPrintedName:
type:
- string
- 'null'
description: Printed name of the organization.
default: null
shipping:
$ref: '#/components/schemas/Shipping'
tax:
$ref: '#/components/schemas/Taxes'
couponIds:
type:
- array
- 'null'
description: >-
List of coupons to redeem on the customer and apply to the related
invoice.
For more information, see
[Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/).
items:
type: string
description: Coupon ID.
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: >-
Type of link.
If the quote is issued, a customer can be redirected to the
`invoicePaymentFormUrl` value
to pay the related invoice using one of the methods which are
available to the customer.
type: string
enum:
- self
- quoteAcceptanceFormUrl
- invoicePaymentFormUrl
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
website:
type: object
subscription:
type: object
invoice:
type: object
QuoteReactivateOrder:
type: object
title: QuoteReactivateOrder
required:
- websiteId
- customerId
- items
- action
- subscriptionId
properties:
id:
readOnly: true
description: ID of the quote.
type: string
maxLength: 50
example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ
type:
description: |-
Specifies the type of the quote.
A quote can be a subscription or a one-time purchase.
type: string
readOnly: true
enum:
- subscription-order
- one-time-order
action:
description: >-
Action of the quote for churned or canceled order reactivation.
When a quote is accepted, quote items are applied to the order and
order is reactivated.
type: string
enum:
- reactivate
example: reactivate
acceptanceConditions:
type: array
writeOnly: true
description: >-
Conditions that must be met for the quote to be automatically
accepted.
items:
type: string
enum:
- customer
- payment
x-enumDescriptions:
customer: Quote can be accepted by customer.
payment: Related invoice must be paid in full.
example:
- payment
default:
- customer
acceptanceFulfillment:
type: array
readOnly: true
description: List of `acceptanceConditions` with fulfillment status.
items:
type: object
properties:
condition:
type: string
enum:
- customer
- payment
- organization
isFulfilled:
type: boolean
subscriptionId:
description: ID of the related subscription.
type: string
maxLength: 50
example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ
invoiceId:
type: string
description: ID of the payment invoice.
readOnly: true
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
status:
description: Status of the quote.
type: string
readOnly: true
enum:
- draft
- issued
- accepted
- rejected
- canceled
- expired
x-enumDescriptions:
draft: Quote can be edited. This quote cannot be sent to a customer.
issued: Quote cannot be edited. This quote can be sent to a customer.
accepted: Customer accepted the quote and the related order is reactivated.
rejected: Customer rejected the quote.
canceled: Organization canceled the quote.
expired: Expired before customer or organization interaction.
websiteId:
$ref: '#/components/schemas/WebsiteId'
customerId:
$ref: '#/components/schemas/CustomerId'
items:
type: array
description: Items included in the quote.
minItems: 1
items:
type: object
required:
- plan
- quantity
properties:
id:
description: ID of the quote item.
readOnly: true
type: string
example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ
quantity:
description: Number of product units in the specified plan.
type: integer
minimum: 1
plan:
description: Plan details.
oneOf:
- $ref: '#/components/schemas/OriginalPlan'
- $ref: '#/components/schemas/FlexiblePlan'
description:
type: string
description: Description of the quote item.
example: Charge per approved transaction with DCC
default: ''
maxLength: 255
priceDescription:
type: string
description: |-
Price description of the quote item.
This value is only used for metered billing items.
example: 50% of the markup for approved transactions
default: ''
maxLength: 255
usageLimits:
type:
- object
- 'null'
default: null
description: >-
Specifies the soft and hard usage limit thresholds for an item
with a metered billing plan.
This value is ignored when the plan is not metered.
properties:
softLimit:
type: object
description: >-
Defines thresholds for notification purposes.
For example, to notify the customer that their usage is
near the hard limit of their metered billing plan.
This notification informs the customer so that they can
upgrade their plan before the hard limit is reached.
When the reported usage reaches 75%, 90%, and 100% of the
configured limit a specific event is fired.
To notify the customer, a webhook and notification can be
configured for this event.
This field is useful for accounting and customer success
purposes.
The usage of metered billing plans can still be reported
if the soft limit is reached.
minProperties: 1
maxProperties: 1
properties:
quantity:
type: integer
description: Usage limit quantity.
minimum: 1
amount:
type: number
format: double
description: Usage limit amount in the currency of the order.
minimum: 0.01
hardLimit:
type: object
description: >-
Defines a limit where the customer can no longer use the
service.
Hard limits are used in addition to soft limits.
When a soft limit is reached,
a customer may receive a notification
but the service can still be provided up to the hard limit
value so that the customer can upgrade their plan.
When the reported usage reaches the configured limit,
a specific event is triggered.
To notify the customer in the merchant system,
or block a service,
a webhook and notification can be configured for this
event.
When the total usage reaches the hard limit quantity,
or amount values,
metered billing plan usages can no longer be reported.
minProperties: 1
maxProperties: 1
properties:
quantity:
type: integer
description: Usage limit quantity.
minimum: 1
amount:
type: number
format: double
description: Usage limit amount in the currency of the order.
minimum: 0.01
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_embedded:
type: object
description: >-
Embedded objects that are requested by the `expand` query
parameter.
readOnly: true
properties:
product:
type: object
effectiveTime:
description: |-
Date and time when the service period starts,
unless the subscription is canceled but still active.
If the subscription is still active,
the subscription continues for the current service period.
If this field is omitted, this value defaults to the current time.
type:
- string
- 'null'
format: date-time
renewalTime:
description: >-
Date and time of the next subscription renewal.
If this field is omitted, this value is computed from the
`effectiveTime` field.
If the subscription is canceled but still active,
it is ignored and the next renewal occurs as scheduled.
type:
- string
- 'null'
format: date-time
paymentInstrumentId:
description: >-
ID of the payment instrument.
If this field is omitted, the subscription payment instrument
remains unchanged.
type:
- string
- 'null'
maxLength: 50
example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
invoicePreview:
type: object
description: Preview of the quote invoice.
readOnly: true
properties:
currency:
description: Currency of the invoice.
$ref: '#/components/schemas/CurrencyCode'
initialAmounts:
type: object
description: Total amounts of the initial invoice.
properties:
amount:
description: Amount of the invoice.
type: number
x-type: Money
format: double
subtotalAmount:
description: Subtotal amount of the invoice.
type: number
x-type: Money
format: double
discountAmount:
description: Discount amount that is applied to the invoice.
type: number
x-type: Money
format: double
shippingAmount:
description: Shipping amount that is applied to the invoice.
type: number
x-type: Money
format: double
taxAmount:
description: Tax amount that is applied to the invoice.
type: number
x-type: Money
format: double
recurringAmounts:
type:
- object
- 'null'
description: >-
Total amounts of the recurring invoice.
This includes recurring items only.
If the quote does not have recurring items, the value of this
field is `null`.
properties:
amount:
description: Amount of the invoice.
type: number
x-type: Money
format: double
subtotalAmount:
description: Subtotal amount of the invoice.
type: number
x-type: Money
format: double
discountAmount:
description: Discount amount that is applied to the invoice.
type: number
x-type: Money
format: double
shippingAmount:
description: Shipping amount that is applied to the invoice.
type: number
x-type: Money
format: double
taxAmount:
description: Tax amount that is applied to the invoice.
type: number
x-type: Money
format: double
items:
type: array
description: Invoice items.
items:
type: object
properties:
quoteItemId:
description: ID of the related quote item.
type: string
example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ
type:
type: string
description: Type of the invoice item.
x-basic: true
enum:
- debit
- credit
name:
description: Name of the invoice item.
type: string
maxLength: 1000
description:
description: Description of the invoice item.
type: string
example: Charge per approved transaction with DCC
maxLength: 255
priceDescription:
type: string
description: Price description of the invoice item.
example: 50% of the markup for approved transactions
maxLength: 255
unitPrice:
description: Unit price of the invoice item.
type:
- number
- 'null'
format: double
quantity:
description: Quantity of the invoice item.
type: integer
period:
description: Date interval of the invoice item.
type:
- string
- 'null'
setupUnitPrice:
description: Unit price of the invoice item.
type:
- number
- 'null'
format: double
trialUnitPrice:
description: Unit price of the invoice item.
type:
- number
- 'null'
format: double
trialPeriod:
description: Date interval of the invoice item trial.
type:
- string
- 'null'
taxAmount:
description: Tax amount of the invoice item.
type:
- number
- 'null'
format: double
setupTaxAmount:
description: Tax amount of the setup that is applied to the invoice.
type:
- number
- 'null'
format: double
trialTaxAmount:
description: Tax amount of the trial that is applied to the invoice.
type:
- number
- 'null'
format: double
autopay:
type:
- boolean
- 'null'
description: >-
Specifies if payment attempts for the related subscription are made
automatically.
If autopay is enabled, the payment is retrieved from the customer on
the renewal date using the payment instrument that is set at
`paymentInstrumentId`,
or the default payment instrument on the subscription.
paymentTerms:
description: Payment terms for the customer which are displayed on the quote.
type: string
expirationTime:
description: >-
Date and time when the quote expires.
The default expiration time is one month from the time the quote is
issued.
In a `draft` state, this field may be `null`.
type:
- string
- 'null'
format: date-time
issuedTime:
description: Date and time when the quote is issued.
type:
- string
- 'null'
readOnly: true
format: date-time
acceptedTime:
description: Date and time when the quote is accepted.
type:
- string
- 'null'
readOnly: true
format: date-time
rejectedTime:
description: Date and time when the quote is rejected.
type:
- string
- 'null'
readOnly: true
format: date-time
canceledTime:
description: Date and time when the quote is canceled.
type:
- string
- 'null'
readOnly: true
format: date-time
redirectUrl:
description: |-
URL to redirect the customer to when a quote is rejected.
The default value is the website URL.
type: string
format: uri
signature:
type: object
description: Written signature and printed organization name.
properties:
showWrittenSignatureLines:
type: boolean
default: false
description: Specifies whether to show written signature lines.
organizationPrintedName:
type:
- string
- 'null'
description: Printed name of the organization.
default: null
shipping:
$ref: '#/components/schemas/Shipping'
tax:
$ref: '#/components/schemas/Taxes'
couponIds:
type:
- array
- 'null'
description: >-
List of coupons to redeem on the customer and apply to the related
invoice.
For more information, see
[Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/).
items:
type: string
description: Coupon ID.
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: >-
Type of link.
If the quote is issued, a customer can be redirected to the
`invoicePaymentFormUrl` value
to pay the related invoice using one of the methods which are
available to the customer.
type: string
enum:
- self
- quoteAcceptanceFormUrl
- invoicePaymentFormUrl
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
website:
type: object
subscription:
type: object
invoice:
type: object
QuoteTrialConversionOrder:
type: object
title: QuoteTrialConversionOrder
required:
- websiteId
- customerId
- items
- action
- subscriptionId
properties:
id:
readOnly: true
description: ID of the quote.
type: string
maxLength: 50
example: qt_0YV7DES3WPC5J8JD8QTVNZBZNZ
type:
description: |-
Specifies the type of the quote.
A quote can be a subscription or a one-time purchase.
type: string
readOnly: true
enum:
- subscription-order
- one-time-order
action:
description: |-
Action of the quote for an ended trial-only subscription.
When a quote is accepted, the related order is activated.
type: string
enum:
- trial-only-conversion
example: trial-only-conversion
acceptanceConditions:
type: array
writeOnly: true
description: >-
Conditions that must be met for the quote to be automatically
accepted.
items:
type: string
enum:
- customer
- payment
x-enumDescriptions:
customer: Quote can be accepted by customer.
payment: Related invoice must be paid in full.
example:
- payment
default:
- customer
acceptanceFulfillment:
type: array
readOnly: true
description: List of `acceptanceConditions` with fulfillment status.
items:
type: object
properties:
condition:
type: string
enum:
- customer
- payment
- organization
isFulfilled:
type: boolean
subscriptionId:
description: ID of the related order.
type: string
maxLength: 50
example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ
invoiceId:
type: string
description: ID of the payment invoice.
readOnly: true
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
status:
description: Status of the quote.
type: string
readOnly: true
enum:
- draft
- issued
- accepted
- rejected
- canceled
- expired
x-enumDescriptions:
draft: Quote can be edited. This quote cannot be sent to a customer.
issued: Quote cannot be edited. This quote can be sent to a customer.
accepted: >-
Customer accepted the quote and the related order item changes are
applied.
rejected: Customer rejected the quote.
canceled: Organization canceled the quote.
expired: Expired before customer or organization interaction.
websiteId:
$ref: '#/components/schemas/WebsiteId'
customerId:
$ref: '#/components/schemas/CustomerId'
items:
type: array
description: Items included in the quote.
minItems: 1
items:
type: object
required:
- plan
- quantity
properties:
id:
description: ID of the quote item.
readOnly: true
type: string
example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ
quantity:
description: Number of product units in the specified plan.
type: integer
minimum: 1
plan:
description: Plan details.
oneOf:
- $ref: '#/components/schemas/OriginalPlan'
- $ref: '#/components/schemas/FlexiblePlan'
description:
type: string
description: Description of the quote item.
example: Charge per approved transaction with DCC
default: ''
maxLength: 255
priceDescription:
type: string
description: |-
Price description of the quote item.
This value is only used for metered billing items.
example: 50% of the markup for approved transactions
default: ''
maxLength: 255
usageLimits:
type:
- object
- 'null'
default: null
description: >-
Specifies the soft and hard usage limit thresholds for an item
with a metered billing plan.
This value is ignored when the plan is not metered.
properties:
softLimit:
type: object
description: >-
Defines thresholds for notification purposes.
For example, to notify the customer that their usage is
near the hard limit of their metered billing plan.
This notification informs the customer so that they can
upgrade their plan before the hard limit is reached.
When the reported usage reaches 75%, 90%, and 100% of the
configured limit a specific event is fired.
To notify the customer, a webhook and notification can be
configured for this event.
This field is useful for accounting and customer success
purposes.
The usage of metered billing plans can still be reported
if the soft limit is reached.
minProperties: 1
maxProperties: 1
properties:
quantity:
type: integer
description: Usage limit quantity.
minimum: 1
amount:
type: number
format: double
description: Usage limit amount in the currency of the order.
minimum: 0.01
hardLimit:
type: object
description: >-
Defines a limit where the customer can no longer use the
service.
Hard limits are used in addition to soft limits.
When a soft limit is reached,
a customer may receive a notification
but the service can still be provided up to the hard limit
value so that the customer can upgrade their plan.
When the reported usage reaches the configured limit,
a specific event is triggered.
To notify the customer in the merchant system,
or block a service,
a webhook and notification can be configured for this
event.
When the total usage reaches the hard limit quantity,
or amount values,
metered billing plan usages can no longer be reported.
minProperties: 1
maxProperties: 1
properties:
quantity:
type: integer
description: Usage limit quantity.
minimum: 1
amount:
type: number
format: double
description: Usage limit amount in the currency of the order.
minimum: 0.01
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_embedded:
type: object
description: >-
Embedded objects that are requested by the `expand` query
parameter.
readOnly: true
properties:
product:
type: object
invoicePreview:
type: object
description: Preview of the quote invoice.
readOnly: true
properties:
currency:
description: Currency of the invoice.
$ref: '#/components/schemas/CurrencyCode'
initialAmounts:
type: object
description: Total amounts of the initial invoice.
properties:
amount:
description: Amount of the invoice.
type: number
x-type: Money
format: double
subtotalAmount:
description: Subtotal amount of the invoice.
type: number
x-type: Money
format: double
discountAmount:
description: Discount amount that is applied to the invoice.
type: number
x-type: Money
format: double
shippingAmount:
description: Shipping amount that is applied to the invoice.
type: number
x-type: Money
format: double
taxAmount:
description: Tax amount that is applied to the invoice.
type: number
x-type: Money
format: double
recurringAmounts:
type:
- object
- 'null'
description: >-
Total amounts of the recurring invoice.
This includes recurring items only.
If the quote does not have recurring items, the value of this
field is `null`.
properties:
amount:
description: Amount of the invoice.
type: number
x-type: Money
format: double
subtotalAmount:
description: Subtotal amount of the invoice.
type: number
x-type: Money
format: double
discountAmount:
description: Discount amount that is applied to the invoice.
type: number
x-type: Money
format: double
shippingAmount:
description: Shipping amount that is applied to the invoice.
type: number
x-type: Money
format: double
taxAmount:
description: Tax amount that is applied to the invoice.
type: number
x-type: Money
format: double
items:
type: array
description: Invoice items.
items:
type: object
properties:
quoteItemId:
description: ID of the related quote item.
type: string
example: qti_0YV7DES3WPC5J8JD8QTVNZBZNZ
type:
type: string
description: Type of the invoice item.
x-basic: true
enum:
- debit
- credit
name:
description: Name of the invoice item.
type: string
maxLength: 1000
description:
description: Description of the invoice item.
type: string
example: Charge per approved transaction with DCC
maxLength: 255
priceDescription:
type: string
description: Price description of the invoice item.
example: 50% of the markup for approved transactions
maxLength: 255
unitPrice:
description: Unit price of the invoice item.
type:
- number
- 'null'
format: double
quantity:
description: Quantity of the invoice item.
type: integer
period:
description: Date interval of the invoice item.
type:
- string
- 'null'
setupUnitPrice:
description: Unit price of the invoice item.
type:
- number
- 'null'
format: double
trialUnitPrice:
description: Unit price of the invoice item.
type:
- number
- 'null'
format: double
trialPeriod:
description: Date interval of the invoice item trial.
type:
- string
- 'null'
taxAmount:
description: Tax amount of the invoice item.
type:
- number
- 'null'
format: double
setupTaxAmount:
description: Tax amount of the setup that is applied to the invoice.
type:
- number
- 'null'
format: double
trialTaxAmount:
description: Tax amount of the trial that is applied to the invoice.
type:
- number
- 'null'
format: double
autopay:
type:
- boolean
- 'null'
description: >-
Specifies if payment attempts for the related subscription are made
automatically.
If autopay is enabled, the payment is retrieved from the customer on
the renewal date using the payment instrument that is set at
`paymentInstrumentId`,
or the default payment instrument on the subscription.
paymentTerms:
description: Payment terms for the customer which are displayed on the quote.
type: string
expirationTime:
description: >-
Date and time when the quote expires.
The default expiration time is one month from the time the quote is
issued.
In a `draft` state, this field may be `null`.
type:
- string
- 'null'
format: date-time
issuedTime:
description: Date and time when the quote is issued.
type:
- string
- 'null'
readOnly: true
format: date-time
acceptedTime:
description: Date and time when the quote is accepted.
type:
- string
- 'null'
readOnly: true
format: date-time
rejectedTime:
description: Date and time when the quote is rejected.
type:
- string
- 'null'
readOnly: true
format: date-time
canceledTime:
description: Date and time when the quote is canceled.
type:
- string
- 'null'
readOnly: true
format: date-time
redirectUrl:
description: |-
URL to redirect the customer to when a quote is rejected.
The default value is the website URL.
type: string
format: uri
signature:
type: object
description: Written signature and printed organization name.
properties:
showWrittenSignatureLines:
type: boolean
default: false
description: Specifies whether to show written signature lines.
organizationPrintedName:
type:
- string
- 'null'
description: Printed name of the organization.
default: null
shipping:
$ref: '#/components/schemas/Shipping'
tax:
$ref: '#/components/schemas/Taxes'
couponIds:
type:
- array
- 'null'
description: >-
List of coupons to redeem on the customer and apply to the related
invoice.
For more information, see
[Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/).
items:
type: string
description: Coupon ID.
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: >-
Type of link.
If the quote is issued, a customer can be redirected to the
`invoicePaymentFormUrl` value
to pay the related invoice using one of the methods which are
available to the customer.
type: string
enum:
- self
- quoteAcceptanceFormUrl
- invoicePaymentFormUrl
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
website:
type: object
order:
type: object
invoice:
type: object
Quote:
discriminator:
propertyName: action
mapping:
create: '#/components/schemas/QuoteCreateOrder'
change: '#/components/schemas/QuoteChangeOrder'
reactivate: '#/components/schemas/QuoteReactivateOrder'
trial-only-conversion: '#/components/schemas/QuoteTrialConversionOrder'
oneOf:
- $ref: '#/components/schemas/QuoteCreateOrder'
- $ref: '#/components/schemas/QuoteChangeOrder'
- $ref: '#/components/schemas/QuoteReactivateOrder'
- $ref: '#/components/schemas/QuoteTrialConversionOrder'
PatchQuote:
type: object
description: Patch quote object.
properties:
tax:
$ref: '#/components/schemas/Taxes'
QuoteTimeline:
type: object
properties:
id:
type: string
description: ID of the timeline message.
readOnly: true
maxLength: 50
example: tmln_0YV8Q9WEF5DTA8HFXS27D1G6GC
type:
description: Type of timeline message.
type: string
readOnly: true
enum:
- quote-created
- quote-issued
- quote-accepted
- quote-rejected
- quote-canceled
- quote-recalled
- quote-updated
- quote-expired
- quote-order-attached
triggeredBy:
description: Specifies who, or what, triggered the timeline message.
type: string
readOnly: true
enum:
- rebilly
- app
- direct-api
message:
description: Contents of the timeline message.
type: string
extraData:
$ref: '#/components/schemas/TimelineExtraData'
occurredTime:
description: Date and time when the timeline message occurred.
readOnly: true
$ref: '#/components/schemas/ServerTimestamp'
_links:
$ref: '#/components/schemas/SelfLink'
ReadyToPayAmount:
type: object
title: With amount
required:
- websiteId
- currency
- amount
- riskMetadata
properties:
websiteId:
$ref: '#/components/schemas/WebsiteId'
currency:
$ref: '#/components/schemas/CurrencyCode'
amount:
description: Amount to pay.
type: number
format: double
billingAddress:
description: Billing address.
writeOnly: true
$ref: '#/components/schemas/ContactObject'
riskMetadata:
$ref: '#/components/schemas/RiskMetadata'
ReadyToPayItems:
type: object
title: With items
required:
- websiteId
- items
- riskMetadata
properties:
websiteId:
$ref: '#/components/schemas/WebsiteId'
items:
type: array
minItems: 1
items:
type: object
required:
- planId
- quantity
properties:
planId:
type: string
description: ID of the plan.
maxLength: 50
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
quantity:
description: Number of product units in the specified plan.
type: integer
billingAddress:
description: Billing address.
writeOnly: true
$ref: '#/components/schemas/ContactObject'
riskMetadata:
$ref: '#/components/schemas/RiskMetadata'
ReadyToPay:
type: object
oneOf:
- $ref: '#/components/schemas/ReadyToPayAmount'
- $ref: '#/components/schemas/ReadyToPayItems'
PostReadyToPay:
allOf:
- type: object
properties:
customerId:
$ref: '#/components/schemas/CustomerId'
- $ref: '#/components/schemas/ReadyToPay'
Country:
description: >-
ISO 3166 alpha-2 country code. For examples, see
[ISO.org](https://www.iso.org/obp/ui/#search/code/).
type: string
pattern: ^[A-Z]{2}$
example: US
ApplePayFeature:
type: object
title: Apple Pay Digital Wallet
properties:
name:
type: string
description: Name of the feature.
enum:
- Apple Pay
displayName:
description: >-
String of 64 or fewer UTF-8 characters containing the canonical name
for your store,
that is suitable for display.
Do not localize the name.
type: string
example: Test Merchant
country:
$ref: '#/components/schemas/Country'
GooglePayFeature:
type: object
title: Google Pay Digital Wallet
properties:
name:
type: string
description: Name of the feature.
enum:
- Google Pay
merchantName:
description: Merchant name in Google Pay.
type: string
example: Test Merchant
merchantOrigin:
description: Merchant origin in Google Pay. The fully qualified domain name.
type: string
example: www.example.com
country:
$ref: '#/components/schemas/Country'
PaymentCardFeature:
type: object
discriminator:
propertyName: name
mapping:
Apple Pay: '#/components/schemas/ApplePayFeature'
Google Pay: '#/components/schemas/GooglePayFeature'
oneOf:
- $ref: '#/components/schemas/ApplePayFeature'
- $ref: '#/components/schemas/GooglePayFeature'
ReadyToPayMethodFilters:
type: array
description: >-
For the method to be applicable, one or more of the following filters
must match.
If no filters are sent, no restrictions are applied.
For more information, see [Using
filters](https://www.rebilly.com/docs/dev-docs/search-filters).
items:
type: string
ReadyToPayPaymentCardMethod:
type: object
title: Payment card
required:
- method
properties:
method:
type: string
description: Payment method.
enum:
- payment-card
feature:
description: |-
Specific feature of this method.
For example, a digital wallet.
If the method does not have any features, this value is null.
oneOf:
- $ref: '#/components/schemas/PaymentCardFeature'
- type: 'null'
brands:
type: array
description: List of supported brands.
minItems: 1
items:
$ref: '#/components/schemas/PaymentCardBrand'
filters:
$ref: '#/components/schemas/ReadyToPayMethodFilters'
AchPlaidFeature:
type: object
title: Plaid
required:
- name
- linkToken
- expirationTime
properties:
name:
type: string
description: Name of the feature.
enum:
- Plaid
linkToken:
type: string
description: Plaid `linkToken` for frontend integrations.
expirationTime:
type: string
format: date-time
description: Date and time when the `linkToken` expires.
ReadyToPayAchMethod:
type: object
title: ACH
required:
- method
properties:
method:
type: string
description: Payment method.
enum:
- ach
feature:
description: |-
Specific feature of this method.
For example, a digital wallet or a processor.
If the method does not have any features, this value is null.
oneOf:
- $ref: '#/components/schemas/AchPlaidFeature'
- type: 'null'
filters:
$ref: '#/components/schemas/ReadyToPayMethodFilters'
ReadyToPayGenericMethod:
type: object
title: Generic
required:
- method
properties:
method:
$ref: '#/components/schemas/AlternativePaymentMethods'
filters:
$ref: '#/components/schemas/ReadyToPayMethodFilters'
PayPalBillingAgreementFeature:
type: object
title: Billing agreement
required:
- name
- paypalMerchantId
- paypalClientId
- billingAgreementToken
- expirationTime
properties:
name:
type: string
description: Name of the feature.
enum:
- PayPal billing agreement
paypalMerchantId:
type: string
description: ID of the PayPal merchant.
paypalClientId:
type: string
description: ID of the PayPal client.
billingAgreementToken:
type: string
description: PayPal billing agreement token.
expirationTime:
type: string
format: date-time
description: Date and time when the billing agreement token expires.
ReadyToPayPayPalMethod:
type: object
title: PayPal
required:
- method
properties:
method:
type: string
description: Payment method.
enum:
- paypal
feature:
description: Specific features of PayPal.
oneOf:
- $ref: '#/components/schemas/PayPalBillingAgreementFeature'
- type: 'null'
filters:
$ref: '#/components/schemas/ReadyToPayMethodFilters'
KlarnaFeature:
type: object
title: Klarna
required:
- name
- clientToken
- sessionId
properties:
name:
type: string
description: Name of the feature.
enum:
- Klarna
clientToken:
type: string
description: Klarna client token.
sessionId:
type: string
description: Klarna session token.
ReadyToPayKlarnaMethod:
type: object
title: Klarna
required:
- method
properties:
method:
type: string
description: Payment method.
enum:
- Klarna
feature:
description: |-
Specific feature of this method.
For example, a digital wallet or a processor.
If the method does not have any features, this value is null.
oneOf:
- $ref: '#/components/schemas/KlarnaFeature'
- type: 'null'
filters:
$ref: '#/components/schemas/ReadyToPayMethodFilters'
ReadyToPayMethods:
type: object
discriminator:
propertyName: method
mapping:
payment-card: '#/components/schemas/ReadyToPayPaymentCardMethod'
ach: '#/components/schemas/ReadyToPayAchMethod'
cash: '#/components/schemas/ReadyToPayGenericMethod'
check: '#/components/schemas/ReadyToPayGenericMethod'
paypal: '#/components/schemas/ReadyToPayPayPalMethod'
AdvCash: '#/components/schemas/ReadyToPayGenericMethod'
Alfa-click: '#/components/schemas/ReadyToPayGenericMethod'
Alipay: '#/components/schemas/ReadyToPayGenericMethod'
AstroPay Card: '#/components/schemas/ReadyToPayGenericMethod'
AstroPay-GO: '#/components/schemas/ReadyToPayGenericMethod'
BankReferenced: '#/components/schemas/ReadyToPayGenericMethod'
bank-transfer: '#/components/schemas/ReadyToPayGenericMethod'
bank-transfer-2: '#/components/schemas/ReadyToPayGenericMethod'
bank-transfer-3: '#/components/schemas/ReadyToPayGenericMethod'
bank-transfer-4: '#/components/schemas/ReadyToPayGenericMethod'
bank-transfer-5: '#/components/schemas/ReadyToPayGenericMethod'
bank-transfer-6: '#/components/schemas/ReadyToPayGenericMethod'
bank-transfer-7: '#/components/schemas/ReadyToPayGenericMethod'
bank-transfer-8: '#/components/schemas/ReadyToPayGenericMethod'
bank-transfer-9: '#/components/schemas/ReadyToPayGenericMethod'
Baloto: '#/components/schemas/ReadyToPayGenericMethod'
Beeline: '#/components/schemas/ReadyToPayGenericMethod'
Belfius-direct-net: '#/components/schemas/ReadyToPayGenericMethod'
bitcoin: '#/components/schemas/ReadyToPayGenericMethod'
Bizum: '#/components/schemas/ReadyToPayGenericMethod'
Boleto: '#/components/schemas/ReadyToPayGenericMethod'
cash-deposit: '#/components/schemas/ReadyToPayGenericMethod'
CASHlib: '#/components/schemas/ReadyToPayGenericMethod'
CashToCode: '#/components/schemas/ReadyToPayGenericMethod'
China UnionPay: '#/components/schemas/ReadyToPayGenericMethod'
Cleo: '#/components/schemas/ReadyToPayGenericMethod'
CODVoucher: '#/components/schemas/ReadyToPayGenericMethod'
Conekta-oxxo: '#/components/schemas/ReadyToPayGenericMethod'
Cupon-de-pagos: '#/components/schemas/ReadyToPayGenericMethod'
cryptocurrency: '#/components/schemas/ReadyToPayGenericMethod'
domestic-cards: '#/components/schemas/ReadyToPayGenericMethod'
echeck: '#/components/schemas/ReadyToPayGenericMethod'
ecoPayz: '#/components/schemas/ReadyToPayGenericMethod'
ecoVoucher: '#/components/schemas/ReadyToPayGenericMethod'
Efecty: '#/components/schemas/ReadyToPayGenericMethod'
EPS: '#/components/schemas/ReadyToPayGenericMethod'
ePay.bg: '#/components/schemas/ReadyToPayGenericMethod'
eZeeWallet: '#/components/schemas/ReadyToPayGenericMethod'
FasterPay: '#/components/schemas/ReadyToPayGenericMethod'
Flexepin: '#/components/schemas/ReadyToPayGenericMethod'
Giropay: '#/components/schemas/ReadyToPayGenericMethod'
Gpaysafe: '#/components/schemas/ReadyToPayGenericMethod'
Google Pay: '#/components/schemas/ReadyToPayGenericMethod'
iDebit: '#/components/schemas/ReadyToPayGenericMethod'
iDEAL: '#/components/schemas/ReadyToPayGenericMethod'
ING-homepay: '#/components/schemas/ReadyToPayGenericMethod'
INOVAPAY-pin: '#/components/schemas/ReadyToPayGenericMethod'
INOVAPAY-wallet: '#/components/schemas/ReadyToPayGenericMethod'
InstaDebit: '#/components/schemas/ReadyToPayGenericMethod'
instant-bank-transfer: '#/components/schemas/ReadyToPayGenericMethod'
InstantPayments: '#/components/schemas/ReadyToPayGenericMethod'
Interac: '#/components/schemas/ReadyToPayGenericMethod'
Interac-online: '#/components/schemas/ReadyToPayGenericMethod'
Interac-eTransfer: '#/components/schemas/ReadyToPayGenericMethod'
invoice: '#/components/schemas/ReadyToPayGenericMethod'
iWallet: '#/components/schemas/ReadyToPayGenericMethod'
Jeton: '#/components/schemas/ReadyToPayGenericMethod'
jpay: '#/components/schemas/ReadyToPayGenericMethod'
Khelocard: '#/components/schemas/ReadyToPayGenericMethod'
Klarna: '#/components/schemas/ReadyToPayKlarnaMethod'
KNOT: '#/components/schemas/ReadyToPayGenericMethod'
loonie: '#/components/schemas/ReadyToPayGenericMethod'
Matrix: '#/components/schemas/ReadyToPayGenericMethod'
MaxiCash: '#/components/schemas/ReadyToPayGenericMethod'
Megafon: '#/components/schemas/ReadyToPayGenericMethod'
MiFinity-eWallet: '#/components/schemas/ReadyToPayGenericMethod'
miscellaneous: '#/components/schemas/ReadyToPayGenericMethod'
Bancontact: '#/components/schemas/ReadyToPayGenericMethod'
Bancontact-mobile: '#/components/schemas/ReadyToPayGenericMethod'
MTS: '#/components/schemas/ReadyToPayGenericMethod'
MuchBetter: '#/components/schemas/ReadyToPayGenericMethod'
Multibanco: '#/components/schemas/ReadyToPayGenericMethod'
Neosurf: '#/components/schemas/ReadyToPayGenericMethod'
Netbanking: '#/components/schemas/ReadyToPayGenericMethod'
Neteller: '#/components/schemas/ReadyToPayGenericMethod'
Nordea-Solo: '#/components/schemas/ReadyToPayGenericMethod'
OchaPay: '#/components/schemas/ReadyToPayGenericMethod'
online-bank-transfer: '#/components/schemas/ReadyToPayGenericMethod'
Onlineueberweisen: '#/components/schemas/ReadyToPayGenericMethod'
oriental-wallet: '#/components/schemas/ReadyToPayGenericMethod'
OXXO: '#/components/schemas/ReadyToPayGenericMethod'
P24: '#/components/schemas/ReadyToPayGenericMethod'
Pagadito: '#/components/schemas/ReadyToPayGenericMethod'
PagoEffectivo: '#/components/schemas/ReadyToPayGenericMethod'
Pagsmile-deposit-express: '#/components/schemas/ReadyToPayGenericMethod'
Pagsmile-lottery: '#/components/schemas/ReadyToPayGenericMethod'
PayCash: '#/components/schemas/ReadyToPayGenericMethod'
Payeer: '#/components/schemas/ReadyToPayGenericMethod'
PaymentAsia-crypto: '#/components/schemas/ReadyToPayGenericMethod'
Paymero: '#/components/schemas/ReadyToPayGenericMethod'
Perfect-money: '#/components/schemas/ReadyToPayGenericMethod'
Piastrix: '#/components/schemas/ReadyToPayGenericMethod'
plaid-account: '#/components/schemas/ReadyToPayGenericMethod'
PayTabs: '#/components/schemas/ReadyToPayGenericMethod'
Paysafecard: '#/components/schemas/ReadyToPayGenericMethod'
Paysafecash: '#/components/schemas/ReadyToPayGenericMethod'
Pay4Fun: '#/components/schemas/ReadyToPayGenericMethod'
Paynote: '#/components/schemas/ReadyToPayGenericMethod'
PinPay: '#/components/schemas/ReadyToPayGenericMethod'
phone: '#/components/schemas/ReadyToPayGenericMethod'
PhonePe: '#/components/schemas/ReadyToPayGenericMethod'
POLi: '#/components/schemas/ReadyToPayGenericMethod'
PostFinance-card: '#/components/schemas/ReadyToPayGenericMethod'
PostFinance-e-finance: '#/components/schemas/ReadyToPayGenericMethod'
QIWI: '#/components/schemas/ReadyToPayGenericMethod'
QPay: '#/components/schemas/ReadyToPayGenericMethod'
QQPay: '#/components/schemas/ReadyToPayGenericMethod'
rapyd-checkout: '#/components/schemas/ReadyToPayGenericMethod'
Resurs: '#/components/schemas/ReadyToPayGenericMethod'
SafetyPay: '#/components/schemas/ReadyToPayGenericMethod'
SEPA: '#/components/schemas/ReadyToPayGenericMethod'
Skrill: '#/components/schemas/ReadyToPayGenericMethod'
Skrill Rapid Transfer: '#/components/schemas/ReadyToPayGenericMethod'
SMSVoucher: '#/components/schemas/ReadyToPayGenericMethod'
Sofort: '#/components/schemas/ReadyToPayGenericMethod'
SparkPay: '#/components/schemas/ReadyToPayGenericMethod'
swift-dbt: '#/components/schemas/ReadyToPayGenericMethod'
Tele2: '#/components/schemas/ReadyToPayGenericMethod'
Terminaly-RF: '#/components/schemas/ReadyToPayGenericMethod'
ToditoCash-card: '#/components/schemas/ReadyToPayGenericMethod'
Trustly: '#/components/schemas/ReadyToPayGenericMethod'
UPayCard: '#/components/schemas/ReadyToPayGenericMethod'
UPI: '#/components/schemas/ReadyToPayGenericMethod'
USD-coin: '#/components/schemas/ReadyToPayGenericMethod'
VCreditos: '#/components/schemas/ReadyToPayGenericMethod'
VenusPoint: '#/components/schemas/ReadyToPayGenericMethod'
voucher: '#/components/schemas/ReadyToPayGenericMethod'
voucher-2: '#/components/schemas/ReadyToPayGenericMethod'
voucher-3: '#/components/schemas/ReadyToPayGenericMethod'
voucher-4: '#/components/schemas/ReadyToPayGenericMethod'
Webmoney: '#/components/schemas/ReadyToPayGenericMethod'
Webpay: '#/components/schemas/ReadyToPayGenericMethod'
Webpay-2: '#/components/schemas/ReadyToPayGenericMethod'
Webpay Card: '#/components/schemas/ReadyToPayGenericMethod'
WeChat Pay: '#/components/schemas/ReadyToPayGenericMethod'
XPay-P2P: '#/components/schemas/ReadyToPayGenericMethod'
XPay-QR: '#/components/schemas/ReadyToPayGenericMethod'
Yandex-money: '#/components/schemas/ReadyToPayGenericMethod'
Zotapay: '#/components/schemas/ReadyToPayGenericMethod'
Zimpler: '#/components/schemas/ReadyToPayGenericMethod'
anyOf:
- $ref: '#/components/schemas/ReadyToPayPaymentCardMethod'
- $ref: '#/components/schemas/ReadyToPayAchMethod'
- $ref: '#/components/schemas/ReadyToPayGenericMethod'
- $ref: '#/components/schemas/ReadyToPayPayPalMethod'
- $ref: '#/components/schemas/ReadyToPayKlarnaMethod'
SubscriptionOrOneTimeSaleItem:
type: object
required:
- plan
properties:
id:
type: string
description: ID of the order item.
readOnly: true
maxLength: 50
planId:
description: ID of the plan.
deprecated: true
x-basic: true
type: string
maxLength: 50
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
quantity:
description: Number of product units in the specified plan.
type: integer
quantityFilled:
description: Number of filled product units.
type: integer
plan:
anyOf:
- $ref: '#/components/schemas/OriginalPlan'
- $ref: '#/components/schemas/FlexiblePlan'
usageLimits:
type: object
description: >-
Specifies the soft and hard usage limit thresholds for an item with
a metered billing plan.
This value is ignored when the plan is not metered.
properties:
softLimit:
type: object
description: >-
Defines thresholds for notification purposes.
For example, to notify the customer that their usage is near the
hard limit of their metered billing plan.
This notification informs the customer so that they can upgrade
their plan before the hard limit is reached.
When the reported usage reaches 75%, 90%, and 100% of the
configured limit a specific event is fired.
To notify the customer, a webhook and notification can be
configured for this event.
This field is useful for accounting and customer success
purposes.
The usage of metered billing plans can still be reported if the
soft limit is reached.
minProperties: 1
maxProperties: 1
properties:
quantity:
type: integer
description: Usage limit quantity.
minimum: 1
amount:
type: number
format: double
description: Usage limit amount in the currency of the order.
minimum: 0.01
hardLimit:
type: object
description: >-
Defines a limit where the customer can no longer use the
service.
Hard limits are used in addition to soft limits.
When a soft limit is reached,
a customer may receive a notification
but the service can still be provided up to the hard limit value
so that the customer can upgrade their plan.
When the reported usage reaches the configured limit,
a specific event is triggered.
To notify the customer in the merchant system,
or block a service,
a webhook and notification can be configured for this event.
When the total usage reaches the hard limit quantity,
or amount values,
metered billing plan usages can no longer be reported.
minProperties: 1
maxProperties: 1
properties:
quantity:
type: integer
description: Usage limit quantity.
minimum: 1
amount:
type: number
format: double
description: Usage limit amount in the currency of the order.
minimum: 0.01
revision:
type: integer
readOnly: true
description: >-
Revision number that increments with each overriding change to this
specific plan item.
isModified:
type: boolean
readOnly: true
description: Specifies if the plan information is modified for this subscription.
isGrandfathered:
type: boolean
readOnly: true
description: >-
Specifies if the current plan revision number is greater than the
plan item revision number.
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
product:
type: object
Subscription:
type: object
required:
- orderType
- customerId
- websiteId
- items
properties:
id:
type: string
description: ID of the order.
readOnly: true
maxLength: 50
example: sub_01HRF27SATGE4Z6PBJE6PD8328
orderId:
type: string
description: ID of the order (experimental).
readOnly: true
maxLength: 50
example: ord_01GYJPRKHBD6ZYHH897QCJMBS4
orderType:
description: |-
Specifies the type of order.
An order may be a subscription or a one-time purchase.
type: string
x-basic: true
enum:
- subscription-order
customerId:
$ref: '#/components/schemas/CustomerId'
renewalReminderTime:
description: Date and time when the renewal reminder event triggers.
type:
- string
- 'null'
format: date-time
readOnly: true
renewalReminderNumber:
description: Number of triggered renewal reminder events.
type:
- integer
- 'null'
readOnly: true
trialReminderTime:
description: Date and time when the trial reminder event triggers.
type:
- string
- 'null'
format: date-time
readOnly: true
trialReminderNumber:
description: Number of triggered trial reminder events.
type:
- integer
- 'null'
readOnly: true
abandonReminderTime:
description: Date and time when the abandon order reminder event triggers.
type:
- string
- 'null'
format: date-time
readOnly: true
abandonReminderNumber:
description: Number of abandon order reminder events that are triggered.
type:
- integer
- 'null'
readOnly: true
organizationId:
readOnly: true
allOf:
- $ref: '#/components/schemas/OrganizationId'
status:
description: >-
Status of the subscription service.
A subscription starts in the `pending` status, and becomes `active`
when the service period begins.
type: string
readOnly: true
enum:
- pending
- active
- abandoned
- canceled
- churned
- paused
- voided
- completed
- trial-ended
inTrial:
description: Specifies if the subscription is currently in a trial period.
type: boolean
readOnly: true
trial:
type: object
description: >-
Trial details.
To use plan defaults do not send the `trial` key, or send a `null`
value.
properties:
enabled:
description: |-
Specifies if there is a trial for this subscription.
Plans without trial prices are free trials.
type: boolean
endTime:
description: >-
Time and date when the trial ends.
If a trial is enabled on this subscription, a value must be
provided.
type:
- string
- 'null'
format: date-time
isTrialOnly:
description: |-
Specifies if a subscription ends after a trial period.
If this value is `true`, recurring settings are ignored.
type: boolean
default: false
isTrialConverted:
description: >-
Specifies if a subscription had trial conversion.
Trial conversion is when at least one successful payment is made on
the subscription after a trial.
type: boolean
readOnly: true
example: true
invoiceTimeShift:
description: |-
Shifts issue time and due time of invoices for this subscription.
This setting overrides plan settings.
To use plan settings, set this value to `null`.
To use multiple plans in one subscription,
all plans must have the same billing period,
this property enables the customer to subscribe to different plans.
example: null
oneOf:
- $ref: '#/components/schemas/InvoiceTimeShift'
- type: 'null'
recurringInterval:
type:
- object
- 'null'
description: |-
Recurring interval to override plan settings.
To use plan settings, set this value to `null`.
To use multiple plans in one subscription,
all plans must have the same recurring period length.
example: null
properties:
periodAnchorInstruction:
$ref: '#/components/schemas/ServicePeriodAnchorInstruction'
autopay:
description: >-
Specifies if payment attempts are made automatically.
If autopay is enabled, the payment is retrieved from the customer on
the renewal date using the payment instrument that is set at
`paymentInstrumentId`,
or the default payment instrument on the subscription.
type: boolean
default: true
startTime:
description: |-
Date and time when the subscription starts.
If this value is `null`, the current time is used.
This value cannot be more than one service period in the past.
type:
- string
- 'null'
x-sortable: true
x-basic: true
example: null
format: date-time
churnTime:
description: Date and time when the subscription is deactivated.
x-sortable: true
type:
- string
- 'null'
format: date-time
readOnly: true
renewalTime:
description: Date and time when the subscription renews.
type:
- string
- 'null'
x-sortable: true
x-basic: true
format: date-time
rebillNumber:
description: Current billing period number.
type:
- integer
- 'null'
readOnly: true
x-sortable: true
lineItems:
description: >-
Subscription line items which queue until the next renewal, or
interim, invoice is issued for the subscription.
readOnly: true
type: array
deprecated: true
items:
type: object
description: >-
Invoice line item. Use the `isInterim` property of upcoming
invoice items instead.
deprecated: true
properties:
type:
description: Type of invoice line item.
type: string
enum:
- debit
- credit
description:
description: Description of the line item.
type: string
maxLength: 1000
unitPriceAmount:
description: Unit price of the line item.
type: number
format: double
example: 49.95
unitPriceCurrency:
$ref: '#/components/schemas/CurrencyCode'
quantity:
description: Quantity of the line item.
type: integer
example: 1
periodStartTime:
description: Date and time when the service period begins for this item.
type: string
format: date-time
periodEndTime:
description: Date and time when the service period ends for this item.
type: string
format: date-time
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
lineItemSubtotal:
type: object
readOnly: true
description: |-
Subtotal of line items in this subscription (signed value).
If credits exceed debits, this value is a negative number.
properties:
currency:
$ref: '#/components/schemas/CurrencyCode'
amount:
type: number
x-type: Money
x-sortable: true
description: Amount of the subtotal.
format: double
example: 49.95
paymentInstrumentId:
type:
- string
- 'null'
description: >-
ID of the payment instrument to use for autopay.
If this value is not provided, or if the payment instrument is
inactive,
the customer's default payment instrument is used.
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
billingStatus:
description: >-
Billing status of the most recent invoice.
This value may help you to determine if you should change the
service status of the service,
such as suspending the service.
type: string
readOnly: true
enum:
- draft
- unpaid
- past-due
- abandoned
- paid
- voided
- refunded
- disputed
- partially-refunded
- partially-paid
websiteId:
x-sortable: true
x-basic: true
allOf:
- $ref: '#/components/schemas/WebsiteId'
currency:
description: Currency of the order.
readOnly: true
$ref: '#/components/schemas/CurrencyCode'
initialInvoiceId:
description: ID of the initial invoice.
readOnly: true
type:
- string
- 'null'
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
recentInvoiceId:
description: |-
ID of the most recently issued invoice.
The invoice might not be `paid` yet.
readOnly: true
type:
- string
- 'null'
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
items:
description: Details of items in the order.
type: array
minItems: 1
items:
$ref: '#/components/schemas/SubscriptionOrOneTimeSaleItem'
deliveryAddress:
description: Delivery address of the order.
oneOf:
- $ref: '#/components/schemas/ContactObject'
- type: 'null'
billingAddress:
description: Billing address of the order.
oneOf:
- $ref: '#/components/schemas/ContactObject'
- type: 'null'
activationTime:
description: Date and time when the order is activated.
x-sortable: true
type:
- string
- 'null'
format: date-time
readOnly: true
voidTime:
description: Date and time when the order is voided.
type:
- string
- 'null'
format: date-time
readOnly: true
abandonTime:
type:
- string
- 'null'
description: >-
Date and time when the pending order is automatically abandoned.
If this value is not passed during order creation,
a [pending order
TTL](https://www.rebilly.com/catalog/all/organizations/patchorganization/#!t=request&path=settings/billing/pendingOrderTtl)
setting is used to calculate the value.
format: date-time
delinquencyPeriod:
type:
- string
- 'null'
description: >-
Length of time, in ISO-8601 durations format,
which is added to the due time of the order when setting the
delinquency time for all related invoices.
When the delinquency time of an invoice is reached, the order is
automatically canceled.
If the provided value is `null`, the order does not change state.
example: P7D
default: null
couponIds:
type:
- array
- 'null'
description: >-
List of coupons to redeem on the customer and restrict to this
order.
For more information, see
[Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/).
This parameter uses the following logic:
- If this parameter is not supplied, applied coupons are not
changed.
- If an empty array is supplied, all applied coupon redemptions are
canceled.
- If a list of coupons is supplied, unapplied coupons in the list
are applied.
Coupons that have already been applied do not change state.
Applied coupons that are not supplied in list are canceled.
If the list of applied coupons on a pending order is changed by this
parameter during an order update, the invoice for the order is
reissued.
writeOnly: true
items:
type: string
description: ID of the coupon.
poNumber:
description: Purchase order number displayed on the issued invoices.
type:
- string
- 'null'
example: PO123456
shipping:
$ref: '#/components/schemas/Shipping'
notes:
description: Notes for the customer displayed on the order invoice.
type: string
canceledBy:
description: Specifies who initiated the cancellation.
type:
- string
- 'null'
readOnly: true
enum:
- merchant
- customer
- rebilly
- null
cancelCategory:
description: Category of the cancellation.
type:
- string
- 'null'
readOnly: true
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
- null
cancelDescription:
description: Description of the cancellation reason in free form.
type:
- string
- 'null'
readOnly: true
maxLength: 255
revision:
description: >-
Number of times the order data has been modified.
The revision is useful when analyzing webhook data to determine if
the
change takes precedence over the current representation.
type: integer
readOnly: true
riskMetadata:
type:
- object
- 'null'
example: null
description: >-
Risk metadata.
If this value is `null`, this field uses risk metadata that is
captured when creating the payment token.
allOf:
- $ref: '#/components/schemas/RiskMetadata'
billingPortalToken:
description: >-
Customer JWT to access billing portal. This field is presented only
if billing portal exists.
This is an experimental field and can be changed or removed in the
future.
type:
- string
- 'null'
readOnly: true
x-badges:
- name: Experimental
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- website
- customer
- initialInvoice
- recentInvoice
- approvalUrl
- attachments
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
recentInvoice:
type: object
initialInvoice:
type: object
customer:
type: object
website:
type: object
leadSource:
type: object
shippingRate:
type: object
paymentInstrument:
type: object
upcomingInvoice:
type: object
OneTimeSale:
type: object
required:
- orderType
- customerId
- websiteId
- items
properties:
id:
type: string
description: ID of the one-time sale.
readOnly: true
maxLength: 50
example: ots_01HRF27SATGE4Z6PBJE6PD8328
orderId:
type: string
description: ID of the order (experimental).
readOnly: true
maxLength: 50
example: ord_01GYJPRKHBD6ZYHH897QCJMBS4
orderType:
description: |-
Specifies the type of order.
An order may be a subscription or a one-time purchase.
type: string
x-basic: true
enum:
- one-time-order
customerId:
$ref: '#/components/schemas/CustomerId'
organizationId:
deprecated: true
readOnly: true
allOf:
- $ref: '#/components/schemas/OrganizationId'
status:
description: Status of the one-time order.
type: string
readOnly: true
enum:
- pending
- abandoned
- completed
- canceled
billingStatus:
description: >-
Billing status of the most recent invoice.
This value may help you to determine if you should change the
service status of the service,
such as suspending the service.
type: string
readOnly: true
enum:
- draft
- unpaid
- past-due
- abandoned
- paid
- voided
- refunded
- disputed
- partially-refunded
- partially-paid
websiteId:
x-sortable: true
x-basic: true
allOf:
- $ref: '#/components/schemas/WebsiteId'
currency:
description: Currency of the order.
readOnly: true
$ref: '#/components/schemas/CurrencyCode'
initialInvoiceId:
description: ID of the initial invoice (`null` for one-time orders).
readOnly: true
type:
- string
- 'null'
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
recentInvoiceId:
description: |-
ID of the most recently issued invoice.
The invoice might not be `paid` yet.
readOnly: true
type:
- string
- 'null'
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
items:
description: Details of items in the order.
type: array
minItems: 1
items:
$ref: '#/components/schemas/SubscriptionOrOneTimeSaleItem'
deliveryAddress:
description: Delivery address of the order.
oneOf:
- $ref: '#/components/schemas/ContactObject'
- type: 'null'
billingAddress:
description: Billing address of the order.
oneOf:
- $ref: '#/components/schemas/ContactObject'
- type: 'null'
activationTime:
description: Date and time when the order is activated.
x-sortable: true
type:
- string
- 'null'
format: date-time
readOnly: true
voidTime:
description: Date and time when the order is voided.
type:
- string
- 'null'
format: date-time
readOnly: true
abandonTime:
type:
- string
- 'null'
description: >-
Date and time when the pending order is automatically abandoned.
If this value is not passed during order creation,
a [pending order
TTL](https://www.rebilly.com/catalog/all/organizations/patchorganization/#!t=request&path=settings/billing/pendingOrderTtl)
setting is used to calculate the value.
format: date-time
couponIds:
type:
- array
- 'null'
description: >-
List of coupons to redeem on the customer and restrict to this
order.
For more information, see
[Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/).
This parameter uses the following logic:
- If this parameter is not supplied, applied coupons are not
changed.
- If an empty array is supplied, all applied coupon redemptions are
canceled.
- If a list of coupons is supplied, unapplied coupons in the list
are applied.
Coupons that have already been applied do not change state.
Applied coupons that are not supplied in list are canceled.
If the list of applied coupons on a pending order is changed by this
parameter during an order update, the invoice for the order is
reissued.
writeOnly: true
items:
type: string
description: ID of the coupon.
poNumber:
description: Purchase order number displayed on the issued invoices.
type:
- string
- 'null'
example: PO123456
shipping:
$ref: '#/components/schemas/Shipping'
notes:
description: Notes for the customer displayed on the order invoice.
type: string
revision:
description: >-
Number of times the order data has been modified.
The revision is useful when analyzing webhook data to determine if
the
change takes precedence over the current representation.
type: integer
readOnly: true
riskMetadata:
example: null
description: >-
Risk metadata.
If this value is `null`, this field uses risk metadata that is
captured when creating the payment token.
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- website
- customer
- initialInvoice
- recentInvoice
- approvalUrl
- attachments
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
recentInvoice:
type: object
customer:
type: object
website:
type: object
leadSource:
type: object
shippingRate:
type: object
paymentInstrument:
type: object
SubscriptionOrOneTimeSale:
type: object
description: Subscription details.
discriminator:
propertyName: orderType
mapping:
subscription-order: '#/components/schemas/Subscription'
one-time-order: '#/components/schemas/OneTimeSale'
oneOf:
- $ref: '#/components/schemas/Subscription'
- $ref: '#/components/schemas/OneTimeSale'
Search:
type: object
properties:
customers:
description: List of returned customers.
readOnly: true
type: array
items:
$ref: '#/components/schemas/Customer'
invoices:
description: List of returned invoices.
readOnly: true
type: array
items:
$ref: '#/components/schemas/Invoice'
orders:
description: List of returned orders.
readOnly: true
type: array
items:
$ref: '#/components/schemas/SubscriptionOrOneTimeSale'
transactions:
description: List of returned transactions.
readOnly: true
type: array
items:
$ref: '#/components/schemas/Transaction'
searched:
description: |-
Names of searched resources.
Includes all searched resources.
readOnly: true
type: array
items:
type: string
ShippingOption:
type: object
required:
- name
- price
- currency
properties:
id:
type: string
description: ID of the shipping rate.
readOnly: true
maxLength: 50
example: ship_rate_0YVDN408G4DQE9G1RV1QCFHJ3P
name:
type: string
description: Name of the shipping rate.
description:
type:
- string
- 'null'
description: Description of the shipping rate.
price:
description: |-
Price of the shipping rate.
If `price` is `0`, shipping is free.
type: number
format: double
currency:
$ref: '#/components/schemas/CurrencyCode'
ShippingRate:
allOf:
- $ref: '#/components/schemas/ShippingOption'
- properties:
filter:
type: string
description: >-
Filter based on invoice properties that is used to determine
when the rate is applicable.
If no filters are used, the rate is always applicable.
default: ''
example: deliveryAddress.country:US,CA,RU;amount:100..1000
status:
description: |-
Status of the shipping rate.
If `status` is `inactive` the shipping rate is not applied.
type: string
enum:
- active
- inactive
default: active
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
SubscriptionChange:
type: object
required:
- items
- renewalPolicy
- prorated
properties:
items:
description: Details of items in the order.
type: array
minItems: 1
items:
type: object
description: >-
New set of items for the subscription.
To remove an item, include the items array and exclude the items
you want to remove.
required:
- plan
properties:
plan:
description: Plan details.
oneOf:
- $ref: '#/components/schemas/OriginalPlan'
- $ref: '#/components/schemas/FlexiblePlan'
quantity:
description: Number of units of the product on the given plan.
type: integer
usageLimits:
type: object
description: >-
Specifies the soft and hard usage limit thresholds for an item
with a metered billing plan.
This value is ignored when the plan is not metered.
properties:
softLimit:
type: object
description: >-
Defines thresholds for notification purposes.
For example, to notify the customer that their usage is
near the hard limit of their metered billing plan.
This notification informs the customer so that they can
upgrade their plan before the hard limit is reached.
When the reported usage reaches 75%, 90%, and 100% of the
configured limit a specific event is fired.
To notify the customer, a webhook and notification can be
configured for this event.
This field is useful for accounting and customer success
purposes.
The usage of metered billing plans can still be reported
if the soft limit is reached.
minProperties: 1
maxProperties: 1
properties:
quantity:
type: integer
description: Usage limit quantity.
minimum: 1
amount:
type: number
format: double
description: Usage limit amount in the currency of the order.
minimum: 0.01
hardLimit:
type: object
description: >-
Defines a limit where the customer can no longer use the
service.
Hard limits are used in addition to soft limits.
When a soft limit is reached,
a customer may receive a notification
but the service can still be provided up to the hard limit
value so that the customer can upgrade their plan.
When the reported usage reaches the configured limit,
a specific event is triggered.
To notify the customer in the merchant system,
or block a service,
a webhook and notification can be configured for this
event.
When the total usage reaches the hard limit quantity,
or amount values,
metered billing plan usages can no longer be reported.
minProperties: 1
maxProperties: 1
properties:
quantity:
type: integer
description: Usage limit quantity.
minimum: 1
amount:
type: number
format: double
description: Usage limit amount in the currency of the order.
minimum: 0.01
renewalPolicy:
description: >-
Specifies if the subscription retains its current `renewalTime` or
resets it to a newly calculated `renewalTime`.
type: string
enum:
- reset
- retain
prorated:
description: >-
Specifies whether to give a pro rata credit for the amount of time
remaining between the `effectiveTime` and the end of the current
period.
In addition, if the `renewalTime` is retained, by setting the
`renewalPolicy` to `retain`,
a pro rata debit occurs for the amount between the `effectiveTime`
and the `renewalTime` as a percentage of the normal period size.
type: boolean
effectiveTime:
description: >-
Date from which the renewal time for `reset` operations and
proration calculations are made.
If this field is omitted, this value defaults to the current time.
type: string
format: date-time
preview:
description: |-
Specifies if changes to the subscription can be previewed.
Subscriptions cannot be changed in preview.
type: boolean
default: false
keepTrial:
description: |-
Specifies if the subscription order must retain its active trial.
This field is only applicable if `renewalPolicy` is set to `retain`.
type: boolean
default: false
SubscriptionItemUpdate:
type: object
required:
- quantityFilled
properties:
quantityFilled:
x-badges:
- name: Experimental
description: Filled quantity of the subscription item (experimental property).
type: integer
SubscriptionInvoice:
type: object
properties:
transactionId:
description: >-
If present, applies a payment to the invoice created. If the payment
is for the invoice total, it would be marked as paid.
$ref: '#/components/schemas/TransactionId'
SubscriptionPause:
type: object
description: Subscription pause details.
required:
- subscriptionId
properties:
id:
type: string
description: ID of the subscription pause.
readOnly: true
maxLength: 50
example: sub_pau_01H085J3ZR1WKD120D73D7N4C9
subscriptionId:
type: string
description: ID of the paused subscription.
maxLength: 50
example: sub_01HRF27SATGE4Z6PBJE6PD8328
status:
description: Status of the subscription pause.
type: string
readOnly: true
enum:
- pending
- ongoing
- revoked
- finished
pausedBy:
description: Specifies who initiated the pause.
type: string
default: customer
enum:
- merchant
- customer
description:
description: Description of the pause reason in free form.
type:
- string
- 'null'
maxLength: 255
effectiveTime:
description: >-
Date and time when the service period pauses.
This time must be later than the current time.
If this time is earlier then the current time, the current time is
used.
If this field is omitted, this value defaults to the current time.
type:
- string
- 'null'
format: date-time
endTime:
description: >-
Date and time when the pause ends and the subscription resumes
billing.
To resume a subscription from this point in time,
use the current time or an earlier time.
If `endTime` is earlier then the current time, the current time is
used.
If this field is empty, the subscription is indefinitely paused.
type:
- string
- 'null'
format: date-time
timeRemaining:
description: >-
Amount of time between the pause end time and the renewal time in
ISO-8601 durations format.
By default, this value is computed as the time between the pause and
the renewal.
Example: A $30 per month subscription on a 30-day month is paused on
day 20 of the subscription.
There are 10 unused days on the subscription.
Therefore, the subscription renews in 10 days after it is resumed.
The upcoming invoice does not change the amount for the invoiced
period, it remains at $30.
If the subscription uses a billing anchor,
the renewal time after a pause shift behaves as though the renewal
time is moved forward by an [Order API operation](../../tag/Orders),
and the billing anchor is ignored for that period.
For more information, see [Service period anchor, billing timing,
and invoice time
shift](https://www.rebilly.com/docs/dev-docs/concepts/#service-period-anchor-and-billing-timing-and-invoice-time-shift).
type:
- string
- 'null'
example: P3600S
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
SubscriptionCancellation:
type: object
required:
- subscriptionId
- churnTimePolicy
properties:
id:
type: string
description: ID of the cancellation.
readOnly: true
maxLength: 50
example: sub_cnl_0YVJ5XVQM9CDP8248ZQX0RDMKV
subscriptionId:
type: string
description: ID of the canceled subscription order.
maxLength: 50
example: sub_01HRF27SATGE4Z6PBJE6PD8328
proratedInvoiceId:
type:
- string
- 'null'
description: ID of the invoice on which the cancellation proration is calculated.
readOnly: true
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
appliedInvoiceId:
type:
- string
- 'null'
description: >-
ID of the invoice on which the cancellation fees or credits are
applied.
readOnly: true
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
canceledBy:
description: Specifies who initiated the cancellation.
type: string
default: customer
enum:
- merchant
- customer
- rebilly
reason:
description: Reason for the cancellation.
type: string
default: other
enum:
- did-not-use
- did-not-want
- missing-features
- bugs-or-problems
- do-not-remember
- risk-warning
- contract-expired
- too-expensive
- other
- billing-failure
description:
description: Description of the cancellation reason in free form.
type: string
maxLength: 255
prorated:
description: >-
Specifies if the customer gets a pro-rata credit for the time
remaining between `churnTime` and subscription next renewal time.
type: boolean
default: false
status:
description: Status of the subscription order.
type: string
default: confirmed
enum:
- draft
- confirmed
- completed
- revoked
x-enumDescriptions:
draft: >-
Creates a daft cancellation so that the cancellation and charge
can be previewed.
confirmed: |-
Confirms a subscription cancellation.
Sets the subscription to cancel when the `churnTime` is reached.
completed: >-
Marks a subscription cancellation as completed.
This is a read-only status that is set when the `churnTime` is
reached.
The cancellation may not be changed or deleted when the status is
`completed`.
revoked: Revokes a subscription cancellation.
canceledTime:
description: >-
Date and time when a subscription is cancelled.
By default, this occurs when `status` is `confirmed`, unless `draft`
is specified.
type:
- string
- 'null'
format: date-time
readOnly: true
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
churnTime:
description: Date and time when the subscription is deactivated.
type: string
format: date-time
churnTimePolicy:
description: >-
Specifies when the subscription is to be deactivated.
The `churnTimePolicy` takes precedence over the `churnTime` in
request.
type:
- string
- 'null'
enum:
- 'null'
- now
- at-next-renewal
lineItems:
description: |-
Items to be added to the new invoice.
Proration item is generated and added automatically.
type: array
items:
type: object
description: Invoice line item.
required:
- type
- unitPriceAmount
- unitPriceCurrency
- quantity
properties:
type:
description: Type of invoice line item.
type: string
enum:
- debit
- credit
description:
description: Description of the line item.
type: string
maxLength: 1000
unitPriceAmount:
description: Unit price of the line item.
type: number
format: double
example: 49.95
unitPriceCurrency:
$ref: '#/components/schemas/CurrencyCode'
quantity:
description: Quantity of the line item.
type: integer
example: 1
periodStartTime:
description: Date and time when the period begins for this item.
type: string
format: date-time
periodEndTime:
description: Date and time when the period ends for this item.
type: string
format: date-time
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
lineItemSubtotal:
description: >-
Subtotal of the line items added after the subscription
cancellation.
readOnly: true
type: object
properties:
amount:
type: number
description: Subtotal amount of the line items.
example: 49.95
currency:
$ref: '#/components/schemas/CurrencyCode'
_links:
$ref: '#/components/schemas/SelfLink'
SubscriptionReactivation:
type: object
required:
- subscriptionId
properties:
id:
type: string
description: ID of the reactivation.
readOnly: true
maxLength: 50
example: sub_rct_0YVJ62AF5XCFCA6EBFAAA3Z7E0
subscriptionId:
type: string
description: ID of the reactivated subscription.
maxLength: 50
example: sub_01HRF27SATGE4Z6PBJE6PD8328
cancellationId:
type: string
description: ID of the related cancellation.
readOnly: true
maxLength: 50
example: sub_cnl_0YVJ5XVQM9CDP8248ZQX0RDMKV
description:
description: Description of the reactivation reason in free form.
type:
- string
- 'null'
maxLength: 255
effectiveTime:
description: |-
Date and time when the service period starts,
unless the subscription is canceled but still active.
If the subscription is still active,
the subscription continues for the current service period.
If this field is omitted, this value defaults to the current time.
type: string
format: date-time
writeOnly: true
renewalTime:
description: >-
Date and time of the next subscription renewal.
If this field is omitted, this value is computed from the
`effectiveTime` field.
If the subscription is canceled but still active,
it is ignored and the next renewal occurs as scheduled.
type: string
format: date-time
paymentInstrumentId:
writeOnly: true
description: >-
ID of the payment instrument.
If this field is omitted, the subscription payment instrument
remains unchanged.
type:
- string
- 'null'
maxLength: 50
example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
UpcomingInvoiceItem:
type: object
readOnly: true
properties:
id:
type: string
description: ID of the upcoming invoice item.
maxLength: 50
example: ii_0YVFDEQS2KCFTBN9HXWJFY55GV
isInterim:
description: Specifies if the line item is added to an interim invoice.
type: boolean
description:
description: Description of the upcoming invoice item.
type: string
maxLength: 1000
unitPrice:
description: Unit price of the upcoming invoice item.
type: number
format: double
quantity:
description: Quantity of the upcoming invoice item.
type: integer
price:
description: Total price of the upcoming invoice item.
type: number
format: double
productId:
type:
- string
- 'null'
description: ID of the product.
maxLength: 50
example: prod_0YV7DES3WPC5J8JD8QTVNZBZNZ
planId:
type:
- string
- 'null'
description: ID of the plan.
maxLength: 50
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
subscriptionId:
type: string
description: ID of the order.
maxLength: 50
example: sub_01HRF27SATGE4Z6PBJE6PD8328
periodStartTime:
description: Date and time when the billing period starts.
type: string
format: date-time
periodEndTime:
description: Date and time when the billing period ends.
type: string
format: date-time
periodNumber:
description: >-
Billing period number that is associated with the invoice item.
For example, an invoice item for a service is included in billing
period number 3.
The invoice item is only applied to billing period number 3.
type: integer
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
tax:
description: Invoice item tax.
$ref: '#/components/schemas/TaxItem'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- product
- plan
- subscription
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
properties:
product:
type: object
plan:
type: object
UpcomingInvoice:
type: object
readOnly: true
properties:
id:
description: >-
ID of the upcoming invoice, which is persisted in the future renewal
invoice.
type: string
readOnly: true
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
websiteId:
$ref: '#/components/schemas/WebsiteId'
subscriptionId:
description: ID of the related subscription order.
type: string
readOnly: true
maxLength: 50
example: sub_01HRF27SATGE4Z6PBJE6PD8328
currency:
x-sortable: true
x-basic: true
$ref: '#/components/schemas/CurrencyCode'
customerId:
x-basic: true
allOf:
- $ref: '#/components/schemas/CustomerId'
revision:
description: |-
Number of times the upcoming invoice data has changed.
Use the revision number when analyzing webhook data to
determine if a change should take precedence over the current
representation.
type: integer
organizationId:
allOf:
- $ref: '#/components/schemas/OrganizationId'
items:
type: array
description: Upcoming invoice items array.
items:
$ref: '#/components/schemas/UpcomingInvoiceItem'
amount:
description: Amount of the invoice.
type: number
x-type: Money
x-sortable: true
x-basic: true
format: double
readOnly: true
amountDue:
description: Amount that is due on the invoice.
type: number
x-type: Money
x-sortable: true
format: double
readOnly: true
subtotalAmount:
description: Subtotal amount of the invoice.
type: number
x-type: Money
format: double
readOnly: true
discountAmount:
description: Discount amount that is applied to the invoice.
type: number
x-type: Money
format: double
readOnly: true
shipping:
$ref: '#/components/schemas/Shipping'
tax:
$ref: '#/components/schemas/Taxes'
billingAddress:
description: Billing address of the invoice.
$ref: '#/components/schemas/ContactObject'
deliveryAddress:
description: Delivery address of the invoice.
$ref: '#/components/schemas/ContactObject'
poNumber:
description: Purchase order number that is displayed on the invoice.
type:
- string
- 'null'
example: PO123456
notes:
description: Notes for the customer that are displayed on the invoice.
type: string
discounts:
type: array
description: Discounts applied.
readOnly: true
items:
type: object
readOnly: true
properties:
couponId:
type: string
description: ID of the coupon.
maxLength: 50
example: cpn_0YVCNKF81GD778N4YNVGDJK558
redemptionId:
description: ID of the redemption.
$ref: '#/components/schemas/ResourceId'
amount:
description: Total amount discounted by this coupon.
type: number
format: double
description:
type: string
description: Description of the discount.
context:
$ref: '#/components/schemas/DiscountContext'
dueTime:
description: Date and time when the invoice is due for payment.
type: string
x-sortable: true
format: date-time
issuedTime:
description: Date and time when the invoice is issued.
x-label: Date Issued
x-sortable: true
x-basic: true
$ref: '#/components/schemas/ServerTimestamp'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- website
- customer
- organization
- subscription
- attachments
- leadSource
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
properties:
customer:
type: object
website:
type: object
organization:
type: object
leadSource:
type: object
OrderTimeline:
type: object
properties:
id:
type: string
description: ID of the timeline message.
readOnly: true
maxLength: 50
example: tmln_0YV8Q9WEF5DTA8HFXS27D1G6GC
type:
description: Type of timeline message.
type: string
readOnly: true
enum:
- coupon-applied
- email-message-sent
- invoice-abandoned
- invoice-disputed
- invoice-issued
- invoice-paid
- invoice-partially-paid
- invoice-partially-refunded
- invoice-past-due
- invoice-refunded
- invoice-reissued
- invoice-renewal-payment-declined
- invoice-voided
- order-activated
- order-autopay-changed
- order-billing-address-changed
- order-billing-anchor-changed
- order-canceled
- order-churned
- order-completed
- order-custom-fields-changed
- order-delivery-address-changed
- order-downgraded
- order-items-changed
- order-paid-early
- order-quantity-changed
- order-reactivated
- order-recurring-interval-changed
- order-renewal-time-changed
- order-renewed
- order-risk-metadata-changed
- order-upgraded
- order-voided
- order-abandoned
- subscription-paused
- subscription-pause-created
- subscription-pause-modified
- subscription-pause-revoked
- subscription-resumed
- subscription-trial-end-changed
- timeline-comment-created
triggeredBy:
description: Specifies who, or what, triggered the timeline event.
type: string
readOnly: true
enum:
- rebilly
- app
- direct-api
message:
description: Contents of the timeline message.
type: string
extraData:
$ref: '#/components/schemas/TimelineExtraData'
occurredTime:
description: Date and time when the timeline message occurred.
readOnly: true
$ref: '#/components/schemas/ServerTimestamp'
_links:
$ref: '#/components/schemas/SelfLink'
Usage:
type: object
required:
- subscriptionId
- planId
- quantity
properties:
id:
type: string
readOnly: true
description: ID of the usage record.
maxLength: 50
example: sub_usg_0YVJ636B95DNA9M3B1638HXBCQ
subscriptionId:
type: string
description: ID of the subscription for which a usage is reported.
maxLength: 50
example: sub_01HRF27SATGE4Z6PBJE6PD8328
planId:
type: string
description: ID of the plan for which a usage is reported.
maxLength: 50
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
invoiceId:
type:
- string
- 'null'
description: >-
ID of the invoice to which usage is applied. This value is populated
when the invoice is issued.
readOnly: true
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
invoiceItemId:
description: >-
ID of the invoice item to which usage is applied. This value is
populated when the invoice is issued.
readOnly: true
type:
- string
- 'null'
maxLength: 50
example: ii_0YVFDEQS2KCFTBN9HXWJFY55GV
quantity:
description: |-
Number of used product units of a plan.
Products are the goods and services that your business sells.
Plans describe how the customer must pay for products.
type: number
format: float
minimum: 0.01
usageTime:
description: >-
Date and time, in ISO 8601 format, when a usage occurred.
If this value is not provided or is empty, the date and time of the
request is used.
type: string
format: date-time
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
PaymentCardToken:
type: object
title: Payment card token
description: >-
Creates a payment card token.
A payment card token is a string that represents a customer's payment
card details.
It can be used once, and expires upon first use or within 30 minutes of
token creation.
To generate a full payment card token, you must provide the
`billingAddress`.
If `billingAddress` is not provided, the token can not be used for
payments.
required:
- method
- paymentInstrument
properties:
method:
description: Payment method of the token.
type: string
enum:
- payment-card
paymentInstrument:
description: Payment card instrument details.
type: object
required:
- expMonth
- expYear
properties:
pan:
description: |-
Primary Account Number (PAN) of the payment card.
This value is required to perform a payment.
type: string
writeOnly: true
cvv:
description: Card Verification Value (CVV/CVC) of the payment card.
type: string
writeOnly: true
expMonth:
description: Expiration month of the payment card.
type: integer
expYear:
description: Expiration year of the payment card.
type: integer
bin:
description: |-
Bank Identification Number (BIN) of the payment card.
This value is the first 6 digits of the payment card number.
type:
- string
- 'null'
format: bin
readOnly: true
last4:
description: >-
Last 4 digits of the Primary Account Number (PAN) of the payment
card.
type:
- string
- 'null'
readOnly: true
brand:
readOnly: true
allOf:
- $ref: '#/components/schemas/PaymentCardBrand'
billingAddress:
description: |-
Billing address object.
This value is required to perform payments.
For payment-card updates, `billingAddress` can be ignored.
$ref: '#/components/schemas/ContactObject'
id:
description: ID of the token.
readOnly: true
$ref: '#/components/schemas/ResourceId'
isUsed:
description: Specifies if the token has been used.
type: boolean
default: false
readOnly: true
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
leadSource:
allOf:
- $ref: '#/components/schemas/LeadSource'
writeOnly: true
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
usageTime:
description: Date and time when the token is used.
type:
- string
- 'null'
format: date-time
readOnly: true
expirationTime:
description: Date and time when the token expired.
type:
- string
- 'null'
format: date-time
readOnly: true
_links:
$ref: '#/components/schemas/SelfLink'
PayPalToken:
type: object
title: PayPal token
required:
- method
- paymentInstrument
properties:
method:
description: Payment method of the token.
type: string
enum:
- paypal
paymentInstrument:
description: Paypal instrument details required for express checkout.
type: object
required:
- billingAgreementToken
- paypalMerchantId
properties:
paypalMerchantId:
description: ID of the PayPal merchant.
type: string
billingAgreementToken:
description: PayPal billing agreement token.
type: string
billingAddress:
description: Billing address object.
oneOf:
- $ref: '#/components/schemas/ContactObject'
- type: 'null'
id:
description: ID of the token.
readOnly: true
$ref: '#/components/schemas/ResourceId'
isUsed:
description: Specifies if the token is already used.
type: boolean
default: false
readOnly: true
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
leadSource:
allOf:
- $ref: '#/components/schemas/LeadSource'
writeOnly: true
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
usageTime:
description: Date and time when the token is used.
type:
- string
- 'null'
format: date-time
readOnly: true
expirationTime:
description: Date and time when the token expires.
type:
- string
- 'null'
format: date-time
readOnly: true
_links:
$ref: '#/components/schemas/SelfLink'
BBANInstrument:
description: Bank account BBAN instrument.
type: object
required:
- accountNumberType
- accountNumber
- routingNumber
- accountType
properties:
accountNumberType:
description: >-
Bank account number type.
A valid value is basic bank account number (BBAN) or international
bank account number (IBAN).
type: string
enum:
- BBAN
accountNumber:
description: Customer's bank account number.
type: string
pattern: ^[0-9]+$
writeOnly: true
routingNumber:
description: Bank routing number.
type: string
pattern: ^[0-9]+$
accountType:
description: Bank account type.
type: string
enum:
- checking
- savings
- other
bic:
description: Bank Identifier Code (BIC).
type: string
bankName:
description: Bank name.
type: string
last4:
description: Last 4 digits of the bank account number.
type: string
readOnly: true
IBANInstrument:
description: Bank account IBAN instrument.
type: object
required:
- accountNumberType
- accountNumber
properties:
accountNumberType:
description: >-
Bank account number type.
A valid value is basic bank account number (BBAN) or international
bank account number (IBAN).
type: string
enum:
- IBAN
accountNumber:
description: >-
Bank account number.
Detailed information about all ISO 13616-compliant national IBAN
formats is available in the [SWIFT IBAN
Registry](https://www.swift.com/standards/data-standards/iban).
type: string
writeOnly: true
bic:
description: Bank Identifier Code (BIC).
type: string
bankName:
description: Bank name.
type: string
last4:
description: Last 4 digits of the bank account number.
type: string
readOnly: true
BankAccountInstrument:
type: object
description: Bank account BBAN or IBAN instrument.
discriminator:
propertyName: accountNumberType
mapping:
BBAN: '#/components/schemas/BBANInstrument'
IBAN: '#/components/schemas/IBANInstrument'
anyOf:
- $ref: '#/components/schemas/BBANInstrument'
- $ref: '#/components/schemas/IBANInstrument'
BankAccountToken:
type: object
title: Bank account token
required:
- method
- paymentInstrument
- billingAddress
properties:
method:
description: Payment method of the token.
type: string
enum:
- ach
- echeck
paymentInstrument:
$ref: '#/components/schemas/BankAccountInstrument'
billingAddress:
description: Billing address object.
$ref: '#/components/schemas/ContactObject'
id:
description: ID of the token.
readOnly: true
$ref: '#/components/schemas/ResourceId'
isUsed:
description: Specifies if the token is already used.
type: boolean
default: false
readOnly: true
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
leadSource:
allOf:
- $ref: '#/components/schemas/LeadSource'
writeOnly: true
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
usageTime:
description: Date and time when the token is used.
type:
- string
- 'null'
format: date-time
readOnly: true
expirationTime:
description: Date and time when the token expired.
type:
- string
- 'null'
format: date-time
readOnly: true
_links:
$ref: '#/components/schemas/SelfLink'
DigitalWalletToken:
type: object
title: Digital wallet token
required:
- method
- paymentInstrument
properties:
method:
description: Payment method of the token.
type: string
enum:
- digital-wallet
paymentInstrument:
description: Payment instrument details.
type: object
required:
- type
- amount
- currency
- descriptor
- payload
properties:
type:
description: Type of digital wallet.
type: string
enum:
- Apple Pay
- Google Pay
amount:
description: Authorized for the digital wallet amount.
type: number
format: double
currency:
description: Authorized for the digital wallet currency.
$ref: '#/components/schemas/CurrencyCode'
descriptor:
description: Descriptor for a payment.
type: string
bin:
description: >-
Bank Identification Number (BIN) of the payment card.
This value is the same as the first 6 digits of the associated
Primary Account Number (PAN).
type:
- string
- 'null'
format: bin
readOnly: true
last4:
description: >-
Last 4 digits of the Primary Account Number (PAN) of the payment
card.
type: string
readOnly: true
brand:
readOnly: true
allOf:
- $ref: '#/components/schemas/PaymentCardBrand'
expMonth:
readOnly: true
description: Payment card expiration month.
type: integer
expYear:
readOnly: true
description: Payment card expiration year.
type: integer
payload:
writeOnly: true
description: |-
Digital wallet encoded data.
This field may contain the digital wallet billing address.
type: object
billingAddress:
readOnly: true
description: Billing address object.
$ref: '#/components/schemas/ContactObject'
id:
description: ID of the token.
readOnly: true
$ref: '#/components/schemas/ResourceId'
isUsed:
description: Specifies if the token is already used.
type: boolean
default: false
readOnly: true
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
leadSource:
allOf:
- $ref: '#/components/schemas/LeadSource'
writeOnly: true
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
usageTime:
description: Date and time when the token is used.
type:
- string
- 'null'
format: date-time
readOnly: true
expirationTime:
description: Date and time when the token expired.
type:
- string
- 'null'
format: date-time
readOnly: true
_links:
$ref: '#/components/schemas/SelfLink'
PlaidAccountToken:
type: object
title: Plaid account token
required:
- method
- billingAddress
- paymentInstrument
properties:
method:
description: Payment method of the token.
type: string
enum:
- plaid-account
paymentInstrument:
description: Plaid payment instrument details.
type: object
required:
- linkToken
- publicToken
- accountId
properties:
linkToken:
type: string
description: Plaid link token.
writeOnly: true
publicToken:
type: string
description: Plaid public token.
accountId:
type: string
description: ID of the Plaid account.
billingAddress:
description: Billing address object.
$ref: '#/components/schemas/ContactObject'
id:
description: ID of the token.
readOnly: true
$ref: '#/components/schemas/ResourceId'
isUsed:
description: Specifies if the token is already used.
type: boolean
default: false
readOnly: true
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
leadSource:
allOf:
- $ref: '#/components/schemas/LeadSource'
writeOnly: true
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
usageTime:
description: Date and time when the token is used.
type:
- string
- 'null'
format: date-time
readOnly: true
expirationTime:
description: Date and time when the token expired.
type:
- string
- 'null'
format: date-time
readOnly: true
_links:
$ref: '#/components/schemas/SelfLink'
KhelocardCardToken:
type: object
title: Khelocard card token
required:
- method
- billingAddress
- paymentInstrument
properties:
method:
description: Payment method of the token.
type: string
enum:
- Khelocard
paymentInstrument:
description: Token instrument details.
type: object
required:
- number
- cvv
- expYear
- expMonth
properties:
number:
description: Khelocard card number.
type: string
writeOnly: true
cvv:
description: Khelocard Card Verification Value (CVV).
type: string
writeOnly: true
last4:
description: Last 4 digits of the Khelocard card number.
type: string
readOnly: true
expMonth:
description: Khelocard card expiration month.
type: integer
expYear:
description: Khelocard card expiration year.
type: integer
billingAddress:
description: Billing address object.
$ref: '#/components/schemas/ContactObject'
id:
description: ID of the token.
readOnly: true
$ref: '#/components/schemas/ResourceId'
isUsed:
description: Specifies if the token is already used.
type: boolean
default: false
readOnly: true
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
leadSource:
allOf:
- $ref: '#/components/schemas/LeadSource'
writeOnly: true
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
usageTime:
description: Date and time when the token is used.
type:
- string
- 'null'
format: date-time
readOnly: true
expirationTime:
description: Date and time when the token expired.
type:
- string
- 'null'
format: date-time
readOnly: true
_links:
$ref: '#/components/schemas/SelfLink'
KlarnaToken:
type: object
title: Klarna token
required:
- method
- paymentInstrument
properties:
method:
description: Payment method of the token.
type: string
enum:
- Klarna
paymentInstrument:
description: Klarna instrument details required for express checkout.
type: object
required:
- klarnaAuthorizationToken
- klarnaSessionId
properties:
klarnaAuthorizationToken:
description: Klarna authorization token.
type: string
klarnaSessionId:
description: ID of the Klarna session.
type: string
billingAddress:
description: Billing address object.
oneOf:
- $ref: '#/components/schemas/ContactObject'
- type: 'null'
id:
description: ID of the token.
readOnly: true
$ref: '#/components/schemas/ResourceId'
isUsed:
description: Specifies if the token is already used.
type: boolean
default: false
readOnly: true
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
leadSource:
allOf:
- $ref: '#/components/schemas/LeadSource'
writeOnly: true
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
usageTime:
description: Date and time when the token is used.
type:
- string
- 'null'
format: date-time
readOnly: true
expirationTime:
description: Date and time when the token expired.
type:
- string
- 'null'
format: date-time
readOnly: true
_links:
$ref: '#/components/schemas/SelfLink'
AlternativePaymentToken:
type: object
title: Alternative payment token
required:
- method
- billingAddress
properties:
method:
description: Payment method of the token.
type: string
allOf:
- $ref: '#/components/schemas/AlternativePaymentMethods'
- not:
enum:
- payment-card
- paypal
- ach
- echeck
- digital-wallet
- plaid-account
- Khelocard
- Klarna
billingAddress:
description: Billing address object.
$ref: '#/components/schemas/ContactObject'
id:
description: ID of the token.
readOnly: true
$ref: '#/components/schemas/ResourceId'
isUsed:
description: Specifies if the token is already used.
type: boolean
default: false
readOnly: true
riskMetadata:
oneOf:
- $ref: '#/components/schemas/RiskMetadata'
- type: 'null'
leadSource:
allOf:
- $ref: '#/components/schemas/LeadSource'
writeOnly: true
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
usageTime:
description: Date and time when the token is used.
type:
- string
- 'null'
format: date-time
readOnly: true
expirationTime:
description: Date and time when the token expired.
type:
- string
- 'null'
format: date-time
readOnly: true
_links:
$ref: '#/components/schemas/SelfLink'
CompositeToken:
type: object
discriminator:
propertyName: method
mapping:
payment-card: '#/components/schemas/PaymentCardToken'
paypal: '#/components/schemas/PayPalToken'
ach: '#/components/schemas/BankAccountToken'
echeck: '#/components/schemas/BankAccountToken'
digital-wallet: '#/components/schemas/DigitalWalletToken'
plaid-account: '#/components/schemas/PlaidAccountToken'
Khelocard: '#/components/schemas/KhelocardCardToken'
Klarna: '#/components/schemas/KlarnaToken'
cash: '#/components/schemas/AlternativePaymentToken'
check: '#/components/schemas/AlternativePaymentToken'
AdvCash: '#/components/schemas/AlternativePaymentToken'
Alfa-click: '#/components/schemas/AlternativePaymentToken'
Alipay: '#/components/schemas/AlternativePaymentToken'
AstroPay Card: '#/components/schemas/AlternativePaymentToken'
AstroPay-GO: '#/components/schemas/AlternativePaymentToken'
BankReferenced: '#/components/schemas/AlternativePaymentToken'
bank-transfer: '#/components/schemas/AlternativePaymentToken'
bank-transfer-2: '#/components/schemas/AlternativePaymentToken'
bank-transfer-3: '#/components/schemas/AlternativePaymentToken'
bank-transfer-4: '#/components/schemas/AlternativePaymentToken'
bank-transfer-5: '#/components/schemas/AlternativePaymentToken'
bank-transfer-6: '#/components/schemas/AlternativePaymentToken'
bank-transfer-7: '#/components/schemas/AlternativePaymentToken'
bank-transfer-8: '#/components/schemas/AlternativePaymentToken'
bank-transfer-9: '#/components/schemas/AlternativePaymentToken'
Baloto: '#/components/schemas/AlternativePaymentToken'
Beeline: '#/components/schemas/AlternativePaymentToken'
Belfius-direct-net: '#/components/schemas/AlternativePaymentToken'
bitcoin: '#/components/schemas/AlternativePaymentToken'
Bizum: '#/components/schemas/AlternativePaymentToken'
Boleto: '#/components/schemas/AlternativePaymentToken'
cash-deposit: '#/components/schemas/AlternativePaymentToken'
CASHlib: '#/components/schemas/AlternativePaymentToken'
CashToCode: '#/components/schemas/AlternativePaymentToken'
China UnionPay: '#/components/schemas/AlternativePaymentToken'
Cleo: '#/components/schemas/AlternativePaymentToken'
CODVoucher: '#/components/schemas/AlternativePaymentToken'
Conekta-oxxo: '#/components/schemas/AlternativePaymentToken'
Cupon-de-pagos: '#/components/schemas/AlternativePaymentToken'
cryptocurrency: '#/components/schemas/AlternativePaymentToken'
domestic-cards: '#/components/schemas/AlternativePaymentToken'
ecoPayz: '#/components/schemas/AlternativePaymentToken'
ecoVoucher: '#/components/schemas/AlternativePaymentToken'
Efecty: '#/components/schemas/AlternativePaymentToken'
EPS: '#/components/schemas/AlternativePaymentToken'
ePay.bg: '#/components/schemas/AlternativePaymentToken'
eZeeWallet: '#/components/schemas/AlternativePaymentToken'
FasterPay: '#/components/schemas/AlternativePaymentToken'
Flexepin: '#/components/schemas/AlternativePaymentToken'
Giropay: '#/components/schemas/AlternativePaymentToken'
Gpaysafe: '#/components/schemas/AlternativePaymentToken'
Google Pay: '#/components/schemas/AlternativePaymentToken'
iDebit: '#/components/schemas/AlternativePaymentToken'
iDEAL: '#/components/schemas/AlternativePaymentToken'
ING-homepay: '#/components/schemas/AlternativePaymentToken'
INOVAPAY-pin: '#/components/schemas/AlternativePaymentToken'
INOVAPAY-wallet: '#/components/schemas/AlternativePaymentToken'
InstaDebit: '#/components/schemas/AlternativePaymentToken'
instant-bank-transfer: '#/components/schemas/AlternativePaymentToken'
InstantPayments: '#/components/schemas/AlternativePaymentToken'
Interac: '#/components/schemas/AlternativePaymentToken'
Interac-online: '#/components/schemas/AlternativePaymentToken'
Interac-eTransfer: '#/components/schemas/AlternativePaymentToken'
invoice: '#/components/schemas/AlternativePaymentToken'
iWallet: '#/components/schemas/AlternativePaymentToken'
Jeton: '#/components/schemas/AlternativePaymentToken'
jpay: '#/components/schemas/AlternativePaymentToken'
KNOT: '#/components/schemas/AlternativePaymentToken'
loonie: '#/components/schemas/AlternativePaymentToken'
Matrix: '#/components/schemas/AlternativePaymentToken'
MaxiCash: '#/components/schemas/AlternativePaymentToken'
Megafon: '#/components/schemas/AlternativePaymentToken'
MiFinity-eWallet: '#/components/schemas/AlternativePaymentToken'
miscellaneous: '#/components/schemas/AlternativePaymentToken'
Bancontact: '#/components/schemas/AlternativePaymentToken'
Bancontact-mobile: '#/components/schemas/AlternativePaymentToken'
MTS: '#/components/schemas/AlternativePaymentToken'
MuchBetter: '#/components/schemas/AlternativePaymentToken'
Multibanco: '#/components/schemas/AlternativePaymentToken'
Neosurf: '#/components/schemas/AlternativePaymentToken'
Netbanking: '#/components/schemas/AlternativePaymentToken'
Neteller: '#/components/schemas/AlternativePaymentToken'
Nordea-Solo: '#/components/schemas/AlternativePaymentToken'
OchaPay: '#/components/schemas/AlternativePaymentToken'
online-bank-transfer: '#/components/schemas/AlternativePaymentToken'
Onlineueberweisen: '#/components/schemas/AlternativePaymentToken'
oriental-wallet: '#/components/schemas/AlternativePaymentToken'
OXXO: '#/components/schemas/AlternativePaymentToken'
P24: '#/components/schemas/AlternativePaymentToken'
Pagadito: '#/components/schemas/AlternativePaymentToken'
PagoEffectivo: '#/components/schemas/AlternativePaymentToken'
Pagsmile-deposit-express: '#/components/schemas/AlternativePaymentToken'
Pagsmile-lottery: '#/components/schemas/AlternativePaymentToken'
PayCash: '#/components/schemas/AlternativePaymentToken'
Payeer: '#/components/schemas/AlternativePaymentToken'
PaymentAsia-crypto: '#/components/schemas/AlternativePaymentToken'
Paymero: '#/components/schemas/AlternativePaymentToken'
Perfect-money: '#/components/schemas/AlternativePaymentToken'
Piastrix: '#/components/schemas/AlternativePaymentToken'
PayTabs: '#/components/schemas/AlternativePaymentToken'
Paysafecard: '#/components/schemas/AlternativePaymentToken'
Paysafecash: '#/components/schemas/AlternativePaymentToken'
Pay4Fun: '#/components/schemas/AlternativePaymentToken'
Paynote: '#/components/schemas/AlternativePaymentToken'
PinPay: '#/components/schemas/AlternativePaymentToken'
phone: '#/components/schemas/AlternativePaymentToken'
PhonePe: '#/components/schemas/AlternativePaymentToken'
POLi: '#/components/schemas/AlternativePaymentToken'
PostFinance-card: '#/components/schemas/AlternativePaymentToken'
PostFinance-e-finance: '#/components/schemas/AlternativePaymentToken'
QIWI: '#/components/schemas/AlternativePaymentToken'
QPay: '#/components/schemas/AlternativePaymentToken'
QQPay: '#/components/schemas/AlternativePaymentToken'
rapyd-checkout: '#/components/schemas/AlternativePaymentToken'
Resurs: '#/components/schemas/AlternativePaymentToken'
SafetyPay: '#/components/schemas/AlternativePaymentToken'
SEPA: '#/components/schemas/AlternativePaymentToken'
Skrill: '#/components/schemas/AlternativePaymentToken'
Skrill Rapid Transfer: '#/components/schemas/AlternativePaymentToken'
SMSVoucher: '#/components/schemas/AlternativePaymentToken'
Sofort: '#/components/schemas/AlternativePaymentToken'
SparkPay: '#/components/schemas/AlternativePaymentToken'
swift-dbt: '#/components/schemas/AlternativePaymentToken'
Tele2: '#/components/schemas/AlternativePaymentToken'
Terminaly-RF: '#/components/schemas/AlternativePaymentToken'
ToditoCash-card: '#/components/schemas/AlternativePaymentToken'
Trustly: '#/components/schemas/AlternativePaymentToken'
UPayCard: '#/components/schemas/AlternativePaymentToken'
UPI: '#/components/schemas/AlternativePaymentToken'
USD-coin: '#/components/schemas/AlternativePaymentToken'
VCreditos: '#/components/schemas/AlternativePaymentToken'
VenusPoint: '#/components/schemas/AlternativePaymentToken'
voucher: '#/components/schemas/AlternativePaymentToken'
voucher-2: '#/components/schemas/AlternativePaymentToken'
voucher-3: '#/components/schemas/AlternativePaymentToken'
voucher-4: '#/components/schemas/AlternativePaymentToken'
Webmoney: '#/components/schemas/AlternativePaymentToken'
Webpay: '#/components/schemas/AlternativePaymentToken'
Webpay-2: '#/components/schemas/AlternativePaymentToken'
Webpay Card: '#/components/schemas/AlternativePaymentToken'
WeChat Pay: '#/components/schemas/AlternativePaymentToken'
XPay-P2P: '#/components/schemas/AlternativePaymentToken'
XPay-QR: '#/components/schemas/AlternativePaymentToken'
Yandex-money: '#/components/schemas/AlternativePaymentToken'
Zotapay: '#/components/schemas/AlternativePaymentToken'
Zimpler: '#/components/schemas/AlternativePaymentToken'
anyOf:
- $ref: '#/components/schemas/PaymentCardToken'
- $ref: '#/components/schemas/PayPalToken'
- $ref: '#/components/schemas/BankAccountToken'
- $ref: '#/components/schemas/DigitalWalletToken'
- $ref: '#/components/schemas/PlaidAccountToken'
- $ref: '#/components/schemas/KhelocardCardToken'
- $ref: '#/components/schemas/KlarnaToken'
- $ref: '#/components/schemas/AlternativePaymentToken'
DigitalWalletValidation:
type: object
required:
- type
discriminator:
propertyName: type
mapping:
Apple Pay: '#/components/schemas/ApplePayValidation'
properties:
type:
description: Type of digital wallet to validate.
type: string
enum:
- Apple Pay
ApplePayValidation:
description: Apple Pay session validation.
allOf:
- $ref: '#/components/schemas/DigitalWalletValidation'
- type: object
required:
- validationRequest
properties:
type:
type: string
validationRequest:
description: Validation request.
type: object
properties:
validationUrl:
type: string
description: Apple Pay SDK URL that is used to perform validation.
domainName:
type: string
description: >-
Domain where the client code, such as
[FramePay](https://docs.rebilly.com/docs/developer-docs/framepay/),
is executed.
The domain name must be registered in the Apple Pay console.
For more information, see [Register a domain for Apple
Pay](./PostDigitalWalletOnboardingApplePay).
example: www.example.com
displayName:
type: string
description: Display name of your store.
example: My Store
writeOnly: true
validationResponse:
description: Apple Pay SDK validation response.
type: object
readOnly: true
PaymentInstructionToken:
type: object
title: Payment token
required:
- token
properties:
token:
description: Token ID of the payment.
type: string
PaymentInstructionInstrument:
type: object
title: Payment instrument
required:
- paymentInstrumentId
properties:
paymentInstrumentId:
type: string
description: ID of the payment instrument.
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
PaymentInstructionMethods:
type: object
title: Payment Methods
properties:
methods:
type: array
description: >-
List of available payment methods.
Only payment methods with at least one active gateway account are
allowed.
If not specified all available payment methods are displayed.
Customer can choose any of those as well as the payment instrument
for them.
Additional steps occur via a redirect to `approvalUrl`.
items:
$ref: '#/components/schemas/PaymentMethod'
receivedBy:
description: Cash receiver's name. Available only for `cash` payment method.
type: string
reference:
description: Check reference data. Available only for `check` payment method.
type: string
PaymentInstruction:
oneOf:
- $ref: '#/components/schemas/PaymentInstructionToken'
- $ref: '#/components/schemas/PaymentInstructionInstrument'
- $ref: '#/components/schemas/PaymentInstructionMethods'
- $ref: '#/components/schemas/PaymentCardCreatePlain'
- $ref: '#/components/schemas/BankAccountCreatePlain'
TransactionQuery:
type: object
properties:
transactionId:
$ref: '#/components/schemas/TransactionId'
result:
description: Result of the transaction.
type: string
readOnly: true
enum:
- abandoned
- approved
- canceled
- declined
- unknown
status:
description: Status of the transaction.
type: string
readOnly: true
enum:
- completed
- conn-error
- disputed
- never-sent
- offsite
- partially-refunded
- pending
- refunded
- sending
- suspended
- timeout
- voided
- waiting-approval
- waiting-capture
- waiting-gateway
- waiting-refund
amount:
description: Amount of the transaction.
type: number
format: double
readOnly: true
currency:
readOnly: true
$ref: '#/components/schemas/CurrencyCode'
TransactionUpdate:
type: object
description: >-
Updates the status of a transaction to `completed` with a specified
`result` and optional currency and amount values.
required:
- result
properties:
result:
description: Result of the transaction.
type: string
enum:
- abandoned
- approved
- canceled
- declined
amount:
description: Amount of the transaction.
type: number
format: double
currency:
description: Currency of the transaction.
$ref: '#/components/schemas/CurrencyCode'
TransactionRefund:
type: object
required:
- amount
properties:
amount:
description: Amount of the refund.
type: number
format: double
description:
description: Description of the refund.
type: string
maxLength: 255
isProcessedOutside:
description: Specifies if the refund is processed outside of Rebilly.
type: boolean
default: false
TransactionTimeline:
type: object
properties:
id:
type: string
description: ID of the timeline message.
readOnly: true
maxLength: 50
example: tmln_0YV8Q9WEF5DTA8HFXS27D1G6GC
type:
description: Type of timeline message.
type: string
readOnly: true
enum:
- amount-adjusted
- blocklist-matched
- bump-offer-accepted
- bump-offer-presented
- bump-offer-rejected
- customer-redirected-offsite
- customer-returned
- dcc-offer-accepted
- dcc-offer-forced
- dcc-offer-presented
- dcc-offer-rejected
- dispute-changed
- dispute-created
- dispute-forfeited
- dispute-lost
- dispute-responded
- dispute-won
- gateway-connection-failed
- gateway-connection-timed-out
- gateway-response-received
- offsite-transaction-completed
- quickbooks-payment-created
- quickbooks-refund-receipt-created
- quickbooks-transaction-task-failed
- risk-score-changed
- timeline-comment-created
- transaction-abandoned
- transaction-amount-discrepancy-found
- transaction-approved
- transaction-canceled
- transaction-capture-delayed
- transaction-captured
- transaction-declined
- transaction-discrepancy-found
- transaction-disputed
- transaction-initiated
- transaction-payment-method-changed
- transaction-process-requested
- transaction-processed
- transaction-queried
- transaction-reconciled
- transaction-refunded
- transaction-retried
- transaction-rules-processed
- transaction-scheduled-time-changed
- transaction-timeout-resolved
- transaction-updated
- transaction-voided
- transaction-waiting-gateway
- transaction-waiting-gateway-completed
triggeredBy:
description: Specifies who, or what, triggered the timeline message.
type: string
readOnly: true
enum:
- rebilly
- app
- direct-api
message:
description: Contents of the timeline message.
type: string
extraData:
$ref: '#/components/schemas/TimelineExtraData'
occurredTime:
description: Date and time when the timeline message occurred.
readOnly: true
$ref: '#/components/schemas/ServerTimestamp'
_links:
$ref: '#/components/schemas/SelfLink'
FixedFeeFormula:
type: object
required:
- type
- currency
- amount
properties:
type:
description: Type of fee.
type: string
enum:
- fixed-fee
currency:
$ref: '#/components/schemas/CurrencyCode'
amount:
description: Amount of the fee.
type: number
format: double
example: 10
x-type: Money
Bips:
type: number
description: 'Basis points. Example: 100 bips = 1%, 1 bip = 0.01%.'
format: integer
minimum: 0
maximum: 100000
example: 100
PercentageFeeFormula:
type: object
required:
- type
- currency
- bips
properties:
type:
description: Type of fee.
type: string
enum:
- percentage
currency:
$ref: '#/components/schemas/CurrencyCode'
bips:
$ref: '#/components/schemas/Bips'
minAmount:
description: >-
Minimum fee amount.
This value is applied when the calculated fee is less than the
required minimum.
type: number
format: double
example: 10
x-type: Money
FeeFormula:
type: object
description: Formula that is used to calculate the fee.
discriminator:
propertyName: type
mapping:
fixed-fee: '#/components/schemas/FixedFeeFormula'
percentage: '#/components/schemas/PercentageFeeFormula'
anyOf:
- $ref: '#/components/schemas/FixedFeeFormula'
- $ref: '#/components/schemas/PercentageFeeFormula'
SettlementPeriod:
type: object
description: |-
Instruction for calculating the settlement time.
The settlement time and settlement period anchor are used
in conjunction with the transaction processed time,
to calculate the time in which the amount settles.
discriminator:
propertyName: method
mapping:
date-interval: '#/components/schemas/SchedulingMethodDateInterval'
immediately: '#/components/schemas/SchedulingMethodImmediately'
anyOf:
- $ref: '#/components/schemas/SchedulingMethodDateInterval'
- $ref: '#/components/schemas/SchedulingMethodImmediately'
SettlementSettings:
type: object
description: |-
Settlement settings.
Use these settings to set up settlement accounts.
required:
- settlementCurrency
- settlementPeriod
properties:
settlementCurrency:
description: Default settlement currency for all transactions.
$ref: '#/components/schemas/CurrencyCode'
settlementPeriod:
description: Default settlement period for all transactions.
$ref: '#/components/schemas/SettlementPeriod'
advancedSettings:
description: |-
Advanced settlement settings.
Use these settings to override either default settlement currency,
period, or both for the transactions matched a filter.
type: array
items:
type: object
required:
- filter
properties:
filter:
type: string
description: >-
Filter that is based on transaction properties and is used to
determine when to apply the settings.
minLength: 1
maxLength: 255
example: currency:EUR,GBP
settlementCurrency:
$ref: '#/components/schemas/CurrencyCode'
settlementPeriod:
$ref: '#/components/schemas/SettlementPeriod'
Fee:
type: object
required:
- type
- name
- formula
properties:
id:
type: string
description: ID of the fee.
readOnly: true
maxLength: 50
example: fee_01GQT145JX3XBRJ8K812Y3GRE9
type:
description: Type of fee.
type: string
enum:
- buy
- sell
name:
type: string
description: Name of the fee.
minLength: 1
maxLength: 255
example: A gateway fee
filter:
description: >-
Filter that is based on the properties of the transaction and used
to determine when to apply the fee.
minLength: 1
maxLength: 255
example: type:sale,capture;result:approved
type:
- string
- 'null'
formula:
$ref: '#/components/schemas/FeeFormula'
settlementSettings:
description: >-
Fee settlement settings.
This value overrides the gateway account financial settings of the
transaction.
oneOf:
- $ref: '#/components/schemas/SettlementSettings'
- type: 'null'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
PatchFee:
type: object
properties:
type:
description: Type of fee.
type: string
enum:
- buy
- sell
name:
type: string
description: Name of the fee.
minLength: 1
maxLength: 255
example: A gateway fee
filter:
description: >-
Filter that is based on the properties of the transaction and used
to determine when to apply the fee.
minLength: 1
maxLength: 255
example: type:sale,capture;result:approved
type:
- string
- 'null'
formula:
$ref: '#/components/schemas/FeeFormula'
settlementSettings:
description: >-
Fee settlement settings.
This value overrides the gateway account financial settings of the
transaction.
oneOf:
- $ref: '#/components/schemas/SettlementSettings'
- type: 'null'
DepositRequest:
type: object
required:
- websiteId
- customerId
- currency
properties:
id:
type: string
description: ID of the deposit request.
readOnly: true
maxLength: 50
example: dep_req_0YVJ65BSGYC3EAT58SEX8KY6J7
websiteId:
description: >-
Website ID of the deposit. This value specifies the website with
which the deposit is associated.
type: string
maxLength: 50
example: web_0YV7DE4Z26DQSA1AC92FBJ7SEG
customerId:
$ref: '#/components/schemas/CustomerId'
transactionId:
type:
- string
- 'null'
description: ID of the transaction that is used in the deposit request.
deprecated: true
readOnly: true
maxLength: 50
example: txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0
transactionIds:
type: array
description: >-
List of transaction IDs that are associated with the deposit
request.
This list includes transactions that are created from the deposit
request.
There is a maximum of one `approved` transaction in the list.
items:
type: string
maxLength: 50
status:
description: Status of the request.
type: string
readOnly: true
enum:
- created
- pending
- initiated
- attempted
- completed
- expired
x-enumDescriptions:
created: >-
Request is created, but it has not been visited by a customer.
This is a temporary state.
pending: >-
Request has been visited by a customer, but no funds have been
deposited yet. This is a temporary state.
initiated: >-
A funds deposit transaction has been initiated. This is a
temporary state.
attempted: >-
A funds deposit transaction was attempted and declined. This is a
temporary state.
completed: >-
A funds deposit transaction has been approved and completed. This
is a permanent state.
expired: >-
Request expired without an approved deposit transaction. This is a
permanent state.
currency:
$ref: '#/components/schemas/CurrencyCode'
amounts:
type: array
description: >-
List of available deposit amounts.
If `amounts` is not specified when a deposit is created, amounts are
determined from the chosen strategy.
For more information, see the [`strategyId`
property](https://www.rebilly.com/catalog/all/deposits/postdepositrequest/#!t=request&path=strategyId).
items:
type: number
format: double
minimum: 0.01
customAmount:
type:
- object
- 'null'
description: >-
Custom amount restrictions.
If this value is `null`, custom amounts are prohibited.
If `customAmount` is not specified when a deposit request is
created, amount restrictions are determined from the chosen
strategy.
For more information, see the [`strategyId`
property](https://www.rebilly.com/catalog/all/deposits/postdepositrequest/#!t=request&path=strategyId).
required:
- minimum
- multipleOf
- maximum
properties:
minimum:
description: Minimum custom amount.
type: number
format: double
minimum: 0.01
multipleOf:
description: >-
Multiple by which the custom amount increases.
For example, if `minimum` is equal to 5.30, and `multipleOf` is
0.50, the valid custom amount is 5.30, 5.80, 6.30, 6.80 and so
on until the `maximum` value is reached.
A valid custom amount must be equal to `minimum` + X *
`multipleOf`, where X is any non negative integer.
type: number
format: double
minimum: 0.01
maximum:
description: >-
Maximum custom amount. This value must be equal to `minimum` + X
* `multipleOf`, where X is any positive integer.
type: number
format: double
minimum: 0.01
redirectUrl:
description: >-
URL to redirect the customer to when a deposit is completed. The
default value is the website URL.
type: string
format: uri
expirationTime:
description: >-
Date and time at which the deposit request expires. The default
expiration time is one hour from the time the request is created.
type: string
format: date-time
propertiesSchema:
readOnly: true
description: >-
Defines properties the user can complete when they use the hosted
deposit form.
This field accepts [JSON-schema](https://json-schema.org/) drafts 4,
6, and 7.
type:
- object
- 'null'
example:
type: object
properties:
email:
type: string
max:
type: integer
minimum: 0
exclusiveMaximum: 100
required:
- email
properties:
readOnly: true
description: >-
Properties that are available for the user to complete when they use
the hosted deposit form.
Use this object to describe fields that are rendered and completed
on the hosted deposit form.
type:
- object
- 'null'
additionalProperties:
type: string
example:
email: email@example.com
max: '33'
notificationUrl:
description: >-
URL where a server-to-server POST notification is sent.
This notification is sent when the transaction result is finalized
after a timeout or an offsite interaction.
Do not interpret this notification as a confirmation,
complete a `GET` request to confirm the result of the transaction.
To ensure the request is not reattempted,
when the result is confirmed, respond with a `2xx` HTTP status code.
The following placeholders are available to use in this URI: `{id}`
and `{result}`.
These placeholders are replaced the with the transaction ID and
result accordingly.
type:
- string
- 'null'
format: uri
customFields:
description: >-
Custom fields related to the deposit request.
Custom field values are copied to created transactions if matching
custom fields (name, type) exist.
$ref: '#/components/schemas/ResourceCustomFields'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- deposit
- transactions
_embedded:
type: object
description: Embedded objects that are requested by the `expand` query parameter.
readOnly: true
properties:
customer:
type: object
website:
type: object
transactions:
type: array
maxItems: 10
description: Most recent associated transactions.
PostDepositRequest:
type: object
required:
- websiteId
- customerId
- currency
properties:
websiteId:
description: >-
Website ID of the deposit. This value specifies the website with
which the deposit is associated.
type: string
maxLength: 50
example: web_0YV7DE4Z26DQSA1AC92FBJ7SEG
customerId:
$ref: '#/components/schemas/CustomerId'
strategyId:
description: >-
ID of a strategy to be applied for this request for `amounts` and
`customAmount`.
If this field is not specified, a randomly selected strategy with a
matching `filter` value is applied for empty `amounts` and
`customAmount`.
If there is no matching strategy, the default strategy with the
following parameters is applied for empty `amounts` and
`customAmount`:
```yaml
amounts:
calculator: absolute
baseAmount: 10
increments: [10, 20]
adjustBaseToLastDeposit: true
customAmount:
minimum: 1
multipleOf: 1
maximum: 10000
```
For more information, see [Create a deposit
strategy](https://www.rebilly.com/catalog/all/deposits/postdepositstrategy).
type:
- string
- 'null'
maxLength: 50
example: dep_str_0YVJ64MAHTDPA97H8S7R5MYR1M
currency:
$ref: '#/components/schemas/CurrencyCode'
amounts:
type:
- array
- 'null'
description: >-
List of available deposit amounts.
If `amounts` is not specified when a deposit request is created,
amounts are determined from the chosen strategy.
For more information, see the [`strategyId`
property](https://www.rebilly.com/catalog/all/deposits/postdepositrequest#!t=request&path=strategyId).
items:
type: number
format: double
minimum: 0.01
amountLimits:
type:
- object
- 'null'
description: >-
Deposit amount limit information. Set optional minimum and maximum
deposit amounts. Limits override `amounts` and `customAmount`
values.
If this value is `null`, deposit amount limits are not set.
minProperties: 1
properties:
minimum:
description: Minimum deposit amount.
type:
- number
- 'null'
format: double
default: 0
minimum: 0
maximum:
description: Maximum deposit amount.
type:
- number
- 'null'
format: double
minimum: 0
customAmount:
type:
- object
- 'null'
description: >-
Custom amount restrictions.
If this value is `null`, custom amounts are prohibited.
If `customAmount` is not specified when a deposit request is
created, amount restrictions are determined from the chosen
strategy.
For more information, see the [`strategyId`
property](https://www.rebilly.com/catalog/all/deposits/postdepositrequest#!t=request&path=strategyId).
required:
- minimum
- multipleOf
- maximum
properties:
minimum:
description: Minimum custom amount.
type: number
format: double
minimum: 0.01
multipleOf:
description: >-
Multiple by which the custom amount increases.
For example, if `minimum` is equal to 5.30, and `multipleOf` is
0.50, the valid custom amount is 5.30, 5.80, 6.30, 6.80 and so
on until the `maximum` value is reached.
A valid custom amount must be equal to `minimum` + X *
`multipleOf`, where X is any non negative integer.
type: number
format: double
minimum: 0.01
maximum:
description: >-
Maximum custom amount. This value must be equal to `minimum` + X
* `multipleOf`, where X is any positive integer.
type: number
format: double
minimum: 0.01
redirectUrl:
description: >-
URL to redirect the customer to when a deposit is completed. The
default value is the website URL.
type:
- string
- 'null'
format: uri
expirationTime:
description: >-
Date and time at which the deposit request expires. The default
expiration time is one hour after the time the request is created.
type:
- string
- 'null'
format: date-time
customPropertySetId:
description: >-
ID of a custom property set to apply to the request
`propertiesSchema`.
type:
- string
- 'null'
maxLength: 50
example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
notificationUrl:
description: >-
URL where a server-to-server `POST` notification is sent.
This notification is sent when the transaction result is finalized
after a timeout or an offsite interaction.
Do not interpret this notification as a confirmation,
complete a `GET` request to confirm the result of the transaction.
To ensure the request is not reattempted,
when the result is confirmed, respond with a `2xx` HTTP status code.
The following placeholders are available to use in this URI: `{id}`
and `{result}`.
These placeholders are replaced the with the transaction ID and
result accordingly.
type:
- string
- 'null'
format: uri
DepositStrategy:
type: object
required:
- name
- amounts
- customAmount
properties:
id:
type: string
description: ID of the deposit strategy.
readOnly: true
maxLength: 50
example: dep_str_0YVJ64MAHTDPA97H8S7R5MYR1M
name:
type: string
description: Name of the strategy.
filter:
type: string
description: >-
Filter that uses deposit request properties to determine if a
deposit strategy is applicable for the request.
If this field is empty, the strategy is applicable for any request.
default: ''
example: depositRequest.currency:USD
amounts:
type: object
description: Deposit strategy amounts configuration.
required:
- calculator
- baseAmount
- increments
properties:
calculator:
type: string
description: >-
Deposit amounts calculator.
This field specifies if amounts are calculated using an absolute
or percentage calculation.
Amounts are specified in `baseAmount`, and increments are
specified in `increments`.
Example: `baseAmount: 10` and `increments: [20, 50, 100]`.
- If the calculator is set to `absolute`: the amounts displayed
to the customer are `[10, 30, 60, 110]`.
- If the calculator is set to `percent`: the amounts displayed
to the customer are `[10, 12, 15, 20]`.
enum:
- absolute
- percent
baseAmount:
type: number
format: double
minimum: 0.01
description: First amount that is displayed to customer.
increments:
type: array
description: >-
List of incremental amounts that are displayed to customer.
For more information, see the [`calculator`
property](https://www.rebilly.com/catalog/all/deposits/postdepositstrategy#!t=request&path=amounts/calculator).
items:
type: number
format: double
minimum: 0.01
adjustBaseToLastDeposit:
type: boolean
default: false
description: >-
Specifies if the base amount must be adjusted based on the last
deposit.
If this value is `true`, the `baseAmount` is changed to the last
successful deposit amount made using [Create a deposit
request](https://www.rebilly.com/catalog/all/deposits/postdepositrequest).
If the customer has no successful deposits, `baseAmount` is not
adjusted.
customAmount:
type:
- object
- 'null'
description: >-
Custom amount restrictions.
If this value is `null`, custom amounts are prohibited.
If `customAmount` is not specified when a deposit request is
created, amount restrictions are determined from the chosen
strategy.
For more information, see the [`strategyId`
property](https://www.rebilly.com/catalog/all/deposits/postdepositrequest#!t=request&path=strategyId).
required:
- minimum
- multipleOf
- maximum
properties:
minimum:
description: Minimum custom amount.
type: number
format: double
minimum: 0.01
multipleOf:
description: >-
Multiple by which the custom amount increases.
For example, if `minimum` is equal to 5.30, and `multipleOf` is
0.50, the valid custom amount is 5.30, 5.80, 6.30, 6.80 and so
on until the `maximum` value is reached.
A valid custom amount must be equal to `minimum` + X *
`multipleOf`, where X is any non negative integer.
type: number
format: double
minimum: 0.01
maximum:
description: >-
Maximum custom amount. This value must be equal to `minimum` + X
* `multipleOf`, where X is any positive integer.
type: number
format: double
minimum: 0.01
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
DepositCustomPropertySet:
type: object
required:
- name
- properties
properties:
id:
type: string
description: ID of the deposit property set.
readOnly: true
maxLength: 50
example: dep_prop_0YVJ640MB4CXVB8KXBRW3B79R9
name:
type: string
description: Name of the custom property set.
properties:
description: >-
Defines properties the user can complete when they use the hosted
deposit form.
This field accepts [JSON-schema](https://json-schema.org/) drafts 4,
6, and 7.
Accepted properties types are: `string`, `number`, `integer`,
`array`, and `enum`.
For more information, see [Configure custom hosted deposit
properties](https://www.rebilly.com/docs/dev-docs/configure-custom-hosted-deposit-properties/).
type: object
example:
type: object
properties:
email:
type: string
max:
type: integer
minimum: 0
exclusiveMaximum: 100
required:
- email
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
$ref: '#/components/schemas/SelfLink'
PayoutRequestCancellation:
description: Reason the payout request is canceled.
type:
- object
- 'null'
readOnly: true
properties:
canceledBy:
description: Specifies who initiated the cancellation.
type: string
default: customer
enum:
- merchant
- customer
description:
description: Description of the cancellation reason in free form.
type: string
maxLength: 255
PayoutRequest:
type: object
required:
- websiteId
- customerId
- currency
- amount
properties:
id:
type: string
readOnly: true
description: Unique resource ID.
maxLength: 50
example: pout_req_0YVDMDE2BMC6KBB5MX76RF6T80
websiteId:
$ref: '#/components/schemas/WebsiteId'
customerId:
description: ID of the customer who is requesting a payout.
$ref: '#/components/schemas/CustomerId'
paymentInstrumentId:
type:
- string
- 'null'
description: ID of the requested payment instrument to offer for the payout.
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
currency:
description: Currency of the payout.
$ref: '#/components/schemas/CurrencyCode'
amount:
description: Amount of the payout.
type: number
format: double
x-type: Money
availableAmount:
description: Available payout request amount that has not been allocated.
readOnly: true
type: number
format: double
x-type: Money
description:
description: Description of payout request.
type:
- string
- 'null'
status:
description: Status of the request.
type: string
readOnly: true
enum:
- pending
- instrument-selected
- partially-fulfilled
- fulfilled
- canceled
x-enumDescriptions:
pending: >-
Request is awaiting customer's selection of the payment instrument
or fulfillment.
instrument-selected: >-
Request has a selected payment instrument and is awaiting
fulfillment.
partially-fulfilled: >-
Request is partially paid out when `availableAmount` is less than
`amount`.
fulfilled: Request is fully paid out when `availableAmount` reaches zero.
canceled: Request is canceled by merchant or customer.
selectPaymentInstrumentUrl:
readOnly: true
type: string
format: uri
description: URL for the customer to select a preferred payment instrument.
allocations:
type: array
description: >-
List of credit transactions that are allocated to reduce the
available amount of a payout request.
readOnly: true
items:
type: object
properties:
transactionId:
description: >-
ID of the transaction to which the payout request is
allocated.
$ref: '#/components/schemas/TransactionId'
transactionResult:
description: Result of a transaction.
type: string
x-basic: true
readOnly: true
enum:
- abandoned
- approved
- canceled
- declined
- unknown
method:
$ref: '#/components/schemas/PaymentMethod'
gatewayName:
description: >-
Name of the payment gateway that processed, or is selected to
process, the transaction.
x-label: Gateway account
x-basic: true
$ref: '#/components/schemas/GatewayName'
paymentInstrumentId:
type: string
description: ID of the selected payment instrument for the transaction.
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
amount:
description: >-
Payout amount that is allocated from the payout request to the
credit transaction.
type: number
format: double
createdTime:
description: Date and time when a payout request is allocated.
$ref: '#/components/schemas/ServerTimestamp'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
selectedPaymentInstrumentRedirectUrl:
description: >-
URL where the customer is redirected when a payment instrument is
selected. The default value is the website URL.
Use `{{id}}` as a placeholder for the payout request ID.
type: string
format: uri
example: https://example.com/payout-request-success?id={{id}}
cancellationReason:
$ref: '#/components/schemas/PayoutRequestCancellation'
createdTime:
description: Date and time when the payout request is created.
$ref: '#/components/schemas/ServerTimestamp'
updatedTime:
description: Date and time when the payout request is updated.
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
- paymentInstrument
OrderPreview:
type: object
required:
- websiteId
- items
properties:
websiteId:
writeOnly: true
allOf:
- $ref: '#/components/schemas/WebsiteId'
items:
description: Items details.
type: array
writeOnly: true
minItems: 1
items:
type: object
required:
- planId
properties:
planId:
type: string
description: ID of the plan.
maxLength: 50
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
quantity:
description: Number of product units in the specified plan.
type: integer
billingAddress:
description: Billing address details.
writeOnly: true
oneOf:
- $ref: '#/components/schemas/ContactObject'
- type: 'null'
deliveryAddress:
description: Delivery address details.
writeOnly: true
oneOf:
- $ref: '#/components/schemas/ContactObject'
- type: 'null'
couponIds:
type: array
writeOnly: true
description: List of coupons that are applied to the order.
items:
type: string
currency:
readOnly: true
$ref: '#/components/schemas/CurrencyCode'
lineItems:
type: array
description: List of purchase items.
readOnly: true
items:
type: object
properties:
type:
description: Type of transaction.
type: string
enum:
- debit
- credit
description:
description: Description of the purchase item.
type: string
unitPrice:
description: Unit price of the purchase item.
type: number
format: double
example: 49.95
quantity:
description: Total quantity of the purchase item.
type: number
format: integer
price:
description: Total cost of the purchase item.
type: number
format: double
planId:
type: string
description: ID of the related plan.
maxLength: 50
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
productId:
type: string
description: ID of the related product.
maxLength: 50
example: prod_0YV7DES3WPC5J8JD8QTVNZBZNZ
shippingRates:
type: array
description: Available shipping rates.
readOnly: true
items:
$ref: '#/components/schemas/ShippingOption'
taxes:
type: array
description: Taxes applied to the purchase.
readOnly: true
items:
type: object
properties:
amount:
description: Amount of tax that is due.
type: number
format: double
description:
type: string
description: Description of the tax.
discounts:
type: array
description: Discounts applied to the purchase.
readOnly: true
items:
type: object
properties:
couponId:
type: string
description: ID of a coupon that is associated with the purchase.
maxLength: 50
example: cpn_0YVCNKF81GD778N4YNVGDJK558
amount:
description: Total amount of discount from the coupon.
type: number
format: double
description:
description: Description of the discount.
type: string
subtotalAmount:
description: Subtotal amount of the purchase.
type: number
format: double
readOnly: true
taxAmount:
description: Tax amount of the purchase.
type: number
format: double
readOnly: true
shippingAmount:
description: Shipping amount of the purchase.
type: number
format: double
readOnly: true
discountsAmount:
description: Total discount amount of the purchase.
type: number
format: double
readOnly: true
total:
description: Total amount of the purchase.
type: number
format: double
readOnly: true
shipping:
writeOnly: true
$ref: '#/components/schemas/Shipping'
EventType:
type: string
description: Type of Rebilly event.
readOnly: true
enum:
- account-password-reset-requested
- account-verification-requested
- aml-list-possibly-matched
- application-instance-disabled
- application-instance-enabled
- balance-transaction-settled
- coupon-application-removed
- coupon-applied
- coupon-expiration-modified
- coupon-expired
- coupon-issued
- coupon-modified
- coupon-redeemed
- coupon-redemption-canceled
- customer-created
- customer-one-time-password-requested
- customer-updated
- dispute-created
- dispute-modified
- experian-check-performed
- gateway-account-downtime-ended
- gateway-account-downtime-started
- gateway-account-limit-reached
- gateway-account-onboarding-completed
- gateway-account-onboarding-failed
- gateway-account-requested
- hard-usage-limit-reached
- invoice-issued
- invoice-modified
- invoice-paid
- invoice-partially-paid
- invoice-partially-refunded
- invoice-past-due
- invoice-past-due-reminder
- invoice-refunded
- invoice-revenue-recognized
- invoice-tax-calculation-failed
- invoice-voided
- kyc-document-accepted
- kyc-document-modified
- kyc-document-rejected
- kyc-request-fulfilled
- nsf-response-received
- order-abandon-reminder
- order-abandoned
- order-completed
- payment-card-created
- payment-card-expiration-reminder
- payment-card-expired
- payment-instrument-modified
- payout-request-created
- payout-request-modified
- quote-accepted
- quote-canceled
- quote-created
- quote-expired
- quote-issued
- quote-recalled
- quote-rejected
- quote-updated
- ready-to-pay-requested
- renewal-invoice-issued
- renewal-invoice-payment-canceled
- renewal-invoice-payment-declined
- risk-score-changed
- soft-usage-limit-reached
- subscription-activated
- subscription-canceled
- subscription-churned
- subscription-created
- subscription-downgraded
- subscription-items-changed
- subscription-modified
- subscription-pause-created
- subscription-pause-modified
- subscription-pause-revoked
- subscription-paused
- subscription-reactivated
- subscription-renewal-reminder
- subscription-renewed
- subscription-resumed
- subscription-trial-converted
- subscription-trial-end-changed
- subscription-trial-end-reminder
- subscription-upgraded
- transaction-amount-discrepancy-found
- transaction-declined
- transaction-discrepancy-found
- transaction-process-requested
- transaction-processed
- order-delinquency-reached
EddScore:
type: string
enum:
- not-found
- unlikely
- unclear
- probable
- confirmed
EddScoreDetails:
type: object
properties:
url:
type: string
format: uri
description: URL from which the score is obtained.
details:
type: string
description: Text from which the score is obtained.
Edd:
type: object
properties:
parsedScore:
type: object
properties:
occupation:
$ref: '#/components/schemas/EddScore'
arrest:
$ref: '#/components/schemas/EddScore'
bankruptcy:
$ref: '#/components/schemas/EddScore'
fraud:
$ref: '#/components/schemas/EddScore'
occupationDetails:
$ref: '#/components/schemas/EddScoreDetails'
arrestDetails:
$ref: '#/components/schemas/EddScoreDetails'
bankruptcyDetails:
$ref: '#/components/schemas/EddScoreDetails'
fraudDetails:
$ref: '#/components/schemas/EddScoreDetails'
score:
type: object
properties:
occupation:
$ref: '#/components/schemas/EddScore'
arrest:
$ref: '#/components/schemas/EddScore'
bankruptcy:
$ref: '#/components/schemas/EddScore'
fraud:
$ref: '#/components/schemas/EddScore'
nextUpdateTime:
description: Date and time in ISO 8601 format when the EDD score is updated.
type:
- string
- 'null'
format: date-time
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
EddTimeline:
type: object
properties:
id:
type: string
description: ID of the timeline message.
readOnly: true
maxLength: 50
example: tmln_0YV8Q9WEF5DTA8HFXS27D1G6GC
type:
description: Type of timeline message.
type: string
readOnly: true
enum:
- edd-search-performed
- edd-score-manually-updated
- timeline-comment-created
triggeredBy:
description: Specifies who, or what, triggered the timeline event.
type: string
readOnly: true
enum:
- rebilly
- app
- direct-api
message:
description: Detailed message description.
type: string
extraData:
$ref: '#/components/schemas/TimelineExtraData'
occurredTime:
description: Date and time when the customer timeline custom event occurs.
readOnly: true
$ref: '#/components/schemas/ServerTimestamp'
_links:
$ref: '#/components/schemas/SelfLink'
EddSearchResult:
type: object
properties:
id:
type: string
readOnly: true
description: ID of the EDD search result.
maxLength: 50
example: cus_edd_01H057XGZ62JZED3P8DWAXPAE6
type:
type: string
readOnly: true
enum:
- occupation
- arrest
- fraud
- bankruptcy
searchResultData:
type: array
readOnly: true
items:
$ref: '#/components/schemas/EddScoreDetails'
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
RiskScoreBoolean:
type:
- object
- 'null'
required:
- value
properties:
value:
type: integer
description: Value added to the risk score of the transaction.
RiskScoreBracket:
type:
- object
- 'null'
required:
- brackets
properties:
brackets:
description: >-
Risk factor values range with corresponding risk score increment
value. First matched bracket is applied.
type: array
minItems: 1
items:
type: object
required:
- start
- end
- value
properties:
start:
description: Minimal risk factor value when condition is applied.
type: integer
minimum: 0
end:
description: Maximal risk factor value when condition is applied.
type: integer
minimum: 1
value:
type: integer
description: Value added to the risk score of the transaction.
RiskScoreRules:
type: object
description: Risk score rules.
required:
- isProxy
- isVpn
- isTor
- isHosting
- hasMismatchedBillingAddressCountry
- hasMismatchedBankCountry
- hasMismatchedTimeZone
- hasMismatchedHolderName
- hasFakeName
- isHighRiskCountry
- paymentInstrumentVelocity
- declinedPaymentInstrumentVelocity
- deviceVelocity
- ipVelocity
- emailVelocity
- billingAddressVelocity
properties:
isProxy:
description: Specifies whether the customer's IP address is related to a proxy.
$ref: '#/components/schemas/RiskScoreBoolean'
isVpn:
description: Specifies whether the customer's IP address is related to a VPN.
$ref: '#/components/schemas/RiskScoreBoolean'
isTor:
description: Specifies whether the customer's IP address is related to TOR.
$ref: '#/components/schemas/RiskScoreBoolean'
isHosting:
description: Specifies whether the customer's IP address is related to hosting.
$ref: '#/components/schemas/RiskScoreBoolean'
hasMismatchedBillingAddressCountry:
description: >-
Specifies whether the customer's billing address country and geo-IP
address are not the same.
$ref: '#/components/schemas/RiskScoreBoolean'
hasMismatchedBankCountry:
description: >-
Specifies whether the customer's bank country and geo-IP address are
not the same.
$ref: '#/components/schemas/RiskScoreBoolean'
hasMismatchedTimeZone:
description: >-
Specifies whether the customer's browser time zone and the IP
address associated time zone are not the same.
$ref: '#/components/schemas/RiskScoreBoolean'
hasMismatchedHolderName:
description: >-
Specifies whether the customer's billing address name and primary
address name are not the same.
$ref: '#/components/schemas/RiskScoreBoolean'
hasFakeName:
description: Specifies whether the holder name seems fake.
$ref: '#/components/schemas/RiskScoreBoolean'
isHighRiskCountry:
description: >-
Specifies whether the geo-IP country, or the customer's billing
country, is considered a high risk country.
$ref: '#/components/schemas/RiskScoreBoolean'
paymentInstrumentVelocity:
description: >-
Number of transactions for this payment instrument, based on
fingerprint, in the last 24 hours.
$ref: '#/components/schemas/RiskScoreBracket'
declinedPaymentInstrumentVelocity:
description: >-
Number of declined transactions for this payment instrument
fingerprint in the last 24 hours.
$ref: '#/components/schemas/RiskScoreBracket'
deviceVelocity:
description: >-
Number of transactions for this device, based on fingerprint, in the
last 24 hours.
$ref: '#/components/schemas/RiskScoreBracket'
ipVelocity:
description: Number of transactions for this IP address in the last 24 hours.
$ref: '#/components/schemas/RiskScoreBracket'
emailVelocity:
description: Number of transactions for this email address in the last 24 hours.
$ref: '#/components/schemas/RiskScoreBracket'
billingAddressVelocity:
description: >-
Number of transactions for this billing address in the last 24
hours.
$ref: '#/components/schemas/RiskScoreBracket'
RiskScoreBlocklistType:
type:
- object
- 'null'
required:
- riskScoreThreshold
- ttl
properties:
riskScoreThreshold:
type: integer
description: Pass and fail threshold for the blocklist.
ttl:
type: integer
description: |-
Amount of seconds a blocklist exists before it expires.
If value for this field is `0` then blocklist record never expires.
RiskScoreBlocklist:
type: object
description: Risk score blocklist configuration.
properties:
address:
description: House number and ZIP code of the customer's address.
$ref: '#/components/schemas/RiskScoreBlocklistType'
bank-account:
description: Bank account being charged.
$ref: '#/components/schemas/RiskScoreBlocklistType'
bin:
description: Bank Identification Number (BIN) of the payment card being charged.
$ref: '#/components/schemas/RiskScoreBlocklistType'
country:
description: >-
Country where the customer is making the purchase, and of the
payment card billing address.
$ref: '#/components/schemas/RiskScoreBlocklistType'
customer-id:
description: Rebilly `customerId` of the customer making the purchase.
$ref: '#/components/schemas/RiskScoreBlocklistType'
email:
description: Email address of the customer making the purchase.
$ref: '#/components/schemas/RiskScoreBlocklistType'
email-domain:
description: Email address domain of the customer making the purchase.
$ref: '#/components/schemas/RiskScoreBlocklistType'
fingerprint:
description: >-
Fingerprint of the user's device.
A device fingerprint is a unique token that is used to identify the
user.
The device fingerprint is generated based on device attributes,
such as: hardware, software, IP address, language, browser, and
more.
$ref: '#/components/schemas/RiskScoreBlocklistType'
ip-address:
description: IP address of the customer making the purchase.
$ref: '#/components/schemas/RiskScoreBlocklistType'
payment-card:
description: Payment card number being charged.
$ref: '#/components/schemas/RiskScoreBlocklistType'
Allowlist:
type: object
description: Risk score allowlist record.
required:
- type
- value
properties:
id:
type: string
description: ID of the allowlist record.
readOnly: true
maxLength: 50
example: rsal_0YVF9605RKC62BP14NE2R7V2XT
type:
type: string
description: >-
Type of data to exclude from risk score checks.
Data types that are added to this field are excluded from risk score
checks and are not added to blocklists.
enum:
- address
- bank-account
- bin
- country
- customer-id
- email
- email-domain
- fingerprint
- ip-address
- payment-card
value:
type: string
description: Value of the allowlist record.
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
GlobalEventType:
type: string
description: Type of event.
enum:
- aml-list-possibly-matched
- application-instance-disabled
- application-instance-enabled
- balance-transaction-settled
- coupon-application-removed
- coupon-applied
- coupon-expiration-modified
- coupon-expired
- coupon-issued
- coupon-modified
- coupon-redeemed
- coupon-redemption-canceled
- credit-memo-applied
- credit-memo-created
- credit-memo-modified
- credit-memo-partially-applied
- credit-memo-voided
- customer-created
- customer-merged
- customer-one-time-password-requested
- customer-redirected-offsite
- customer-returned
- customer-updated
- data-export-completed
- dispute-created
- dispute-modified
- experian-check-performed
- gateway-account-downtime-ended
- gateway-account-downtime-started
- gateway-account-limit-reached
- gateway-account-onboarding-completed
- gateway-account-onboarding-failed
- gateway-account-requested
- hard-usage-limit-reached
- invoice-abandoned
- invoice-created
- invoice-issued
- invoice-modified
- invoice-paid
- invoice-partially-paid
- invoice-partially-refunded
- invoice-past-due
- invoice-past-due-reminder
- invoice-refunded
- invoice-reissued
- invoice-tax-calculation-failed
- invoice-voided
- kyc-document-accepted
- kyc-document-archived
- kyc-document-created
- kyc-document-modified
- kyc-document-rejected
- kyc-document-reviewed
- kyc-request-attempted
- kyc-request-failed
- kyc-request-fulfilled
- kyc-request-partially-fulfilled
- lead-source-changed
- nsf-response-received
- offsite-payment-completed
- order-abandoned
- order-completed
- payment-card-created
- payment-card-expiration-reminder
- payment-card-expired
- payment-instrument-modified
- payout-request-created
- payout-request-modified
- quote-accepted
- quote-canceled
- quote-created
- quote-expired
- quote-issued
- quote-recalled
- quote-rejected
- quote-updated
- renewal-invoice-issued
- renewal-invoice-payment-canceled
- renewal-invoice-payment-declined
- risk-score-changed
- soft-usage-limit-reached
- subscription-activated
- subscription-canceled
- subscription-churned
- subscription-downgraded
- subscription-items-changed
- subscription-modified
- subscription-pause-created
- subscription-pause-modified
- subscription-pause-revoked
- subscription-paused
- subscription-reactivated
- subscription-renewal-reminder
- subscription-renewed
- subscription-resumed
- subscription-trial-converted
- subscription-trial-end-changed
- subscription-trial-end-reminder
- subscription-trial-ended
- subscription-upgraded
- transaction-amount-discrepancy-found
- transaction-declined
- transaction-discrepancy-found
- transaction-process-requested
- transaction-processed
- transaction-reconciled
- transaction-timeout-resolved
- waiting-gateway-transaction-completed
- order-delinquency-reached
TagUntagRule:
type: object
description: Tag or untag rule.
required:
- name
- eventType
- addTags
- removeTags
properties:
id:
type: string
description: ID of the rule.
readOnly: true
maxLength: 50
example: tag_rule_0YVCEE5APAD7V84MK3P9CCJVYY
name:
description: Name of the rule.
type: string
eventType:
allOf:
- $ref: '#/components/schemas/GlobalEventType'
- not:
enum:
- application-instance-disabled
- application-instance-enabled
- balance-transaction-settled
- credit-memo-applied
- credit-memo-created
- credit-memo-modified
- credit-memo-partially-applied
- credit-memo-voided
- customer-redirected-offsite
- customer-returned
- dispute-created
- dispute-modified
- gateway-account-downtime-ended
- gateway-account-downtime-started
- gateway-account-limit-reached
- gateway-account-onboarding-completed
- gateway-account-onboarding-failed
- gateway-account-requested
- invoice-created
- invoice-modified
- invoice-past-due-reminder
- invoice-tax-calculation-failed
- nsf-response-received
- offsite-payment-completed
- order-abandon-reminder
- organization-tax-number-validated
- payment-card-created
- payment-card-expiration-reminder
- payment-instrument-modified
- renewal-invoice-payment-canceled
- risk-score-changed
- subscription-items-changed
- subscription-modified
- subscription-pause-created
- subscription-pause-modified
- subscription-pause-revoked
- subscription-renewal-reminder
- subscription-trial-converted
- subscription-trial-end-changed
- subscription-trial-end-reminder
- subscription-trial-ended
- transaction-process-requested
- transaction-reconciled
- transaction-timeout-resolved
- waiting-gateway-transaction-completed
- data-export-completed
- hard-usage-limit-reached
- soft-usage-limit-reached
filter:
description: >-
Filter that determines whether to tag or untag.
This field requires a special format.
Use `,` for multiple allowed values.
Use `;` for multiple fields.
For more information,
see [Using
filters](https://api-reference.rebilly.com/#section/Using-filter-with-collections).
type:
- string
- 'null'
addTags:
description: List of tags to add to the customer.
type: array
minItems: 0
maxItems: 1000
items:
type: string
removeTags:
description: List of tags to remove for the customer.
type: array
minItems: 0
maxItems: 1000
items:
type: string
status:
description: Status of the rule.
type: string
default: active
enum:
- active
- inactive
createdTime:
$ref: '#/components/schemas/CreatedTime'
updatedTime:
$ref: '#/components/schemas/UpdatedTime'
_links:
type: array
description: Related resource links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- self
responses:
Unauthorized:
description: Unauthorized access. Invalid credentials used.
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
Forbidden:
description: Access forbidden.
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
NotFound:
description: Resource not found.
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
ValidationError:
description: Invalid data sent.
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationError'
Conflict:
description: Conflict.
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
Customer:
description: Customer.
content:
application/json:
schema:
$ref: '#/components/schemas/Customer'
Found:
description: Resource moved.
headers:
Location:
schema:
type: string
format: uri
example: https://api.rebilly.com/example
requestBodies:
Attachment:
content:
application/json:
schema:
$ref: '#/components/schemas/Attachment'
description: Attachment resource.
required: true
Blocklist:
content:
application/json:
schema:
$ref: '#/components/schemas/Blocklist'
description: Blocklist resource.
required: true
Coupon:
content:
application/json:
schema:
$ref: '#/components/schemas/Coupon'
description: Coupon resource.
required: true
Customer:
content:
application/json:
schema:
$ref: '#/components/schemas/Customer'
description: Customer resource.
required: true
Dispute:
content:
application/json:
schema:
type: object
required:
- currency
- amount
- transactionId
- postedTime
- type
- status
- reasonCode
properties:
transactionId:
description: ID of the disputed transaction.
$ref: '#/components/schemas/TransactionId'
currency:
$ref: '#/components/schemas/CurrencyCode'
amount:
description: Dispute amount.
type: number
format: double
acquirerReferenceNumber:
description: Acquirer reference number for the dispute.
type:
- string
- 'null'
caseId:
description: Case ID of the dispute.
type:
- string
- 'null'
reasonCode:
description: >-
Code used in the chargeback that describes the reason for the
dispute.
type: string
enum:
- '0'
- '00'
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
- '9'
- '10.1'
- '10.2'
- '10.3'
- '10.4'
- '10.5'
- '11.1'
- '11.2'
- '11.3'
- '12'
- '12.1'
- '12.2'
- '12.3'
- '12.4'
- '12.5'
- '12.6'
- '12.7'
- '13.1'
- '13.2'
- '13.3'
- '13.4'
- '13.5'
- '13.6'
- '13.7'
- '13.8'
- '13.9'
- '30'
- '31'
- '34'
- '35'
- '37'
- '40'
- '41'
- '42'
- '46'
- '47'
- '49'
- '50'
- '51'
- '53'
- '54'
- '55'
- '57'
- '59'
- '60'
- '62'
- '63'
- '70'
- '71'
- '72'
- '73'
- '74'
- '75'
- '76'
- '77'
- '78'
- '79'
- '80'
- '81'
- '82'
- '83'
- '85'
- '86'
- '93'
- '98'
- '1000'
- '2700'
- '2702'
- A
- A01
- A02
- A08
- AL
- AP
- AW
- B
- C02
- C04
- C05
- C08
- C14
- C18
- C28
- C31
- C32
- CA
- CD
- CR
- DA
- DP
- DP1
- EX
- F10
- F14
- F22
- F24
- F29
- FR1
- FR4
- FR6
- IC
- IN
- IS
- LP
- M01
- M10
- M49
- 'N'
- NA
- NC
- P
- P01
- P03
- P04
- P05
- P07
- P08
- P22
- P23
- R03
- R13
- RG
- RM
- RN1
- RN2
- SV
- TF
- TNM
- UA01
- UA02
- UA03
- UA10
- UA11
- UA12
- UA18
- UA20
- UA21
- UA22
- UA23
- UA28
- UA30
- UA31
- UA32
- UA38
- UA99
- bank_cannot_process
- credit_not_processed
- customer_initiated
- debit_not_authorized
- duplicate
- fraudulent
- general
- incorrect_account_details
- insufficient_funds
- pre-chargeback-alert
- product_not_received
- product_unacceptable
- subscription_canceled
- unrecognized
type:
description: Type of dispute.
type: string
enum:
- information-request
- first-chargeback
- second-chargeback
- arbitration
- fraud
- ethoca-alert
- verifi-alert
- bank-return
status:
description: Status of the dispute.
type: string
enum:
- response-needed
- under-review
- forfeited
- won
- lost
- unknown
postedTime:
description: Date and time when the dispute is posted.
type: string
format: date-time
deadlineTime:
description: >-
Latest date and time by when a merchant must submit a
representment for a dispute.
If the deadline is missed, the merchant loses the dispute.
type:
- string
- 'null'
format: date-time
description: Dispute resource.
required: true
Invoice:
content:
application/json:
schema:
$ref: '#/components/schemas/Invoice'
description: Invoice resource.
required: true
PatchKycRequest:
content:
application/json:
schema:
allOf:
- properties:
customerId:
readOnly: true
- $ref: '#/components/schemas/KycRequest'
PostPaymentInstrument:
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/PaymentInstrumentCreateToken'
- $ref: '#/components/schemas/PaymentCardCreatePlain'
- $ref: '#/components/schemas/BankAccountCreatePlain'
- $ref: '#/components/schemas/PayPalAccount'
- $ref: '#/components/schemas/AlternativeInstrument'
description: PaymentInstrument resource.
required: true
PatchPaymentInstrument:
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/PaymentInstrumentUpdateToken'
- $ref: '#/components/schemas/PaymentCardUpdatePlain'
- $ref: '#/components/schemas/BankAccountUpdatePlain'
description: PaymentInstrument resource.
required: true
Product:
content:
application/json:
schema:
$ref: '#/components/schemas/Product'
description: Product resource.
required: true
Subscription:
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionOrOneTimeSale'
description: Order resource.
required: true
SubscriptionCancellation:
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionCancellation'
description: Cancellation resource.
required: true
Tag:
content:
application/json:
schema:
$ref: '#/components/schemas/Tag'
description: Tag resource.
required: true
UpdateTag:
content:
application/json:
schema:
required:
- name
properties:
name:
description: |-
Unique name for the tag.
Tag names are not case-sensitive.
type: string
maxLength: 255
pattern: ^[@~\-\.\w\s]+$
example: New
description: Tag resource.
required: true
TransactionRequest:
content:
application/json:
schema:
required:
- type
- websiteId
- customerId
- currency
- amount
type: object
properties:
upsertCustomer:
type: boolean
default: false
writeOnly: true
description: >-
Specifies whether to create or update (upsert) a customer.
If this value is `true`, the operation creates or updates
(upserts) a customer.
If this value is `false`, the `customerId` already exists, and
the related customer is not updated.
type:
description: >-
Type of transaction.
This field supports a limited subset of transaction types.
To refund or void, see [Refund a
transaction](../PostTransactionRefund).
To `capture`, use the `sale` type.
If any existing `authorize` transactions are eligible,
they are captured and the `sale` converts to a `capture` type.
The `setup` type sets up the payment instrument by following
the `setupInstruction` in the selected gateway account.
If the instruction is to `do-nothing`, a transaction with
result `approved` of type `setup` returns.
type: string
enum:
- sale
- authorize
- setup
limits:
$ref: '#/components/schemas/TransactionLimitAmount'
websiteId:
$ref: '#/components/schemas/WebsiteId'
customerId:
$ref: '#/components/schemas/CustomerId'
currency:
$ref: '#/components/schemas/CurrencyCode'
amount:
description: Amount of the transaction.
type: number
format: double
example: 97.97
invoiceIds:
description: Array of invoice IDs.
type:
- array
- 'null'
items:
$ref: '#/components/schemas/ResourceId'
paymentInstruction:
description: |-
Payment instruction for the purchase.
If this value is not supplied,
the customer's default payment instrument is used.
$ref: '#/components/schemas/PaymentInstruction'
billingAddress:
description: >-
Billing address.
If this value is not supplied,
the billing address associated with the payment instrument is
used.
If no billing address is associated with the payment
instrument,
the customer's billing address is used.
oneOf:
- $ref: '#/components/schemas/ContactObject'
- type: 'null'
requestId:
description: >-
Use this field to prevent duplicate transaction requests that
may occur within a short period of time.
If a duplicate request is sent with the same `requestId`,
it is ignored to prevent double-billing.
This value must be unique within a 24-hour period.
> **Important:** This field is recommended.
type:
- string
- 'null'
maxLength: 50
pattern: ^[\-\w]+$
example: 44433322-2c4y-483z-a0a9-158621f77a21
gatewayAccountId:
description: >-
ID of the gateway account.
Rebilly selects the payment gateway account for the
transaction based on transaction properties and the rules
configuration of the `gateway-account-requested` event.
To prevent Rebilly from making the gateway account selection,
supply a gateway account ID in this field.
Only use this field if you intend to override the settings.
type:
- string
- 'null'
maxLength: 50
example: gw_acc_0YVCXMF26DDNKAERE5NW727S34
description:
type:
- string
- 'null'
description: Payment description.
maxLength: 255
notificationUrl:
description: >-
URL where a server-to-server `POST` notification is sent.
This notification is sent when the transaction result is
finalized after a timeout or an offsite interaction.
Do not interpret this notification as a confirmation,
complete a `GET` request to confirm the result of the
transaction.
To ensure the request is not reattempted,
when the result is confirmed, respond with a `2xx` HTTP status
code.
The following placeholders are available to use in this URI:
`{id}` and `{result}`.
These placeholders are replaced the with the transaction ID
and result accordingly.
type:
- string
- 'null'
format: uri
redirectUrl:
type:
- string
- 'null'
description: >-
URL to redirect the end-user when an offsite transaction is
completed.
Defaults to the configured URL of the website.
You may use `{id}` or `{result}` as placeholders in the URL,
these are replaced the with the transaction ID and result
accordingly.
format: uri
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
riskMetadata:
$ref: '#/components/schemas/RiskMetadata'
isProcessedOutside:
description: Specifies when the transaction is processed outside Rebilly.
type: boolean
default: false
isMerchantInitiated:
description: Specifies when the transaction is initiated by the merchant.
type: boolean
default: false
processedTime:
type: string
description: >-
Time the transaction is processed.
This field is only specified if the transaction is processed
outside Rebilly.
format: date-time
description: Transaction resource.
required: true
PatchTransactionRequest:
content:
application/json:
schema:
type: object
title: Patch transaction request
properties:
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
description: Use the patch transaction request to modify custom fields.
required: true
CreditTransactionRequest:
content:
application/json:
schema:
type: object
required:
- websiteId
- customerId
- currency
- amount
properties:
websiteId:
$ref: '#/components/schemas/WebsiteId'
customerId:
$ref: '#/components/schemas/CustomerId'
currency:
$ref: '#/components/schemas/CurrencyCode'
amount:
description: Amount of the transaction.
type: number
format: double
example: 97.97
invoiceIds:
description: Array of invoice IDs.
type:
- array
- 'null'
items:
$ref: '#/components/schemas/ResourceId'
paymentInstruction:
description: |-
Payment instruction for the purchase.
If this value is not supplied,
the customer's default payment instrument is used.
$ref: '#/components/schemas/PaymentInstruction'
billingAddress:
description: >-
Billing address.
If this value is not supplied,
the billing address associated with the payment instrument is
used.
If no billing address is associated with the payment
instrument,
the customer's billing address is used.
oneOf:
- $ref: '#/components/schemas/ContactObject'
- type: 'null'
requestId:
description: >-
Use this field to prevent duplicate transaction requests that
may occur within a short period of time.
If a duplicate request is sent with the same `requestId`,
it is ignored to prevent double-billing.
This value must be unique within a 24-hour period.
> **Important:** This field is recommended.
type:
- string
- 'null'
maxLength: 50
pattern: ^[\-\w]+$
example: 44433322-2c4y-483z-a0a9-158621f77a21
gatewayAccountId:
description: >-
ID of the gateway account.
Rebilly selects the payment gateway account for the
transaction based on transaction properties and the rules
configuration of the `gateway-account-requested` event.
To prevent Rebilly from making the gateway account selection,
supply a gateway account ID in this field.
Only use this field if you intend to override the settings.
type:
- string
- 'null'
maxLength: 50
example: gw_acc_0YVCXMF26DDNKAERE5NW727S34
description:
type:
- string
- 'null'
description: Payment description.
maxLength: 255
notificationUrl:
description: >-
URL where a server-to-server `POST` notification is sent.
This notification is sent when the transaction result is
finalized after a timeout or an offsite interaction.
Do not interpret this notification as a confirmation,
complete a `GET` request to confirm the result of the
transaction.
To ensure the request is not reattempted,
when the result is confirmed, respond with a `2xx` HTTP status
code.
The following placeholders are available to use in this URI:
`{id}` and `{result}`.
These placeholders are replaced the with the transaction ID
and result accordingly.
type:
- string
- 'null'
format: uri
redirectUrl:
type:
- string
- 'null'
description: >-
URL to redirect the end-user when an offsite transaction is
completed.
Defaults to the configured URL of the website.
You may use `{id}` or `{result}` as placeholders in the URL,
these are replaced the with the transaction ID and result
accordingly.
format: uri
customFields:
$ref: '#/components/schemas/ResourceCustomFields'
riskMetadata:
$ref: '#/components/schemas/RiskMetadata'
isProcessedOutside:
description: Specifies when the transaction is processed outside Rebilly.
type: boolean
default: false
isMerchantInitiated:
description: Specifies when the transaction is initiated by the merchant.
type: boolean
default: false
processedTime:
type: string
description: >-
Time the transaction is processed.
This field is only specified if the transaction is processed
outside Rebilly.
format: date-time
payoutRequestId:
description: >-
ID of the payout request for which the transaction is fully
allocated.
writeOnly: true
type: string
maxLength: 50
description: Transaction resource.
required: true
CustomerWebhook:
content:
application/json:
schema:
properties:
customerId:
$ref: '#/components/schemas/CustomerId'
eventType:
type: string
description: Type of webhook event.
enum:
- aml-list-possibly-matched
- customer-created
- customer-merged
- customer-one-time-password-requested
- customer-redirected-offsite
- customer-returned
- customer-updated
_embedded:
type: object
description: Embedded objects.
properties:
customer:
$ref: '#/components/schemas/Customer'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- customer
description: Customer webhook request body resource.
CouponRedemptionWebhook:
content:
application/json:
schema:
properties:
couponId:
description: ID of the coupon.
type: string
redemptionId:
description: ID of the redemption.
type: string
customerId:
description: ID of the customer.
type: string
eventType:
type: string
description: Type of webhook event.
enum:
- coupon-application-removed
- coupon-applied
- coupon-redeemed
- coupon-redemption-canceled
_embedded:
type: object
description: Embedded objects.
properties:
coupon:
$ref: '#/components/schemas/Coupon'
redemption:
$ref: '#/components/schemas/CouponRedemption'
customer:
$ref: '#/components/schemas/Customer'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- coupon
- redemption
- customer
description: Coupon redemption webhook request body resource.
CouponWebhook:
content:
application/json:
schema:
properties:
couponId:
description: ID of the coupon.
type: string
eventType:
type: string
description: Type of webhook event.
enum:
- coupon-expiration-modified
- coupon-expired
- coupon-issued
- coupon-modified
_embedded:
type: object
description: Embedded objects.
properties:
coupon:
$ref: '#/components/schemas/Coupon'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- coupon
description: Coupon webhook request body resource.
CreditMemoWebhook:
content:
application/json:
schema:
properties:
creditMemoId:
type: string
description: ID of the credit memo.
maxLength: 50
example: crmm_0YVCNN22TWC3G8H82QNPNVZCHG
eventType:
type: string
description: Rebilly webhooks event type.
enum:
- credit-memo-applied
- credit-memo-created
- credit-memo-modified
- credit-memo-partially-applied
- credit-memo-voided
_embedded:
type: object
description: Embedded objects.
properties:
creditMemo:
$ref: '#/components/schemas/CreditMemo'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- creditMemo
description: Credit memo webhook request body resource.
MergedCustomer:
content:
application/json:
schema:
properties:
targetCustomerId:
description: ID of the customer that contains the merged data.
type: string
maxLength: 50
example: cus_0YV7DDSDD1C8DA64KHH2W33CPF
eventType:
type: string
description: Type of webhook event.
enum:
- customer-merged
duplicatedCustomer:
$ref: '#/components/schemas/Customer'
_embedded:
type: object
description: Customer object.
properties:
targetCustomer:
$ref: '#/components/schemas/Customer'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- customer
description: Merged customer webhook request body resource.
CustomerRedirect:
content:
application/json:
schema:
properties:
transactionId:
$ref: '#/components/schemas/TransactionId'
redirectUrl:
description: URL customer redirected to.
type: string
format: url
ipAddress:
description: Customer's IP address.
type: string
httpHeaders:
description: Customer's browser HTTP headers.
type: object
additionalProperties:
type: string
example:
Content-Type: application/json
Accept: >-
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
eventType:
description: Rebilly webhooks event type.
type: string
enum:
- customer-redirected-offsite
- customer-returned
_embedded:
type: object
description: Embedded objects.
properties:
transaction:
$ref: '#/components/schemas/Transaction'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- transaction
description: Customer redirect webhook request body resource.
DisputeWebhook:
content:
application/json:
schema:
properties:
disputeId:
type: string
description: ID of the dispute.
maxLength: 50
example: dp_0YVCE8J5F2DE58FV0S8YASW4HK
transactionId:
type:
- string
- 'null'
description: ID of the transaction.
maxLength: 50
example: txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0
eventType:
type: string
description: Type of webhook event.
enum:
- dispute-created
- dispute-modified
_embedded:
type: object
description: Embedded objects.
properties:
dispute:
$ref: '#/components/schemas/Dispute'
transaction:
oneOf:
- $ref: '#/components/schemas/Transaction'
- type: 'null'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- dispute
- transaction
description: Dispute webhook request body resource.
ExperianCheckPerformed:
content:
application/json:
schema:
properties:
customerId:
$ref: '#/components/schemas/CustomerId'
outcome:
description: >-
Check decision where `1` - record matches, `0` - no matches
found, `-1` - record mismatches.
type: integer
enum:
- -1
- 0
- 1
example: 1
reason:
description: Text representation of the outcome.
type: string
example: >-
Individual has a 90 percent or greater match to forename
surname premise postcode with ID verified and DOB
errorCode:
description: Error code produced by the Experian system.
type: string
example: '001'
errorMessage:
description: Error message produced by the Experian system.
type: string
example: 'Authentication Error: Bad Username or Password'
eventType:
type: string
description: Type of webhook event.
enum:
- experian-check-performed
_embedded:
type: object
description: Embedded object.
properties:
customer:
$ref: '#/components/schemas/Customer'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- customer
description: Experian check performed webhook request body resource.
UsageLimitWebhook:
content:
application/json:
schema:
properties:
subscriptionId:
type: string
description: ID of the order.
example: sub_01HRF27SATGE4Z6PBJE6PD8328
subscriptionItemId:
type: string
description: ID of the subscription item.
example: sub_01HW2V1Y3A6QPM1NX4WCYHFSRS
planId:
type: string
description: ID of the plan.
example: plan_01GYJPRKHBD6ZYHH897QCJMBS4
usageQuantity:
type: integer
description: Reported usage quantity.
usageAmount:
type: number
format: double
description: Reported usage amount.
currency:
type: string
description: Currency of the reported usage amount.
eventType:
type: string
description: Type of webhook event.
enum:
- soft-usage-limit-reached
- hard-usage-limit-reached
_embedded:
type: object
description: Embedded objects.
properties:
subscription:
$ref: '#/components/schemas/SubscriptionOrOneTimeSale'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- subscription
description: Request body resource of the usage limit webhook.
InvoiceTaxCalculationFailed:
content:
application/json:
schema:
properties:
invoiceId:
type: string
description: ID of the invoice.
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
reason:
description: Error message explaining tax calculation failure.
type: string
eventType:
type: string
description: Type of webhook event.
enum:
- invoice-tax-calculation-failed
_embedded:
type: object
description: Invoice object.
properties:
invoice:
$ref: '#/components/schemas/Invoice'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- invoice
description: Invoice tax validation failed webhook request body resource.
TransactionWebhook:
content:
application/json:
schema:
properties:
transactionId:
$ref: '#/components/schemas/TransactionId'
eventType:
type: string
description: Type of webhook event.
enum:
- gateway-account-requested
- nsf-response-received
- offsite-payment-completed
- risk-score-changed
- transaction-amount-discrepancy-found
- transaction-declined
- transaction-discrepancy-found
- transaction-process-requested
- transaction-processed
- transaction-timeout-resolved
- waiting-gateway-transaction-completed
_embedded:
type: object
description: Embedded objects.
properties:
transaction:
$ref: '#/components/schemas/Transaction'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- transaction
description: Transaction webhook request body resource.
InvoiceWebhook:
content:
application/json:
schema:
properties:
invoiceId:
type: string
description: ID of the invoice.
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
eventType:
type: string
description: Type of webhook event.
enum:
- invoice-abandoned
- invoice-created
- invoice-issued
- invoice-modified
- invoice-paid
- invoice-partially-paid
- invoice-partially-refunded
- invoice-past-due
- invoice-past-due-reminder
- invoice-refunded
- invoice-reissued
- invoice-tax-calculation-failed
- invoice-voided
_embedded:
type: object
description: >-
Available embedded objects that are requested by the expand
query parameter.
properties:
invoice:
$ref: '#/components/schemas/Invoice'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- invoice
description: Invoice webhook request body resource.
KycDocumentWebhook:
content:
application/json:
schema:
properties:
customerId:
$ref: '#/components/schemas/CustomerId'
kycDocumentId:
type: string
description: ID of the KYC document.
maxLength: 50
example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
fileId:
type: string
description: ID of the file.
maxLength: 50
example: file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N
eventType:
type: string
description: Type of webhook event.
enum:
- kyc-document-accepted
- kyc-document-created
- kyc-document-modified
- kyc-document-rejected
- kyc-document-reviewed
- kyc-document-archived
_embedded:
type: object
description: Customer and KYC document data.
properties:
customer:
$ref: '#/components/schemas/Customer'
kycDocument:
$ref: '#/components/schemas/KycDocument'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- customer
- file
- kycDocument
description: KYC document webhook request body resource.
KycRequestWebhook:
content:
application/json:
schema:
properties:
customerId:
$ref: '#/components/schemas/CustomerId'
kycRequestId:
type: string
description: ID of the KYC request.
maxLength: 50
example: kyc_req_0YV7JMJ3DBCGRBR7K9D4HVGPP5
eventType:
type: string
description: Rebilly webhooks event type.
enum:
- kyc-request-attempted
- kyc-request-failed
- kyc-request-fulfilled
- kyc-request-partially-fulfilled
_embedded:
type: object
description: Customer and KYC request data.
properties:
customer:
$ref: '#/components/schemas/Customer'
kycRequest:
$ref: '#/components/schemas/KycRequest'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- customer
- kycRequest
description: KYC request webhook body resource.
SubscriptionWebhook:
content:
application/json:
schema:
properties:
subscriptionId:
type: string
description: ID of the order.
example: sub_01HRF27SATGE4Z6PBJE6PD8328
eventType:
type: string
description: Type of webhook event.
enum:
- order-completed
- order-abandoned
- subscription-activated
- subscription-canceled
- subscription-churned
- subscription-downgraded
- subscription-modified
- subscription-reactivated
- subscription-renewal-reminder
- subscription-renewed
- subscription-trial-converted
- subscription-trial-end-changed
- subscription-trial-end-reminder
- subscription-trial-ended
- subscription-upgraded
- order-delinquency-reached
- subscription-items-changed
_embedded:
type: object
description: Embedded objects.
properties:
subscription:
$ref: '#/components/schemas/SubscriptionOrOneTimeSale'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- subscription
description: Order webhook request body resource.
PaymentCardWebhook:
content:
application/json:
schema:
properties:
paymentCardId:
description: ID of the payment instrument.
type: string
eventType:
type: string
description: Type of webhook event.
enum:
- payment-card-created
- payment-card-expiration-reminder
- payment-card-expired
_embedded:
type: object
description: Embedded objects.
properties:
paymentCard:
$ref: '#/components/schemas/PaymentCard'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- paymentCard
description: Payment card webhook request body resource.
PaymentInstrumentWebhook:
content:
application/json:
schema:
properties:
paymentInstrumentId:
type: string
description: ID of the payment instrument.
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
eventType:
type: string
description: Type of webhook event.
enum:
- payment-instrument-modified
_embedded:
type: object
properties:
paymentInstrument:
$ref: '#/components/schemas/PaymentInstrument'
_links:
type: array
description: Related links.
readOnly: true
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- paymentInstrument
description: Payment instrument webhook request body resource.
PayoutRequestWebhook:
content:
application/json:
schema:
properties:
payoutRequestId:
description: ID of the payout request.
type: string
eventType:
type: string
description: Type of webhook event.
enum:
- payout-request-created
- payout-request-modified
- payout-request-canceled
_embedded:
type: object
description: Embedded objects.
properties:
payoutRequest:
$ref: '#/components/schemas/PayoutRequest'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- payoutRequest
description: Payout request webhook request body resource.
QuoteWebhook:
content:
application/json:
schema:
properties:
quoteId:
type: string
description: ID of the quote.
example: qt_01GYJPRKHBD6ZYHH897QCJMBS4
eventType:
type: string
description: Type of webhook event.
enum:
- quote-accepted
- quote-canceled
- quote-created
- quote-expired
- quote-issued
- quote-recalled
- quote-rejected
- quote-updated
_embedded:
type: object
description: Embedded objects.
properties:
quote:
$ref: '#/components/schemas/Quote'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- quote
description: Quote webhook request body resource.
RenewalInvoiceIssued:
content:
application/json:
schema:
properties:
subscriptionId:
type: string
description: ID of the order.
example: sub_01HRF27SATGE4Z6PBJE6PD8328
invoiceId:
type: string
description: ID of the invoice.
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
eventType:
type: string
description: Type of webhook event.
enum:
- renewal-invoice-issued
_embedded:
type: object
description: Embedded objects.
properties:
subscription:
$ref: '#/components/schemas/SubscriptionOrOneTimeSale'
invoice:
$ref: '#/components/schemas/Invoice'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- subscription
- invoice
description: Renewal invoice issued webhook request body resource.
InvoiceAndTransaction:
content:
application/json:
schema:
properties:
transactionId:
$ref: '#/components/schemas/TransactionId'
invoiceId:
type: string
description: ID of the invoice.
maxLength: 50
example: in_0YVF9605RKC62BP14NE2R7V2XT
eventType:
type: string
description: Type of webhook event.
enum:
- renewal-invoice-payment-canceled
- renewal-invoice-payment-declined
_embedded:
type: object
description: Embedded objects.
properties:
transaction:
$ref: '#/components/schemas/Transaction'
invoice:
$ref: '#/components/schemas/Invoice'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- transaction
- invoice
description: Invoice and Transaction webhook request body resource.
SubscriptionAndSubscriptionPause:
content:
application/json:
schema:
properties:
subscriptionId:
type: string
description: ID of the order.
example: sub_01HRF27SATGE4Z6PBJE6PD8328
subscriptionPauseId:
type: string
description: ID of the subscription pause.
example: sub_pau_01H085J3ZR1WKD120D73D7N4C9
eventType:
type: string
description: Type of webhook event.
enum:
- subscription-pause-created
- subscription-pause-modified
- subscription-pause-revoked
- subscription-paused
- subscription-resumed
_embedded:
type: object
description: Embedded objects.
properties:
subscription:
$ref: '#/components/schemas/SubscriptionOrOneTimeSale'
pause:
$ref: '#/components/schemas/SubscriptionPause'
_links:
type: array
description: Related links.
items:
type: object
properties:
href:
description: Link URL.
type: string
rel:
description: Type of link.
type: string
enum:
- subscription
- pause
description: Subscription pause and order webhook request body resource.
examples:
stripe-trx-request:
summary: Stripe transaction fees
description: Transaction fees for Stripe. Discount rate fees are a separate record.
value:
type: buy
name: Stripe transaction fees
filter: type:sale,capture;result:approved;gatewayAccountId:stripe
formula:
type: fixed-fee
currency: USD
amount: 0.3
stripe-us-request:
summary: Stripe US fees
description: >-
Fees for Stripe in the US. Fees for outside of the US are a different
fee record.
value:
type: buy
name: Stripe US fees
filter: >-
type:sale,capture;result:approved;billingAddress.country:US;gatewayAccountId:stripe
formula:
type: percentage
currency: USD
bips: 290
stripe-intl-request:
summary: Stripe international fees
description: Fees for Stripe outside of the US.
value:
type: buy
name: Stripe international fees
filter: >-
type:sale,capture;result:approved;billingAddress.country:!US;gatewayAccountId:stripe
formula:
type: percentage
currency: USD
bips: 390
stripe-trx-response:
summary: Stripe transaction fees
description: Stripe transaction fees. Discount rate fees are a separate record.
value:
id: fee_01GQT145JX3XBRJ8K812Y3GRE9
type: buy
name: Stripe transaction fees
filter: type:sale,capture;result:approved;gatewayAccountId:stripe
formula:
type: fixed-fee
currency: USD
amount: 0.3
createdTime: '2021-12-15T14:15:22Z'
updatedTime: '2021-12-15T14:15:22Z'
_links:
- rel: self
href: >-
https://api-sandbox.rebilly.com/fees/fee_01GQT145JX3XBRJ8K812Y3GRE9
stripe-us-response:
summary: Stripe US fees
description: >-
Stripe transaction fees for the US. Fees for outside of the US are a
different fee record.
value:
id: fee_01GQT145JX3XBRJ8K812Y3GRE9
type: buy
name: Stripe US fees
filter: >-
type:sale,capture;result:approved;billingAddress.country:US;gatewayAccountId:stripe
formula:
type: percentage
currency: USD
bips: 290
createdTime: '2021-12-15T14:15:22Z'
updatedTime: '2021-12-15T14:15:22Z'
_links:
- rel: self
href: >-
https://api-sandbox.rebilly.com/fees/fee_01GQT145JX3XBRJ8K812Y3GRE9
stripe-intl-response:
summary: Stripe international fees
description: Stripe transaction fees for outside of the US.
value:
id: fee_01GQT145JX3XBRJ8K812Y3GRE9
type: buy
name: Stripe international fees
filter: >-
type:sale,capture;result:approved;billingAddress.country:!US;gatewayAccountId:stripe
formula:
type: percentage
currency: USD
bips: 390
createdTime: '2021-12-15T14:15:22Z'
updatedTime: '2021-12-15T14:15:22Z'
_links:
- rel: self
href: >-
https://api-sandbox.rebilly.com/fees/fee_01GQT145JX3XBRJ8K812Y3GRE9
tags:
- name: Allowlists
description: >-
Use allowlists to exclude specific customer attribute data from risk score
checks.
Allowlists are lists of data that are excluded from risk score checks.
Allowlists prevent specific data from being added to a [blocklist
record](https://www.rebilly.com/docs/automations/blocklists/) when a [risk
score](https://www.rebilly.com/docs/automations/risk-scoring/) threshold
reached.
- name: AML
description: >-
Use Anti-Money Laundering (AML) operations to screen customers and help
prevent your business from becoming directly or indirectly involved in
criminal activity.
Use AML operations during customer creation, and some transaction
processing,
to help determine if a potential customer (lead), or customer, has
political or economic sanctions against them.
AML operations search the following for screening purposes:
Politically Exposed Persons (PEPs) lists, sanction lists,
and adverse media lists.
- name: API keys
description: >-
Use API keys to identify and authenticate applications and users.
Always keep your API keys private.
When creating API keys, you can restrict them to a given set of
permissions.
For information on how to create and manage API keys, see [API
keys](https://www.rebilly.com/docs/dev-docs/api-keys/).
- name: Application owners
description: >-
Use these operations to register applications to the Rebilly Apps Store
and manage application instances.
An application owner is a person or organization that has submitted an app
to the Rebilly App Store.
For more information, see [Submit an
app](https://www.rebilly.com/docs/dev-docs/submit-a-rebilly-app/).
- name: Application users
description: >-
Use these operations to install or uninstall apps from the Rebilly App
Store to your Rebilly account, and to manage application instances.
An application user is a person or organization that uses an app that is
installed from the Rebilly App Store.
For more information, see [Install or uninstall an
app](https://www.rebilly.com/docs/dev-docs/install-an-app/).
- name: Balance transactions
description: |-
Use these operations to view and manage balance transactions.
> **Important:** These operations are experimental and may change.
- name: Billing portals
description: >-
Use these operations to create and manage billing portals.
Rebilly hosted billing portals provide secure, Rebilly hosted pages, where
customers can:
view invoices, cancel subscriptions, update payment instruments, and
update their address.
- name: Blocklists
description: >-
Use blocklists to prevent fraud and criminal activity.
Blocklists are lists of customer attribute values that are blocked from
buying from you.
For example, if a customer attempts to make a purchase from you with a
credit card that is in a blocklist, the transaction is blocked and is not
processed.
Before a new transaction is processed in Rebilly, blocklists are examined
to check for attributes related to the entity.
If a match is detected, the operation is aborted.
A blocklist that expires after a period of time is called a greylist.
- name: Broadcast messages
description: >-
Use broadcast messages to notify customers and leads about upcoming
promotions, service updates, and events.
Broadcast messages are emails that are sent to a specific group of
customers, or all customers.
For more information, see [Create a broadcast
message](https://www.rebilly.com/docs/automations/email-notifications/#create-a-broadcast-messages).
- name: Checkout forms
description: >-
Use these operations to create and manage checkout forms.
Rebilly hosted checkout forms provide secure and compliant checkouts.
Checkout forms are customizable, and use fully responsive design,
built-in error messaging, validation, and expedited checkout for returning
customers.
- name: Coupons
description: >-
Use coupons to reward customers, generate sales, or to test new pricing
strategies.
Coupons enable you to apply different types of discounts to invoices,
subscriptions, and pricing plans.
Redeemed coupons are attached to a customer's account.
Depending on the coupon restrictions, the redeemed coupons are then
applied from the customer's account to subsequent invoices or
subscriptions.
Redeemed coupons can only be applied to invoices of the same currency.
Once a coupon is redeemed it cannot be modified.
You may deactivate a coupon or create a new coupon, but you cannot reuse
the same coupon code.
If you have a use case where you must reuse the same code, [contact
Rebilly](https://www.rebilly.com/contact/).
### Coupon restriction types
The following coupon description types are available:
- `restrict-to-countries`: Restricts a coupon for use in specific
countries.
- `discounts-per-redemption`: Restricts the number of times that the
coupon can be applied by one redemption.
For example, use this restriction to configure a coupon that can only be applied to the first subscription renewal of a particular product.
- `minimum-order-amount`: Sets a minimum order amount for a coupon
application.
For example, if the restriction amount is $20, the coupon is only applied to invoices with a total amount of $20 or more.
- `restrict-to-invoices`: Restricts a coupon to specific invoices.
- `restrict-to-plans`: Restricts a coupon to specific pricing plans.
- `restrict-to-subscriptions`: Restricts a coupon to specific order
subscriptions.
- `restrict-to-customer-tags`: Restricts a coupon to customers with
specific tags.
- `restrict-to-customers`: Restricts a coupon to specific customers.
- `restrict-to-exclusive-application`: Restricts a coupon so that it
cannot be used in combination with other coupons. If more than one coupon
is active, a coupon with this restriction is only applied if it provides a
larger discount than the other coupons combined. If a coupon with this
restriction is applied, all other coupons are removed.
- `restrict-to-products`: Restricts a coupon to specific products.
- `paid-by-time`: Specifies a date and time at which a coupon redemption
expires if not paid.
- `redemptions-per-customer`: Restricts the number of times that a coupon
can be redeemed by one customer.
For example, use this restriction to limit the number of redemptions to one per customer.
- `total-redemptions`: Restricts the number of times a coupon can be
redeemed by different customers.
- `restrict-to-bxgy`: Provides "buy X get Y" promotions.
These promotions incentivize new customers to buy and also reward existing customers.
This restriction type enables you to add discounted plans to an invoice when a certain quantity of other plans are purchased.
For example, if a customer buys two or more books, they get one free bookmark.
- name: Credit memos
description: >-
Use credit memos to provide a customer with store credit.
A common use case for using a credit memo is to provide a customer with
store credit,
rather than a refund, if the customer pays more than they owe or returns a
product.
For information on the credit memo resource, see
[Resources](https://www.rebilly.com/docs/dev-docs/concepts/#resources).
- name: Credit memos timeline
description: >-
Use credit memo timelines to maintain an audit trail of changes and
activity for each credit memo.
Credit memos are a means of providing a customer with store credit.
- name: Custom domains
description: >-
Use custom domains to configure and use your own domain for forms and
billing portals,
instead of the default Rebilly domain: `portal.secure-payments.app`.
For more information, see [Configure a custom
domain](https://www.rebilly.com/docs/settings/organizations-and-websites#configure-a-custom-domain).
- name: Custom fields
description: >-
Use custom fields to extend a resource scheme to include custom data that
is not provided as a common field.
Depending on the resource on which the custom field is added, it may be
available in the Rebilly UI.
Example: A custom field called `preferredCommunicationChannel` is added to
the customer resource.
It has two allowed values, which are 'email' and 'phone'.
```js
{
"customFields": {
"preferredCommunicationChannel": "email"
}
}
```
For detailed information on Rebilly resources, see
[Resources](https://www.rebilly.com/docs/dev-docs/concepts/#resources).
- name: Customer authentication
description: >-
Use these operations to validate the identity of users and manage
authentication credentials.
- name: Customers
description: >-
Use these operations to manage customers.
A customer is an entity that purchases goods or services from you (a
merchant),
and is the payee in any transaction that is credited to you.
Customers are associated with payment instruments,
subscriptions, invoices, and other related resources.
In other systems, customers may be referred to as accounts,
clients, members, patrons, or players.
For information on the customer resource, see
[Resources](https://www.rebilly.com/docs/dev-docs/concepts/#resources).
- name: Customers timeline
description: >-
Use customer timelines to maintain an audit trail of changes and activity
for each customer.
- name: Data exports
description: >-
Use data export operations to manage the export of resource data, such as:
transactions, customers, subscriptions, invoices, invoice item data, or
revenue audit.
Common data export use cases are:
accounting, data analysis, reporting, or importing into other databases.
For detailed information on Rebilly resources,
see
[Resources](https://www.rebilly.com/docs/dev-docs/concepts/#resources).
For information on how manage reconciliation, see [Transaction
reconciliation](https://www.rebilly.com/docs/dev-docs/transaction-reconciliation).
- name: Deposits
description: >-
Create and manage deposit requests and manage strategies that determine
the deposit amounts to display on the page.
Rebilly hosted deposit form provides a secure and compliant way to deposit
funds.
Deposit forms are customizable, and use fully responsive design, built-in
error messaging and validation.
> **Important:** These operations are experimental and may change.
- name: Disputes
description: >-
Use these operations to manage disputes.
A dispute occurs when a customer contests a charge to their account.
The dispute and related information is made available to the merchant by
the bank or credit card company.
The merchant then has the option to represent the charge and win the case.
This process is called dispute resolution.
If the merchant is unable to represent the charge, the card issuer
typically reverses the sale and adds fees on top of the charge.
This process is called a chargeback.
- name: Email delivery settings
description: >-
Use email delivery settings to configure from which email address
notifications and broadcast message are sent.
In Rebilly, this email address is referred to as a "From address".
Supported email service providers are:
SMTP, Mailgun, SendGrid, AWS SES, Postmark, and Rebilly.
- name: Email messages
description: Use email messages to email customers directly.
- name: Email notifications
description: >-
Use email notifications to keep customers informed on events,
and to inform them of events that may require action on their end.
Email notifications are targeted email messages that can be plain text or
HTML.
Email notifications can also be used to notify teammates about new
customers, blocklist matches, risk score changes, and more.
For more information, see [Email
notifications](https://www.rebilly.com/docs/automations/email-notifications/).
- name: External identifiers
description: >-
Use external identifier operations to associate entities such as
customers,
invoices, transactions, journal accounts, journal entries,
and more with external services.
To use external identifiers, you must use an active service credential.
- name: Fees
description: >-
Use fees to reconcile transactions with applicable fees and discount
rates.
Fees are not applied directly to transaction amounts, they do not modify
the transaction amount.
Fees help to describe each part of the transaction amount.
> **Important:** These operations are experimental and may change.
- name: Files
description: >-
Use the file entity to store files and related metadata.
Files can be sorted by size, MIME-type, user-defined tags, and
description.
The following methods are available to upload files:
multipart/form-data encoded form, RAW POST &mdash;
by sending the file contents as the POST body, and fetching from URL
&mdash;
by providing the file URL using the 'url' parameter.
Use the attachments entity to link a file to one or multiple objects, such
as:
customer, dispute, transaction, order, plan, product, invoice, or timeline
comment.
Attachments enable you to quickly find and use files related to specific
entities.
- name: Gateway accounts
description: >-
Use these operations to manage payment gateway accounts.
A payment gateway is a service which enables merchants to receive payments
from their customers to their merchant account.
A merchant account is a bank account that enables businesses to receive
payments.
Use payment gateway accounts to connect payment requests to third party
networks and platforms.
- name: Gateway accounts timeline
description: >-
Use gateway account timelines to maintain an audit trail of changes and
activity for each gateway account.
- name: Histograms
description: >-
Use histograms operations to generate transaction histogram reports with
cohorts and periods. For information on the invoice resource, see
[Resources](https://www.rebilly.com/docs/dev-docs/concepts/#resources).
- name: Integrations
description: >-
Use these operations to manage third-party apps that are integrated to
your Rebilly account.
For more information on third-party apps, and how to integrate them,
see [App store](https://www.rebilly.com/docs/app-store/app-store/).
- name: Invoices
description: >-
Use invoices to bill for the goods or services that you provide.
If your invoice includes subscription items, it also includes the
corresponding service periods and prices.
- name: Invoices timeline
description: >-
Use invoice timelines to maintain an audit trail of changes and activity
for each invoice.
- name: Journal
description: Use journal accounts, entries and records to track and recognize revenue.
- name: KYC documents
description: >-
Use Know Your Customer (KYC) documents to verify your customers identity.
The KYC document operations generate a signed link to the Rebilly [KYC
document
gatherer](https://www.rebilly.com/docs/kyc-and-aml/kyc-document-gatherer/).
Document types:
- `identity-proof`: Validates a customer's identity.
- `address-proof`: Validates a customer's address.
- `purchase-proof`: Validates a customer's purchase.
- `funds-proof`: Validates that a customer has funds.
- `credit-file-proof`: Verifies that there is an existing credit file with two sources that match the customer's name, DOB, and address.
Rebilly parses and analyzes the documents and accepts or rejects them
according to a configurable scoring algorithm.
When all document types in a KYC request are accepted, the status is
fulfilled, and the [KYC request fulfilled
webhook](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/kyc-request-fulfilled/)
is sent.
### Credit file proof
The `credit-file-proof` KYC document request type is only available in the
API,
this option is not available in the [KYC document
gatherer](https://www.rebilly.com/docs/kyc-and-aml/kyc-document-gatherer/).
This request verifies that there is an existing credit file with two
sources that match the person's name, date of birth, and address.
In Canada, to meet FINTRAC requirements, the `credit-file-proof` KYC
document request verifies the customer's name, address, and date of birth
with a credit agency.
If `credit-file-proof` is requested in combination with `identity-proof`
and `address-proof`,
`credit-file-proof` is attempted first.
If `credit-file-proof` validates the identity and address,
the KYC request is considered fulfilled.
If the request is not fulfilled,
redirect your customer to the KYC document gatherer to collect their KYC
documents.
- name: Lists
description: >-
Use lists to create and maintain sets of values that may be referenced in
rule conditions.
Commonly used lists contain values related to conditions that target
specific properties such as: customers, transactions, or BINs.
You may grant list edit permissions to members of your team without
enabling them to edit rules.
This may be useful if your workflow involves frequent updates to value
sets that are used in rule or bind conditions.
List order may not be maintained and duplicates may be removed.
For more information, see [Value
lists](https://www.rebilly.com/docs/automations/create-a-value-list/#value-lists).
- name: Memberships
description: |-
Use these operations to manage user membership within your organizations.
Membership describes the relationship between organizations and users.
For example, one user could be a member of more than one organization.
- name: Metadata
description: |-
Use these operations to retrieve and manage metadata.
Metadata is structured information on other data.
- name: Orders
description: >-
Use these operations to manage customer orders.
An order is a customer's request to purchase items.
It can contain subscription and one-time sale items.
When an order contains one or more subscription items, it is a
subscription order.
An order generates an invoice.
A subscription order generates an invoice for each service period.
For more information, see
[Orders](https://www.rebilly.com/docs/dev-docs/concepts/#orders).
- name: Orders timeline
description: >-
Use order timelines to maintain an audit trail of changes and activity for
each order.
- name: Organization data exports
description: >-
Use organization data exports to export your organization data which you
may want to do as a business continuity practice.
These may also be used to to export data if you decide to migrate to a
different payments solution.
- name: Organizations
description: >-
Use these operations to manage your organizations in Rebilly.
An organization is an entity that represents you, or your company, as a
merchant.
You can have multiple organizations.
For more information, see [My organizations and
websites](https://www.rebilly.com/docs/settings/organizations-and-websites/).
Note: No data, including organizations, is shared between the live and
sandbox environments.
- name: Payment instruments
description: >-
Use these operations to manage payment instruments.
Payment instrument is a term which describes any means of making a digital
payment, such as:
credit cards, debit cards, direct debits, payment service providers, and
digital wallets.
For more information on payment instruments, see [Payment
instruments](https://www.rebilly.com/docs/dev-docs/concepts/#payment-instruments).
- name: Payment tokens
description: >-
Use payment tokens to reduce the scope of [PCI DSS
compliance](https://www.rebilly.com/docs/pci-compliance/).
A payment token can be made using a different authentication scheme
(public key authentication), which enables you to create a payment token
directly from the browser.
This bypasses the need to send sensitive cardholder info to your servers.
We recommend using this with the FramePay library, which helps you
integrate a form into this API resource and create payment tokens.
- name: Plans
description: >-
Use pricing plans to describe how the customer must pay for
[products](https://www.rebilly.com/docs/dev-docs/api/products/).
Rebilly provides the following plan types:
- Trial only: Use this plan to create and offer a free or discounted trial
period for your product.
For example, a free 2 week trial of an internet service.
After the trial, the customer can choose to sign up for a paid subscription, or stop using the service.
- Recurring: Use this plan to create and offer a subscription for your
product.
For example, a monthly subscription to an internet service that is charged at 20 USD per month.
- One time sale: Use this plan to create and offer a one-off sale for your
products.
For example, a one time purchase of two bags of coffee.
For information on the plans resource, see
[Plans](https://www.rebilly.com/docs/dev-docs/concepts/#plans).
For information on plan pricing, see [Pricing
formulas](https://www.rebilly.com/docs/settings/pricing-formulas/).
- name: Products
description: >-
Use products to describe the goods and services that your business sells.
A product also describes sales items on invoices and receipts.
Product pricing is defined in
[plans](https://www.rebilly.com/docs/dev-docs/api/plans/).
A product may have one or many plans.
For information on the product resource, see
[Product](https://www.rebilly.com/docs/dev-docs/concepts/#products).
- name: Profile
description: |-
Use these operations to manage user profiles.
A profile represents the person that is signed in to Rebilly.
- name: Quotes
description: >-
Use quote operations to create and manage quotations.
Quotations describe the cost of goods or services to potential customers
before they commit to a purchase.
A quote contains an initial invoice preview that can be accepted to become
an order.
A quote can contain subscription and one-time sale items.
When a quote contains one or more subscription items, it is a subscription
order quote.
- name: Quotes timeline
description: >-
Use quote timelines to maintain an audit trail of changes and activity for
each quote.
- name: Reports
description: >-
Use reports operations to retrieve summary information about your
customers, subscriptions, transactions, and more.
- name: Reset password
description: >-
Use these operations to manage password resets.
When a password reset is requested, an email with a token is sent.
In the email the user must click a reset link, and then create a new
password.
- name: Risk score
description: >-
Use risk score operations to configure blocklists based on transaction
risk factors.
- name: Roles
description: >-
Use these operations to manage user roles within your team or
organization.
Roles are an implementation of the general hierarchical (Role Based Access
Control) RBAC.
A senior role inherits all of its juniors' Access Control Lists (ACLs) and
its own ACL.
Junior roles are not influenced by the senior role.
- name: Rules
description: >-
Use rules to automate.
In the Rebilly rules engine, an action is an operation that executes when
an event occurs.
Action and event conditions are defined in rules.
Rulesets are collections of rules that are associated with an event.
The order in which the rules are placed within a ruleset specifies the
execution order.
For a list of events and related actions, see
[Events](https://www.rebilly.com/docs/automations/event-types/).
- name: Rules timeline
description: >-
Use rule timelines to maintain an audit trail of changes and activity for
each rule.
- name: Search
description: >-
Use search operations to search data on customers, invoices, orders,
transactions and more.
- name: Segments
description: >-
Use these operations to manage UI segments.
A segment is a filtered view of a data set that can be shared with other
users.
For example, you may create a transactions segment that displays specific
columns that are filtered and sorted based on certain criteria,
and share it with others in your organization.
- name: Service credentials
description: >-
Use these operations to get, create, and manage credentials for
third-party services.
- name: Shipping rates
description: >-
Use these operations to manage shipping rates.
A shipping rate contains a filter and a pricing for a specific shipping
destination.
- name: Status
description: |-
Use this operation to check the status of the Rebilly API.
No authentication is required.
- name: Storefront account
description: >-
Use these operations to manage Storefront accounts.
A Storefront account is an account that the customer is subscribed to in
order to use the Rebilly product.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations,
the customer must be issued a JWT with limited permissions.
For more information, see [Create a session with username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront billing portals
description: >-
Use these operations to access Storefront billing portals.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations,
the customer must be issued a JWT with limited permissions.
For more information, see [Create a session with username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront checkout forms
description: >-
Use these operations to access Storefront checkout forms.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations,
the customer must be issued a JWT with limited permissions.
For more information, see [Create a session with username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront custom fields
description: >-
Use these operations to access Storefront custom fields.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations,
the customer must be issued a JWT with limited permissions.
For more information, see [Create a session with username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront deposits
description: >-
Use these operations to access Storefront deposits.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations, the customer must be issued a JWT with
limited permissions. For more information, see [Create a session with
username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront invoices
description: >-
Use these operations to access Storefront invoices.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations, the customer must be issued a JWT with
limited permissions. For more information, see [Create a session with
username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront KYC documents
description: >-
Use these operations to access Storefront KYC documents.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations, the customer must be issued a JWT with
limited permissions. For more information, see [Create a session with
username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront orders
description: >-
Use these operations to access Storefront orders.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations, the customer must be issued a JWT with
limited permissions. For more information, see [Create a session with
username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront payment instruments
description: >-
Use these operations to access Storefront payment instruments.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations, the customer must be issued a JWT with
limited permissions. For more information, see [Create a session with
username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront plans
description: >-
Use these operations to access Storefront plans.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations,
the customer must be issued a JWT with limited permissions.
For more information, see [Create a session with username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront products
description: >-
Use these operations to access Storefront products.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations,
the customer must be issued a JWT with limited permissions.
For more information,
see [Create a session with username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront purchases
description: >-
Use these operations to manage Storefront purchases.
Purchases are transactions that have been executed related to the purchase
of goods or services.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations,
the customer must be issued a JWT with limited permissions.
For more information, see [Create a session with username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront quotes
description: >-
Use these operations to access Storefront quotes.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations, the customer must be issued a JWT with
limited permissions. For more information, see [Create a session with
username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront transactions
description: >-
Use these operations to access Storefront transactions.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations,
the customer must be issued a JWT with limited permissions.
For more information, see [Create a session with username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Storefront websites
description: >-
Use these operations to access Storefront websites.
Storefront operations interact directly with the customer,
and provide the customer with access to their own data.
To use Storefront operations,
the customer must be issued a JWT with limited permissions.
For more information, see [Create a session with username and
password](https://www.rebilly.com/catalog/all/storefront-account/storefrontpostlogin)
and [Exchange an authentication
token](https://www.rebilly.com/catalog/all/customer-authentication/postauthenticationtokenexchange).
Storefront operations are intended to be used directly from an untrusted
browser.
- name: Tags
description: >-
Use tags to organize and categorize customers or KYC documents based on
keywords.
- name: Tracking
description: |-
Use tracking when debugging and auditing issues.
Tracking is a layer for accessing all activity such as:
API requests, subscriptions, webhooks, events, and more.
- name: Transactions
description: |-
Use these operations to:
- set up payment instruments for payments
- authorize and hold funds
- capture funds
- make payments
- make payouts
- refund transactions.
- name: Transactions timeline
description: >-
Use transaction timelines to maintain an audit trail of changes and
activity for each transaction.
- name: Usage
description: >-
Use these operations to manage the product usage of a subscription item
for metered billing purposes.
Use metered billing when product quantity is unknown to the customer at
the moment of creating a subscription.
Metered billing is based on reported usage records.
Every reported usage updates the quantity of an upcoming invoice item for
a specified subscription and a plan.
To create a metered billing plan, see [Plans](../Plans).
- name: Users
description: >-
Use these operations to manage users.
A user is a person who can login to Rebilly, and take actions based on
their granted permissions.
- name: Webhooks
description: >-
Use these operations to manage webhooks.
Webhooks notify your systems in real-time when certain events occur.
For example, when a new transaction occurs or a new subscription is
created.
Webhooks enable you to collect information about events.
Rebilly can send this information by HTTP POST request to a defined URL of
your choice.
- name: Websites
description: >-
Use these operations to manage websites.
A website is where your organization obtains a customer.
It is also the processor account and billing descriptor used for payment
transactions.
You can create multiple websites.
Websites are related to each invoice and each payment gateway account.
This enables you to associate gateway accounts with multiple websites,
or make them exclusive to particular websites.
For more information, see [My organizations and
websites](https://www.rebilly.com/docs/settings/organizations-and-websites/).
x-tagGroups:
- name: Customers
tags:
- Customers
- Customer authentication
- Tags
- Customers timeline
- name: Payment Instruments
tags:
- Payment instruments
- Payment tokens
- name: Payments
tags:
- Transactions
- Disputes
- Fees
- Transactions timeline
- name: Orders & Invoices
tags:
- Orders
- Invoices
- Usage
- Credit memos
- Plans
- Products
- Coupons
- Quotes
- Quotes timeline
- Shipping rates
- Orders timeline
- Invoices timeline
- Credit memos timeline
- name: Risk
tags:
- Blocklists
- Allowlists
- KYC documents
- AML
- Risk score
- name: Misc
tags:
- Custom fields
- Files
- Search
paths:
/aml-checks:
get:
x-products:
- Core
tags:
- AML
summary: Retrieve AML checks
operationId: GetAmlCheckCollection
x-sdk-operation-name: getAll
description: >-
Retrieves a list of AML checks.
These checks are records of customer data and potentially matching data
in AML lists.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of AML checks retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AmlCheck'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/aml-checks/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- AML
summary: Retrieve an AML check
operationId: GetAmlCheck
x-sdk-operation-name: get
description: |-
Retrieves the results of a customer's AML check.
Customer metadata and an array of matching AML hits is returned.
responses:
'200':
description: AML check retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/AmlCheck'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/aml-checks/{id}/start-review:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- AML
summary: Start review of an AML check
operationId: PostAmlCheckStartReview
x-sdk-operation-name: startReview
description: >-
Starts the manual review process for an AML check with a specified ID.
This operation also sets the AML check `reviewStartTime` to the current
date-time,
and updates the review information.
responses:
'201':
description: AML check review started.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/AmlCheck'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
/aml-checks/{id}/stop-review:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- AML
summary: Stop review of an AML check
operationId: PostAmlCheckStopReview
x-sdk-operation-name: stopReview
description: >-
Stops the manual review process for an AML check with a specified ID.
This operation also sets the AML check `reviewStartTime` and the
reviewer information to null.
Use this operation when the reviewer must stop the review.
For example, if the reviewer must take a break, or ends a shift.
responses:
'201':
description: AML document review stopped.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/AmlCheck'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
/aml-checks/{id}/review:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- AML
summary: Review an AML check
operationId: PostAmlCheckReview
x-sdk-operation-name: review
description: >-
Reviews an AML check.
The AML check can be either confirmed or marked as a false positive with
a customer tag.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AmlCheckReview'
responses:
'201':
description: AML check reviewed.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/AmlCheck'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
/aml-settings:
get:
x-products:
- Core
tags:
- AML
summary: Retrieve AML settings
operationId: GetAmlSettings
x-sdk-operation-name: getAmlSettings
description: Retrieves AML settings.
responses:
'200':
description: AML settings retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/AmlSettings'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-products:
- Core
tags:
- AML
summary: Update AML settings
operationId: PutAmlSettings
x-sdk-operation-name: putAmlSettings
description: Updates AML settings.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AmlSettings'
description: Settings for AML searches.
required: true
responses:
'200':
description: AML settings updated.
content:
application/json:
schema:
$ref: '#/components/schemas/AmlSettings'
'201':
description: AML settings created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/AmlSettings'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/attachments:
get:
x-products:
- Core
tags:
- Files
summary: Retrieve attachments
operationId: GetAttachmentCollection
x-sdk-operation-name: getAllAttachments
description: |-
Retrieves a list of attachments. You may sort attachments by: `id`,
`name`, `relatedId`, `relatedType`, `fileId`, `createdTime`,
and `updatedTime`.
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'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of attachments retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Attachment'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$attachments = $client->attachments()->search([
'filter' => 'relatedType:customer',
]);
- lang: JavaScript
source: >-
// all parameters are optional
const firstCollection = await api.files.getAllAttachments();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await api.files.getAllAttachments(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(attachment =>
console.log(attachment.fields.relatedType));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$attachmentsPaginator =
$service->files()->getAllAttachmentsPaginator(limit: 5, filter:
'relatedType:customer');
foreach ($attachmentsPaginator as $attachmentPage) {
printf("Attachments page %d/%d\n", $attachmentsPaginator->key() + 1, $attachmentsPaginator->count());
foreach ($attachmentPage as $attachment) {
printf("Attachment #%s (%s): %s\n", $attachment->getId(), $attachment->getRelatedType(), $attachment->getName());
}
}
// OR
$attachments = $service->files()->getAllAttachments(filter:
'relatedType:customer');
foreach ($attachments as $attachment) {
printf("Attachment #%s (%s): %s\n", $attachment->getId(), $attachment->getRelatedType(), $attachment->getName());
}
post:
x-products:
- Core
tags:
- Files
summary: Create an attachment
operationId: PostAttachment
x-sdk-operation-name: attach
description: |-
Attaches a file to one or multiple objects, such as: customer,
dispute, transaction, order, plan, product, invoice, or timeline
comment. Attachments enable you to quickly find and use files
related to specific entities.
requestBody:
$ref: '#/components/requestBodies/Attachment'
responses:
'201':
description: Attachment created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Attachment'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$attachmentForm = new Rebilly\Entities\Attachment();
$attachmentForm->setFileId('fileId');
$attachmentForm->setRelatedType($attachmentForm::TYPE_CUSTOMER);
$attachmentForm->setRelatedId('customerId');
try {
$attachment = $client->attachments()->create($attachmentForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: |
// Define the attachment
const data = {
// Previously uploaded file ID
fileId: 'my-file-id',
relatedType: 'customer',
relatedId: 'my-customer-id',
name: 'an attachment',
description: `the customer's file`
};
const attachment = await api.files.attach({data});
console.log(attachment.fields.id);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$attachmentForm = new \Rebilly\Sdk\Model\Attachment();
$attachmentForm->setFileId('fileId');
$attachmentForm->setRelatedType($attachmentForm::RELATED_TYPE_CUSTOMER);
$attachmentForm->setRelatedId('customerId');
try {
$attachment = $service->files()->attach($attachmentForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/attachments/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Files
summary: Retrieve an attachment
operationId: GetAttachment
x-sdk-operation-name: getAttachment
description: Retrieves an attachment with a specified ID.
responses:
'200':
description: Attachment retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Attachment'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$attachment = $client->attachments()->load('attachmentId');
- lang: JavaScript
source: >-
const attachment = await api.files.getAttachment({id:
'foobar-001'});
console.log(attachment.fields.relatedType);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$attachment = $service->files()->getAttachment('attachmentId');
put:
x-products:
- Core
tags:
- Files
summary: Update an attachment
operationId: PutAttachment
x-sdk-operation-name: updateAttachment
description: Updates an attachment with a specified ID.
requestBody:
$ref: '#/components/requestBodies/Attachment'
responses:
'200':
description: Attachment updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Attachment'
'201':
description: Attachment created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Attachment'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$attachmentForm = new Rebilly\Entities\Attachment();
$attachmentForm->setFileId('fileId');
$attachmentForm->setRelatedType($attachmentForm::TYPE_CUSTOMER);
$attachmentForm->setRelatedId('customerId');
try {
$attachment = $client->attachments()->update('attachmentId', $attachmentForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// define the values to update
const data = {
relatedType: 'customer',
relatedId: 'my-customer-id',
name: 'an attachment',
description: `the customer's file`
};
const attachment = await api.files.updateAttachment({id:
'foobar-001', data});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$attachmentForm = new \Rebilly\Sdk\Model\Attachment();
$attachmentForm->setFileId('fileId');
$attachmentForm->setRelatedType($attachmentForm::RELATED_TYPE_CUSTOMER);
$attachmentForm->setRelatedId('customerId');
try {
$attachment = $service->files()->updateAttachment('attachmentId', $attachmentForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
delete:
x-products:
- Core
tags:
- Files
summary: Delete an attachment
operationId: DeleteAttachment
x-sdk-operation-name: detach
description: Deletes an attachment with a specified ID.
responses:
'204':
description: Attachment deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$client->attachments()->delete('attachmentId');
- lang: JavaScript
source: |-
const request = await api.files.detach({id: 'my-attachment-id'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$service->files()->detach('attachmentId');
/authentication-options:
get:
x-products:
- Core
tags:
- Customer authentication
summary: Retrieve authentication options
operationId: GetAuthenticationOption
x-sdk-operation-name: getAuthOptions
description: Retrieves customer authentication options.
responses:
'200':
description: Authentication options retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/AuthenticationOptions'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$authenticationOptions = $client->authenticationOptions()->load();
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$authenticationOptions =
$service->customerAuthentication()->getAuthOptions();
- lang: JavaScript
source: |-
const options = await api.customerAuthentication.getAuthOptions();
console.log(options.fields.credentialTtl);
put:
x-products:
- Core
tags:
- Customer authentication
summary: Change authentication options
operationId: PutAuthenticationOption
x-sdk-operation-name: updateAuthOptions
description: Changes customer authentication options.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AuthenticationOptions'
description: Authentication options resource.
required: true
responses:
'200':
description: Authentication options updated.
content:
application/json:
schema:
$ref: '#/components/schemas/AuthenticationOptions'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$authenticationOptionsForm = new
Rebilly\Entities\AuthenticationOptions();
// Regular expression below matches any password with 6+ length that
contains alphabet symbols and/or numbers.
$authenticationOptionsForm->setPasswordPattern('/^[a-zA-Z0-9]{6,}$/');
try {
$authenticationOptions = $client->authenticationOptions()->update($authenticationOptionsForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// first set the properties for the authentication options
const data = {
passwordPattern: null,
credentialTtl: 10,
authTokenTtl: 20,
resetTokenTtl: 30
};
const options = await
api.customerAuthentication.updateAuthOptions({data});
console.log(options.fields.credentialTtl);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$authenticationOptionsForm = new
\Rebilly\Sdk\Model\AuthenticationOptions();
// Regular expression below matches any password with 6+ length that
contains alphabet symbols and/or numbers.
$authenticationOptionsForm->setPasswordPattern('/^[a-zA-Z0-9]{6,}$/');
try {
$authenticationOptions = $service->customerAuthentication()->updateAuthOptions($authenticationOptionsForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/authentication-tokens:
get:
x-products:
- Core
tags:
- Customer authentication
summary: Retrieve authentication tokens
operationId: GetAuthenticationTokenCollection
x-sdk-operation-name: getAllAuthTokens
description: Retrieves a list of customer authentication tokens.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
responses:
'200':
description: List of auth tokens retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AuthenticationTokenResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$authenticationTokens = $client->authenticationTokens()->search([
'filter' => 'customerId:testCustomer',
]);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$listOfTokens =
$service->customerAuthentication()->getAllAuthTokens();
// alternatively you can specify one or more of them
$listOfTokens =
$coreService->customerAuthentication()->getAllAuthTokens(limit: 5,
offset: 2);
- lang: JavaScript
source: >-
// all parameters are optional
const firstCollection = await
api.customerAuthentication.getAllAuthTokens();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100};
const secondCollection = await
api.customerAuthentication.getAllAuthTokens(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(token =>
console.log(token.fields.username));
post:
x-products:
- Core
tags:
- Customer authentication
summary: Login a customer
operationId: PostAuthenticationToken
x-sdk-operation-name: login
description: Logs in a customer.
security:
- SecretApiKey: []
- JWT: []
- PublishableApiKey: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AuthenticationToken'
description: AuthenticationToken resource.
required: true
responses:
'201':
description: Login successful.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/AuthenticationTokenResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$authenticationForm = new Rebilly\Entities\AuthenticationToken();
$authenticationForm->setUsername('username');
$authenticationForm->setPassword('test123');
try {
$authenticationToken = $client->authenticationTokens()->login($authenticationForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: |-
const data = {
username: 'foobar',
password: 'fuubar'
// optionally you can define an `expiredTime` to
// limit the duration of the session token
//expiredTime: '2017-09-18T19:17:39Z'
};
const session = await api.customerAuthentication.login({data});
console.log(session.fields.token);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$authenticationForm =
\Rebilly\Sdk\Model\AuthenticationTokenPasswordMode::from();
$authenticationForm->setUsername('username');
$authenticationForm->setPassword('test123');
try {
$authenticationToken = $service->customerAuthentication()->login($authenticationForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/authentication-tokens/{token}:
parameters:
- name: token
in: path
description: ID of the authentication token.
required: true
schema:
type: string
get:
x-products:
- Core
tags:
- Customer authentication
summary: Verify an authentication token
operationId: GetAuthenticationTokenVerification
x-sdk-operation-name: verify
description: Verifies a customer's authentication token.
security:
- SecretApiKey: []
- JWT: []
- PublishableApiKey: []
responses:
'200':
description: Authentication token verified.
content:
application/json:
schema:
$ref: '#/components/schemas/AuthenticationTokenResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$isVerified = $client->authenticationTokens()->verify('token');
- lang: JavaScript
source: >-
const token = 'dcf6e32f2daee457a1db8ce5fdfbe200';
const verification = await
api.customerAuthentication.verify({token});
// if the the token is valid then no error will be thrown
console.log(verification.reponse.status) // 200
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$isVerified = $service->customerAuthentication()->verify('token');
delete:
x-products:
- Core
tags:
- Customer authentication
summary: Logout a customer
operationId: DeleteAuthenticationToken
x-sdk-operation-name: logout
description: Logs out a customer.
security:
- SecretApiKey: []
- JWT: []
- PublishableApiKey: []
responses:
'204':
description: Customer logged out.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$client->authenticationTokens()->logout('token');
- lang: JavaScript
source: |-
const token = 'dcf6e32f2daee457a1db8ce5fdfbe200';
const request = await api.customerAuthentication.logout({token});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$service->customerAuthentication()->logout('token');
/authentication-tokens/{token}/exchange:
parameters:
- name: token
in: path
description: ID of the authentication token.
required: true
schema:
type: string
post:
x-products:
- Core
tags:
- Customer authentication
summary: Exchange an authentication token
operationId: PostAuthenticationTokenExchange
x-sdk-operation-name: exchangeToken
description: >-
Exchanges an authentication token for a JWT.
By default, this operation invalidates the exchanged authentication
token.
security:
- SecretApiKey: []
- JWT: []
- PublishableApiKey: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerJWT'
required: true
responses:
'201':
description: Authentication token exchanged for a JWT.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerJWT'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/blocklists:
get:
x-products:
- Core
tags:
- Blocklists
summary: Retrieve blocklists
operationId: GetBlocklistCollection
x-sdk-operation-name: getAll
description: Retrieves a list of all blocklists.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of blocklists retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Blocklist'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$blocklists = $client->blocklists()->search([
'filter' => 'value:testValue',
]);
- lang: JavaScript
source: >
// all parameters are optional
const firstCollection = await api.blocklists.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await api.blocklists.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(blocklistItem =>
console.log(blocklistItem.fields.status));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$blocklistsPaginator =
$service->blocklists()->getAllPaginator(limit: 5, filter:
'value:testValue');
foreach ($blocklistsPaginator as $blocklistPage) {
printf("Blocklists page %d/%d\n", $blocklistsPaginator->key() + 1, $blocklistsPaginator->count());
foreach ($blocklistPage as $blocklist) {
printf("Blocklist #%s (%s): %s\n", $blocklist->getId(), $blocklist->getType(), $blocklist->getValue());
}
}
// OR
$blocklists = $service->blocklists()->getAll(filter:
'value:testValue');
foreach ($blocklists as $blocklist) {
printf("Blocklist #%s (%s): %s\n", $blocklist->getId(), $blocklist->getType(), $blocklist->getValue());
}
post:
x-products:
- Core
tags:
- Blocklists
summary: Create a blocklist
operationId: PostBlocklist
x-sdk-operation-name: create
description: Creates a blocklist.
requestBody:
$ref: '#/components/requestBodies/Blocklist'
responses:
'201':
description: Blocklist created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Blocklist'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$blocklistForm = new Rebilly\Entities\Blocklist();
$blocklistForm->setType($blocklistForm::TYPE_EMAIL);
$blocklistForm->setValue('test@test.com');
$blocklistForm->setExpiredTime('2025-01-01 05:00:00');
try {
$blocklist = $client->blocklists()->create($blocklistForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >
// first set the required properties for the new blocklist item
const data = {
type: 'ip-address',
value: '63.118.98.100'
// optionally provide an `expirationTime` to make
// the item expire and function like a `greylist`
// expirationTime: '2017-09-18T21:50:44Z'
};
// the ID is optional
const firstKey = await api.blocklists.create({data});
// or you can provide one
const secondKey = await api.blocklists.create({id: 'my-second-id',
data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$blocklistForm = new \Rebilly\Sdk\Model\Blocklist();
$blocklistForm->setType($blocklistForm::TYPE_EMAIL);
$blocklistForm->setValue('test@test.com');
$blocklistForm->setExpirationTime('2025-01-01 05:00:00');
try {
$blocklist = $service->blocklists()->create($blocklistForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/blocklists/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Blocklists
summary: Retrieve a blocklist
operationId: GetBlocklist
x-sdk-operation-name: get
description: Retrieves a blocklist with a specified ID.
responses:
'200':
description: Blocklist retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Blocklist'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$blocklist = $client->blocklists()->load('blocklistId');
- lang: JavaScript
source: |
const blocklistItem = await api.blocklists.get({id: 'foobar-001'});
console.log(blocklistItem.fields.status);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$blocklist = $service->blocklists()->get('blocklistId');
put:
x-products:
- Core
tags:
- Blocklists
summary: Create a blocklist with specified ID
operationId: PutBlocklist
x-sdk-operation-name: update
description: Creates a blocklist with a specified ID.
requestBody:
$ref: '#/components/requestBodies/Blocklist'
responses:
'200':
description: Blocklist updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Blocklist'
'201':
description: Blocklist created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Blocklist'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$blocklistForm = new Rebilly\Entities\Blocklist();
$blocklistForm->setType($blocklistForm::TYPE_EMAIL);
$blocklistForm->setValue('test@test.com');
$blocklistForm->setExpiredTime('2025-01-01 05:00:00');
try {
$blocklist = $client->blocklists()->create($blocklistForm, 'blocklistId');
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >
// first set the required properties for the new blocklist item
const data = {
type: 'ip-address',
value: '63.118.98.100'
// optionally provide an `expirationTime` to make
// the item expire and function like a `greylist`
// expirationTime: '2017-09-18T21:50:44Z'
};
// the ID is optional
const firstKey = await api.blocklists.create({data});
// or you can provide one
const secondKey = await api.blocklists.create({id: 'my-second-id',
data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$blocklistForm = new \Rebilly\Sdk\Model\Blocklist();
$blocklistForm->setType($blocklistForm::TYPE_EMAIL);
$blocklistForm->setValue('test@test.com');
$blocklistForm->setExpirationTime('2025-01-01 05:00:00');
try {
$blocklist = $service->blocklists()->update('blocklistId', $blocklistForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
delete:
x-products:
- Core
tags:
- Blocklists
summary: Delete a blocklist
operationId: DeleteBlocklist
x-sdk-operation-name: delete
description: Deletes a blocklist with a specified ID.
responses:
'204':
description: Blocklist deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$client->blocklists()->delete('blocklistId');
- lang: JavaScript
source: |
const request = await api.blocklists.delete({id: 'my-second-key'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$service->blocklists()->delete('blocklistId');
/coupons-redemptions:
get:
x-products:
- Core
tags:
- Coupons
summary: Retrieve coupon redemptions
operationId: GetCouponRedemptionCollection
x-sdk-operation-name: getAllRedemptions
description: Retrieves a list of coupon redemptions.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionQuery'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of coupon redemptions retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CouponRedemption'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$couponRedemptions = $client->couponsRedemptions()->search([
'filter' => 'customerId:testCustomer',
]);
- lang: JavaScript
source: >-
// all parameters are optional
const firstCollection = await api.coupons.getAllRedemptions();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await
api.coupons.getAllRedemptions(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(coupon =>
console.log(coupon.fields.status));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$couponRedemptionsPaginator =
$service->coupons()->getAllRedemptionsPaginator(limit: 5, filter:
'customerId:testCustomer');
foreach ($couponRedemptionsPaginator as $couponRedemptionsPage) {
printf("Coupon redemptions page %d/%d\n", $couponRedemptionsPaginator->key() + 1, $couponRedemptionsPaginator->count());
foreach ($couponRedemptionsPage as $couponRedemption) {
printf("Coupon redemption #%s\n", $couponRedemption->getId());
}
}
// OR
$couponRedemptions = $service->coupons()->getAllRedemptions(filter:
'customerId:testCustomer');
foreach ($couponRedemptions as $couponRedemption) {
printf("Coupon redemption #%s\n", $couponRedemption->getId());
}
post:
x-products:
- Core
tags:
- Coupons
summary: Redeem a coupon
operationId: PostCouponRedemption
x-sdk-operation-name: redeem
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Redeems a coupon.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CouponRedemption'
description: Coupon resource.
required: true
responses:
'201':
description: Coupon redeemed.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/CouponRedemption'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$redemptionForm = new Rebilly\Entities\Coupons\Redemption();
$redemptionForm->setCustomerId('customerId');
$redemptionForm->setCouponId('couponId');
$restrictionData = [
'type' => Rebilly\Entities\Coupons\Restriction::TYPE_DISCOUNTS_PER_REDEMPTION,
'quantity' => 2,
];
$restrictionForm =
Rebilly\Entities\Coupons\Restriction::createFromData($restrictionData);
$redemptionForm->setAdditionalRestrictions([$restrictionForm]);
try {
$couponRedemption = $client->couponsRedemptions()->redeem($redemptionForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: |
// build the redemption data
const data = {
couponId: 'my-best-coupon',
customerId: 'foobar-001'
};
const redemption = await api.coupons.redeem({data});
console.log(redemption.fields.id);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$redemptionForm = new \Rebilly\Sdk\Model\CouponRedemption();
$redemptionForm->setCustomerId('customerId');
$redemptionForm->setCouponId('couponId');
$restrictionForm = new
\Rebilly\Sdk\Model\CouponRestrictionDiscountPerRedemption();
$restrictionForm->setQuantity(2);
$redemptionForm->setAdditionalRestrictions([$restrictionForm]);
try {
$couponRedemption = $service->coupons()->redeem($redemptionForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/coupons-redemptions/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Coupons
summary: Retrieve a coupon redemption
operationId: GetCouponRedemption
x-sdk-operation-name: getRedemption
description: Retrieves a coupon redemption with a specified ID.
responses:
'200':
description: Coupon redemption retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/CouponRedemption'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$couponRedemption =
$client->couponsRedemptions()->load('redemptionId');
- lang: JavaScript
source: >-
const redemption = await api.coupons.getRedemption({id:
'foobar-001'});
console.log(redemption.fields.id);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$couponRedemption =
$service->coupons()->getRedemption('redemptionId');
/coupons-redemptions/{id}/cancel:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Coupons
summary: Cancel a coupon redemption
operationId: PostCouponRedemptionCancellation
x-sdk-operation-name: cancelRedemption
description: Cancels a coupon redemption with a specified ID.
responses:
'201':
description: Coupon redemption cancelled.
headers:
Location:
$ref: '#/components/headers/Location'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$client->couponsRedemptions()->cancel('id');
- lang: JavaScript
source: >-
const cancellation = await api.coupons.cancelRedemption({id:
'foobar-001'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(cancellation.response.status); // 201
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$service->coupons()->cancelRedemption('id');
/coupons:
get:
x-products:
- Core
tags:
- Coupons
summary: Retrieve coupons
operationId: GetCouponCollection
x-sdk-operation-name: getAll
description: Retrieves a list of coupons.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionQuery'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of coupons retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Coupon'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$coupons = $client->coupons()->search([
'filter' => 'status:issued',
]);
- lang: JavaScript
source: >-
// all parameters are optional
const firstCollection = await api.coupons.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await api.coupons.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(coupon =>
console.log(coupon.fields.status));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$couponsPaginator = $service->coupons()->getAllPaginator(limit: 5,
filter: 'status:issued');
foreach ($couponsPaginator as $couponsPage) {
printf("Coupons page %d/%d\n", $couponsPaginator->key() + 1, $couponsPaginator->count());
foreach ($couponsPage as $coupon) {
printf("Coupon #%s (%s): %s\n", $coupon->getId(), $coupon->getStatus(), $coupon->getDescription());
}
}
// OR
$coupons = $service->coupons()->getAll(filter: 'status:issued');
foreach ($coupons as $coupon) {
printf("Coupon #%s (%s): %s\n", $coupon->getId(), $coupon->getStatus(), $coupon->getDescription());
}
post:
x-products:
- Core
tags:
- Coupons
summary: Create a coupon
operationId: PostCoupon
x-sdk-operation-name: create
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Creates a coupon.
requestBody:
$ref: '#/components/requestBodies/Coupon'
responses:
'201':
description: Coupon created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Coupon'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$couponForm = new Rebilly\Entities\Coupons\Coupon();
$discountArray = [
'currency' => 'USD',
'amount' => 1.99,
];
$discountForm = new
\Rebilly\Entities\Coupons\Discounts\Fixed($discountArray);
$couponForm->setDiscount($discountForm);
// Coupon can be used right now
$couponForm->setIssuedTime(date('c'));
$restrictionArray = [
'quantity' => 2,
];
$restrictionForm = new
Rebilly\Entities\Coupons\Restrictions\DiscountsPerRedemption($restrictionArray);
$couponForm->setRestrictions([$restrictionForm]);
try {
$coupon = $client->coupons()->create($couponForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >
// first set the required properties for the new coupon
const data = {
description: 'a new coupon',
issuedTime: '2017-09-19T20:46:44Z',
discount: {
type: 'percent',
value: 12
},
restrictions: [{
type: 'discounts-per-redemption',
quantity: 12
}]
};
// the ID is optional
const firstKey = await api.coupons.create({data});
// or you can provide one
const secondKey = await api.coupons.create({id: 'my-second-id',
data});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$couponForm = new \Rebilly\Sdk\Model\Coupon();
$discountForm = new \Rebilly\Sdk\Model\DiscountFixed();
$discountForm->setCurrency('USD');
$discountForm->setAmount(1.99);
$couponForm->setDiscount($discountForm);
// Coupon can be used right now
$couponForm->setIssuedTime(date('c'));
$restrictionArray = [
'quantity' => 2,
];
$restrictionForm = new
\Rebilly\Sdk\Model\CouponRestrictionDiscountPerRedemption($restrictionArray);
$couponForm->setRestrictions([$restrictionForm]);
try {
$coupon = $service->coupons()->create($couponForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/coupons/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Coupons
summary: Retrieve a coupon
operationId: GetCoupon
x-sdk-operation-name: get
description: Retrieves a coupon with a specified ID.
responses:
'200':
description: Coupon retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Coupon'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$coupon = $client->coupons()->load('couponId');
- lang: JavaScript
source: |
const coupon = await api.coupons.get({couponId: 'foobar-001'});
console.log(coupon.fields.status);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$coupon = $service->coupons()->get('couponId');
put:
x-products:
- Core
tags:
- Coupons
summary: Upsert a coupon
operationId: PutCoupon
x-sdk-operation-name: update
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Creates or updates (upserts) a coupon with a specified coupon ID.
requestBody:
$ref: '#/components/requestBodies/Coupon'
responses:
'200':
description: Coupon updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Coupon'
'201':
description: Coupon created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Coupon'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$couponForm = new Rebilly\Entities\Coupons\Coupon([
'issuedTime' => '2022-01-01T00:00:00-04:00',
]);
$discountArray = [
'type' => Rebilly\Entities\Coupons\Discount::TYPE_FIXED,
'currency' => 'USD',
'amount' => 1.99,
];
$discountForm =
Rebilly\Entities\Coupons\Discount::createFromData($discountArray);
$couponForm->setDiscount($discountForm);
$restrictionArray = [
'type' => Rebilly\Entities\Coupons\Restriction::TYPE_DISCOUNTS_PER_REDEMPTION,
'quantity' => 2,
];
$restrictionForm =
Rebilly\Entities\Coupons\Restriction::createFromData($restrictionArray);
$couponForm->setRestrictions([$restrictionForm]);
try {
$coupon = $client->coupons()->create($couponForm, 'couponId');
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >
// creating a coupon
const data = {
description: 'a new coupon',
issuedTime: '2017-09-19T20:46:44Z',
discount: {
type: 'percent',
value: 12
},
restrictions: [{
type: 'discounts-per-redemption',
quantity: 12
}]
};
// the ID is optional
const firstKey = await api.coupons.create({data});
// or you can provide one
const secondKey = await api.coupons.create({id: 'my-second-id',
data});
// updating a coupon
const data = {
description: 'a small update'
};
const coupon = await api.coupons.update({id: 'my-second-id', data});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$couponForm = new \Rebilly\Sdk\Model\Coupon();
$couponForm->setIssuedTime('2022-01-01T00:00:00-04:00');
$discountForm = new \Rebilly\Sdk\Model\DiscountFixed();
$discountForm->setCurrency('USD');
$discountForm->setAmount(1.99);
$couponForm->setDiscount($discountForm);
$restrictionForm = new
\Rebilly\Sdk\Model\CouponRestrictionDiscountPerRedemption();
$restrictionForm->setQuantity(2);
$couponForm->setRestrictions([$restrictionForm]);
try {
$coupon = $service->coupons()->update('couponId', $couponForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/coupons/{id}/expiration:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Coupons
summary: Specify a coupon expiration time
operationId: PostCouponExpiration
x-sdk-operation-name: setExpiration
description: |-
Specifies the expiration time of a coupon with a specified ID.
The `expiredTime` of a coupon must be greater than its `issuedTime`.
> **Note:** This operation cannot be performed on expired coupons.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CouponExpiration'
description: Coupon resource.
responses:
'201':
description: Coupon expiration set.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Coupon'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: |-
Coupon has expired and been redeemed. Unable to reschedule
expiration.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >
const data = {
expiredTime: "2020-05-25T18:51:14Z"
}
const coupon = await api.coupons.setExpiration({id: 'my-second-id',
data});
/credentials:
get:
x-products:
- Core
tags:
- Customer authentication
summary: Retrieve credentials
operationId: GetCredentialCollection
x-sdk-operation-name: getAllCredentials
description: Retrieves a list of authentication credentials.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
responses:
'200':
description: List of authentication credentials retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CustomerCredential'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$customerCredentials = $client->customerCredentials()->search([
'filter' => 'customerId:testCustomer',
]);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$customerCredentials =
$service->customerAuthentication()->getAllCredentials(limit: 10);
- lang: JavaScript
source: >-
// all parameters are optional
const firstCollection = await
api.customerAuthentication.getAllCredentials();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100};
const secondCollection = await
api.customerAuthentication.getAllCredentials(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(credential =>
console.log(credential.fields.customerId));
post:
x-products:
- Core
tags:
- Customer authentication
summary: Create a credential
operationId: PostCredential
x-sdk-operation-name: createCredential
description: Creates an authentication credential.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerCredential'
description: Credential resource.
required: true
responses:
'201':
description: Credential created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerCredential'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$customerCredentialForm = new Rebilly\Entities\CustomerCredential();
$customerCredentialForm->setCustomerId('customerId');
$customerCredentialForm->setUsername('test');
$customerCredentialForm->setPassword('1234');
try {
$customerCredential = $client->customerCredentials()->create($customerCredentialForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// first set the required properties for the new credential
const data = {
username: 'foobar',
password: 'fuubar',
customerId: 'foobar-0001'
// optionally you can define an `expiredTime` to
// limit the duration of the credential
//expiredTime: '2017-09-18T19:17:39Z'
};
// the ID is optional
const firstCredential = await
api.customerAuthentication.createCredential({data});
// or you can provide one
const secondCredential = await
api.customerAuthentication.createCredential({id: 'my-second-id',
data});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$customerCredentialForm =
\Rebilly\Sdk\Model\CustomerCredential::from([])
->setCustomerId('customerId')
->setUsername('test')
->setPassword('1234');
try {
$customerCredential = $service->customerAuthentication()->createCredential($customerCredentialForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/credentials/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Customer authentication
summary: Retrieve a credential
operationId: GetCredential
x-sdk-operation-name: getCredential
description: Retrieves a credential with a specified ID.
responses:
'200':
description: Credential retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerCredential'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$customerCredential =
$client->customerCredentials()->load('credentialId');
- lang: JavaScript
source: >-
const credential = await
api.customerAuthentication.getCredential({id: 'my-first-id'});
console.log(credential.fields.customerId);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$customerCredential =
$service->customerAuthentication()->getCredential('credentialId');
put:
x-products:
- Core
tags:
- Customer authentication
summary: Upsert a credential
operationId: PutCredential
x-sdk-operation-name: updateCredential
description: >-
Creates or updates (upserts) an authentication credential with a
specified ID.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerCredential'
description: Credential resource.
required: true
responses:
'200':
description: Credential updated.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerCredential'
'201':
description: Credential created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerCredential'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$customerCredentialForm = new Rebilly\Entities\CustomerCredential();
$customerCredentialForm->setCustomerId('customerId');
$customerCredentialForm->setUsername('test');
$customerCredentialForm->setPassword('1234');
try {
$customerCredential = $client->customerCredentials()->update('credentialId', $customerCredentialForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// creating a new credential
const data = {
username: 'foobar',
password: 'fuubar',
customerId: 'foobar-0001'
// optionally you can define an `expiredTime` to
// limit the duration of the credential
//expiredTime: '2017-09-18T19:17:39Z'
};
// the ID is optional
const firstCredential = await
api.customerAuthentication.createCredential({data});
// or you can provide one
const secondCredential = await
api.customerAuthentication.createCredential({id: 'my-second-id',
data});
// updating a credential
const data = {
username: 'foobar',
password: 'hell0'
};
const secondCredential = await
api.customerAuthentication.updateCredential({id: 'my-second-id',
data});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$customerCredentialForm =
\Rebilly\Sdk\Model\CustomerCredential::from([])
->setCustomerId('customerId')
->setUsername('test')
->setPassword('1234');
try {
$customerCredential = $service->customerAuthentication()->updateCredential('credentialId', $customerCredentialForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
delete:
x-products:
- Core
tags:
- Customer authentication
summary: Delete a credential
operationId: DeleteCredential
x-sdk-operation-name: deleteCredential
description: Deletes an authentication credential with a specified ID.
responses:
'204':
description: Credential deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$client->customerCredentials()->delete('credentialId');
- lang: JavaScript
source: >-
const request = await
api.customerAuthentication.deleteCredential({id: 'my-second-key'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$service->customerAuthentication()->deleteCredential('credentialId');
/custom-fields/{resource}:
parameters:
- $ref: '#/components/parameters/customFieldResource'
get:
x-products:
- Core
tags:
- Custom fields
summary: Retrieve custom fields
operationId: GetCustomFieldCollection
x-sdk-operation-name: getAll
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
description: Retrieves the custom fields schema for a specified resource.
responses:
'200':
description: Schema of custom fields retrieved.
content:
application/json:
schema:
description: List of custom fields.
type: array
items:
$ref: '#/components/schemas/CustomField'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$customFields = $client->customFields()->search('customers', [
'filter' => 'type:boolean',
]);
- lang: JavaScript
source: >-
// all parameters except `resource` are optional
const firstCollection = await api.customFields.getAll({resource:
'customers'});
// alternatively you can specify one or more of them
const params = {resource: 'customers', limit: 20, offset: 100};
const secondCollection = await api.customFields.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(customField =>
console.log(customField.fields.description));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$customFieldsPaginator =
$service->customFields()->getAllPaginator(resource: 'customers',
limit: 5);
foreach ($customFieldsPaginator as $customFieldPage) {
printf("Custom fields page %d/%d\n", $customFieldsPaginator->key() + 1, $customFieldsPaginator->count());
foreach ($customFieldPage as $customField) {
printf("Custom field #%s: %s\n", $customField->getName(), $customField->getDescription());
}
}
// OR
$customFields = $service->customFields()->getAll('customers');
foreach ($customFields as $customField) {
printf("Custom field #%s: %s\n", $customField->getName(), $customField->getDescription());
}
/custom-fields/{resource}/{name}:
parameters:
- $ref: '#/components/parameters/customFieldResource'
- name: name
in: path
description: ID of the custom field.
required: true
schema:
type: string
maxLength: 60
pattern: ^[\w-]+$
get:
x-products:
- Core
tags:
- Custom fields
summary: Retrieve a custom field
operationId: GetCustomField
x-sdk-operation-name: get
description: Retrieves a specified custom field schema for a specified resource.
responses:
'200':
description: Custom field schema retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomField'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$customField = $client->customFields()->load('customers',
'testFieldName');
- lang: JavaScript
source: >-
const customField = await api.customFields.get({resource:
'customers', name: 'dob'});
console.log(customField.fields.description);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$customField = $service->customFields()->get('customers',
'testFieldName');
put:
x-products:
- Core
tags:
- Custom fields
summary: Create or alter a custom field
operationId: PutCustomField
x-sdk-operation-name: create
description: >-
Creates or alters a specified custom field schema for a specified
resource.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomField'
description: Custom fields schema of the specified resource.
required: true
responses:
'200':
description: Custom field updated.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomField'
'201':
description: Custom field created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/CustomField'
'401':
$ref: '#/components/responses/Unauthorized'
'409':
description: |-
Schema in use. To remove or alter the schema, remove all
associated data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$customFieldForm = new Rebilly\Entities\CustomField();
$customFieldForm->setType($customFieldForm::TYPE_BOOLEAN);
try {
$customField = $client->customFields()->update('customers', 'testFieldName', $customFieldForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: |
// creating a custom field
const data = {
name: 'Date of Birth',
type: 'date',
description: `The customer's date of birth`
};
// define the entire payload
const params = {resource: 'customers', name: 'dob', data};
// create the custom field
const customField = await api.customFields.create(params);
// or update the custom field
const customField = await api.customFields.update(params);
// you can verify if the custom field is used
console.log(customField.fields.isUsed);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$customFieldForm = new \Rebilly\Sdk\Model\BooleanCustomField();
$customFieldForm->setDescription('testFieldDescription');
try {
$customField = $service->customFields()->create('customers', 'testFieldName', $customFieldForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/customers:
get:
x-products:
- Core
tags:
- Customers
summary: Retrieve customers
operationId: GetCustomerCollection
x-sdk-operation-name: getAll
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Retrieves a list of customers.
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'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of customers retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Customer'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$customers = $client->customers()->search([
'filter' => 'firstName:John',
]);
- lang: JavaScript
source: >
// all parameters are optional
const firstCollection = await api.customers.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await api.customers.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(customer =>
console.log(customer.fields.primaryAddress.firstName));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$customersPaginator = $service->customers()->getAllPaginator(limit:
5);
foreach ($customersPaginator as $customerPage) {
printf("Customers page %d/%d\n", $customersPaginator->key() + 1, $customersPaginator->count());
foreach ($customerPage as $customer) {
printf("Customer #%s: %s\n", $customer->getId(), $customer->getFirstName());
}
}
// OR
$customers = $service->customers()->getAll(filter:
'firstName:John');
foreach ($customers as $customer) {
printf("Customer #%s: %s\n", $customer->getId(), $customer->getFirstName());
}
post:
x-products:
- Core
tags:
- Customers
summary: Create a customer
operationId: PostCustomer
x-sdk-operation-name: create
description: >-
Creates a new customer and customer ID.
The customer's primary address is used as the default address for
payment instruments, subscriptions, and invoices if none are provided.
If the customer already has an identifier within your system,
and you want to create customer with a predefined ID &mdash; to
prevent duplicate customers, use the _Upsert a customer
with predefined ID_ operation. For more information, see
[Prevent duplicate
customers](https://www.rebilly.com/docs/dev-docs/concepts/#prevent-duplicate-customers).
requestBody:
$ref: '#/components/requestBodies/Customer'
responses:
'201':
description: Customer created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Customer'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$customerForm = new Rebilly\Entities\Customer();
$customerForm->setPrimaryAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
]);
try {
$customer = $client->customers()->create($customerForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// first set the properties for the new customer
const data = {
primaryAddress: {
firstName: 'John',
lastName: 'Doe',
emails: [{
label: 'main',
value: 'john.doe+test@grr.la',
primary: true
}],
}
};
// the ID is optional
const firstCustomer = await api.customers.create({data});
// or you can provide one
const secondCustomer = await api.customers.create({id:
'my-second-id', data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$customerForm = \Rebilly\Sdk\Model\Customer::from([])
->setWebsiteId('websiteId')
->setPrimaryAddress(
\Rebilly\Sdk\Model\ContactObject::from([])
->setFirstName('John')
->setLastName('Doe')
->setAddress('Test street 5')
->setEmails([
\Rebilly\Sdk\Model\ContactEmails::from([])
->setLabel('main')
->setValue('johndoe@email.com')
->setPrimary(true),
]),
);
try {
$customer = $service->customers()->create($customerForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/customers/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Customers
summary: Retrieve a customer
operationId: GetCustomer
x-sdk-operation-name: get
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Retrieves a customer with a specified ID.
parameters:
- $ref: '#/components/parameters/collectionExpand'
- $ref: '#/components/parameters/collectionFields'
responses:
'200':
description: Customer retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Customer'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$customers = $client->customers()->load('myCustomerId');
- lang: JavaScript
source: |-
const customer = await api.customers.get({id: 'foobar-001'});
console.log(customer.fields.primaryAddress.firstName);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$customer = $service->customers()->get('customerId');
put:
x-products:
- Core
tags:
- Customers
summary: Upsert a customer
operationId: PutCustomer
x-sdk-operation-name: update
description: >-
Creates or updates (upserts) a customer with a specified ID.
If the customer already has an identifier within your system,
and you want to create a customer with a specified ID &mdash; use this
operation to prevent duplicate customers.
For more information, see [Prevent duplicate
customers](https://www.rebilly.com/docs/dev-docs/concepts/#prevent-duplicate-customers).
requestBody:
$ref: '#/components/requestBodies/Customer'
responses:
'200':
$ref: '#/components/responses/Customer'
'201':
description: Customer with a specified ID created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Customer'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$customerForm = new Rebilly\Entities\Customer();
$customerForm->setPrimaryAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
]);
try {
$customer = $client->customers()->update('myCustomerId', $customerForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// creating a customer
const data = {
primaryAddress: {
firstName: 'John',
lastName: 'Doe',
emails: [{
label: 'main',
value: 'john.doe+test@grr.la',
primary: true
}],
}
};
// the ID is optional
const firstCustomer = await api.customers.create({data});
// or you can provide one
const secondCustomer = await api.customers.create({id:
'my-second-id', data});
// updating a customer
const data = {
primaryAddress: {
firstName: 'Johnny',
lastName: 'Doe',
emails: [{
label: 'main',
value: 'johnny.doe+test@grr.la',
primary: true
}],
}
};
const customer = await api.customers.update({id: 'my-second-id',
data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$customerForm = \Rebilly\Sdk\Model\Customer::from([])
->setWebsiteId('websiteId')
->setPrimaryAddress(
\Rebilly\Sdk\Model\ContactObject::from([])
->setFirstName('John')
->setLastName('Doe')
->setAddress('Test street 5')
->setEmails([
\Rebilly\Sdk\Model\ContactEmails::from([])
->setLabel('main')
->setValue('johndoe@email.com')
->setPrimary(true),
]),
);
try {
$customer = $service->customers()->update('myCustomerId', $customerForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
delete:
x-products:
- Core
parameters:
- in: query
name: targetCustomerId
required: true
schema:
type: string
description: |-
ID of the customer that you want to delete. This field is used
to obtain the customer's data.
tags:
- Customers
summary: Merge and delete a customer
operationId: DeleteCustomer
x-sdk-operation-name: merge
description: >-
Merges one duplicate customer to another target customer and deletes the
former.
responses:
'204':
description: Customer is merged and deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$service->customers()->merge('customerId', 'targetCustomerId');
/customer-timeline-custom-events:
get:
x-products:
- Core
tags:
- Customers timeline
summary: Retrieve customer timeline custom event types
operationId: GetCustomerTimelineCustomEventTypeCollection
x-sdk-operation-name: getAll
description: Retrieves a list of customer timeline custom event types.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
responses:
'200':
description: List of customer timeline custom event types retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CustomerTimelineCustomEvent'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-products:
- Core
tags:
- Customers timeline
summary: Create customer timeline custom event type
operationId: PostCustomerTimelineCustomEventType
x-sdk-operation-name: create
description: Creates a customer timeline custom event type.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerTimelineCustomEvent'
description: Customer timeline custom event type resource.
required: true
responses:
'201':
description: Customer timeline custom event type created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerTimelineCustomEvent'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/customer-timeline-custom-events/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Customers timeline
summary: Retrieve customer timeline custom event type
operationId: GetCustomerTimelineCustomEventType
x-sdk-operation-name: get
description: Retrieves a customer timeline custom event type with a specified ID.
responses:
'200':
description: Customer timeline custom event type retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerTimelineCustomEvent'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/customers/{id}/lead-source:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Customers
summary: Retrieve a customer's lead source
operationId: GetCustomerLeadSource
x-sdk-operation-name: getLeadSource
description: >-
Retrieves lead source data for a customer with a specified ID.
A lead source is the marketing campaign that generates customer
interaction, a sale, or a trial.
For more information, see [Lead source
attribution](https://www.rebilly.com/docs/dev-docs/concepts/#lead-source-attribution).
responses:
'200':
description: Lead source retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/LeadSource'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$customer = $client->customers()->load('myCustomerId');
$leadSource = $customer->getLeadSource();
- lang: JavaScript
source: >-
const lead = await api.customers.getLeadSource({id:
'my-second-id'});
console.log(lead.fields.affiliate);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$customerLeadSource =
$service->customers()->getLeadSource('customerId');
put:
x-products:
- Core
tags:
- Customers
summary: Create a customer's lead source
operationId: PutCustomerLeadSource
x-sdk-operation-name: createLeadSource
description: >-
Creates a lead source for a customer with a specified ID.
A lead source is the marketing campaign that
generates customer interaction, a sale, or a trial. For more
information, see
[Lead source
attribution](https://www.rebilly.com/docs/dev-docs/concepts/#lead-source-attribution).
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LeadSource'
description: Lead Source resource.
required: true
responses:
'201':
description: Lead source created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/LeadSource'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$leadSourceForm = new Rebilly\Entities\LeadSource();
$leadSourceForm->setSource('TestSource');
$leadSourceForm->setCampaign('TestCampaign');
try {
$customer = $client->customers()->updateLeadSource('myCustomerId', $leadSourceForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// first set the properties for the new lead source
const data = {
medium: 'foobar',
source: 'www.google.com',
campaign: 'my-first-campaign',
term: 'subscriptions',
content: 'subscription business',
affiliate: 'Acme',
subAffiliate: null,
salesAgent: null,
clickId: null,
path: null,
ipAddress: '12.34.56.78',
currency: 'USD',
amount: 0
};
const lead = await api.customers.createLeadSource({id:
'my-second-id', data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$leadSourceForm = \Rebilly\Sdk\Model\LeadSource::from([])
->setSource('TestSource')
->setCampaign('TestCampaign');
try {
$customer = $service->customers()->createLeadSource('myCustomerId', $leadSourceForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
delete:
x-products:
- Core
tags:
- Customers
summary: Delete a customer's lead source
operationId: DeleteCustomerLeadSource
x-sdk-operation-name: deleteLeadSource
description: Deletes lead source data for a customer with a specified ID.
responses:
'204':
description: Lead source deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$client->customers()->deleteLeadSource('myCustomerId');
- lang: JavaScript
source: >-
const request = await api.customers.deleteLeadSource({id:
'my-second-id'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$service->customers()->deleteLeadSource('customerId');
/customers/{id}/timeline:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Customers timeline
summary: Retrieve customer timeline messages
operationId: GetCustomerTimelineCollection
x-sdk-operation-name: getAllTimelineMessages
description: Retrieves customer timeline messages.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of customer timeline messages retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CustomerTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: JavaScript
source: >-
// all parameters are optional except for the `id`
const firstCollection = await api.customers
.getAllTimelineMessages({id: 'my-customer'});
// alternatively you can specify one or more of them
const params = {id: 'my-customer', limit: 20, offset: 100};
const secondCollection = await
api.customers.getAllTimelineMessages(params);
// access the collection items, each item is a Member
secondCollection.items
.forEach(message => console.log(message.fields.eventType));
post:
x-products:
- Core
tags:
- Customers timeline
summary: Create a customer timeline comment
operationId: PostCustomerTimeline
x-sdk-operation-name: createTimelineComment
description: Creates a customer timeline comment or custom defined event.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerTimeline'
description: Customer timeline resource.
required: true
responses:
'201':
description: Customer timeline comment or custom defined event created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >-
// Create a comment
const firstComment = await api
.customers.createTimelineComment({id: 'my-customer-id', data: {message: 'Your comment here'}});
// Using params object, mentions and references
const message = `Example of mentions @user@mydomain.com and
references #customers-customer-id`;
const params = {
id: 'my-customer-id',
data: {
message,
},
};
const secondComment = await
api.customers.createTimelineComment(params);
/customers/{id}/timeline/{messageId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: messageId
in: path
description: ID of the customer timeline message.
required: true
schema:
type: string
get:
x-products:
- Core
tags:
- Customers timeline
summary: Retrieve a customer timeline message
operationId: GetCustomerTimeline
x-sdk-operation-name: getTimelineMessage
description: Retrieves a customer message with a specified ID.
responses:
'200':
description: Customer message retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: JavaScript
source: |-
const message = await api.customers
.getTimelineMessage({id: 'foobar-001', messageId: 'message-202'});
console.log(message.fields.eventType);
delete:
x-products:
- Core
tags:
- Customers timeline
summary: Delete a customer timeline message
operationId: DeleteCustomerTimeline
x-sdk-operation-name: deleteTimelineMessage
description: Deletes a customer timeline message with a specified ID.
responses:
'204':
description: Customer timeline message deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: JavaScript
source: |-
const request = await api.customers
.deleteTimelineMessage({id: 'foobar-001', messageId: 'message-202'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
/disputes:
get:
x-products:
- Core
tags:
- Disputes
summary: Retrieve disputes
operationId: GetDisputeCollection
x-sdk-operation-name: getAll
description: Retrieves a list of all disputes.
parameters:
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionQuery'
- $ref: '#/components/parameters/collectionExpand'
responses:
'200':
description: List of disputes successfully retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Dispute'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$disputes = $client->disputes()->search([
'filter' => 'transactionId:testId',
]);
- lang: JavaScript
source: >
// all parameters are optional
const firstCollection = await api.disputes.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await api.disputes.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(dispute =>
console.log(dispute.fields.transactionId));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$disputesPaginator = $service->disputes()->getAllPaginator(filter:
'transactionId:testId', limit: 5);
foreach ($disputesPaginator as $disputesPage) {
printf("Disputes page %d/%d\n", $disputesPaginator->key() + 1, $disputesPaginator->count());
foreach ($disputesPage as $dispute) {
printf("Dispute #%s (%s)\n", $dispute->getId(), $dispute->getStatus());
}
}
// OR
$disputes = $service->disputes()->getAll(filter:
'transactionId:testId');
foreach ($disputes as $dispute) {
printf("Dispute #%s (%s)\n", $dispute->getId(), $dispute->getStatus());
}
post:
x-products:
- Core
tags:
- Disputes
summary: Create a dispute
operationId: PostDispute
x-sdk-operation-name: create
description: Creates a new dispute.
requestBody:
$ref: '#/components/requestBodies/Dispute'
responses:
'201':
description: Dispute created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Dispute'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$disputeForm = new Rebilly\Entities\Dispute();
$disputeForm->setTransactionId('transactionId');
$disputeForm->setCurrency('USD');
$disputeForm->setAmount(10);
$disputeForm->setReasonCode(1000);
$disputeForm->setType($disputeForm::TYPE_1CB);
$disputeForm->setStatus($disputeForm::STATUS_RESPONSE_NEEDED);
$disputeForm->setPostedTime('2025-01-01 05:00:00');
try {
$dispute = $client->disputes()->create($disputeForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// first set the properties for the new dispute
const data = {
transactionId: 'my-transaction-id',
currency: 'USD',
amount: 5,
reasonCode: '1000',
type: 'first-chargeback',
status: 'response-needed',
acquirerReferenceNumber: '143543',
postedTime: '2017-09-19T20:46:48Z',
deadlineTime: '2017-09-19T20:46:48Z'
};
// the ID is optional
const firstdispute = await api.disputes.create({data});
// or you can provide one
const secondDispute = await api.disputes.create({id: 'my-second-id',
data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$disputeForm = new \Rebilly\Sdk\Model\Dispute();
$disputeForm->setTransactionId('transactionId');
$disputeForm->setCurrency('USD');
$disputeForm->setAmount(10);
$disputeForm->setReasonCode('1000');
$disputeForm->setType($disputeForm::TYPE_INFORMATION_REQUEST);
$disputeForm->setStatus($disputeForm::STATUS_RESPONSE_NEEDED);
$disputeForm->setPostedTime('2025-01-01 05:00:00');
try {
$dispute = $service->disputes()->create($disputeForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/disputes/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Disputes
summary: Retrieve a dispute
operationId: GetDispute
x-sdk-operation-name: get
description: Retrieves a dispute with a specified ID.
responses:
'200':
description: Dispute retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Dispute'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$dispute = $client->disputes()->load('disputeId');
- lang: JavaScript
source: |-
const dispute = await api.disputes.get({id: 'foobar-001'});
console.log(dispute.fields.firstName);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$dispute = $service->disputes()->get('disputeId');
put:
x-products:
- Core
tags:
- Disputes
summary: Upsert a dispute
operationId: PutDispute
x-sdk-operation-name: update
description: Creates or updates (upserts) a dispute with a specified ID.
requestBody:
$ref: '#/components/requestBodies/Dispute'
responses:
'200':
description: Dispute updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Dispute'
'201':
description: Dispute created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Dispute'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$disputeForm = new Rebilly\Entities\Dispute();
$disputeForm->setTransactionId('transactionId');
$disputeForm->setCurrency('USD');
$disputeForm->setAmount(10);
$disputeForm->setReasonCode(1000);
$disputeForm->setType($disputeForm::TYPE_1CB);
$disputeForm->setStatus($disputeForm::STATUS_RESPONSE_NEEDED);
$disputeForm->setPostedTime('2025-01-01 05:00:00');
try {
$dispute = $client->disputes()->update('disputeId', $dispute);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// creating a dispute
const data = {
transactionId: 'my-transaction-id',
currency: 'USD',
amount: 5,
reasonCode: '1000',
type: 'first-chargeback',
status: 'response-needed',
acquirerReferenceNumber: '143543',
postedTime: '2017-09-19T20:46:48Z',
deadlineTime: '2017-09-19T20:46:48Z'
};
// the ID is optional
const firstdispute = await api.disputes.create({data});
// or you can provide one
const secondDispute = await api.disputes.create({id: 'my-second-id',
data});
// updating a dispute
const data = {
transactionId: 'my-other-transaction-id',
currency: 'USD',
amount: 5,
reasonCode: '1000',
type: 'first-chargeback',
status: 'response-needed',
acquirerReferenceNumber: '143543',
postedTime: '2017-09-19T20:46:48Z',
deadlineTime: '2017-09-19T20:46:48Z'
};
const dispute = await api.disputes.update({id: 'my-second-id',
data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$disputeForm = new \Rebilly\Sdk\Model\Dispute();
$disputeForm->setTransactionId('transactionId');
$disputeForm->setCurrency('USD');
$disputeForm->setAmount(10);
$disputeForm->setReasonCode('1000');
$disputeForm->setType($disputeForm::TYPE_INFORMATION_REQUEST);
$disputeForm->setStatus($disputeForm::STATUS_RESPONSE_NEEDED);
$disputeForm->setPostedTime('2025-01-01 05:00:00');
try {
$dispute = $service->disputes()->update('disputeId', $disputeForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/{resource}/{resourceId}/external-identifiers/{service}:
parameters:
- $ref: '#/components/parameters/externalIdentifierResource'
- $ref: '#/components/parameters/externalIdentifierResourceId'
- $ref: '#/components/parameters/externalIdentifierService'
/files:
get:
x-products:
- Core
tags:
- Files
summary: Retrieve files
operationId: GetFileCollection
x-sdk-operation-name: getAll
description: Retrieves a list of files.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionQuery'
- $ref: '#/components/parameters/collectionFields'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of files retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/File'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$files = $client->files()->search([
'filter' => 'name:TestFile',
]);
- lang: JavaScript
source: >-
// all parameters are optional
const firstCollection = await api.files.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await api.files.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(file =>
console.log(file.fields.name));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$filesPaginator = $service->files()->getAllPaginator(limit: 5,
filter: 'name:TestFile');
foreach ($filesPaginator as $filesPage) {
printf("Files page %d/%d\n", $filesPaginator->key() + 1, $filesPaginator->count());
foreach ($filesPage as $file) {
printf("File #%s: %s\n", $file->getId(), $file->getName());
}
}
// OR
$files = $service->files()->getAll(filter: 'name:TestFile');
foreach ($files as $file) {
printf("File #%s: %s\n", $file->getId(), $file->getName());
}
post:
x-products:
- Core
tags:
- Files
summary: Create a file
operationId: PostFile
x-sdk-operation-name: upload
security:
- SecretApiKey: []
- JWT: []
- PublishableApiKey: []
description: |-
Creates a file.
Additionally, a file can be sent by:
- Multipart/form-data POST request: In this request, the file is
uploaded and all property names are the same as the JSON names.
- File body request: In this request, the file body is sent as
the request body, with the appropriate `Content-Type`. No
additional properties can be set with the request data.
Permitted file types: `.jpg`, `.png`, `.gif`, and `.pdf`.
When using a publishable API key, only private files can be created.
The files can be modified at a later point or time, or can be
accessed using a secret API key.
requestBody:
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/FileCreateFromInline'
- $ref: '#/components/schemas/FileCreateFromUrl'
required: true
responses:
'201':
description: File created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/File'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$fileForm = new Rebilly\Entities\File();
$fileForm->setUrl('http://test.com/somefile.jpg');
try {
$file = $client->files()->create($fileForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// using a FileList to fetch a file
const fileObject = fileList[0];
const addedFile = await api.files.upload({fileObject});
// or, upload and update a file at the same time
// using a FileList to fetch a file
const fileObject = fileList[0];
// define file data
const data = {
description: 'my new file',
tags: ['original']
};
const addedFile = await api.files.uploadAndUpdate({fileObject,
data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$fileForm = new \Rebilly\Sdk\Model\FileCreateFromUrl();
$fileForm->setUrl('http://test.com/somefile.jpg');
try {
$file = $service->files()->upload($fileForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/files/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Files
summary: Retrieve a file record
operationId: GetFile
x-sdk-operation-name: get
description: Retrieves a file with a specified ID.
responses:
'200':
description: File retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/File'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$file = $client->files()->load('fileId');
- lang: JavaScript
source: |-
const file = await api.files.get({id: 'foobar-001'});
console.log(file.fields.name);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$file = $service->files()->get('fileId');
put:
x-products:
- Core
tags:
- Files
summary: Update a file
operationId: PutFile
x-sdk-operation-name: update
description: |-
Updates a file with a specified ID.
> **Note:** Files can only be uploaded by POST request.
For more information, see the Create a file operation.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/File'
description: File resource.
required: true
responses:
'200':
description: File updated.
content:
application/json:
schema:
$ref: '#/components/schemas/File'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$fileForm = new Rebilly\Entities\File();
$fileForm->setDescription('This is a test file');
try {
$file = $client->files()->update('fileId', $fileForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// define the values to update
const data = {
name: 'new file name',
description: 'a fitting description',
tags: ['original']
};
const file = await api.files.update({id: 'my-file-id', data});
// or, upload and update a file at the same time
// using a FileList to fetch a file
const fileObject = fileList[0];
// define file data
const data = {
description: 'my new file',
tags: ['original']
};
const addedFile = await api.files.uploadAndUpdate({fileObject,
data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$fileForm = new \Rebilly\Sdk\Model\File();
$fileForm->setDescription('This is a test file');
try {
$file = $service->files()->update('fileId', $fileForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
delete:
x-products:
- Core
tags:
- Files
summary: Delete a file
operationId: DeleteFile
x-sdk-operation-name: delete
description: Deletes a file with a specified ID.
responses:
'204':
description: File deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$client->files()->delete('fileId');
- lang: JavaScript
source: >-
// simply delete a file
const request = await api.files.delete({id: 'my-file-id'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
// or, delete a file and its related resource attachments
// use this method to remove the file completely from all resources
at once.
const request = await api.files.detachAndDelete({id: 'my-file-id'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$service->files()->delete('fileId');
/files/{id}/download:
parameters:
- $ref: '#/components/parameters/resourceId'
- $ref: '#/components/parameters/imageSize'
get:
x-products:
- Core
tags:
- Files
summary: Download a file
operationId: GetFileDownload
x-sdk-operation-name: download
description: Downloads a file with a specified ID.
responses:
'200':
description: File retrieved.
headers:
Content-Length:
description: Number of bytes in the file.
schema:
type: integer
example: 48
Content-Type:
description: MIME type of the file.
schema:
type: string
example: image/png
content:
application/json:
schema:
type: string
readOnly: true
format: binary
application/pdf:
schema:
type: string
readOnly: true
format: binary
application/zip:
schema:
type: string
readOnly: true
format: binary
image/jpg:
schema:
type: string
readOnly: true
format: binary
image/png:
schema:
type: string
readOnly: true
format: binary
image/gif:
schema:
type: string
readOnly: true
format: binary
text/csv:
schema:
type: string
readOnly: true
format: binary
'302':
$ref: '#/components/responses/Found'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: JavaScript
source: |-
const file = await api.files.download({id: 'my-file-id'});
// access the file ArrayBuffer to view the content
console.log(file.data);
/application-instances/{applicationId}:
parameters:
- $ref: '#/components/parameters/applicationId'
/application-instances/{applicationId}/configuration:
parameters:
- $ref: '#/components/parameters/applicationId'
/applications/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/applications/{id}/instances:
parameters:
- $ref: '#/components/parameters/resourceId'
/applications/{id}/instances/{organizationId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- $ref: '#/components/parameters/organizationId'
/invoices:
get:
x-products:
- Core
tags:
- Invoices
summary: Retrieve invoices
operationId: GetInvoiceCollection
x-sdk-operation-name: getAll
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Retrieves a list of invoices.
parameters:
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionQuery'
- $ref: '#/components/parameters/collectionExpand'
responses:
'200':
description: List of invoices retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Invoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$invoices = $client->invoices()->search([
'filter' => 'customerId:testCustomerId',
]);
- lang: JavaScript
source: >
// all parameters are optional
const firstCollection = await api.invoices.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await api.invoices.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(invoice =>
console.log(invoice.fields.firstName));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$invoicesPaginator = $service->invoices()->getAllPaginator(filter:
'customerId:testCustomerId', limit: 5);
foreach ($invoicesPaginator as $invoicePage) {
printf("Invoices page %d/%d\n", $invoicesPaginator->key() + 1, $invoicesPaginator->count());
foreach ($invoicePage as $invoice) {
printf("Invoice #%s (%s): %.2f\n", $invoice->getId(), $invoice->getStatus(), $invoice->getAmount());
}
}
// OR
$invoices = $service->invoices()->getAll(filter:
'customerId:testCustomerId', limit: 100);
foreach ($invoices as $invoice) {
printf("Invoice #%s (%s): %.2f\n", $invoice->getId(), $invoice->getStatus(), $invoice->getAmount());
}
post:
x-products:
- Core
tags:
- Invoices
summary: Create an invoice
operationId: PostInvoice
x-sdk-operation-name: create
description: Creates an invoice.
requestBody:
$ref: '#/components/requestBodies/Invoice'
responses:
'201':
description: Invoice created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Invoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$invoiceForm = new Rebilly\Entities\Invoice();
$invoiceForm->setCustomerId('customerId');
$invoiceForm->setWebsiteId('websiteId');
$invoiceForm->setCurrency('USD');
$invoiceForm->setBillingAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
]);
try {
$invoice = $client->invoices()->create($invoiceForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// first set the properties for the new invoice
const data = {
customerId: 'foobar-0001',
websiteId: 'my-main-website',
currency: 'USD',
billingAddress: {
firstName: 'Johnny',
lastName: 'Brown',
emails: [{
label: 'main',
value: 'johnny+test@grr.la',
primary: true
}],
},
deliveryAddress: {
firstName: 'Johnny',
lastName: 'Brown',
emails: [{
label: 'main',
value: 'johnny+test@grr.la',
primary: true
}],
},
notes: `customer's first invoice`,
};
// the ID is optional
const firstInvoice = await api.invoices.create({data});
// or you can provide one
const secondInvoice = await api.invoices.create({id: 'my-second-id',
data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$invoice = \Rebilly\Sdk\Model\Invoice::from()
->setCustomerId('customerId')
->setWebsiteId('websiteId')
->setCurrency('USD')
->setBillingAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
]);
try {
$invoice = $service->invoices()->create($invoice);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/invoices/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Invoices
summary: Retrieve an invoice
operationId: GetInvoice
x-sdk-operation-name: get
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Retrieves an invoice with a specified ID.
parameters:
- $ref: '#/components/parameters/mediaTypeJsonPdf'
- $ref: '#/components/parameters/collectionExpand'
responses:
'200':
description: Invoice retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Invoice'
application/pdf:
schema:
$ref: '#/components/schemas/Invoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$invoice = $client->invoices()->load('invoiceId');
- lang: JavaScript
source: |-
const invoice = await api.invoices.get({id: 'foobar-001'});
console.log(invoice.fields.primaryAddress.firstName);
// alternatively, download as a PDF file
const pdf = await api.invoices.downloadPDF({id: 'foobar-001'});
// the invoice's data in arraybuffer format
console.log(pdf.data);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$invoice = $service->invoices()->get('invoiceId');
put:
x-products:
- Core
tags:
- Invoices
summary: Upsert an invoice
operationId: PutInvoice
x-sdk-operation-name: update
description: Creates or updates (upserts) an invoice with a specified ID.
requestBody:
$ref: '#/components/requestBodies/Invoice'
responses:
'200':
description: Invoice updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Invoice'
'201':
description: Invoice created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Invoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$invoiceForm = new Rebilly\Entities\Invoice();
$invoiceForm->setCustomerId('customerId');
$invoiceForm->setWebsiteId('websiteId');
$invoiceForm->setCurrency('USD');
$invoiceForm->setBillingAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
]);
try {
$invoice = $client->invoices()->update('invoiceId', $invoiceForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// creating an invoice
const data = {
customerId: 'foobar-0001',
websiteId: 'my-main-website',
currency: 'USD',
billingAddress: {
firstName: 'Johnny',
lastName: 'Brown',
emails: [{
label: 'main',
value: 'johnny+test@grr.la',
primary: true
}],
},
deliveryAddress: {
firstName: 'Johnny',
lastName: 'Brown',
emails: [{
label: 'main',
value: 'johnny+test@grr.la',
primary: true
}],
},
notes: `customer's first invoice`,
};
// the ID is optional
const firstInvoice = await api.invoices.create({data});
// or you can provide one
const secondInvoice = await api.invoices.create({id: 'my-second-id',
data});
// updating an invoice
const data = {
customerId: 'foobar-0001',
websiteId: 'my-main-website',
currency: 'USD',
billingAddress: {
firstName: 'Johnny',
lastName: 'Brown',
emails: [{
label: 'main',
value: 'johnny+test@grr.la',
primary: true
}],
},
deliveryAddress: {
firstName: 'Johnny',
lastName: 'Brown',
emails: [{
label: 'main',
value: 'johnny+test@grr.la',
primary: true
}],
},
notes: `customer's first invoice`,
};
const invoice = await api.invoices.update({id: 'my-second-id',
data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$invoice = \Rebilly\Sdk\Model\Invoice::from()
->setCustomerId('customerId')
->setWebsiteId('websiteId')
->setCurrency('USD')
->setBillingAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
]);
try {
$invoice = $service->invoices()->update('invoiceId', $invoice);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/invoices/{id}/items:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Invoices
summary: Retrieve invoice items
operationId: GetInvoiceItemCollection
x-sdk-operation-name: getAllInvoiceItems
description: Retrieves invoice items with a specified invoice ID.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionExpand'
responses:
'200':
description: Invoice items retrieved.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/InvoiceItem'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$invoiceItems = $client->invoiceItems()->search('invoiceId', [
'filter' => 'quantity:5',
]);
- lang: JavaScript
source: >-
// get the top 20 invoice items for this ID
const invoiceItems = await api.invoices.getAllInvoiceItems({id:
'my-invoice-id', limit: 20});
invoiceItems.items.forEach(item =>
console.log(item.fields.description));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$invoiceItems =
$service->invoices()->getAllInvoiceItems('invoiceId');
post:
x-products:
- Core
tags:
- Invoices
summary: Create an invoice item
operationId: PostInvoiceItem
x-sdk-operation-name: createInvoiceItem
description: Creates an invoice item.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceItem'
description: InvoiceItem resource.
required: true
responses:
'201':
description: Invoice item created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceItem'
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$invoiceItemForm = new Rebilly\Entities\InvoiceItem();
$invoiceItemForm->setType($invoiceItemForm::TYPE_DEBIT);
$invoiceItemForm->setUnitPrice(0.99);
$invoiceItemForm->setQuantity(5);
try {
$invoiceItem = $client->invoiceItems()->create($invoiceItemForm, 'invoiceId');
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// first set the properties for the new invoice item
const data = {
type: 'debit',
unitPrice: 5
};
const invoiceItem = await api.invoices.createInvoiceItem({id:
'my-second-id', data});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$invoiceItem = new \Rebilly\Sdk\Model\InvoiceItem();
$invoiceItemForm->setType(\Rebilly\Sdk\Model\InvoiceItem::TYPE_DEBIT);
$invoiceItemForm->setUnitPrice(0.99);
$invoiceItemForm->setQuantity(5);
try {
$invoiceItem = $service->invoices()->createInvoiceItem('invoiceId', $invoiceItem);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/invoices/{id}/items/{itemId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: itemId
in: path
description: ID of the invoice item.
required: true
schema:
type: string
get:
x-products:
- Core
tags:
- Invoices
summary: Retrieve an invoice item
operationId: GetInvoiceItem
x-sdk-operation-name: getInvoiceItem
description: Retrieves an invoice item.
responses:
'200':
description: Invoice item retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceItem'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$invoiceItems = $client->invoiceItems()->load('invoiceId');
- lang: JavaScript
source: >
const invoiceItem = await api.invoices.getInvoiceItem({id:
'foobar-001'});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$invoiceItem = $service->invoices()->getInvoiceItem('invoiceId',
'invoiceItemId');
put:
x-products:
- Core
tags:
- Invoices
summary: Update an invoice item
operationId: PutInvoiceItem
x-sdk-operation-name: updateInvoiceItem
description: Updates an invoice item.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceItem'
description: Invoice item resource.
required: true
responses:
'200':
description: Invoice item updated.
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceItem'
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$invoiceItemForm = new Rebilly\Entities\InvoiceItem();
$invoiceItemForm->setType($invoiceItemForm::TYPE_DEBIT);
$invoiceItemForm->setUnitPrice(0.99);
$invoiceItemForm->setQuantity(5);
try {
$invoiceItem = $client->invoiceItems()->update($invoiceItemForm, 'invoiceId', 'invoiceItemId');
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >
// first set the properties for the new invoice item
const data = {
type: 'debit',
unitPrice: 5
};
const invoiceItem = await api.invoices.updateInvoiceItem({id: 'id',
itemId: 'itemId', data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$invoiceItem = \Rebilly\Sdk\Model\InvoiceItem::from([
'type' => \Rebilly\Sdk\Model\InvoiceItem::TYPE_DEBIT,
'unitPrice' => 0.99,
'quantity' => 5,
]);
try {
$invoiceItem = $service->invoices()->updateInvoiceItem('invoiceId', 'invoiceItemId', $invoiceItem);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
delete:
x-products:
- Core
tags:
- Invoices
summary: Delete an invoice item
operationId: DeleteInvoiceItem
x-sdk-operation-name: deleteInvoiceItem
description: Deletes an invoice item.
responses:
'204':
description: Invoice item deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$client->invoiceItems()->delete('invoiceId', 'invoiceItemId');
- lang: JavaScript
source: >
const invoiceItem = await api.invoices.deleteInvoiceItem({id: 'id',
itemId: 'itemId'});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$service->invoices()->deleteInvoiceItem('invoiceId',
'invoiceItemId');
/invoices/{id}/issue:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Invoices
summary: Issue an invoice
operationId: PostInvoiceIssuance
x-sdk-operation-name: issue
description: |-
Issues an invoice with a specified ID.
The invoice must be in `draft` status.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceIssue'
description: Invoice issue resource.
required: true
responses:
'201':
description: Invoice issued.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Invoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$invoice = $client->invoices()->issue('invoiceId', '2025-01-01
05:00:00');
- lang: JavaScript
source: >-
// define the issued time
const data = {
issuedTime: "2017-09-19T20:46:51Z"
};
// issue the invoice without an issued time
const firstInvoice = await api.invoices.issue({id: 'my-first-id'});
// or include it
const secondInvoice = await api.invoices.issue({id: 'my-second-id',
data});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$invoice = $service->invoices()->issue('invoiceId', new
\Rebilly\Sdk\Model\InvoiceIssue([
'issuedTime' => '2025-01-01 05:00:00',
]));
/invoices/{id}/abandon:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Invoices
summary: Abandon an invoice
operationId: PostInvoiceAbandonment
x-sdk-operation-name: abandon
description: Abandons an invoice with a specified ID.
responses:
'201':
description: Invoice abandoned.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Invoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$invoice = $client->invoices()->abandon('invoiceId');
- lang: JavaScript
source: >-
const abandonedInvoice = await api.invoices.abandon({id:
'my-invoice-id'});
console.log(abandonedInvoice.fields.status);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$invoice = $service->invoices()->abandon('invoiceId');
/invoices/{id}/void:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Invoices
summary: Void an invoice
operationId: PostInvoiceVoid
x-sdk-operation-name: void
description: Voids an invoice with a specified ID.
responses:
'201':
description: Invoice voided.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Invoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$invoice = $client->invoices()->void('invoiceId');
- lang: JavaScript
source: >-
const voidedInvoice = await api.invoices.void({id:
'my-invoice-id'});
console.log(voidedInvoice.fields.status);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$invoice = $service->invoices()->void('invoiceId');
/invoices/{id}/recalculate:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Invoices
summary: Recalculate an invoice
operationId: PostInvoiceRecalculation
x-sdk-operation-name: recalculate
description: >-
Recalculates shipping rates, taxes, and discounts on an invoice with a
specified ID.
One use case for this operation to apply a revoked coupon,
or coupon that is redeemed by a customer after the invoice is issued.
responses:
'201':
description: Invoice recalculated.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Invoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$invoice = $service->invoices()->recalculate('invoiceId');
/invoices/{id}/reissue:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Invoices
summary: Reissue an invoice
operationId: PostInvoiceReissuance
x-sdk-operation-name: reissue
description: |-
Reissues an invoice with a specified ID.
The status of the invoice must be `unpaid` or `past-due`.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceReissue'
description: InvoiceReissue resource.
required: true
responses:
'201':
description: Invoice reissued.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Invoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$invoiceReissue = new \Rebilly\Sdk\Model\InvoiceReissue([
'dueTime' => '2025-01-01 05:00:00',
]);
try {
$invoiceReissue = $service->invoices()->reissue('invoiceId', $invoiceReissue);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/invoices/{id}/transaction-allocations:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Invoices
summary: Retrieve transaction amounts allocations
operationId: GetInvoiceTransactionAllocationCollection
x-sdk-operation-name: getAllTransactionAllocations
description: >-
Retrieves amounts from a transaction that are allocated as invoice
payments.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
responses:
'200':
description: List of allocations retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/InvoiceTransactionAllocation'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$transactionAllocations =
$service->invoices()->getAllTransactionAllocations('invoiceId');
/invoices/{id}/transaction:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Invoices
summary: Apply a transaction to an invoice
operationId: PostInvoiceTransaction
x-sdk-operation-name: applyTransaction
description: >-
Applies a transaction to an invoice.
The invoice status must be `unpaid`, and the transaction must have a
non-zero unused amount.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceTransaction'
description: Invoice transaction resource.
required: true
responses:
'200':
description: Transaction applied to invoice.
content:
application/json:
schema:
$ref: '#/components/schemas/Invoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: |
const params = {
id: 'my-invoice-id',
transactionId: 'my-transaction-id',
amount: 12,99
};
const invoice = await api.invoices.applyTransaction(params);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$invoiceTransaction = new \Rebilly\Sdk\Model\InvoiceTransaction([
'transactionId' => 'transactionId',
'amount' => 149.99,
]);
try {
$invoiceTransaction = $service->invoices()->applyTransaction('invoiceId', $invoiceTransaction);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/invoices/{id}/timeline:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Invoices timeline
summary: Retrieve invoice timeline messages
operationId: GetInvoiceTimelineCollection
x-sdk-operation-name: getAllTimelineMessages
description: Retrieves a list of invoice timeline messages.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of invoice timeline messages retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/InvoiceTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: JavaScript
source: >-
// all parameters are optional except for the `id`
const firstCollection = await api.invoices
.getAllTimelineMessages({id: 'my-invoice'});
// alternatively you can specify one or more of them
const params = {id: 'my-invoice', limit: 20, offset: 100};
const secondCollection = await
api.invoices.getAllTimelineMessages(params);
// access the collection items, each item is a Member
secondCollection.items
.forEach(message => console.log(message.fields.eventType));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$timelineMessages =
$service->invoices()->getAllTimelineMessages('invoiceId', filter:
'triggeredBy:direct-api');
post:
x-products:
- Core
tags:
- Invoices timeline
summary: Create an invoice timeline comment
operationId: PostInvoiceTimeline
x-sdk-operation-name: createTimelineComment
description: Creates an invoice timeline comment.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceTimeline'
description: Invoice Timeline resource.
required: true
responses:
'201':
description: Invoice timeline comment created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >-
// Create a comment
const firstComment = await api
.invoices.createTimelineComment({id: 'my-invoice-id', data: {message: 'Your comment here'}});
// Using params object, mentions and references
const message = `Example of mentions @user@mydomain.com and
references #invoice-subscription-id`;
const params = {
id: 'my-invoice-id',
data: {
message,
},
};
const secondComment = await
api.invoices.createTimelineComment(params);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$timelineMessage = new \Rebilly\Sdk\Model\InvoiceTimeline([
'message' => 'Automatic message',
]);
try {
$timelineMessage = $service->invoices()->createTimelineComment('invoiceId', $timelineMessage);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/invoices/{id}/timeline/{messageId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: messageId
in: path
description: ID of the invoice timeline message.
required: true
schema:
type: string
get:
x-products:
- Core
tags:
- Invoices timeline
summary: Retrieve an invoice timeline message
operationId: GetInvoiceTimeline
x-sdk-operation-name: getTimelineMessage
description: Retrieves an invoice timeline message with a specified ID.
responses:
'200':
description: Invoice message retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: JavaScript
source: |-
const message = await api.invoices
.getTimelineMessage({id: 'foobar-001', messageId: 'message-202'});
console.log(message.fields.eventType);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$timelineMessage =
$service->invoices()->getTimelineMessage('invoiceId', 'messageId');
delete:
x-products:
- Core
tags:
- Invoices timeline
summary: Delete an invoice timeline message
operationId: DeleteInvoiceTimeline
x-sdk-operation-name: deleteTimelineMessage
description: Deletes an invoice timeline message with a specified ID.
responses:
'204':
description: Invoice timeline message deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: JavaScript
source: |-
const request = await api.invoices
.deleteTimelineMessage({id: 'foobar-001', messageId: 'message-202'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$service->invoices()->deleteTimelineMessage('invoiceId',
'messageId');
/credit-memos:
get:
x-products:
- Core
tags:
- Credit memos
summary: Retrieve credit memos
operationId: GetCreditMemoCollection
x-sdk-operation-name: getAll
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Retrieves a list of credit memos.
parameters:
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of credit memos retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CreditMemo'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-products:
- Core
tags:
- Credit memos
summary: Create a credit memo
operationId: PostCreditMemo
x-sdk-operation-name: create
description: Creates a credit memo.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreditMemo'
responses:
'201':
description: Credit memo created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/CreditMemo'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/credit-memos/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Credit memos
summary: Retrieve a credit memo
operationId: GetCreditMemo
x-sdk-operation-name: get
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Retrieves a credit memo with a specified ID.
responses:
'200':
description: Credit memo retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/CreditMemo'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-products:
- Core
tags:
- Credit memos
summary: Upsert a credit memo
operationId: PutCreditMemo
x-sdk-operation-name: update
description: Creates or updates (upserts) a credit memo with a specified ID.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreditMemo'
responses:
'200':
description: Credit memo updated.
content:
application/json:
schema:
$ref: '#/components/schemas/CreditMemo'
'201':
description: Credit memo created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/CreditMemo'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
patch:
x-products:
- Core
tags:
- Credit memos
summary: Partially update a credit memo
operationId: PatchCreditMemo
x-sdk-operation-name: patch
description: Partially updates a credit memo with a specified ID.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PatchCreditMemo'
responses:
'200':
description: Credit memo updated.
content:
application/json:
schema:
$ref: '#/components/schemas/CreditMemo'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
/credit-memos/{id}/void:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Credit memos
summary: Void a credit memo
operationId: PostCreditMemoVoid
x-sdk-operation-name: void
description: Voids a credit memo with a specified ID.
responses:
'201':
description: Credit memo voided.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/CreditMemo'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/credit-memos/{id}/timeline:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Credit memos timeline
summary: Retrieve credit memo timeline messages
operationId: GetCreditMemoTimelineCollection
x-sdk-operation-name: getAllTimelineMessages
description: Retrieves a list of credit memo timeline messages.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of credit memo timeline messages retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CreditMemoTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-products:
- Core
tags:
- Credit memos timeline
summary: Create a credit memo timeline message
operationId: PostCreditMemoTimeline
x-sdk-operation-name: createTimelineComment
description: Creates a credit memo timeline message.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreditMemoTimeline'
description: Credit memo timeline resource.
required: true
responses:
'201':
description: Credit memo timeline message created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/CreditMemoTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/credit-memos/{id}/timeline/{messageId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: messageId
in: path
description: ID of the credit memo timeline message.
required: true
schema:
type: string
get:
x-products:
- Core
tags:
- Credit memos timeline
summary: Retrieve a credit memo timeline message
operationId: GetCreditMemoTimeline
x-sdk-operation-name: getTimelineMessage
description: Retrieves a credit memo timeline message with a specified ID.
responses:
'200':
description: Credit memo timeline message retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/CreditMemoTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
delete:
x-products:
- Core
tags:
- Credit memos timeline
summary: Delete a credit memo timeline message
operationId: DeleteCreditMemoTimeline
x-sdk-operation-name: deleteTimelineMessage
description: Deletes a credit memo timeline message with a specified ID.
responses:
'204':
description: Credit memo timeline message deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
/journal-accounts:
get:
x-products:
- Core
tags:
- Journal
summary: Retrieve journal accounts
operationId: GetJournalAccountCollection
x-sdk-operation-name: getAllAccounts
description: Retrieves a list of journal accounts.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of journal accounts retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/JournalAccount'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-products:
- Core
tags:
- Journal
summary: Create a journal account
operationId: PostJournalAccount
x-sdk-operation-name: createAccount
description: Creates a journal account.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/JournalAccount'
description: Journal account resource.
required: true
responses:
'201':
description: Journal account created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/JournalAccount'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/journal-accounts/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Journal
summary: Retrieve journal account
operationId: GetJournalAccount
x-sdk-operation-name: getAccount
description: Retrieves a journal account with a specified ID.
responses:
'200':
description: Journal account retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/JournalAccount'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-products:
- Core
tags:
- Journal
summary: Upsert a journal account
operationId: PutJournalAccount
x-sdk-operation-name: updateAccount
description: Creates or updates (upsert) a journal account.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/JournalAccount'
description: Journal account resource.
required: true
responses:
'200':
description: Journal account updated.
content:
application/json:
schema:
$ref: '#/components/schemas/JournalAccount'
'201':
description: Journal account created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/JournalAccount'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
/journal-entries:
get:
x-products:
- Core
tags:
- Journal
summary: Retrieve journal entries
operationId: GetJournalEntryCollection
x-sdk-operation-name: getAllEntries
description: Retrieves a list of journal entries.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of journal entries retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/JournalEntry'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-products:
- Core
tags:
- Journal
summary: Create a journal entry
operationId: PostJournalEntry
x-sdk-operation-name: createEntry
description: Creates a journal entry.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/JournalEntry'
description: Journal entry resource.
required: true
responses:
'201':
description: Journal entry created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/JournalEntry'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/journal-entries/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Journal
summary: Retrieve journal entry
operationId: GetJournalEntry
x-sdk-operation-name: getEntry
description: Retrieves a journal entry with a specified ID.
responses:
'200':
description: Journal entry retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/JournalEntry'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-products:
- Core
tags:
- Journal
summary: Upsert a journal entry
operationId: PutJournalEntry
x-sdk-operation-name: updateEntry
description: Creates or updates (upsert) a journal entry.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/JournalEntry'
description: Journal entry resource.
required: true
responses:
'200':
description: Journal entry updated.
content:
application/json:
schema:
$ref: '#/components/schemas/JournalEntry'
'201':
description: Journal entry created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/JournalEntry'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
/journal-entries/{id}/records:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Journal
summary: Retrieve journal records
operationId: GetJournalRecordCollection
x-sdk-operation-name: getAllRecords
description: Retrieves a list of journal records.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionExpand'
responses:
'200':
description: List of journal records retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/JournalRecord'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-products:
- Core
tags:
- Journal
summary: Create a journal record
operationId: PostJournalRecord
x-sdk-operation-name: createRecord
description: Creates a journal record.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/JournalRecord'
description: Journal record resource.
required: true
responses:
'201':
description: Journal record created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/JournalRecord'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/journal-entries/{id}/records/{journalRecordId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- $ref: '#/components/parameters/journalRecordId'
get:
x-products:
- Core
tags:
- Journal
summary: Retrieve journal record
operationId: GetJournalRecord
x-sdk-operation-name: getRecord
description: Retrieves a journal record with a specified ID.
responses:
'200':
description: Journal record retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/JournalRecord'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-products:
- Core
tags:
- Journal
summary: Upsert a journal record
operationId: PutJournalRecord
x-sdk-operation-name: updateRecord
description: Creates or updates (upsert) a journal record.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/JournalRecord'
description: Journal record resource.
required: true
responses:
'200':
description: Journal record updated.
content:
application/json:
schema:
$ref: '#/components/schemas/JournalRecord'
'201':
description: Journal record created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/JournalRecord'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
delete:
x-products:
- Core
tags:
- Journal
summary: Delete a journal record
operationId: DeleteJournalRecord
x-sdk-operation-name: deleteRecord
description: Deletes a journal record.
responses:
'204':
description: Journal record deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
/kyc-requests:
post:
x-products:
- Core
tags:
- KYC documents
summary: Create a KYC request
operationId: PostKycRequest
x-sdk-operation-name: create
description: >-
Creates a KYC request.
The customer is redirected to the `kycGatherer` link.
After the customer completes the KYC process,
they are redirected back to the `redirectUrl` link.
Corresponding webhooks, such as: KYC document accepted and KYC document
rejected,
are sent to the subscribers.
When the complete list of documents is received and accepted,
the KYC request fulfilled webhook is sent to subscribers.
If a `credit-file-proof` request is successful,
it returns a `decision` value of `single-source` or `dual-source`.
The corresponding `identity-proof` and `address-proof` documents are not
requested.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/KycRequest'
examples:
credit-file-identity-address:
summary: Credit file with fallback
description: >-
In the sandbox environment, to mark a `credit-file-proof` KYC
document as `accepted`,
pass the customer's first name to the `accept` field.
If an incorrect first name is passed, the document is
rejected.
value:
customerId: '123_456789'
redirectUrl: https://example.com/return-here/
documents:
- type: credit-file-proof
maxAttempts: 1
- type: identity-proof
- type: address-proof
reason: registration
identity-with-face-proof:
summary: Identity with face proof
value:
customerId: '123_456789'
redirectUrl: https://example.com/return-here/
documents:
- type: identity-proof
faceProofRequired: true
faceLivenessRequired: false
reason: registration
identity-and-address:
summary: Identity and address
value:
customerId: '123_456789'
redirectUrl: https://example.com/return-here/
documents:
- type: identity-proof
- type: address-proof
reason: registration
description: KYC request resource.
required: true
responses:
'201':
description: KYC request created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/KycRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
get:
x-products:
- Core
tags:
- KYC documents
summary: Retrieve KYC requests
operationId: GetKycRequestCollection
x-sdk-operation-name: getAll
description: Retrieves a list of KYC requests.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of KYC requests retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/KycRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/kyc-requests/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- KYC documents
summary: Retrieve a KYC request
operationId: GetKycRequest
x-sdk-operation-name: get
description: Retrieves a KYC request with a specified ID.
responses:
'200':
description: KYC request retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/KycRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
patch:
x-products:
- Core
tags:
- KYC documents
summary: Update a KYC request
operationId: PatchKycRequest
x-sdk-operation-name: update
description: Updates a KYC request with a specified ID.
requestBody:
$ref: '#/components/requestBodies/PatchKycRequest'
description: KYC document resource.
required: true
responses:
'200':
description: KYC request updated.
content:
application/json:
schema:
$ref: '#/components/schemas/KycRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
delete:
x-products:
- Core
tags:
- KYC documents
summary: Delete the KYC request
operationId: DeleteKycRequest
x-sdk-operation-name: delete
description: Deletes a KYC request with a specified ID.
responses:
'204':
description: KYC request deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/kyc-documents:
get:
x-products:
- Core
tags:
- KYC documents
summary: Retrieve KYC documents
operationId: GetKycDocumentCollection
x-sdk-operation-name: getAll
description: Retrieves a list of KYC documents.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionExpand'
responses:
'200':
description: List of KYC documents retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/KycDocument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: JavaScript
source: >-
// all parameters are optional
const firstCollection = await api.kycDocuments.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await api.kycDocuments.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(document =>
console.log(document.fields.documentType));
post:
x-products:
- Core
tags:
- KYC documents
summary: Create a KYC document
operationId: PostKycDocument
x-sdk-operation-name: create
description: Creates a KYC document.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/KycDocument'
description: Kyc document resource.
required: true
responses:
'201':
description: KYC document created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/KycDocument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: |-
// All fields are required
const data = {
fieldId: '4f6cf35x-2c4y-483z-a0a9-158621f77a21',
customerId: '4f6cf35x-2c4y-483z-a0a9-158621f77a21',
documentType: 'identity-proof'
};
const firstKycDocument = await api.kycDocuments.create({data});
/kyc-documents/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- KYC documents
summary: Retrieve a KYC document
operationId: GetKycDocument
x-sdk-operation-name: get
description: Retrieves a KYC document with a specified ID.
responses:
'200':
description: KYC document retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/KycDocument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: JavaScript
source: |-
const document = await api.kycDocuments.get({id: 'foobar-001'});
console.log(document.fields.documentType);
put:
x-products:
- Core
tags:
- KYC documents
summary: Upsert a KYC document
operationId: PutKycDocument
x-sdk-operation-name: update
description: Creates or updates (upserts) a KYC document with a specified ID.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/KycDocument'
description: KYC document resource.
required: true
responses:
'200':
description: KYC document updated.
content:
application/json:
schema:
$ref: '#/components/schemas/KycDocument'
'201':
description: KYC document created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/KycDocument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >-
// define the values to update
const data = {
status: 'accepted'
};
const document = await api.kycDocuments.update({id: 'my-second-id',
data});
/kyc-documents/{id}/acceptance:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- KYC documents
summary: Accept a KYC document
operationId: PostKycDocumentAcceptance
x-sdk-operation-name: accept
description: |-
Accepts a KYC document and changes the documents `status` to `accepted`.
The review time and reviewer information is also updated.
> **Note:** Use this operation for manual overrides.
responses:
'201':
description: KYC document acceptance created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/KycDocument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: JavaScript
source: >-
const acceptedDocument = await api.kycDocuments.accept({id:
'my-second-id'});
console.log(acceptedDocument.fields.status);
/kyc-documents/{id}/matches:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- KYC documents
summary: Update KYC document matches
operationId: PostKycDocumentMatches
x-sdk-operation-name: matches
description: |-
Updates the document matches of a KYC document with a specified ID.
> **Note:** Use this operation for manual overrides.
requestBody:
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/KycIdentityMatches'
- $ref: '#/components/schemas/KycAddressMatches'
description: Kyc document resource.
required: true
responses:
'204':
description: Document matches updated.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/kyc-documents/{id}/rejection:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- KYC documents
summary: Reject a KYC document
operationId: PostKycDocumentRejection
x-sdk-operation-name: reject
description: |-
Rejects a KYC document and changes the `status` to `rejected`.
The review time and reviewer information is also updated.
> **Note:** Use this operation for manual overrides.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/KycDocumentRejection'
description: KYC document resource.
required: true
responses:
'201':
description: KYC document rejected.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/KycDocument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >-
const data = {
type: 'document-expired',
message: 'Document is expired'
}
const rejectedDocument = await api.kycDocuments.reject({id:
'my-second-id', data});
console.log(rejectedDocument.fields.rejectionReason.type);
/kyc-documents/{id}/review:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- KYC documents
summary: Review a KYC document
operationId: PostKycDocumentReview
x-sdk-operation-name: review
description: >-
Updates the `reviewTime` and `reviewerId` of a KYC document with a
specified ID.
responses:
'201':
description: KYC document reviewed.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/KycDocument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >-
const reviewedDocument = await api.kycDocuments.review({id:
'my-second-id'});
console.log(reviewedDocument.fields.status);
/kyc-documents/{id}/start-review:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- KYC documents
summary: Start review of a KYC document
operationId: PostKycDocumentStartReview
x-sdk-operation-name: startReview
description: >-
Starts the review process of a KYC document with a specified ID.
This operation also sets the KYC document `reviewStartTime` to the
current date-time,
and updates the review information.
responses:
'201':
description: KYC document review started.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/KycDocument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
/kyc-documents/{id}/stop-review:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- KYC documents
summary: Stop review of a KYC document
operationId: PostKycDocumentStopReview
x-sdk-operation-name: stopReview
description: >-
Stops the review of a KYC document with a specified ID.
This operation also sets the KYC document `reviewStartTime` and the
reviewer information to null.
Use this operation when the reviewer must stop the review.
For example, if the reviewer must take a break, or ends a shift.
responses:
'201':
description: KYC document review stopped.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/KycDocument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
/kyc-settings:
get:
x-products:
- Core
tags:
- KYC documents
summary: Retrieve KYC settings
operationId: GetKycSettings
x-sdk-operation-name: getKycSettings
description: Retrieves KYC settings.
responses:
'200':
description: KYC settings retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/KycSettings'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-products:
- Core
tags:
- KYC documents
summary: Update KYC settings
operationId: PutKycSettings
x-sdk-operation-name: updateKycSettings
description: Updates KYC settings.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/KycSettings'
description: Settings for KYC analysis.
required: true
responses:
'200':
description: KYC settings updated.
content:
application/json:
schema:
$ref: '#/components/schemas/KycSettings'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/password-tokens:
get:
x-products:
- Full
- Core
tags:
- Customer authentication
summary: Retrieve tokens
operationId: GetPasswordTokenCollection
x-sdk-operation-name: getAllResetPasswordTokens
description: Retrieves a list of reset password tokens.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
responses:
'200':
description: List of reset password tokens retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ResetPasswordToken'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: JavaScript
source: >-
// all parameters are optional
const firstCollection = await
api.customerAuthentication.getAllResetPasswordTokens();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100};
const secondCollection = await
api.customerAuthentication.getAllResetPasswordTokens(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(token =>
console.log(token.fields.token));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$passwordTokens =
$service->customerAuthentication()->getAllResetPasswordTokens();
post:
x-products:
- Full
- Core
tags:
- Customer authentication
summary: Create a reset password token
operationId: PostPasswordToken
x-sdk-operation-name: createResetPasswordToken
description: Creates a reset password token.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ResetPasswordToken'
description: ResetPasswordToken resource.
required: true
responses:
'201':
description: Reset password token created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/ResetPasswordToken'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >-
// first set the required properties for the new credential
const data = {
username: 'foobar',
password: 'fuubar',
// the `credential` expects
// the customer credential's ID
credential: 'foobar-0001'
// optionally you can define an `expiredTime` to
// limit the duration of the reset token
//expiredTime: '2017-09-18T19:17:39Z'
};
const resetToken = await
api.customerAuthentication.createResetPasswordToken({data});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$resetPasswordTokenForm = new
\Rebilly\Sdk\Model\ResetPasswordToken();
$resetPasswordTokenForm->setUsername('username');
try {
$tokens = $coreService->customerAuthentication()->createResetPasswordToken($resetPasswordTokenForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/password-tokens/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Customer authentication
summary: Retrieve a reset password token
operationId: GetPasswordToken
x-sdk-operation-name: getResetPasswordToken
description: Retrieves a reset password token with a specified ID.
responses:
'200':
description: Reset password token retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/ResetPasswordToken'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: JavaScript
source: >-
const token = await
api.customerAuthentication.getResetPasswordToken({id:
'my-first-id'});
console.log(token.fields.credential);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$passwordToken =
$service->customerAuthentication()->getResetPasswordToken('tokenId');
delete:
x-products:
- Core
tags:
- Customer authentication
summary: Delete a reset password token
operationId: DeletePasswordToken
x-sdk-operation-name: deleteResetPasswordToken
description: Deletes a reset password token with a specified ID.
responses:
'204':
description: Reset password token deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: JavaScript
source: >-
const request = await
api.customerAuthentication.deleteResetPasswordToken({id:
'my-second-key'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$service->customerAuthentication()->deleteResetPasswordToken('tokenId');
/payment-instruments:
get:
x-products:
- Core
tags:
- Payment instruments
summary: Retrieve payment instruments
operationId: GetPaymentInstrumentCollection
x-sdk-operation-name: getAll
description: Retrieves a list of payment instruments.
parameters:
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionQuery'
- $ref: '#/components/parameters/collectionExpand'
responses:
'200':
description: List of payment instruments retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PaymentInstrument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$paymentInstruments = $client->paymentInstruments()->search([
'filter' => 'status:active;method:payment-card',
]);
- lang: JavaScript
source: >
// all parameters are optional
const firstCollection = await api.paymentInstruments.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await
api.paymentInstruments.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(paymentInstrument =>
console.log(paymentInstrument.fields.customerId));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\UsersService($client);
$paymentInstrumentsPaginator =
$service->paymentInstruments()->getAllPaginator(
filter: 'status:active;method:payment-card',
limit: 5
);
foreach ($paymentInstrumentsPaginator as $paymentInstrumentsPage) {
printf("Payment instruments page %d/%d\n", $paymentInstrumentsPaginator->key() + 1, $paymentInstrumentsPaginator->count());
foreach ($paymentInstrumentsPage as $paymentInstrument) {
printf("Payment instrument #%s\n", $paymentInstrument->getId());
}
}
// OR
$paymentInstruments = $service->paymentInstruments()->getAll(filter:
'status:active;method:payment-card');
foreach ($paymentInstruments as $paymentInstrument) {
printf("Payment instrument #%s\n", $paymentInstrument->getId());
}
post:
x-products:
- Core
tags:
- Payment instruments
summary: Create a payment instrument
operationId: PostPaymentInstrument
x-sdk-operation-name: create
description: >-
Creates a payment instrument.
If the payment card, bank account, or alternative payment instrument
already exists it is updated.
requestBody:
$ref: '#/components/requestBodies/PostPaymentInstrument'
responses:
'201':
description: Payment instrument created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentInstrument'
'303':
description: Payment instrument updated.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentInstrument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$paymentInstrumentForm = new
Rebilly\Entities\CommonPaymentInstrument();
$paymentInstrumentForm->setCustomerId('customerId');
$paymentInstrumentForm->setPan('4111111111111111');
$paymentInstrumentForm->setExpYear(2025);
$paymentInstrumentForm->setExpMonth(8);
$paymentInstrumentForm->setBillingAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
]);
try {
$paymentInstrument = $client->paymentInstruments()->create($paymentInstrumentForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
// Alternatively you can specify a payment token
$paymentInstrumentForm = new
Rebilly\Entities\CommonPaymentInstrument();
$paymentInstrumentForm->setCustomerId('customerId');
$paymentInstrumentForm->setToken('payment-token');
try {
$paymentInstrument = $client->paymentInstruments()->create($paymentInstrumentForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >
// first set the properties for the new payment card instrument
const data = {
method: 'payment-card',
pan: '4111111111111111',
expYear: 2025,
expMonth: 11,
cvv: '123',
billingAddress: {
firstName: 'Johnny',
lastName: 'Brown',
emails: [{
label: 'main',
value: 'johnny+test@grr.la',
primary: true
}]
},
// the customer ID for which
// we are adding a payment card instrument
customerId: 'foobar-0001'
};
const firstPaymentInstrument = await
api.paymentInstruments.create({data});
// alternatively you can specify a payment token
const tokenData = {
token: 'payment-token',
// the customer ID for which
// we are adding a payment card instrument
customerId: 'foobar-0001'
};
const secondPaymentInstrument = await
api.paymentInstruments.create({tokenData});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\UsersService($client);
$paymentInstrumentForm = new
\Rebilly\Sdk\Model\PaymentCardCreatePlain();
$paymentInstrumentForm->setCustomerId('customerId');
$paymentInstrumentForm->setPan('4111111111111111');
$paymentInstrumentForm->setExpYear(2025);
$paymentInstrumentForm->setExpMonth(8);
$paymentInstrumentForm->setBillingAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
]);
try {
$paymentInstrument = $service->paymentInstruments()->create($paymentInstrumentForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
// Alternatively you can specify a payment token
$paymentInstrumentForm = new
\Rebilly\Sdk\Model\PaymentCardCreatePlain();
$paymentInstrumentForm->setCustomerId('customerId');
$paymentInstrumentForm->setToken('payment-token');
try {
$paymentInstrument = $service->paymentInstruments()->create($paymentInstrumentForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/payment-instruments/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Payment instruments
summary: Retrieve a payment instrument
operationId: GetPaymentInstrument
x-sdk-operation-name: get
description: Retrieves a payment instrument with a specified ID.
responses:
'200':
description: Payment instrument retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentInstrument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$paymentInstrument =
$client->paymentInstruments()->load('paymentInstrumentId');
- lang: JavaScript
source: >
const paymentInstrument = await api.paymentInstruments.get({id:
'payment-instrument-id'});
console.log(paymentInstrument.fields.customerId);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\UsersService($client);
$paymentInstrument =
$service->paymentInstruments()->get('paymentInstrumentId');
patch:
x-products:
- Core
tags:
- Payment instruments
summary: Update payment instrument
operationId: PatchPaymentInstrument
x-sdk-operation-name: update
description: Updates the values of a payment instrument with a specified ID.
requestBody:
$ref: '#/components/requestBodies/PatchPaymentInstrument'
responses:
'200':
description: Payment instrument updated.
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentInstrument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$paymentInstrumentForm = new
Rebilly\Entities\CommonPaymentInstrument();
$paymentInstrumentForm->setCvv('123');
$paymentInstrumentForm->setExpYear(2025);
$paymentInstrumentForm->setExpMonth(12);
$paymentInstrumentForm->setBillingAddress([
'firstName' => 'John',
]);
try {
$paymentInstrument = $client->paymentInstruments()->update('paymentInstrumentId', $paymentInstrumentForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
// Alternatively you can specify a partial token
$paymentInstrumentForm = new
Rebilly\Entities\CommonPaymentInstrument();
$paymentInstrumentForm->setToken('partial-token');
$paymentInstrumentForm->setBillingAddress([
'firstName' => 'John',
]);
try {
$paymentInstrument = $client->paymentInstruments()->update('paymentInstrumentId', $paymentInstrumentForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: |
// payment instrument properties to be updated
const data = {
cvv: '123',
expMonth: 12,
expYear: 2025,
billingAddress: {
firstName: 'John'
}
};
api.paymentInstruments.patch({id: 'id-to-update', data});
// alternatively you can specify a partial token
const tokenData = {
token: 'partial-token',
billingAddress: {
firstName: 'John'
},
customFields: {
foo: 'bar'
}
};
api.paymentInstruments.patch({id: 'id-to-update', tokenData});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\UsersService($client);
$paymentInstrumentForm = new
\Rebilly\Sdk\Model\PaymentCardUpdatePlain();
$paymentInstrumentForm->setCvv('123');
$paymentInstrumentForm->setExpYear(2025);
$paymentInstrumentForm->setExpMonth(12);
$paymentInstrumentForm->setBillingAddress([
'firstName' => 'John',
]);
try {
$paymentInstrument = $service->paymentInstruments()->update('paymentInstrumentId', $paymentInstrumentForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
// Alternatively you can specify a partial token
$paymentInstrumentForm = new
\Rebilly\Sdk\Model\PaymentInstrumentUpdateToken();
$paymentInstrumentForm->setToken('partial-token');
$paymentInstrumentForm->setBillingAddress([
'firstName' => 'John',
]);
try {
$paymentInstrument = $service->paymentInstruments()->update('paymentInstrumentId', $paymentInstrumentForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/payment-instruments/{id}/deactivation:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Payment instruments
summary: Deactivate a payment instrument
operationId: PostPaymentInstrumentDeactivation
x-sdk-operation-name: deactivate
description: Deactivates a payment instrument with a specified ID.
responses:
'201':
description: Payment instrument deactivated.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentInstrument'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$client->paymentInstruments()->deactivate('paymentInstrumentId');
- lang: JavaScript
source: >
const paymentInstrument = await
api.paymentInstruments.deactivate({id: 'id-to-deactivate'});
console.log(paymentInstrument.fields.status);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\UsersService($client);
$service->paymentInstruments()->deactivate('paymentInstrumentId');
/plans:
get:
x-products:
- Core
tags:
- Plans
summary: Retrieve plans
operationId: GetPlanCollection
x-sdk-operation-name: getAll
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Retrieves a list of plans.
parameters:
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of plans retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Plan'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$plans = $client->plans()->search([
'filter' => 'name:TestPlan',
]);
- lang: JavaScript
source: >-
// all parameters are optional
const firstCollection = await api.plans.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await api.plans.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(plan =>
console.log(plan.fields.name));
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$plansPaginator = $service->plans()->getAllPaginator(limit: 5);
foreach ($plansPaginator as $planPage) {
printf("Plans page %d/%d\n", $plansPaginator->key() + 1, $plansPaginator->count());
foreach ($planPage as $plan) {
printf("Plan #%s: %s\n", $plan->getId(), $plan->getProductId());
}
}
// OR
$plans = $service->plans()->getAll(limit: 100);
foreach ($plans as $plan) {
printf("Plan #%s: %s\n", $plan->getId(), $plan->getProductId());
}
post:
x-products:
- Core
tags:
- Plans
summary: Create a plan
operationId: PostPlan
x-sdk-operation-name: create
description: Creates a plan.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Plan'
description: Plan resource.
required: true
responses:
'201':
description: Plan created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Plan'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$planForm = new Rebilly\Entities\Plan();
$planForm->setName('TestPlan');
$planForm->setCurrency('USD');
$planForm->setTrialAmount(1);
$planForm->setTrialPeriodUnit('day');
$planForm->setTrialPeriodLength(1);
$planForm->setProductId('test-product');
try {
$plan = $client->plans()->create($planForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// first set the properties for the new plan
const data = {
name: 'My strongest plan',
currency: 'USD',
setupAmount: 12.99,
// you could also include a trial if needed
recurringPeriodUnit: 'month',
recurringPeriodLength: 1,
recurringAmount: 25.99
};
// the ID is optional
const firstPlan = await api.plans.create({data});
// or you can provide one
const secondPlan = await api.plans.create({id: 'my-second-key',
data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$plan = \Rebilly\Sdk\Model\Plan::from([])
->setProductId('productId')
->setName('Test plan')
->setCurrency('USD')
->setPricing(new \Rebilly\Sdk\Model\PlanFormulaFlatRate(['price' => 9.99]))
->setRecurringInterval(
\Rebilly\Sdk\Model\SubscriptionOrderPlanRecurringInterval::from()
->setUnit(\Rebilly\Sdk\Model\SubscriptionOrderPlanRecurringInterval::UNIT_MONTH)
->setLength(1),
);
try {
$plan = $service->plans()->create($plan);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/plans/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Plans
summary: Retrieve a plan
operationId: GetPlan
x-sdk-operation-name: get
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Retrieves a plan with a specified ID.
responses:
'200':
description: Plan retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Plan'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$plan = $client->plans()->load('planId');
- lang: JavaScript
source: |-
const plan = await api.plans.get({id: 'foobar-001'});
console.log(plan.fields.name);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$plan = $service->plans()->get('planId');
put:
x-products:
- Core
tags:
- Plans
summary: Upsert a plan
operationId: PutPlan
x-sdk-operation-name: update
description: Creates or updates (upserts) a plan with a specified ID.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Plan'
description: Plan resource.
required: true
responses:
'200':
description: Plan updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Plan'
'201':
description: Plan created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Plan'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$planForm = new Rebilly\Entities\Plan();
$planForm->setName('TestPlan');
$planForm->setCurrency('USD');
$planForm->setTrialAmount(1);
$planForm->setTrialPeriodUnit('day');
$planForm->setTrialPeriodLength(1);
try {
$plan = $client->plans()->update('planId', $planForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// first set the properties for the new plan
const data = {
name: 'My strongest plan',
currency: 'USD',
setupAmount: 12.99,
// you could also include a trial if needed
recurringPeriodUnit: 'month',
recurringPeriodLength: 1,
recurringAmount: 25.99
};
// the ID is optional
const firstPlan = await api.plans.create({data});
// or you can provide one
const secondPlan = await api.plans.create({id: 'my-second-key',
data});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$plan = new \Rebilly\Sdk\Model\Plan([
'recurringInterval' => [
'unit' => \Rebilly\Sdk\Model\SubscriptionOrderPlanRecurringInterval::UNIT_WEEK,
'length' => 2,
],
]);
try {
$plan = $service->plans()->update('planId', $plan);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
// OR
$plan = $service->plans()->get('planId');
$plan->setRecurringInterval(new
\Rebilly\Sdk\Model\SubscriptionOrderPlanRecurringInterval([
'unit' => \Rebilly\Sdk\Model\SubscriptionOrderPlanRecurringInterval::UNIT_WEEK,
'length' => 2,
]));
try {
$plan = $service->plans()->update('planId', $plan);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
delete:
x-products:
- Core
tags:
- Plans
summary: Delete a plan
operationId: DeletePlan
x-sdk-operation-name: delete
description: Deletes a plan with a specified ID.
responses:
'204':
description: Plan deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$client->plans()->delete('planId');
- lang: JavaScript
source: |-
const request = await api.plans.delete({id: 'my-second-key'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$service->plans()->delete('planId');
/products:
get:
x-products:
- Core
tags:
- Products
summary: Retrieve products
operationId: GetProductCollection
x-sdk-operation-name: getAll
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Retrieves a list of products.
parameters:
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of products retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Product'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: JavaScript
source: >-
// all parameters are optional
const firstCollection = await api.products.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await api.products.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(product =>
console.log(product.fields.name));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$productsPaginator = $service->products()->getAllPaginator(limit:
5);
foreach ($productsPaginator as $productPage) {
printf("Products page %d/%d\n", $productsPaginator->key() + 1, $productsPaginator->count());
foreach ($productPage as $product) {
printf("Product #%s: %s\n", $product->getId(), $product->getName());
}
}
// OR
$products = $service->products()->getAll(limit: 100);
foreach ($products as $product) {
printf("Product #%s: %s\n", $product->getId(), $product->getName());
}
post:
x-products:
- Core
tags:
- Products
summary: Create a product
operationId: PostProduct
x-sdk-operation-name: create
description: Creates a product.
requestBody:
$ref: '#/components/requestBodies/Product'
responses:
'201':
description: Product created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Product'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >-
// first set the properties for the new product
const data = {
name: 'my first product',
description: 'made to be of the highest quality',
taxCategoryId: '',
requiresShipping: true,
accountingCode: '100',
customFields: []
};
// the ID is optional
const firstProduct = await api.products.create({data});
// or you can provide one
const secondProduct = await api.products.create({id:
'my-second-key', data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$product = new \Rebilly\Sdk\Model\Product([
'name' => 'my first product',
'description' => 'made to be of the highest quality',
'taxCategoryId' => '',
'requiresShipping' => true,
'accountingCode' => '100',
]);
try {
$product = $service->products()->create($product);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/products/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Products
summary: Retrieve a product
operationId: GetProduct
x-sdk-operation-name: get
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Retrieves a product with a specified ID.
responses:
'200':
description: Product retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Product'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: JavaScript
source: |-
const product = await api.products.get({id: 'foobar-001'});
console.log(product.fields.name);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$product = $service->products()->get('productId');
put:
x-products:
- Core
tags:
- Products
summary: Upsert a product
operationId: PutProduct
x-sdk-operation-name: update
description: Creates or updates (upserts) a product with a specified ID.
requestBody:
$ref: '#/components/requestBodies/Product'
responses:
'200':
description: Product updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Product'
'201':
description: Product created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Product'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >-
// creating a new product
const data = {
name: 'my first product',
description: 'made to be of the highest quality',
taxCategoryId: '',
requiresShipping: true,
accountingCode: '100',
customFields: []
};
// the ID is optional
const firstProduct = await api.products.create({data});
// or you can provide one
const secondProduct = await api.products.create({id:
'my-second-key', data});
// updating a product
const data = {
name: 'my first product',
description: 'made to be of the highest quality',
taxCategoryId: '20010',
requiresShipping: false,
accountingCode: '77',
customFields: []
};
const product = await api.products.update({id: 'my-second-key',
data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$product = new \Rebilly\Sdk\Model\Product([
'requiresShipping' => false,
'accountingCode' => '101',
]);
try {
$product = $service->products()->update('productId', $product);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
// OR
$product = $service->products()->get('productId');
$product->setRequiresShipping(false)
->setAccountingCode('101');
try {
$product = $service->products()->update('productId', $product);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
delete:
x-products:
- Core
tags:
- Products
summary: Delete a product
operationId: DeleteProduct
x-sdk-operation-name: delete
description: Deletes a product with a specified ID.
responses:
'204':
description: Product deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: JavaScript
source: |-
const request = await api.products.delete({id: 'my-second-key'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$service->products()->delete('productId');
/quotes:
get:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes
summary: Retrieve quotes
operationId: GetQuoteCollection
x-sdk-operation-name: getAll
description: Retrieves a list of quotes.
parameters:
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionExpand'
responses:
'200':
description: List of quotes retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Quote'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes
summary: Create a quote
operationId: PostQuote
x-sdk-operation-name: create
description: Creates a quote.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Quote'
required: true
responses:
'201':
description: Quote created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Quote'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/quotes/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes
summary: Retrieve a quote
operationId: GetQuote
x-sdk-operation-name: get
description: Retrieves a quote with a specified ID.
parameters:
- $ref: '#/components/parameters/mediaTypeJsonPdf'
- $ref: '#/components/parameters/collectionExpand'
responses:
'200':
description: Quote retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Quote'
application/pdf:
schema:
$ref: '#/components/schemas/Quote'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes
summary: Upsert a quote
operationId: PutQuote
x-sdk-operation-name: update
description: >-
Creates or updates a quote with a specified ID.
The update operation can only be used for quotes with a `status` of
`draft`.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Quote'
required: true
responses:
'200':
description: Quote updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Quote'
'201':
description: Quote created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Quote'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
patch:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes
summary: Partially update a quote
operationId: PatchQuote
x-sdk-operation-name: patch
description: >-
Partially updates a quote with a specified ID.
The update operation can only be used for quotes with a `status` of
`draft`.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchQuote'
required: true
responses:
'200':
description: Quote updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Quote'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
/quotes/{id}/accept:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes
summary: Accept a quote
operationId: PostQuoteAcceptance
x-sdk-operation-name: accept
description: Accepts an issued quote with a specified ID.
responses:
'200':
description: Quote accepted.
content:
application/json:
schema:
$ref: '#/components/schemas/Quote'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
/quotes/{id}/cancel:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes
summary: Cancel a quote
operationId: PostQuoteCancellation
x-sdk-operation-name: cancel
description: Cancels a draft or issued quote with a specified ID.
responses:
'200':
description: Quote canceled.
content:
application/json:
schema:
$ref: '#/components/schemas/Quote'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
/quotes/{id}/issue:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes
summary: Issue a quote
operationId: PostQuoteIssuance
x-sdk-operation-name: issue
description: Issues a draft quote with a specified ID.
responses:
'200':
description: Quote issued.
content:
application/json:
schema:
$ref: '#/components/schemas/Quote'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
/quotes/{id}/recall:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes
summary: Recall a quote
operationId: PostQuoteRecall
x-sdk-operation-name: recall
description: |-
Recalls an issued quote with a specified ID so that it can be edited.
Recalled quotes are assigned the `status` of `draft`.
responses:
'200':
description: Quote recalled.
content:
application/json:
schema:
$ref: '#/components/schemas/Quote'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
/quotes/{id}/reject:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes
summary: Reject a quote
operationId: PostQuoteRejection
x-sdk-operation-name: reject
description: Rejects an issued quote with specified ID.
responses:
'200':
description: Quote rejected.
content:
application/json:
schema:
$ref: '#/components/schemas/Quote'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
/quotes/{id}/timeline:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes timeline
summary: Retrieve quote timeline messages
operationId: GetQuoteTimelineCollection
x-sdk-operation-name: getAllTimelineMessages
description: Retrieves quote timeline messages.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of quote timeline messages retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/QuoteTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes timeline
summary: Create a quote timeline comment
operationId: PostQuoteTimeline
x-sdk-operation-name: createTimelineComment
description: Creates a quote timeline comment or custom defined event.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/QuoteTimeline'
description: Quote timeline resource.
required: true
responses:
'201':
description: Quote timeline comment or custom defined event created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/QuoteTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/quotes/{id}/timeline/{messageId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: messageId
in: path
description: ID of the quote timeline message.
required: true
schema:
type: string
get:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes timeline
summary: Retrieve a quote timeline message
operationId: GetQuoteTimelineMessage
x-sdk-operation-name: getTimelineMessage
description: Retrieves a quote timeline message with a specified ID.
responses:
'200':
description: Quote timeline message retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/QuoteTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
delete:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Quotes timeline
summary: Delete a quote timeline message
operationId: DeleteQuoteTimeline
x-sdk-operation-name: deleteTimelineMessage
description: Deletes a quote timeline message with a specified ID.
responses:
'204':
description: Quote timeline message deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
/ready-to-pay:
post:
x-products:
- Core
tags:
- Transactions
summary: Ready to pay
operationId: PostReadyToPay
x-sdk-operation-name: readyToPay
description: >-
Retrieves available payment methods for a specific transaction or
purchase.
The order in which the payment methods are displayed to the customer
should be the same as the order in the response.
The list of payment methods is generated from available gateway accounts
and the last matched `adjust-ready-to-pay` action on the
`ready-to-pay-requested` event.
If no rules match for the specific request, all methods supported by the
gateway accounts are sent.
To invert this behavior, place an all matching rule at the end of the
`ready-to-pay-requested` event in the rules engine,
and include an empty `paymentMethods` property for the
`adjust-ready-to-pay` action.
For more information, see [Update event
rules](https://www.rebilly.com/catalog/all/rules#operation/PutEventRule)
and [Gateway
accounts](https://www.rebilly.com/catalog/all/gateway-accounts).
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PostReadyToPay'
responses:
'200':
description: Payment methods retrieved.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ReadyToPayMethods'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$readyToPayForm = new Rebilly\Entities\ReadyToPay();
$readyToPayForm->setCurrency('USD');
$readyToPayForm->setAmount(10);
$readyToPayForm->setWebsiteId('websiteId');
$readyToPayForm->setCustomerId('customerId');
$riskMetadata = new Rebilly\Entities\RiskMetadata();
$riskMetadata->setFingerprint('fingerprint');
$readyToPayForm->setRiskMetadata($riskMetadata);
try {
$transaction = $client->transactions()->create($readyToPayForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$readyToPayForm = new \Rebilly\Sdk\Model\PostReadyToPay();
$readyToPayForm->setCurrency('USD');
$readyToPayForm->setAmount(10);
$readyToPayForm->setWebsiteId('websiteId');
$readyToPayForm->setCustomerId('customerId');
$riskMetadata = new \Rebilly\Sdk\Model\RiskMetadata();
$riskMetadata->setFingerprint('fingerprint');
$readyToPayForm->setRiskMetadata($riskMetadata);
try {
$transactions = $service->purchase()->readyToPay($readyToPayForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/search:
get:
x-products:
- Core
tags:
- Search
summary: Search merchant data
operationId: GetSearch
x-sdk-operation-name: get
description: >-
Searches merchant data to return resources such as customers, invoices,
orders, transactions.
parameters:
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- name: q
in: query
description: Default search. Searches across resources and fields.
schema:
type: string
responses:
'200':
description: Results keyed by a resource.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Search'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/shipping-rates:
get:
x-products:
- Core
tags:
- Shipping rates
summary: Retrieve shipping rates
operationId: GetShippingRateCollection
x-sdk-operation-name: getAll
description: Retrieves a list of shipping rates.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of shipping rates retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ShippingRate'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: JavaScript
source: >
// all parameters are optional
const firstCollection = await api.shippingRates.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await api.shippingRates.getAll(params);
// access the collection items, each item is a ShippingRate
secondCollection.items.forEach(shippingRate =>
console.log(shippingRate.fields.name));
post:
x-products:
- Core
tags:
- Shipping rates
summary: Create a shipping rate
operationId: PostShippingRate
x-sdk-operation-name: create
description: Creates a shipping rate.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ShippingRate'
description: Shipping rate resource.
required: true
responses:
'201':
description: Shipping rate created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/ShippingRate'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >
// first set the properties for the new shipping rate
const data = {
name: 'free shipping',
filter: '',
price: 0,
currency: 'USD'
};
// the ID is optional
const firstRate = await api.shippingRates.create({data});
// or you can provide one
const secondRate = await api.shippingRates.create({id:
'my-second-key', data});
/shipping-rates/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Shipping rates
summary: Retrieve a shipping rate
operationId: GetShippingRate
x-sdk-operation-name: get
description: Retrieves a shipping rate with a specified ID.
responses:
'200':
description: Shipping rate retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/ShippingRate'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: JavaScript
source: >
const shippingRate = await api.shippingRates.get({id:
'foobar-001'});
console.log(shippingRate.fields.name);
put:
x-products:
- Core
tags:
- Shipping rates
summary: Create a shipping rate with ID
operationId: PutShippingRate
x-sdk-operation-name: update
description: Creates a shipping rate with a specified ID.
responses:
'200':
description: Shipping rate updated.
content:
application/json:
schema:
$ref: '#/components/schemas/ShippingRate'
'201':
description: Shipping rate created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/ShippingRate'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ShippingRate'
description: Shipping rate resource.
required: true
x-codeSamples:
- lang: JavaScript
source: >
// creating a new shipping rate
const data = {
name: 'free shipping',
filter: '',
price: 0,
currency: 'USD'
};
// the ID is optional
const firstRate = await api.shippingRates.create({data});
// or you can provide one
const secondRate = await api.shippingRates.create({id:
'my-second-key', data});
// updating a shipping rate
const data = {
name: 'regular shipping',
filter: '',
price: 9.99,
currency: 'USD'
};
const shippingRate = await api.shippingRates.update({id:
'my-second-key', data});
delete:
x-products:
- Core
tags:
- Shipping rates
summary: Delete a shipping rate
operationId: DeleteShippingRate
x-sdk-operation-name: delete
description: Deletes a shipping rate with a specified ID.
responses:
'204':
description: Shipping rate deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: JavaScript
source: >
const request = await api.shippingRates.delete({id:
'my-second-key'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
/subscriptions:
get:
x-products:
- Core
tags:
- Orders
summary: Retrieve orders
operationId: GetSubscriptionCollection
x-sdk-operation-name: getAll
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Retrieves a list of orders.
parameters:
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionQuery'
- $ref: '#/components/parameters/subscriptionExpand'
responses:
'200':
description: List of subscriptions retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SubscriptionOrOneTimeSale'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$subscriptions = $client->subscriptions()->search([
'filter' => 'customerId:testCustomerId',
]);
- lang: JavaScript
source: >
// all parameters are optional
const firstCollection = await api.subscriptions.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await api.subscriptions.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(subscription =>
console.log(subscription.fields.customerId));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$ordersPaginator =
$service->subscriptions()->getAllPaginator(filter:
'customerId:testCustomerId');
foreach ($ordersPaginator as $orderPage) {
printf("Orders page %d/%d\n", $ordersPaginator->key() + 1, $ordersPaginator->count());
foreach ($orderPage as $order) {
printf("Order #%s (%s): %s\n", $order->getId(), $order->getOrderType(), $order->getStatus());
}
}
// OR
$orders = $service->subscriptions()->getAll(filter:
'customerId:testCustomerId', limit: 10);
foreach ($orders as $order) {
printf("Order #%s (%s): %s\n", $order->getId(), $order->getOrderType(), $order->getStatus());
}
post:
x-products:
- Core
tags:
- Orders
summary: Create an order
operationId: PostSubscription
x-sdk-operation-name: create
description: >-
Creates an order.
To create or update an order with a specified ID, use the [Upsert an
order](../PutSubscription) operation.
parameters:
- $ref: '#/components/parameters/subscriptionExpand'
requestBody:
$ref: '#/components/requestBodies/Subscription'
responses:
'201':
description: Order created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionOrOneTimeSale'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$subscriptionForm = new Rebilly\Entities\Subscription();
$subscriptionForm->setCustomerId('customerId');
$subscriptionForm->setWebsiteId('websiteId');
$subscriptionForm->setItems([
[
'planId' => 'my-plan',
'quantity' => 1,
],
]);
$subscriptionForm->setBillingAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
]);
try {
$subscription = $client->subscriptions()->create($subscriptionForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// first set the properties for the new subscription
const data = {
customerId: 'foobar-0001',
websiteId: 'my-main-website',
items: [
{ plan: { id: 'my-plan-id' }, quantity: 1 },
],
// you can append this subscription to
// an existing invoice by passing its ID
initialInvoiceId: 'my-existing-invoice-id',
billingAddress: {
firstName: 'Johnny',
lastName: 'Brown',
emails: [{
label: 'main',
value: 'johnny+test@grr.la',
primary: true
}],
},
deliveryAddress: {
firstName: 'Johnny',
lastName: 'Brown',
emails: [{
label: 'main',
value: 'johnny+test@grr.la',
primary: true
}],
},
customFields: {}
};
// the ID is optional
const firstInvoice = await api.subscriptions.create({data});
// or you can provide one
const secondInvoice = await api.subscriptions.create({id:
'my-second-id', data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$order = \Rebilly\Sdk\Model\SubscriptionOrder::from()
->setWebsiteId('websiteId')
->setCustomerId('customerId')
->setItems([
\Rebilly\Sdk\Model\OrderItem::from()
->setPlan(
\Rebilly\Sdk\Model\OrderItemPlan::from()
->setId('planId')
)
->setQuantity(1),
]);
try {
$order = $service->subscriptions()->create($order);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/subscriptions/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Orders
summary: Retrieve an order
operationId: GetSubscription
x-sdk-operation-name: get
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
parameters:
- $ref: '#/components/parameters/subscriptionExpand'
description: Retrieves an order with a specified ID.
responses:
'200':
description: Order retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionOrOneTimeSale'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$subscription = $client->subscriptions()->load('subscriptionId');
- lang: JavaScript
source: >-
const subscription = await api.subscriptions.get({id:
'foobar-001'});
console.log(subscription.fields.billingAddress.firstName);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$order = $service->subscriptions()->get('orderId');
put:
x-products:
- Core
tags:
- Orders
summary: Upsert an order
operationId: PutSubscription
x-sdk-operation-name: update
description: Creates or updates (upserts) an order with a specified ID.
parameters:
- $ref: '#/components/parameters/subscriptionExpand'
requestBody:
$ref: '#/components/requestBodies/Subscription'
responses:
'200':
description: Order updated.
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionOrOneTimeSale'
'201':
description: Order created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionOrOneTimeSale'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$subscriptionForm = new Rebilly\Entities\Subscription();
$subscriptionForm->setCustomerId('customerId');
$subscriptionForm->setWebsiteId('websiteId');
$subscriptionForm->setItems($subscriptionForm->createItems([
[
'planId' => 'my-plan',
'quantity' => 1,
],
]));
$subscriptionForm->setBillingAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
]);
try {
$subscription = $client->subscriptions()->update('subscriptionId', $subscriptionForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >-
// creating a subscription
const data = {
customerId: 'foobar-0001',
websiteId: 'my-main-website',
items: [
{ plan: { id: 'my-plan-id' }, quantity: 1 },
],
// you can append this subscription to
// an existing invoice by passing its ID
initialInvoiceId: 'my-existing-invoice-id',
billingAddress: {
firstName: 'Johnny',
lastName: 'Brown',
emails: [{
label: 'main',
value: 'johnny+test@grr.la',
primary: true
}],
},
deliveryAddress: {
firstName: 'Johnny',
lastName: 'Brown',
emails: [{
label: 'main',
value: 'johnny+test@grr.la',
primary: true
}],
},
customFields: {}
};
// the ID is optional
const firstInvoice = await api.subscriptions.create({data});
// or you can provide one
const secondInvoice = await api.subscriptions.create({id:
'my-second-id', data});
// updating a subscription
const data = {
// determines if a payment attempt will be automatic
autopay: false,
// set the next renewal time
renewalTime: '2018-09-26T15:34:29Z'
};
const subscription = await api.subscriptions.update({id:
'my-second-id', data});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$order = new \Rebilly\Sdk\Model\SubscriptionOrder([
'shipping' => new \Rebilly\Sdk\Model\ManualShipping([
'amount' => 14.99,
]),
]);
try {
$order = $service->subscriptions()->update('orderId', $order);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
// OR
$order = $service->subscriptions()->get('orderId');
$order->setShipping(new \Rebilly\Sdk\Model\ManualShipping(['amount'
=> 14.99]));
try {
$order = $service->subscriptions()->update('orderId', $order);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
delete:
x-products:
- Core
tags:
- Orders
summary: Delete a pending order
operationId: DeleteSubscription
x-sdk-operation-name: delete
description: Deletes a pending order with a specified ID.
responses:
'204':
description: Pending order deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$service->subscriptions()->delete('orderId');
/subscriptions/{id}/void:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Orders
summary: Void a subscription order
operationId: PostSubscriptionVoid
x-sdk-operation-name: void
description: Voids a pending order with a specified ID.
responses:
'201':
description: Order voided.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionOrOneTimeSale'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$subscription = $client->subscriptions()->void('subscriptionId');
- lang: JavaScript
source: >
const voidedSubscription = await api.subscriptions.void({id:
'my-subscription-id'});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$order = $service->subscriptions()->void('orderId');
/subscriptions/{id}/change-items:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Orders
summary: Change subscription order items
operationId: PostSubscriptionItemsChange
x-sdk-operation-name: changeItems
parameters:
- $ref: '#/components/parameters/subscriptionExpand'
description: >-
Changes subscription order items or quantities, and designates if or
when pro-rata credits should be given.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionChange'
description: Change items request.
required: true
responses:
'201':
description: Order changed.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionOrOneTimeSale'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/subscriptions/{id}/items/{itemId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: itemId
in: path
description: ID of subscription item.
required: true
schema:
type: string
patch:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Orders
summary: Update a subscription order item
operationId: PatchSubscriptionItem
x-sdk-operation-name: updateItem
description: >-
Updates a subscription order item. This is an experimental endpoint, can
be changed or removed in the future.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionItemUpdate'
description: Update item request.
required: true
responses:
'200':
description: Order item updated.
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionOrOneTimeSaleItem'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/subscriptions/{id}/interim-invoice:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Orders
summary: Issue an interim invoice
operationId: PostSubscriptionInterimInvoice
x-sdk-operation-name: createInterimInvoice
description: |-
Issues an interim invoice for a subscription order.
Use this operation for plan changes and pro rata adjustments.
This process:
- Creates an invoice.
- Adds the subscription line items to the invoice.
- Issues the invoice.
- Optionally, applies payment to the invoice if a `transactionId` is supplied.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionInvoice'
description: Issue an interim invoice.
required: true
responses:
'201':
description: Invoice created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Invoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/subscription-pauses:
get:
x-products:
- Core
tags:
- Orders
summary: Retrieve subscription order pauses
operationId: GetSubscriptionPauseCollection
x-sdk-operation-name: getAll
description: Retrieves a list of subscription order pauses.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of subscription order pauses retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SubscriptionPause'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-products:
- Core
tags:
- Orders
summary: Pause a subscription order
operationId: PostSubscriptionPause
x-sdk-operation-name: pause
description: Pauses a subscription order with a specified ID.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionPause'
description: Pause resource.
required: true
responses:
'201':
description: Pause created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionPause'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/subscription-pauses/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Orders
summary: Retrieve a subscription order pause
operationId: GetSubscriptionPause
x-sdk-operation-name: get
description: Retrieves a subscription order pause with a specified ID.
responses:
'200':
description: Pause retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionPause'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-products:
- Core
tags:
- Orders
summary: Update a subscription order pause
operationId: PutSubscriptionPause
x-sdk-operation-name: update
description: Updates a subscription order pause.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionPause'
responses:
'200':
description: Pause updated.
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionPause'
'201':
description: Pause created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionPause'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
delete:
x-products:
- Core
tags:
- Orders
summary: Delete a subscription order pause
operationId: DeleteSubscriptionPause
x-sdk-operation-name: delete
description: |-
Deletes a subscription order pause with a specified ID.
If the specified pause is `pending`, it is `revoked`.
If the specified pause is `ongoing`, it is `finished`.
responses:
'204':
description: Subscription order pause revoked or finished.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
/subscription-cancellations:
get:
x-products:
- Core
tags:
- Orders
summary: Retrieve subscription order cancellations
operationId: GetSubscriptionCancellationCollection
x-sdk-operation-name: getAll
description: Retrieves a list of subscription order cancellations.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of cancelled subscription orders retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SubscriptionCancellation'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$cancellationsPaginator =
$service->subscriptionCancellations()->getAllPaginator(
filter: 'reason:' . \Rebilly\Sdk\Model\SubscriptionCancellation::REASON_CONTRACT_EXPIRED,
);
foreach ($cancellationsPaginator as $cancellationPage) {
printf("Cancellations page %d/%d\n", $cancellationsPaginator->key() + 1, $cancellationsPaginator->count());
foreach ($cancellationPage as $cancellation) {
printf(
"Cancellation #%s (%s): %s\n",
$cancellation->getId(),
$cancellation->getStatus(),
$cancellation->getSubscriptionId(),
);
}
}
// OR
$cancellations = $service->subscriptionCancellations()->getAll(
filter: 'reason:' . \Rebilly\Sdk\Model\SubscriptionCancellation::REASON_CONTRACT_EXPIRED,
limit: 10,
);
foreach ($cancellations as $cancellation) {
printf(
"Cancellation #%s (%s): %s\n",
$cancellation->getId(),
$cancellation->getStatus(),
$cancellation->getSubscriptionId(),
);
}
post:
x-products:
- Core
tags:
- Orders
summary: Cancel a subscription order
operationId: PostSubscriptionCancellation
x-sdk-operation-name: create
description: Cancels a subscription order.
requestBody:
$ref: '#/components/requestBodies/SubscriptionCancellation'
responses:
'201':
description: Cancellation created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionCancellation'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$subscriptionCancellationForm = new
Rebilly\Entities\SubscriptionCancellation();
$subscriptionCancellationForm->setSubscriptionId('subscription-1');
$subscriptionCancellationForm->setChurnTime(date('c'));
try {
$subscription = $client->subscriptionCancellations()->create($subscriptionCancellationForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >
const data = {
subscriptionId: 'sub_01HRF27SATGE4Z6PBJE6PD8328',
churnTime: '2020-06-10T13:55:51Z',
}
// the ID is optional
const firstSubscriptionCancellation = await
api.subscriptionCancellations.create({data});
// or you can provide one
const secondSubscriptionCancellation = await
api.subscriptionCancellations.create({id: 'custom-cancellation-id',
data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$cancellation = new \Rebilly\Sdk\Model\SubscriptionCancellation([
'subscriptionId' => 'subscriptionId',
'churnTime' => new \DateTimeImmutable(),
'canceledBy' => \Rebilly\Sdk\Model\SubscriptionCancellation::CANCELED_BY_MERCHANT,
'reason' => \Rebilly\Sdk\Model\SubscriptionCancellation::REASON_CONTRACT_EXPIRED,
]);
try {
$cancellation = $service->subscriptionCancellations()->create($cancellation);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/subscription-cancellations/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Orders
summary: Retrieve a subscription order cancellation
operationId: GetSubscriptionCancellation
x-sdk-operation-name: get
description: Retrieves a subscription order cancellation with a specified ID.
responses:
'200':
description: Subscription order cancellation retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionCancellation'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$cancellation =
$service->subscriptionCancellations()->get('cancellationId');
put:
x-products:
- Core
tags:
- Orders
summary: Upsert a subscription order cancellation
operationId: PutSubscriptionCancellation
x-sdk-operation-name: update
description: >-
Creates or updates (upserts) a subscription order cancellation with a
specified ID.
requestBody:
$ref: '#/components/requestBodies/SubscriptionCancellation'
responses:
'200':
description: Cancellation updated.
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionCancellation'
'201':
description: Cancellation created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionCancellation'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >
const data = {
subscriptionId: 'sub_01HRF27SATGE4Z6PBJE6PD8328',
churnTime: '2020-06-10T13:55:51Z',
}
// the ID is optional
const firstSubscriptionCancellation = await
api.subscriptionCancellations.create({data});
// or you can provide one
const secondSubscriptionCancellation = await
api.subscriptionCancellations.create({id: 'custom-cancellation-id',
data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$cancellation = new \Rebilly\Sdk\Model\SubscriptionCancellation([
'subscriptionId' => 'subscriptionId',
'churnTime' => new \DateTimeImmutable(),
'canceledBy' => \Rebilly\Sdk\Model\SubscriptionCancellation::CANCELED_BY_MERCHANT,
'reason' => \Rebilly\Sdk\Model\SubscriptionCancellation::REASON_CONTRACT_EXPIRED,
]);
try {
$cancellation = $service->subscriptionCancellations()->update('cancellationId', $cancellation);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
patch:
x-products:
- Core
tags:
- Orders
summary: Update a subscription order cancellation
operationId: PatchSubscriptionCancellation
x-sdk-operation-name: patch
description: |-
Updates a subscription order cancellation with a specified ID.
Use this operation to update a cancellation reason and description.
requestBody:
content:
application/json:
schema:
allOf:
- properties:
canceledBy:
readOnly: true
status:
readOnly: true
- $ref: '#/components/schemas/SubscriptionCancellation'
description: Patch cancellation resource.
required: true
responses:
'200':
description: Cancellation updated.
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionCancellation'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$cancellation = new
\Rebilly\Sdk\Model\PatchSubscriptionCancellationRequest([
'reason' => \Rebilly\Sdk\Model\PatchSubscriptionCancellationRequest::REASON_CONTRACT_EXPIRED,
]);
try {
$cancellation = $service->subscriptionCancellations()->patch('cancellationId', $cancellation);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
delete:
x-products:
- Core
tags:
- Orders
summary: Delete a subscription order cancellation
operationId: DeleteSubscriptionCancellation
x-sdk-operation-name: delete
description: >-
Deletes a subscription order cancellation with a specified ID.
> **Important:** Only subscription order cancellations with a `status`
of `draft` can be deleted.
responses:
'204':
description: Subscription order cancellation deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$service->subscriptionCancellations()->delete('cancellationId');
/subscription-reactivations:
get:
x-products:
- Core
tags:
- Orders
summary: Retrieve subscription order reactivations
operationId: GetSubscriptionReactivationCollection
x-sdk-operation-name: getAll
description: Retrieves a list of subscription order reactivations.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of subscription order reactivations retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SubscriptionReactivation'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: JavaScript
source: >
// all parameters are optional
const firstCollection = await
api.subscriptionReactivations.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await
api.subscriptionReactivations.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(subscription =>
console.log(subscription.fields.customerId));
post:
x-products:
- Core
tags:
- Orders
summary: Reactivate a subscription order
operationId: PostSubscriptionReactivation
x-sdk-operation-name: reactivate
description: Reactivates a subscription order with a specified ID.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionReactivation'
description: Reactivation resource.
required: true
responses:
'201':
description: >-
Reactivation created. The order is now active.
If the order had a related cancellation with a `status` of
`confirmed`, it is revoked.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionReactivation'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >
const data = {
subscriptionId: 'sub_01HRF27SATGE4Z6PBJE6PD8328',
description: 'reactivation-reason',
effectiveTime: '2020-06-10T13:55:51Z',
renewalTime: '2020-07-10T13:55:51Z'
};
const reactivatedSubscription = await
api.subscriptionReactivations.reactivate({data});
/subscription-reactivations/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Orders
summary: Retrieve a subscription order reactivation
operationId: GetSubscriptionReactivation
x-sdk-operation-name: get
description: Retrieves a subscription order reactivation with a specified ID.
responses:
'200':
description: Reactivation retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionReactivation'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: JavaScript
source: >
const subscription = await api.subscriptionReactivations.get({id:
'foobar-001'});
console.log(subscription.fields.description);
/subscriptions/{id}/upcoming-invoices:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Orders
summary: Retrieve upcoming subscription order invoice
operationId: GetSubscriptionUpcomingInvoiceCollection
x-sdk-operation-name: getAllUpcomingInvoices
description: >-
Retrieves an upcoming invoice for a specified subscription order.
This endpoint is deprecated.
Use [Retrieve an upcoming invoice](../GetSubscriptionUpcomingInvoice)
instead.
parameters:
- $ref: '#/components/parameters/collectionExpand'
deprecated: true
responses:
'200':
description: Upcoming invoices retrieved.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/UpcomingInvoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/subscriptions/{id}/upcoming-invoice:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Orders
summary: Retrieve an upcoming subscription order invoice
operationId: GetSubscriptionUpcomingInvoice
x-sdk-operation-name: getUpcomingInvoice
description: >-
Retrieves an upcoming invoice for a specified subscription order.
An upcoming invoice is an invoice that has not been issued.
It functions as a preview of the next invoice for the order.
For more information, see
[Invoices](https://www.rebilly.com/docs/dev-docs/invoices/).
parameters:
- $ref: '#/components/parameters/collectionExpand'
responses:
'200':
description: Upcoming invoice retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/UpcomingInvoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/subscriptions/{id}/upcoming-invoice/issue:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Orders
summary: Issue an upcoming invoice for early pay
operationId: PostSubscriptionUpcomingInvoiceIssuance
x-sdk-operation-name: issueEarlyUpcomingInvoice
description: >-
Issues an upcoming invoice, for a subscription order with a specified
ID, for early pay.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceIssue'
description: InvoiceIssue resource.
required: true
responses:
'201':
description: Upcoming invoice issued.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/UpcomingInvoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
/subscriptions/{id}/upcoming-invoices/{invoiceId}/issue:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: invoiceId
in: path
description: ID of the upcoming invoice.
required: true
schema:
type: string
post:
x-products:
- Core
tags:
- Orders
summary: Issue a specific upcoming invoice for early pay
operationId: PostUpcomingInvoiceIssuance
x-sdk-operation-name: issueUpcomingInvoice
deprecated: true
description: >-
Issues an upcoming invoice with a specified ID for early pay.
This endpoint is deprecated.
Use [Issue an upcoming invoice for early
pay](../PostSubscriptionUpcomingInvoiceIssuance) instead.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceIssue'
description: InvoiceIssue resource.
required: true
responses:
'201':
description: Upcoming invoice issued.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/UpcomingInvoice'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
/subscriptions/{id}/timeline:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Orders timeline
summary: Retrieve order timeline messages
operationId: GetSubscriptionTimelineCollection
x-sdk-operation-name: getAllTimelineMessages
description: Retrieves a list of order timeline messages.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of order timeline messages retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OrderTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
x-codeSamples:
- lang: JavaScript
source: >-
// all parameters are optional except for the `id`
const firstCollection = await api.subscriptions
.getAllTimelineMessages({id: 'my-transaction'});
// alternatively you can specify one or more of them
const params = {id: 'my-transaction', limit: 20, offset: 100};
const secondCollection = await
api.subscriptions.getAllTimelineMessages(params);
// access the collection items, each item is a Member
secondCollection.items
.forEach(message => console.log(message.fields.eventType));
post:
x-products:
- Core
tags:
- Orders timeline
summary: Create an order timeline comment
operationId: PostSubscriptionTimeline
x-sdk-operation-name: createTimelineComment
description: Creates an order timeline comment.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OrderTimeline'
description: Order Timeline resource.
required: true
responses:
'201':
description: Order timeline comment created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/OrderTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >-
// Create a comment
const firstComment = await api
.subscriptions.createTimelineComment({id: 'my-subscription-id', data: {message: 'Your comment here'}});
// Using params object, mentions and references
const message = `Example of mentions @user@mydomain.com and
references #subscriptions-subscription-id`;
const params = {
id: 'my-subscription-id',
data: {
message,
},
};
const secondComment = await
api.subscriptions.createTimelineComment(params);
/subscriptions/{id}/timeline/{messageId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: messageId
in: path
description: ID of the order timeline message.
required: true
schema:
type: string
get:
x-products:
- Core
tags:
- Orders timeline
summary: Retrieve an order timeline message
operationId: GetSubscriptionTimeline
x-sdk-operation-name: getTimelineMessage
description: Retrieves a order message with a specified ID.
responses:
'200':
description: Order timeline message retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/OrderTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: JavaScript
source: |-
const message = await api.subscriptions
.getTimelineMessage({id: 'foobar-001', messageId: 'message-202'});
console.log(message.fields.eventType);
delete:
x-products:
- Core
tags:
- Orders timeline
summary: Delete an order timeline message
operationId: DeleteSubscriptionTimeline
x-sdk-operation-name: deleteTimelineMessage
description: Deletes an order timeline message with a specified ID.
responses:
'204':
description: Order timeline message deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: JavaScript
source: |-
const request = await api.subscriptions
.deleteTimelineMessage({id: 'foobar-001', messageId: 'message-202'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
/usages:
get:
x-products:
- Core
tags:
- Usage
summary: Retrieve usage records
operationId: GetUsageCollection
x-sdk-operation-name: getAll
description: Retrieves a list of usage records.
parameters:
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of usage records retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Usage'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-products:
- Core
tags:
- Usage
summary: Create a usage record
operationId: PostUsage
x-sdk-operation-name: create
description: Creates a usage report.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Usage'
responses:
'201':
description: Usage record created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Usage'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/usages/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Usage
summary: Retrieve a usage record
operationId: GetUsage
x-sdk-operation-name: get
security:
- SecretApiKey: []
- JWT: []
description: Retrieves a usage record with a specified ID.
responses:
'200':
description: Usage record retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Usage'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-products:
- Core
tags:
- Usage
summary: Upsert a usage record
operationId: PutUsage
x-sdk-operation-name: update
description: Creates or updates a usage record with a specified ID.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Usage'
responses:
'200':
description: Usage record updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Usage'
'201':
description: Usage record created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Usage'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
delete:
x-products:
- Core
tags:
- Usage
summary: Delete a usage record
operationId: DeleteUsage
x-sdk-operation-name: delete
description: Deletes a usage record with a specified ID.
responses:
'204':
description: Usage record deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
/tags:
get:
x-products:
- Core
tags:
- Tags
summary: Retrieve tags
operationId: GetTagCollection
x-sdk-operation-name: getAll
description: Retrieves a list of tags.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionQuery'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of tags retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Tag'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$tagsPaginator = $service->tags()->getAllPaginator(limit: 5);
foreach ($tagsPaginator as $tagPage) {
printf("Tags page %d/%d\n", $tagsPaginator->key() + 1, $tagsPaginator->count());
foreach ($tagPage as $tag) {
printf("Tag #%s: %s\n", $tag->getId(), $tag->getName());
}
}
// OR
$tags = $service->tags()->getAll();
foreach ($tags as $tag) {
printf("Tag #%s: %s\n", $tag->getId(), $tag->getName());
}
post:
x-products:
- Core
tags:
- Tags
summary: Create a tag
operationId: PostTag
x-sdk-operation-name: create
description: Creates a tag.
requestBody:
$ref: '#/components/requestBodies/Tag'
responses:
'201':
description: Tag created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Tag'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$tagForm = new \Rebilly\Sdk\Model\Tag();
$tagForm->setName('tag-name');
$tagForm->setType(\Rebilly\Sdk\Model\Tag::TYPE_CUSTOMER);
try {
$service->tags()->create($tagForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/tags/{tag}:
parameters:
- $ref: '#/components/parameters/tag'
get:
x-products:
- Core
tags:
- Tags
summary: Retrieve a tag
operationId: GetTag
x-sdk-operation-name: get
description: Retrieves a tag with a specified name.
responses:
'200':
description: Tag with a specified name retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Tag'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
patch:
x-products:
- Core
tags:
- Tags
summary: Update a tag
operationId: PatchTag
x-sdk-operation-name: update
description: Updates a tag with a specified name.
requestBody:
$ref: '#/components/requestBodies/UpdateTag'
responses:
'200':
description: Tag updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Tag'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
delete:
x-products:
- Core
tags:
- Tags
summary: Delete a tag
operationId: DeleteTag
x-sdk-operation-name: delete
description: |-
Deletes a tag with a specified name.
This is an asynchronous operation.
responses:
'204':
description: Tag deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/tags/{tag}/customers:
parameters:
- $ref: '#/components/parameters/tag'
post:
x-products:
- Core
tags:
- Tags
summary: Tag a list of customers
operationId: PostTagCustomerCollection
x-sdk-operation-name: tagCustomers
description: >-
Tags a list of customers.
If a customer in the list already has the specified tag applied, the
customer is ignored.
This is an asynchronous operation.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- customerIds
properties:
customerIds:
description: List of customer IDs.
type: array
minItems: 1
maxItems: 1000
items:
type: string
responses:
'204':
description: Customers tagging process has been scheduled.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
delete:
x-products:
- Core
tags:
- Tags
summary: Untag a list of customers
operationId: DeleteTagCustomerCollection
x-sdk-operation-name: untagCustomers
description: >-
Untag a list of customers.
If a customer in the list does not have the specified tag applied, the
customer is ignored.
This is an asynchronous operation.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- customerIds
properties:
customerIds:
description: List of customer IDs.
type: array
minItems: 1
maxItems: 1000
items:
type: string
responses:
'204':
description: Customers untagging process has been scheduled.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/tags/{tag}/customers/{customerId}:
parameters:
- $ref: '#/components/parameters/tag'
- $ref: '#/components/parameters/customerId'
post:
x-products:
- Core
tags:
- Tags
summary: Tag a customer
operationId: PostTagCustomer
x-sdk-operation-name: tagCustomer
description: Tags a customer.
responses:
'204':
description: Customer tagged.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
delete:
x-products:
- Core
tags:
- Tags
summary: Untag a customer
operationId: DeleteTagCustomer
x-sdk-operation-name: untagCustomer
description: Untags a customer.
responses:
'204':
description: Customer untagged.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/tags/{tag}/kyc-documents:
parameters:
- $ref: '#/components/parameters/tag'
post:
x-products:
- Core
tags:
- Tags
summary: Tag a list of KYC documents
operationId: PostTagKycDocumentCollection
x-sdk-operation-name: tagKycDocuments
description: >-
Tags a list of KYC documents.
If a KYC document in the list already has the specified tag applied, the
KYC document is ignored.
This is an asynchronous operation.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- kycDocumentIds
properties:
kycDocumentIds:
description: List of KYC document IDs.
type: array
minItems: 1
maxItems: 1000
items:
type: string
example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
responses:
'204':
description: KYC documents tagging process has been scheduled.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
delete:
x-products:
- Core
tags:
- Tags
summary: Untag a list of KYC documents
operationId: DeleteTagKycDocumentCollection
x-sdk-operation-name: untagKycDocuments
description: >-
Untags a list of KYC documents.
If a KYC document in the list does not have the specified tag applied,
the KYC document is ignored.
This is an asynchronous operation.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- kycDocumentIds
properties:
kycDocumentIds:
description: List of KYC document IDs.
type: array
minItems: 1
maxItems: 1000
items:
type: string
example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8
responses:
'204':
description: KYC documents untagging process has been scheduled.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/tags/{tag}/kyc-documents/{kycDocumentId}:
parameters:
- $ref: '#/components/parameters/tag'
- $ref: '#/components/parameters/kycDocumentId'
post:
x-products:
- Core
tags:
- Tags
summary: Tag a KYC document
operationId: PostTagKycDocument
x-sdk-operation-name: tagKycDocument
description: Tags a KYC document.
responses:
'204':
description: KYC document tagged.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
delete:
x-products:
- Core
tags:
- Tags
summary: Untag a KYC document
operationId: DeleteTagKycDocument
x-sdk-operation-name: untagKycDocument
description: Untags a KYC document.
responses:
'204':
description: KYC document untagged.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/tags/{tag}/aml-checks:
parameters:
- $ref: '#/components/parameters/tag'
post:
x-products:
- Core
tags:
- Tags
summary: Tag a list of AML checks
operationId: PostTagAmlCheckCollection
x-sdk-operation-name: tagAmlChecks
description: >-
Tags a list of AML checks.
If an AML check in the list already has the specified tag applied, the
AML check is ignored.
This is an asynchronous operation.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- amlCheckIds
properties:
amlCheckIds:
description: List of AML check IDs to tag.
type: array
minItems: 1
maxItems: 1000
items:
type: string
example: aml_chk_0YV7JHY705C6DA487BFTAA33V8
responses:
'204':
description: AML checks tagging process has been scheduled.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
delete:
x-products:
- Core
tags:
- Tags
summary: Untag a list of AML checks
operationId: DeleteTagAmlCheckCollection
x-sdk-operation-name: untagAmlChecks
description: >-
Untags a list of AML checks.
If an AML check in the list does not have the specified tag applied, the
AML check is ignored.
This is an asynchronous operation.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- amlCheckIds
properties:
amlCheckIds:
description: List of AML check IDs to tag.
type: array
minItems: 1
maxItems: 1000
items:
type: string
example: aml_chk_0YV7JHY705C6DA487BFTAA33V8
responses:
'204':
description: AML checks untagging process has been scheduled.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/tags/{tag}/aml-checks/{amlCheckId}:
parameters:
- $ref: '#/components/parameters/tag'
- name: amlCheckId
in: path
description: ID of the AML check to tag.
required: true
schema:
type: string
post:
x-products:
- Core
tags:
- Tags
summary: Tag an AML check
operationId: PostTagAmlCheck
x-sdk-operation-name: tagAmlCheck
description: >-
Tags an AML check.
If an AML check in the list does not have the specified tag applied, the
AML check is ignored.
responses:
'204':
description: AML check tagged.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
delete:
x-products:
- Core
tags:
- Tags
summary: Untag an AML check
operationId: DeleteTagAmlCheck
x-sdk-operation-name: untagAmlCheck
description: >-
Untags an AML check.
If an AML check in the list does not have the specified tag applied, the
AML check is ignored.
responses:
'204':
description: AML check untagged.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/tokens:
post:
x-products:
- Core
tags:
- Payment tokens
summary: Create a payment token
operationId: PostToken
x-sdk-operation-name: create
description: >-
Creates a payment token which can be exchanged into a payment
instrument.
[FramePay](https://docs.rebilly.com/docs/developer-docs/framepay/) is
the recommended way to create a payment token because it minimizes PCI
DSS compliance.
Once a payment token is created, it can only be used once.
A payment token expires upon first use or within 30 minutes of the token
creation, whichever comes first.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CompositeToken'
description: Payment token resource.
required: true
security:
- PublishableApiKey: []
- SecretApiKey: []
- JWT: []
responses:
'201':
description: Token created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/CompositeToken'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$paymentCardTokenForm = new Rebilly\Entities\PaymentCardToken();
$paymentCardTokenForm->setBillingAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
]);
$paymentInstrumentForm = new
Entities\PaymentInstruments\PaymentCardPaymentInstrument();
$paymentInstrumentForm->setPan('4111111111111111');
$paymentInstrumentForm->setExpYear(2025);
$paymentInstrumentForm->setExpMonth(8);
$paymentInstrumentForm->setCvv(123);
$paymentCardTokenForm->setPaymentInstrument($paymentInstrumentForm);
try {
$paymentCardToken = $client->paymentCardTokens()->create($paymentCardTokenForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: |
// first set the properties for the new payment token
const data = {
method: 'payment-card',
paymentInstrument: {
pan: '4111111111111111',
expYear: 2022,
expMonth: 12,
cvv: '123'
},
billingAddress: {
firstName: 'Johnny',
lastName: 'Brown',
emails: [{
label: 'main',
value: 'johnny+test@grr.la',
primary: true
}]
}
};
const token = await api.paymentTokens.create({data});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$paymentCardTokenForm = new \Rebilly\Sdk\Model\PaymentCardToken();
$paymentCardTokenForm->setBillingAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
]);
$paymentInstrumentForm = new
\Rebilly\Sdk\Model\PaymentCardTokenPaymentInstrument();
$paymentInstrumentForm->setPan('4111111111111111');
$paymentInstrumentForm->setExpYear(2025);
$paymentInstrumentForm->setExpMonth(8);
$paymentInstrumentForm->setCvv('123');
$paymentCardTokenForm->setPaymentInstrument($paymentInstrumentForm);
try {
$paymentCardToken = $service->paymentTokens()->create($paymentCardTokenForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
get:
x-products:
- Core
tags:
- Payment tokens
summary: Retrieve tokens
operationId: GetTokenCollection
x-sdk-operation-name: getAll
description: Retrieve a list of tokens.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
responses:
'200':
description: List of tokens retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CompositeToken'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$paymentCardTokens = $client->paymentCardTokens()->search([
'filter' => 'token:string',
]);
- lang: JavaScript
source: >-
// all parameters are optional
const firstCollection = await api.paymentTokens.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100};
const secondCollection = await api.paymentTokens.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(paymentToken =>
console.log(paymentToken.fields.id));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$paymentCardTokensPaginator =
$service->paymentTokens()->getAllPaginator(limit: 5);
foreach ($paymentCardTokensPaginator as $paymentCardTokensPage) {
printf("Payment card tokens page %d/%d\n", $paymentCardTokensPaginator->key() + 1, $paymentCardTokensPaginator->count());
foreach ($paymentCardTokensPage as $paymentCardToken) {
printf("Payment card token #%s\n", $paymentCardToken->getId());
}
}
// OR
$paymentCardTokens = $service->paymentTokens()->getAll();
foreach ($paymentCardTokens as $paymentCardToken) {
printf("Payment card token #%s\n", $paymentCardToken->getId());
}
/tokens/{token}:
parameters:
- name: token
in: path
description: ID of the token.
required: true
schema:
type: string
get:
x-products:
- Core
tags:
- Payment tokens
summary: Retrieve a token
operationId: GetToken
x-sdk-operation-name: get
description: Retrieves a token with a specified ID.
security:
- PublishableApiKey: []
responses:
'200':
description: Token retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/CompositeToken'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$paymentCardToken = $client->paymentCardTokens()->load('tokenId');
- lang: JavaScript
source: >-
const paymentToken = await api.paymentTokens.get({id:
'foobar-001'});
console.log(paymentToken.fields.method);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$paymentCardToken = $service->paymentTokens()->get('tokenId');
/digital-wallets/validation:
post:
x-products:
- Core
tags:
- Payment tokens
summary: Validate a digital wallet session
operationId: PostDigitalWalletValidation
x-sdk-operation-name: validate
description: >-
Validates a digital wallet session.
We recommend using
[FramePay](https://docs.rebilly.com/docs/developer-docs/framepay/) to
validate a digital wallet session.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DigitalWalletValidation'
description: Digital wallet validation request.
required: true
security:
- PublishableApiKey: []
- SecretApiKey: []
- JWT: []
responses:
'201':
description: Digital wallet validation complete.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/DigitalWalletValidation'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/transactions:
post:
x-products:
- Core
tags:
- Transactions
summary: Create a transaction
operationId: PostTransaction
x-sdk-operation-name: create
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: >-
Creates a transaction of type `sale`, `authorize` or `setup`.
Use this operation for the following transactions.
#### Real-time decision and response
In this transaction, you send a request and inspect the `result` of the
response for `approved` or `declined`.
#### User approval/interaction required
In this transaction, user approval is required to complete the
transaction.
User approval generally requires the user to interact with a third
party,
and is common in many transactions for alternative methods.
For example, PayPal requires user permission to complete a payment or to
accept a billing agreement.
Payment cards may also require user approval for 3D secure
authentication.
If approval is required, you receive a response with a `result` value of
`unknown` and a `status` value of `waiting-approval`.
The `_links` property of the response has a link for the `approvalUrl`.
Open the `approvalUrl` in an iframe or in a pop. A pop is a better
workflow for mobile devices.
parameters:
- $ref: '#/components/parameters/collectionExpand'
requestBody:
$ref: '#/components/requestBodies/TransactionRequest'
responses:
'201':
description: Transaction created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Transaction'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$transactionForm = new Rebilly\Entities\Transaction();
$transactionForm->setType('sale');
$transactionForm->setCustomerId('customerId');
$transactionForm->setWebsiteId('websiteId');
$transactionForm->setCurrency('USD');
$transactionForm->setAmount(1);
$paymentInstruction = new
Rebilly\Entities\Transactions\PaymentInstructions\PaymentTokenInstruction();
$paymentInstruction->setToken('payment-token');
$transactionForm->setPaymentInstruction($paymentInstruction);
$transactionForm->setBillingAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
'dob' => '2000-06-01',
]);
try {
$transaction = $client->transactions()->create($transactionForm);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: |
// first set the properties for the new transaction
const data = {
customerId: 'foobar-0001',
type: 'sale',
websiteId: 'my-main-website',
paymentInstrument: {
method: 'payment-card',
paymentCardId: 'my-payment-card-id',
gatewayAccountId: 'my-gateway-account-id'
},
currency: 'USD',
amount: 12.99,
description: 'manual transaction',
};
const transaction = await api.transactions.create({data});
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$transactionForm = new \Rebilly\Sdk\Model\PostTransactionRequest([
'type' => 'sale',
'amount' => 1,
]);
$transactionForm->setCustomerId('customerId');
$transactionForm->setWebsiteId('websiteId');
$transactionForm->setCurrency('USD');
$paymentInstruction = new
\Rebilly\Sdk\Model\PaymentInstructionInstrument();
$paymentInstruction->setToken('payment-token');
$transactionForm->setPaymentInstruction($paymentInstruction);
$transactionForm->setBillingAddress([
'firstName' => 'John',
'lastName' => 'Doe',
'organization' => 'Test LTD',
'address' => 'Test street 5',
'address2' => 'Test house 5',
'city' => 'New York',
'region' => 'Long Island',
'country' => 'US',
'postalCode' => '123456',
'emails' => [
[
'label' => 'main',
'value' => 'johndoe@testemail.com',
'primary' => true,
],
[
'label' => 'secondary',
'value' => 'otheremail@testemail.com',
],
],
'phoneNumbers' => [
[
'label' => 'work',
'value' => '+123456789',
'primary' => true,
],
[
'label' => 'home',
'value' => '+9874654321',
],
],
'dob' => '2000-06-01',
]);
try {
$transaction = $service->transactions()->create($transactionForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
get:
x-products:
- Core
tags:
- Transactions
summary: Retrieve transactions
operationId: GetTransactionCollection
x-sdk-operation-name: getAll
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Retrieves a list of transactions.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionQuery'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionExpand'
responses:
'200':
description: List of transactions retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Transaction'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$transactions = $client->transactions()->search([
'filter' => 'result:approved',
]);
- lang: JavaScript
source: >
// all parameters are optional
const firstCollection = await api.transactions.getAll();
// alternatively you can specify one or more of them
const params = {limit: 20, offset: 100, sort: '-createdTime'};
const secondCollection = await api.transactions.getAll(params);
// access the collection items, each item is a Member
secondCollection.items.forEach(transaction =>
console.log(transaction.fields.type));
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$transactionsPaginator =
$service->transactions()->getAllPaginator(limit: 5, filter:
'result:approved');
foreach ($transactionsPaginator as $transactionsPage) {
printf("Transactions page %d/%d\n", $transactionsPaginator->key() + 1, $transactionsPaginator->count());
foreach ($transactionsPage as $transaction) {
printf("Transaction #%s (%s): %s\n", $transaction->getId(), $transaction->getStatus(), $transaction->getDescription());
}
}
// OR
$transactions = $service->transactions()->getAll(filter:
'result:approved');
foreach ($transactions as $transaction) {
printf("Transaction #%s (%s): %s\n", $transaction->getId(), $transaction->getStatus(), $transaction->getDescription());
}
/transactions/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Transactions
summary: Retrieve a transaction
operationId: GetTransaction
x-sdk-operation-name: get
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Retrieves a transaction with a specified ID.
parameters:
- $ref: '#/components/parameters/collectionExpand'
responses:
'200':
description: Transaction retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Transaction'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
$transaction = $client->transactions()->load('transactionId');
- lang: JavaScript
source: |-
const transaction = await api.transactions.get({id: 'foobar-001'});
console.log(transaction.fields.billingAddress.firstName);
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$transaction = $service->transactions()->get('transactionId');
patch:
x-products:
- Core
tags:
- Transactions
summary: Update a transaction
operationId: PatchTransaction
x-sdk-operation-name: patch
description: Updates the custom fields of a transaction with a specified ID.
requestBody:
$ref: '#/components/requestBodies/PatchTransactionRequest'
responses:
'200':
description: Transaction updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Transaction'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: |
try {
$transaction = $client->transactions()->patch($transactionId, $data);
} catch (Rebilly\Http\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
- lang: JavaScript
source: >
// first set the custom fields to update for the transaction
const data = {
customFields: {
'myCustomField': 'myCustomData',
'myOtherField': 'myOtherData',
}
};
const transaction = await api.transactions.patch({id:
'my-transaction-id', data});
- lang: PHP
source: |-
$service = new \Rebilly\Sdk\CoreService($client);
$transactionForm = new \Rebilly\Sdk\Model\PatchTransactionRequest();
$transactionForm->setCustomFields([
[
'name' => 'customField',
'value' => 'customValue',
],
]);
try {
$transaction = $service->transactions()->patch('transactionId', $transactionForm);
} catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
print_r($e->getValidationErrors());
}
/payouts:
post:
x-products:
- Core
tags:
- Transactions
summary: Create a credit transaction
operationId: PostPayout
x-sdk-operation-name: create
security:
- SecretApiKey: []
- JWT: []
- ApplicationJWT: []
description: Creates a transaction of type `credit`.
requestBody:
$ref: '#/components/requestBodies/CreditTransactionRequest'
responses:
'201':
description: Transaction created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Transaction'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
/transactions/{id}/query:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Transactions
summary: Query a transaction
operationId: PostTransactionQuery
x-sdk-operation-name: query
description: >-
Queries a transaction with a specified ID.
The query interacts with the related gateway account to obtain the
result, amount, and currency.
If after analysis, the transaction must be updated, see [Update a
transaction status](../PostTransactionUpdate).
responses:
'201':
description: Transaction queried.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionQuery'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/transactions/{id}/update:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Transactions
summary: Update a transaction status
operationId: PostTransactionUpdate
x-sdk-operation-name: update
description: |-
Updates the status of a transaction with a specified ID to `completed`,
with a specified `result` and optional currency and amount values.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionUpdate'
required: true
responses:
'200':
description: Transaction updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Transaction'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/transactions/{id}/refund:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Transactions
summary: Refund a transaction
operationId: PostTransactionRefund
x-sdk-operation-name: refund
description: |-
Refunds a transaction with a specified ID.
The refund is in the same currency as the original transaction.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionRefund'
description: Transaction resource.
required: true
responses:
'201':
description: Transaction refunded.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Transaction'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: PHP
label: PHP-SDK-2.0
source: >
$transaction = $client->transactions()->refund('transactionId',
1.99);
- lang: JavaScript
source: >-
// define the refund amount
const data = {
amount: 12.99
};
const refund = await api.transactions.switch({id:
'my-transaction-id', data});
console.log(refund.fields.status);
- lang: PHP
source: >-
$service = new \Rebilly\Sdk\CoreService($client);
$transactionRefund = new \Rebilly\Sdk\Model\TransactionRefund();
$transactionRefund->setAmount(1.99);
$transaction = $service->transactions()->refund('transactionId',
$transactionRefund);
/transactions/{id}/timeline:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Transactions timeline
summary: Retrieve transaction timeline messages
operationId: GetTransactionTimelineCollection
x-sdk-operation-name: getAllTimelineMessages
description: Retrieves a list of transaction timeline messages.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of transaction timeline messages retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/TransactionTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
x-codeSamples:
- lang: JavaScript
source: >-
// all parameters are optional except for the `id`
const firstCollection = await api.transactions
.getAllTimelineMessages({id: 'my-transaction'});
// alternatively you can specify one or more of them
const params = {id: 'my-transaction', limit: 20, offset: 100};
const secondCollection = await
api.transactions.getAllTimelineMessages(params);
// access the collection items, each item is a Member
secondCollection.items
.forEach(message => console.log(message.fields.eventType));
post:
x-products:
- Core
tags:
- Transactions timeline
summary: Create a transaction timeline comment
operationId: PostTransactionTimeline
x-sdk-operation-name: createTimelineComment
description: Creates a transaction timeline comment.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionTimeline'
description: Transaction timeline resource.
required: true
responses:
'201':
description: Transaction timeline comment created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
x-codeSamples:
- lang: JavaScript
source: >-
// Create a comment
const firstComment = await api
.transactions.createTimelineComment({id: 'my-transaction-id', data: {message: 'Your comment here'}});
// Using params object, mentions and references
const message = `Example of mentions @user@mydomain.com and
references #transactions-transaction-id`;
const params = {
id: 'my-transaction-id',
data: {
message,
},
};
const secondComment = await
api.transactions.createTimelineComment(params);
/transactions/{id}/timeline/{messageId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: messageId
in: path
description: ID of the transaction timeline message.
required: true
schema:
type: string
get:
x-products:
- Core
tags:
- Transactions timeline
summary: Retrieve a transaction Timeline message
operationId: GetTransactionTimeline
x-sdk-operation-name: getTimelineMessage
description: Retrieves a timeline message with a specified ID.
responses:
'200':
description: Timeline message retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
x-codeSamples:
- lang: JavaScript
source: |-
const message = await api.transactions
.getTimelineMessage({id: 'foobar-001', messageId: 'message-202'});
console.log(message.fields.eventType);
delete:
x-products:
- Core
tags:
- Transactions timeline
summary: Delete a transaction timeline message
operationId: DeleteTransactionTimeline
x-sdk-operation-name: deleteTimelineMessage
description: Deletes a transaction timeline message with a specified ID.
responses:
'204':
description: Transaction timeline message deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
x-codeSamples:
- lang: JavaScript
source: |-
const request = await api.transactions
.deleteTimelineMessage({id: 'foobar-001', messageId: 'message-202'});
// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
/fees:
get:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Fees
summary: Retrieve fee entries
description: >-
Retrieves a list of fee entries.
> **Important:** This operation is experimental and may not be backward
compatible.
operationId: GetFeeCollection
x-sdk-operation-name: getAll
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of fee entries retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Fee'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Fees
summary: Create a fee entry
description: >-
Creates a fee entry.
> **Important:** This operation is experimental and may not be backward
compatible.
operationId: PostFee
x-sdk-operation-name: create
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Fee'
examples:
stripe-trx:
$ref: '#/components/examples/stripe-trx-request'
stripe-us:
$ref: '#/components/examples/stripe-us-request'
stripe-intl:
$ref: '#/components/examples/stripe-intl-request'
responses:
'201':
description: Fee entry created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Fee'
examples:
stripe-trx:
$ref: '#/components/examples/stripe-trx-response'
stripe-us:
$ref: '#/components/examples/stripe-us-response'
stripe-intl:
$ref: '#/components/examples/stripe-intl-response'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/fees/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Fees
summary: Retrieve a fee entry
description: >-
Retrieves a fee entry.
> **Important:** This operation is experimental and may not be backward
compatible.
operationId: GetFee
x-sdk-operation-name: get
responses:
'200':
description: Fee retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Fee'
examples:
stripe-trx:
$ref: '#/components/examples/stripe-trx-response'
stripe-us:
$ref: '#/components/examples/stripe-us-response'
stripe-intl:
$ref: '#/components/examples/stripe-intl-response'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Fees
summary: Upsert a fee entry
description: >-
Creates or updates (upserts) a fee entry.
> **Important:** This operation is experimental and may not be backward
compatible.
operationId: PutFee
x-sdk-operation-name: upsert
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Fee'
examples:
stripe-trx:
$ref: '#/components/examples/stripe-trx-request'
stripe-us:
$ref: '#/components/examples/stripe-us-request'
stripe-intl:
$ref: '#/components/examples/stripe-intl-request'
responses:
'200':
description: Fee entry updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Fee'
examples:
stripe-trx:
$ref: '#/components/examples/stripe-trx-response'
stripe-us:
$ref: '#/components/examples/stripe-us-response'
stripe-intl:
$ref: '#/components/examples/stripe-intl-response'
'201':
description: Fee entry created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Fee'
examples:
stripe-trx:
$ref: '#/components/examples/stripe-trx-response'
stripe-us:
$ref: '#/components/examples/stripe-us-response'
stripe-intl:
$ref: '#/components/examples/stripe-intl-response'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
patch:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Fees
summary: Patch a fee entry
description: >-
Patches a fee entry.
> **Important:** This operation is experimental and may not be backward
compatible.
operationId: PatchFee
x-sdk-operation-name: patch
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PatchFee'
examples:
stripe-trx:
$ref: '#/components/examples/stripe-trx-request'
stripe-us:
$ref: '#/components/examples/stripe-us-request'
stripe-intl:
$ref: '#/components/examples/stripe-intl-request'
responses:
'200':
description: Fee entry patched.
content:
application/json:
schema:
$ref: '#/components/schemas/Fee'
examples:
stripe-trx:
$ref: '#/components/examples/stripe-trx-response'
stripe-us:
$ref: '#/components/examples/stripe-us-response'
stripe-intl:
$ref: '#/components/examples/stripe-intl-response'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
delete:
x-badges:
- name: Experimental
x-products:
- Core
tags:
- Fees
summary: Delete a fee entry
description: >-
Deletes a fee entry.
> **Important:** This operation is experimental and may not be backward
compatible.
operationId: DeleteFee
x-sdk-operation-name: delete
responses:
'204':
description: Fee deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/api-keys/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/balance-transactions/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/billing-portals/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/broadcast-messages/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/deposit-requests:
post:
x-products:
- Core
x-badges:
- name: Experimental
tags:
- Deposits
summary: Create a deposit request
operationId: PostDepositRequest
x-sdk-operation-name: create
description: >-
Creates a deposit request.
To complete the deposit, the customer is redirected to the `deposit`
link.
After the deposit, the customer is redirected to the `redirectUrl`.
Corresponding transaction webhooks are sent to webhooks subscribers.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PostDepositRequest'
description: Deposit request resource.
required: true
responses:
'201':
description: Deposit request created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/DepositRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
get:
x-products:
- Core
x-badges:
- name: Experimental
tags:
- Deposits
summary: Retrieve deposit requests
operationId: GetDepositRequestCollection
x-sdk-operation-name: getAll
description: Retrieves a list of deposit requests.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of deposit requests retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DepositRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/deposit-requests/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
x-badges:
- name: Experimental
tags:
- Deposits
summary: Retrieve a deposit request
operationId: GetDepositRequest
x-sdk-operation-name: get
description: Retrieves a deposit request with a specified ID.
parameters:
- $ref: '#/components/parameters/collectionExpand'
responses:
'200':
description: Deposit request retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/DepositRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/deposit-strategies:
post:
x-products:
- Core
x-badges:
- name: Experimental
tags:
- Deposits
summary: Create a deposit strategy
operationId: PostDepositStrategy
x-sdk-operation-name: create
description: >-
Creates a deposit strategy.
To complete the deposit, the customer is redirected to the `deposit`
link.
After the deposit, the customer is redirected to the `redirectUrl`.
Corresponding transaction webhooks are sent to webhooks subscribers.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DepositStrategy'
description: Deposit strategy resource.
required: true
responses:
'201':
description: Deposit strategy created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/DepositStrategy'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
get:
x-products:
- Core
x-badges:
- name: Experimental
tags:
- Deposits
summary: Retrieve deposit strategies
operationId: GetDepositStrategyCollection
x-sdk-operation-name: getAll
description: Retrieves a list of deposit strategies.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of deposit strategies retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DepositStrategy'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/deposit-strategies/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
x-badges:
- name: Experimental
tags:
- Deposits
summary: Retrieve a deposit strategy
operationId: GetDepositStrategy
x-sdk-operation-name: get
description: Retrieves a deposit strategy with a specified ID.
responses:
'200':
description: Deposit strategy retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/DepositStrategy'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-products:
- Core
x-badges:
- name: Experimental
tags:
- Deposits
summary: Upsert a deposit strategy
operationId: PutDepositStrategy
x-sdk-operation-name: update
description: Creates or updates (upserts) a deposit strategy with a specified ID.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DepositStrategy'
description: Deposit strategy resource.
required: true
responses:
'200':
description: Deposit strategy updated.
content:
application/json:
schema:
$ref: '#/components/schemas/DepositStrategy'
'201':
description: Deposit strategy created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/DepositStrategy'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
delete:
x-products:
- Core
x-badges:
- name: Experimental
tags:
- Deposits
summary: Delete a deposit strategy
operationId: DeleteDepositStrategy
x-sdk-operation-name: delete
description: Deletes a deposit strategy with a specified ID.
responses:
'204':
description: Deposit strategy deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/deposit-custom-property-sets:
post:
x-products:
- Core
x-badges:
- name: Experimental
tags:
- Deposits
summary: Create a custom deposit property set
operationId: PostDepositCustomPropertySet
x-sdk-operation-name: create
description: >-
Creates a custom deposit property set.
A custom property set is a JSON-schema to extend the request form with
extra form fields.
The collected information is stored at the deposit request.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DepositCustomPropertySet'
description: Custom deposit property set resource.
required: true
responses:
'201':
description: Custom deposit property set created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/DepositCustomPropertySet'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
get:
x-products:
- Core
x-badges:
- name: Experimental
tags:
- Deposits
summary: Retrieve custom deposit properties sets
operationId: GetDepositCustomPropertySetCollection
x-sdk-operation-name: getAll
description: Retrieves a list of custom deposit property sets.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of custom deposit property sets retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DepositCustomPropertySet'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/deposit-custom-property-sets/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
x-badges:
- name: Experimental
tags:
- Deposits
summary: Retrieve a custom deposit property set
operationId: GetDepositCustomPropertySet
x-sdk-operation-name: get
description: Retrieves a custom deposit property set with a specified ID.
responses:
'200':
description: Custom deposit property set retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/DepositCustomPropertySet'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-products:
- Core
x-badges:
- name: Experimental
tags:
- Deposits
summary: Upsert a custom deposit property set
operationId: PutDepositCustomPropertySet
x-sdk-operation-name: update
description: >-
Creates or updates (upserts) a custom deposit property set with a
specified ID.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DepositCustomPropertySet'
description: Custom deposit property set resource.
required: true
responses:
'200':
description: Custom deposit property updated.
content:
application/json:
schema:
$ref: '#/components/schemas/DepositCustomPropertySet'
'201':
description: Custom deposit property set created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/DepositCustomPropertySet'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
delete:
x-products:
- Core
x-badges:
- name: Experimental
tags:
- Deposits
summary: Delete a custom deposit property set
operationId: DeleteDepositCustomPropertySet
x-sdk-operation-name: delete
description: Deletes a custom deposit property set with a specified ID.
responses:
'204':
description: Custom deposit property set deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/checkout-forms/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/service-credentials/{type}:
parameters:
- $ref: '#/components/parameters/credentialType'
/service-credentials/{type}/{id}:
parameters:
- $ref: '#/components/parameters/credentialType'
- $ref: '#/components/parameters/resourceId'
/service-credentials/{type}/{id}/items:
parameters:
- $ref: '#/components/parameters/credentialType'
- $ref: '#/components/parameters/resourceId'
/custom-domains/{domain}:
parameters:
- name: domain
in: path
description: Resource domain.
required: true
schema:
type: string
maxLength: 255
pattern: ^[@~\-\.\w]+$
/email-delivery-setting-verifications/{token}:
parameters:
- $ref: '#/components/parameters/token'
/email-delivery-settings/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/email-delivery-settings/{id}/resend-email-verification:
parameters:
- $ref: '#/components/parameters/resourceId'
/email-messages/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/events/{eventType}:
parameters:
- $ref: '#/components/parameters/systemEventType'
/events/{eventType}/rules:
parameters:
- $ref: '#/components/parameters/systemEventType'
/events/{eventType}/timeline:
parameters:
- $ref: '#/components/parameters/systemEventType'
/events/{eventType}/timeline/{messageId}:
parameters:
- $ref: '#/components/parameters/systemEventType'
- name: messageId
in: path
description: ID of the rules engine timeline message.
required: true
schema:
type: string
/events/{eventType}/rules/history:
parameters:
- $ref: '#/components/parameters/systemEventType'
/events/{eventType}/rules/history/{version}:
parameters:
- $ref: '#/components/parameters/systemEventType'
- $ref: '#/components/parameters/rulesVersion'
/events/{eventType}/rules/versions/{version}:
parameters:
- $ref: '#/components/parameters/systemEventType'
- $ref: '#/components/parameters/rulesVersion'
/events/{eventType}/rules/drafts:
parameters:
- $ref: '#/components/parameters/systemEventType'
/events/{eventType}/rules/drafts/{id}:
parameters:
- $ref: '#/components/parameters/systemEventType'
- $ref: '#/components/parameters/resourceId'
/forgot-password:
servers:
- url: https://api-sandbox.rebilly.com
description: Sandbox server
- url: https://api.rebilly.com
description: Live server
/gateway-accounts/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/gateway-accounts/{id}/close:
parameters:
- $ref: '#/components/parameters/resourceId'
/gateway-accounts/{id}/disable:
parameters:
- $ref: '#/components/parameters/resourceId'
/gateway-accounts/{id}/downtime-schedules:
parameters:
- $ref: '#/components/parameters/resourceId'
/gateway-accounts/{id}/downtime-schedules/{downtimeId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: downtimeId
in: path
description: ID of the gateway account downtime.
required: true
schema:
type: string
/gateway-accounts/{id}/enable:
parameters:
- $ref: '#/components/parameters/resourceId'
/gateway-accounts/{id}/limits:
parameters:
- $ref: '#/components/parameters/resourceId'
/gateway-accounts/{id}/limits/{limitId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: limitId
in: path
description: ID of the gateway account limit.
required: true
schema:
type: string
enum:
- daily-money
- monthly-money
- daily-count
- monthly-count
/gateway-accounts/{id}/timeline:
parameters:
- $ref: '#/components/parameters/resourceId'
/gateway-accounts/{id}/timeline/{messageId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: messageId
in: path
description: ID of the gateway account timeline message.
required: true
schema:
type: string
/gateway-accounts/{id}/check-credentials:
parameters:
- $ref: '#/components/parameters/resourceId'
/gateway-accounts/{id}/financial-settings:
parameters:
- $ref: '#/components/parameters/resourceId'
/grid-segments/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/integrations/{label}:
parameters:
- $ref: '#/components/parameters/integrationLabel'
/lists/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/lists/{id}/{version}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: version
in: path
required: true
description: Version of the list.
schema:
type: integer
minimum: 1
/memberships/{organizationId}/{userId}:
parameters:
- name: organizationId
in: path
required: true
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
schema:
$ref: '#/components/schemas/ResourceId'
- name: userId
in: path
required: true
description: ID of the user.
schema:
$ref: '#/components/schemas/ResourceId'
/organizations/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/payment-methods:
servers:
- url: https://api-sandbox.rebilly.com
description: Sandbox server
- url: https://api.rebilly.com
description: Live server
/payment-methods/{apiName}:
servers:
- url: https://api-sandbox.rebilly.com
description: Sandbox server
- url: https://api.rebilly.com
description: Live server
parameters:
- name: apiName
in: path
description: Name of the payment method API.
required: true
schema:
description: Name of the payment method returned in the API response.
type: string
pattern: ^[\w\. -]+$
/payment-gateways-metadata/{apiName}:
parameters:
- name: apiName
in: path
description: Payment gateway metadata API name.
required: true
schema:
description: Name of the payment gateway returned in the API response.
type: string
pattern: ^[\w\. -]+$
/payout-requests:
get:
x-products:
- Core
tags:
- Transactions
summary: Retrieve a list of payout requests
operationId: GetPayoutRequestCollection
x-sdk-operation-name: getAll
description: Retrieves a list of payout requests.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
responses:
'200':
description: List of payout requests retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PayoutRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-products:
- Core
tags:
- Transactions
summary: Create a payout request
operationId: PostPayoutRequest
x-sdk-operation-name: create
description: >-
Creates a payout request.
In the response, the `selectPaymentInstrumentUrl` field is used to
redirect the customer to select a preferred payment instrument.
After a payment instrument is selected, the customer is redirected to
the `selectedPaymentInstrumentRedirectUrl` value.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PayoutRequest'
description: Payout request resource.
required: true
responses:
'201':
description: Payout request created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/PayoutRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/payout-requests/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Transactions
summary: Retrieve a payout request
operationId: GetPayoutRequest
x-sdk-operation-name: get
description: Retrieves a payout request with a specified ID.
responses:
'200':
description: Payout request retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/PayoutRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-products:
- Core
tags:
- Transactions
summary: Upsert a payout request
operationId: PutPayoutRequest
x-sdk-operation-name: update
description: Creates or updates (upserts) a payout request with a specified ID.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PayoutRequest'
responses:
'200':
description: Payout request updated.
content:
application/json:
schema:
$ref: '#/components/schemas/PayoutRequest'
'201':
description: Payout request created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/PayoutRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
/payout-requests/{id}/cancel:
parameters:
- $ref: '#/components/parameters/resourceId'
post:
x-products:
- Core
tags:
- Transactions
summary: Cancel a payout request
operationId: PostPayoutRequestCancellation
x-sdk-operation-name: cancel
description: Cancels a payout request with a specified ID.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PayoutRequestCancellation'
description: Payout request resource.
required: true
responses:
'200':
description: Payout request canceled.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/PayoutRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
/payout-requests/{id}/payment-instruments:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Transactions
summary: Retrieve associated payment instruments
operationId: GetPayoutRequestPaymentInstruments
x-sdk-operation-name: getPaymentInstruments
description: >-
Retrieves the payment gateway and a list of payment instruments that are
associated with a payout request with a specified ID.
responses:
'200':
description: Payout request associated payment instruments retrieved.
content:
application/json:
schema:
type: array
description: >-
List of available payment instruments per an associated
gateway to offer for the payout.
items:
type: object
properties:
paymentInstrumentId:
type: string
description: ID of the payment instrument to offer for the payout.
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
gatewayName:
description: >-
Name of the payment gateway and payment instrument to
use for the payout.
This field is empty if the requested payment instrument
has not been used yet.
x-label: Gateway account
x-basic: true
type:
- string
- 'null'
allOf:
- $ref: '#/components/schemas/GatewayName'
exposureAmount:
description: >-
Total amount of sales minus credit for the specified
gateway and instrument.
type: number
format: double
previousAllocatedAmount:
description: >-
Total amount of allocated credit for the payout request
for the specified gateway and instrument.
type: number
format: double
lastPaymentTime:
description: >-
Date and time when the last payment is created for the
gateway and the payment instrument.
type: string
format: date-time
lastPayoutTime:
description: >-
Date and time when the last payout is created for the
gateway and the payment instrument.
type: string
format: date-time
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/previews/orders:
post:
x-products:
- Core
tags:
- Orders
summary: Preview an order
operationId: PostPreviewOrder
x-sdk-operation-name: order
description: |-
Previews an order.
Use this operation to preview a draft order before making an order.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OrderPreview'
responses:
'200':
description: Order preview retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/OrderPreview'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/roles/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/send-through-attribution/{eventType}:
parameters:
- $ref: '#/components/parameters/systemEventType'
/status:
servers:
- url: https://api-sandbox.rebilly.com
description: Sandbox server
- url: https://api.rebilly.com
description: Live server
/tracking/api/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/tracking/taxes/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/tracking/webhooks/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/tracking/webhooks/{id}/resend:
parameters:
- $ref: '#/components/parameters/resourceId'
/users/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/users/{id}/mfa:
parameters:
- $ref: '#/components/parameters/resourceId'
/webhooks/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/websites/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/experimental/customers/{customerId}/summary-metrics:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
parameters:
- name: customerId
in: path
required: true
description: ID of the customer.
schema:
type: string
/experimental/data-exports:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/data-exports/{id}:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
parameters:
- $ref: '#/components/parameters/resourceId'
/organization-exports/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/experimental/histograms/transactions:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/api-log-summary:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/cumulative-subscriptions:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/dashboard:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/dcc-markup:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/declined-transactions:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/disputes:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/events-triggered:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/events-triggered/{eventType}/rules:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
parameters:
- name: eventType
in: path
required: true
description: Type of system event.
schema:
$ref: '#/components/schemas/EventType'
/experimental/reports/future-renewals:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/journal:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/kyc-acceptance-summary:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/kyc-rejection-summary:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/kyc-request-summary:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/monthly-recurring-revenue:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/renewal-sales:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/retention-percentage:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/retention-value:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/revenue-waterfall:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/revenue-audit:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/subscription-cancellation:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/subscription-renewal:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/tax:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/time-series-transaction:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/transactions-time-dispute:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/reports/transactions:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
/experimental/subscriptions/{subscriptionId}/summary-metrics:
servers:
- url: >-
https://api-sandbox.rebilly.com/experimental/organizations/{organizationId}
description: Sandbox server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
- url: https://api.rebilly.com/experimental/organizations/{organizationId}
description: Live server
variables:
organizationId:
default: unknown
description: >-
Unique organization identifier.
An organization is an entity that represents a company.
For more information, see [Obtain an organization
ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
parameters:
- name: subscriptionId
in: path
required: true
description: ID of the subscription order.
schema:
type: string
/storefront/account/reset-password/{token}:
parameters:
- $ref: '#/components/parameters/token'
/storefront/account/verification/{token}:
parameters:
- $ref: '#/components/parameters/token'
/storefront/billing-portals/{slug}:
parameters:
- name: slug
in: path
description: Resource slug.
required: true
schema:
type: string
maxLength: 100
pattern: ^[@~\-\.\w]+$
/storefront/experimental/billing-portals/{slug}:
parameters:
- name: slug
in: path
description: Resource slug.
required: true
schema:
type: string
maxLength: 100
pattern: ^[@~\-\.\w]+$
/storefront/deposit-strategies/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/deposit-requests/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/checkout-forms/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/custom-fields/{resource}:
parameters:
- $ref: '#/components/parameters/storefrontCustomFieldResource'
/storefront/invoices/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
- $ref: '#/components/parameters/collectionExpand'
/storefront/orders/{id}/upcoming-invoice:
parameters:
- $ref: '#/components/parameters/resourceId'
- $ref: '#/components/parameters/collectionExpand'
/storefront/kyc-documents/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/kyc-requests/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/kyc-liveness-sessions/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/kyc-liveness-sessions/{id}/finish:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/orders/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/orders/{id}/cancellation:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/orders/{id}/pause:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/subscriptions/{id}/change-items:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/payment-instruments/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/payment-instruments/{id}/deactivation:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/payment-instruments/{id}/setup:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/payout-requests/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/plans/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/products/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/quotes/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/quotes/{id}/accept:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/quotes/{id}/reject:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/transactions/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/storefront/transactions/{id}/{token}/continue:
parameters:
- $ref: '#/components/parameters/resourceId'
- $ref: '#/components/parameters/token'
/storefront/transactions/{id}/{token}/bypass:
parameters:
- $ref: '#/components/parameters/resourceId'
- $ref: '#/components/parameters/token'
/storefront/websites/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
/customers/{id}/edd-score:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Customers
summary: Retrieve a customer's EDD score
operationId: GetCustomerEddScore
x-sdk-operation-name: getCustomerEddScore
description: Retrieves an EDD score for a customer with a specified ID.
responses:
'200':
description: EDD score retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Edd'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
patch:
x-products:
- Core
tags:
- Customers
summary: Update a customer's EDD score
operationId: PatchCustomerEddScore
x-sdk-operation-name: patchCustomerEddScore
description: Updates an EDD score for a customer with a specified ID.
requestBody:
content:
application/json:
schema:
type: object
title: PatchCustomerEddScoreRequest
required:
- score
properties:
score:
type: object
description: Customer's EDD score.
properties:
occupation:
$ref: '#/components/schemas/EddScore'
arrest:
$ref: '#/components/schemas/EddScore'
bankruptcy:
$ref: '#/components/schemas/EddScore'
fraud:
$ref: '#/components/schemas/EddScore'
responses:
'200':
description: EDD score updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Edd'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/customers/{id}/edd-timeline:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Customers timeline
summary: Retrieve EDD timeline messages
operationId: GetCustomerEddTimelineCollection
x-sdk-operation-name: getEddTimelineCollection
description: Retrieves a list of EDD timeline messages.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of EDD timeline messages retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/EddTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-products:
- Core
tags:
- Customers timeline
summary: Create an EDD timeline comment
operationId: PostCustomerEddTimeline
x-sdk-operation-name: createEddTimelineComment
description: Creates an EDD timeline comment.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/EddTimeline'
description: EDD timeline resource.
required: true
responses:
'201':
description: EDD timeline comment created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/EddTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/customers/{id}/edd-timeline/{messageId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: messageId
in: path
description: ID of the EDD timeline message.
required: true
schema:
type: string
get:
x-products:
- Core
tags:
- Customers timeline
summary: Retrieve an EDD timeline message
operationId: GetCustomerEddTimeline
x-sdk-operation-name: getEddTimelineMessage
description: Retrieves an EDD message with a specified ID.
responses:
'200':
description: EDD timeline message retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/EddTimeline'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
delete:
x-products:
- Core
tags:
- Customers timeline
summary: Delete an EDD timeline message
operationId: DeleteCustomerEddTimeline
x-sdk-operation-name: deleteEddTimelineMessage
description: Deletes an EDD timeline message with a specified ID.
responses:
'204':
description: EDD timeline message deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
/customers/{id}/edd-search-results:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Customers
summary: Retrieve customer EDD search results
operationId: GetCustomerEddSearchResultCollection
x-sdk-operation-name: getAllEddSearchResults
description: Retrieve EDD search results for a customer with a specified ID.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
responses:
'200':
description: EDD search results retrieved.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/EddSearchResult'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/customers/{id}/edd-search-results/{searchResultId}:
parameters:
- $ref: '#/components/parameters/resourceId'
- name: searchResultId
in: path
description: ID of the EDD search result.
required: true
schema:
type: string
get:
x-products:
- Full
- Risk Management
- Core
tags:
- Customers
summary: Retrieve a customer's EDD search result
operationId: GetCustomerEddSearchResult
x-sdk-operation-name: getEddSearchResult
description: Retrieves an EDD search result for a customer with a specified ID.
responses:
'200':
description: EDD search result retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/EddSearchResult'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/risk-score-rules:
get:
x-products:
- Core
tags:
- Risk score
summary: Retrieve risk score rules
operationId: GetRiskScoreRules
x-sdk-operation-name: getAll
security:
- SecretApiKey: []
- JWT: []
description: Retrieves risk score rules.
responses:
'200':
description: Risk score rules retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/RiskScoreRules'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
put:
x-products:
- Core
tags:
- Risk score
summary: Modify risk score rules
operationId: PutRiskScoreRules
x-sdk-operation-name: updateRiskScoreRules
description: Modifies risk score rules.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RiskScoreRules'
description: Risk score rules.
required: true
responses:
'200':
description: Risk score rules set.
content:
application/json:
schema:
$ref: '#/components/schemas/RiskScoreRules'
'201':
description: Risk score rules set.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/RiskScoreRules'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/risk-score-rules/blocklists:
get:
x-products:
- Core
tags:
- Risk score
summary: Retrieve risk score blocklist rules
operationId: GetRiskScoreBlocklistRules
x-sdk-operation-name: getAllBlocklistRules
security:
- SecretApiKey: []
- JWT: []
description: Retrieves risk score blocklist rules.
responses:
'200':
description: Risk score blocklist rules retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/RiskScoreBlocklist'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
put:
x-products:
- Core
tags:
- Risk score
summary: Modify risk score blocklist rules
operationId: PutRiskScoreBlocklistRules
x-sdk-operation-name: updateRiskScoreBlocklistRules
description: Modifies risk score blocklist rules.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RiskScoreBlocklist'
description: Risk score blocklist rules.
required: true
responses:
'200':
description: Risk score blocklist rules set.
content:
application/json:
schema:
$ref: '#/components/schemas/RiskScoreBlocklist'
'201':
description: Risk score blocklist rules set.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/RiskScoreBlocklist'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/allowlists:
get:
x-products:
- Core
tags:
- Allowlists
summary: Retrieve allowlist collection
operationId: GetAllowlistCollection
x-sdk-operation-name: getAllowlistCollection
security:
- SecretApiKey: []
- JWT: []
description: Retrieves allowlist collection.
parameters:
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
responses:
'200':
description: Allowlist collection retrieved.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Allowlist'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-products:
- Core
tags:
- Allowlists
summary: Create allowlist record
operationId: PostAllowlist
x-sdk-operation-name: storeAllowlist
security:
- PublishableApiKey: []
description: Creates allowlist record.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Allowlist'
description: Allowlist record.
required: true
responses:
'201':
description: Allowlist record created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/Allowlist'
'401':
$ref: '#/components/responses/Unauthorized'
'409':
$ref: '#/components/responses/Conflict'
/allowlists/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Allowlists
summary: Retrieve allowlist record
operationId: GetAllowlist
x-sdk-operation-name: getAllowlist
security:
- SecretApiKey: []
- JWT: []
description: Retrieves allowlist record.
responses:
'200':
description: Allowlist record retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/Allowlist'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
delete:
x-products:
- Core
tags:
- Allowlists
summary: Delete allowlist record
operationId: DeleteAllowlist
x-sdk-operation-name: delete
description: Deletes allowlist record with a specified ID.
responses:
'204':
description: Allowlist record deleted.
/tags-rules:
get:
x-products:
- Core
tags:
- Tags
summary: Retrieve tags rules list
operationId: GetTagsRulesCollection
x-sdk-operation-name: getAllTagsRules
description: Retrieves a list of tags rules.
parameters:
- $ref: '#/components/parameters/collectionLimit'
- $ref: '#/components/parameters/collectionOffset'
- $ref: '#/components/parameters/collectionSort'
- $ref: '#/components/parameters/collectionFilter'
- $ref: '#/components/parameters/collectionQuery'
responses:
'200':
description: List of tags rules retrieved.
headers:
Pagination-Total:
$ref: '#/components/headers/Pagination-Total'
Pagination-Limit:
$ref: '#/components/headers/Pagination-Limit'
Pagination-Offset:
$ref: '#/components/headers/Pagination-Offset'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/TagUntagRule'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
x-products:
- Core
tags:
- Tags
summary: Create tags rule
operationId: PostTagRules
x-sdk-operation-name: createTagsRule
description: Creates a tags rule.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TagUntagRule'
description: Tags rule resource.
required: true
responses:
'201':
description: Tags rule created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/TagUntagRule'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
/tags-rules/{id}:
parameters:
- $ref: '#/components/parameters/resourceId'
get:
x-products:
- Core
tags:
- Tags
summary: Retrieve a tags rule
operationId: GetTagsRule
x-sdk-operation-name: getTagsRule
description: Retrieves a tags rule with a specified ID.
responses:
'200':
description: Tags rule retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/TagUntagRule'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
x-products:
- Core
tags:
- Tags
summary: Create a tags rule with specified ID
operationId: PutTagsRule
x-sdk-operation-name: updateTagsRule
description: Creates a tags rule with a specified ID.
responses:
'200':
description: Tags rule updated.
content:
application/json:
schema:
$ref: '#/components/schemas/TagUntagRule'
'201':
description: Tags rule created.
headers:
Location:
$ref: '#/components/headers/Location'
content:
application/json:
schema:
$ref: '#/components/schemas/TagUntagRule'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
$ref: '#/components/responses/ValidationError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TagUntagRule'
description: Tags rule resource.
required: true
delete:
x-products:
- Core
tags:
- Tags
summary: Delete tags rule
operationId: DeleteTagsRule
x-sdk-operation-name: deleteTagsRule
description: Deletes a tags rule with a specified ID.
responses:
'204':
description: Tags rule deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
webhooks:
aml-list-possibly-matched:
post:
summary: AML list possibly matched
operationId: aml-list-possibly-matched
x-products:
- Core
tags:
- AML
requestBody:
$ref: '#/components/requestBodies/CustomerWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
coupon-application-removed:
post:
summary: Coupon application removed
operationId: coupon-application-removed
x-products:
- Core
tags:
- Coupons
requestBody:
$ref: '#/components/requestBodies/CouponRedemptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
coupon-applied:
post:
summary: Coupon applied
operationId: coupon-applied
x-products:
- Core
tags:
- Coupons
requestBody:
$ref: '#/components/requestBodies/CouponRedemptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
coupon-expiration-modified:
post:
summary: Coupon expiration modified
operationId: coupon-expiration-modified
x-products:
- Core
tags:
- Coupons
requestBody:
$ref: '#/components/requestBodies/CouponWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
coupon-expired:
post:
summary: Coupon expired
operationId: coupon-expired
x-products:
- Core
tags:
- Coupons
requestBody:
$ref: '#/components/requestBodies/CouponWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
coupon-issued:
post:
summary: Coupon issued
operationId: coupon-issued
x-products:
- Core
tags:
- Coupons
requestBody:
$ref: '#/components/requestBodies/CouponWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
coupon-modified:
post:
summary: Coupon modified
operationId: coupon-modified
x-products:
- Core
tags:
- Coupons
requestBody:
$ref: '#/components/requestBodies/CouponWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
coupon-redeemed:
post:
summary: Coupon redeemed
operationId: coupon-redeemed
x-products:
- Core
tags:
- Coupons
requestBody:
$ref: '#/components/requestBodies/CouponRedemptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
coupon-redemption-canceled:
post:
summary: Coupon redemption canceled
operationId: coupon-redemption-canceled
x-products:
- Core
tags:
- Coupons
requestBody:
$ref: '#/components/requestBodies/CouponRedemptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
credit-memo-applied:
post:
summary: Credit memo applied
operationId: credit-memo-applied
x-products:
- Core
tags:
- Credit memos
requestBody:
$ref: '#/components/requestBodies/CreditMemoWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
credit-memo-created:
post:
summary: Credit memo created
operationId: credit-memo-created
x-products:
- Core
tags:
- Credit memos
requestBody:
$ref: '#/components/requestBodies/CreditMemoWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
credit-memo-modified:
post:
summary: Credit memo modified
operationId: credit-memo-modified
x-products:
- Core
tags:
- Credit memos
requestBody:
$ref: '#/components/requestBodies/CreditMemoWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
credit-memo-partially-applied:
post:
summary: Credit memo partially applied
operationId: credit-memo-partially-applied
x-products:
- Core
tags:
- Credit memos
requestBody:
$ref: '#/components/requestBodies/CreditMemoWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
credit-memo-voided:
post:
summary: Credit memo voided
operationId: credit-memo-voided
x-products:
- Core
tags:
- Credit memos
requestBody:
$ref: '#/components/requestBodies/CreditMemoWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
customer-created:
post:
summary: Customer created
operationId: customer-created
x-products:
- Core
tags:
- Customers
requestBody:
$ref: '#/components/requestBodies/CustomerWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
customer-merged:
post:
summary: Customer merged
operationId: customer-merged
x-products:
- Core
tags:
- Customers
requestBody:
$ref: '#/components/requestBodies/MergedCustomer'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
customer-one-time-password-requested:
post:
summary: Customer one-time-password requested
operationId: customer-one-time-password-requested
x-products:
- Core
tags:
- Customers
requestBody:
$ref: '#/components/requestBodies/CustomerWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
customer-redirected-offsite:
post:
summary: Customer redirected offsite
operationId: customer-redirected-offsite
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/CustomerRedirect'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
customer-returned:
post:
summary: Customer returned
operationId: customer-returned
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/CustomerRedirect'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
customer-updated:
post:
summary: Customer updated
operationId: customer-updated
x-products:
- Core
tags:
- Customers
requestBody:
$ref: '#/components/requestBodies/CustomerWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
dispute-created:
post:
summary: Dispute created
operationId: dispute-created
x-products:
- Core
tags:
- Disputes
requestBody:
$ref: '#/components/requestBodies/DisputeWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
dispute-modified:
post:
summary: Dispute modified
operationId: dispute-modified
x-products:
- Core
tags:
- Disputes
requestBody:
$ref: '#/components/requestBodies/DisputeWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
experian-check-performed:
post:
summary: Experian check performed
operationId: experian-check-performed
x-products:
- Core
tags:
- Customers
requestBody:
$ref: '#/components/requestBodies/ExperianCheckPerformed'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
hard-usage-limit-reached:
post:
summary: Soft usage limit reached
operationId: soft-usage-limit-reached
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/UsageLimitWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
invoice-tax-calculation-failed:
post:
summary: Invoice tax calculation failed
operationId: invoice-tax-calculation-failed
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceTaxCalculationFailed'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
gateway-account-requested:
post:
summary: Gateway account requested
operationId: gateway-account-requested
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/TransactionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
invoice-abandoned:
post:
summary: Invoice abandoned
operationId: invoice-abandoned
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
invoice-created:
post:
summary: Invoice created
operationId: invoice-created
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
invoice-issued:
post:
summary: Invoice issued
operationId: invoice-issued
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
invoice-modified:
post:
summary: Invoice modified
operationId: invoice-modified
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
invoice-paid:
post:
summary: Invoice paid
operationId: invoice-paid
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
invoice-partially-paid:
post:
summary: Invoice partially paid
operationId: invoice-partially-paid
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
invoice-refunded:
post:
summary: Invoice refunded
operationId: invoice-refunded
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
invoice-partially-refunded:
post:
summary: Invoice partially refunded
operationId: invoice-partially-refunded
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
invoice-past-due:
post:
summary: Invoice past due
operationId: invoice-past-due
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
invoice-past-due-reminder:
post:
summary: Invoice past due reminder
operationId: invoice-past-due-reminder
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
invoice-reissued:
post:
summary: Invoice reissued
operationId: invoice-reissued
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
invoice-voided:
post:
summary: Invoice voided
operationId: invoice-voided
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
kyc-document-accepted:
post:
summary: KYC document accepted
operationId: kyc-document-accepted
x-products:
- Core
tags:
- KYC documents
requestBody:
$ref: '#/components/requestBodies/KycDocumentWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
kyc-document-modified:
post:
summary: KYC document modified
operationId: kyc-document-modified
x-products:
- Core
tags:
- KYC documents
requestBody:
$ref: '#/components/requestBodies/KycDocumentWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
kyc-document-rejected:
post:
summary: KYC document rejected
operationId: kyc-document-rejected
x-products:
- Core
tags:
- KYC documents
requestBody:
$ref: '#/components/requestBodies/KycDocumentWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
kyc-document-reviewed:
post:
summary: KYC document reviewed
operationId: kyc-document-reviewed
x-products:
- Core
tags:
- KYC documents
requestBody:
$ref: '#/components/requestBodies/KycDocumentWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
kyc-document-archived:
post:
summary: KYC document archived
operationId: kyc-document-archived
x-products:
- Core
tags:
- KYC documents
requestBody:
$ref: '#/components/requestBodies/KycDocumentWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
kyc-request-attempted:
post:
summary: KYC request attempted
operationId: kyc-request-attempted
x-products:
- Core
tags:
- KYC documents
requestBody:
$ref: '#/components/requestBodies/KycRequestWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
kyc-request-failed:
post:
summary: KYC request failed
operationId: kyc-request-failed
x-products:
- Core
tags:
- KYC documents
requestBody:
$ref: '#/components/requestBodies/KycRequestWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
kyc-request-fulfilled:
post:
summary: KYC request fulfilled
operationId: kyc-request-fulfilled
x-products:
- Core
tags:
- KYC documents
requestBody:
$ref: '#/components/requestBodies/KycRequestWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
kyc-request-partially-fulfilled:
post:
summary: KYC request partially fulfilled
operationId: kyc-request-partially-fulfilled
x-products:
- Core
tags:
- KYC documents
requestBody:
$ref: '#/components/requestBodies/KycRequestWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
nsf-response-received:
post:
summary: NSF response received
operationId: nsf-response-received
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/TransactionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
offsite-payment-completed:
post:
summary: Offsite payment completed
operationId: offsite-payment-completed
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/TransactionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
order-abandoned:
post:
summary: Order abandoned
operationId: order-abandoned
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
order-completed:
post:
summary: Order completed
operationId: order-completed
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
payment-card-created:
post:
summary: Payment card created
operationId: payment-card-created
x-products:
- Core
tags:
- Payment instruments
requestBody:
$ref: '#/components/requestBodies/PaymentCardWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
payment-card-expiration-reminder:
post:
summary: Payment card expiration reminder
operationId: payment-card-expiration-reminder
x-products:
- Core
tags:
- Payment instruments
requestBody:
$ref: '#/components/requestBodies/PaymentCardWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
payment-card-expired:
post:
summary: Payment card expired
operationId: payment-card-expired
x-products:
- Core
tags:
- Payment instruments
requestBody:
$ref: '#/components/requestBodies/PaymentCardWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
payment-instrument-modified:
post:
summary: Payment instrument modified
operationId: payment-instrument-modified
x-products:
- Core
tags:
- Payment instruments
requestBody:
$ref: '#/components/requestBodies/PaymentInstrumentWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
payout-request-canceled:
post:
summary: Payout request canceled
operationId: payout-request-canceled
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/PayoutRequestWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
payout-request-created:
post:
summary: Payout request created
operationId: payout-request-created
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/PayoutRequestWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
payout-request-modified:
post:
summary: Payout request modified
operationId: payout-request-modified
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/PayoutRequestWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
quote-accepted:
post:
summary: Quote accepted
operationId: quote-accepted
x-products:
- Core
tags:
- Quotes
requestBody:
$ref: '#/components/requestBodies/QuoteWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
quote-canceled:
post:
summary: Quote canceled
operationId: quote-canceled
x-products:
- Core
tags:
- Quotes
requestBody:
$ref: '#/components/requestBodies/QuoteWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
quote-created:
post:
summary: Quote created
operationId: quote-created
x-products:
- Core
tags:
- Quotes
requestBody:
$ref: '#/components/requestBodies/QuoteWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
quote-expired:
post:
summary: Quote expired
operationId: quote-expired
x-products:
- Core
tags:
- Quotes
requestBody:
$ref: '#/components/requestBodies/QuoteWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
quote-issued:
post:
summary: Quote issued
operationId: quote-issued
x-products:
- Core
tags:
- Quotes
requestBody:
$ref: '#/components/requestBodies/QuoteWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
quote-recalled:
post:
summary: Quote recalled
operationId: quote-recalled
x-products:
- Core
tags:
- Quotes
requestBody:
$ref: '#/components/requestBodies/QuoteWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
quote-rejected:
post:
summary: Quote rejected
operationId: quote-rejected
x-products:
- Core
tags:
- Quotes
requestBody:
$ref: '#/components/requestBodies/QuoteWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
quote-updated:
post:
summary: Quote updated
operationId: quote-updated
x-products:
- Core
tags:
- Quotes
requestBody:
$ref: '#/components/requestBodies/QuoteWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
renewal-invoice-issued:
post:
summary: Renewal invoice issued
operationId: renewal-invoice-issued
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/RenewalInvoiceIssued'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
renewal-invoice-payment-canceled:
post:
summary: Renewal invoice payment canceled
operationId: renewal-invoice-payment-canceled
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceAndTransaction'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
renewal-invoice-payment-declined:
post:
summary: Renewal invoice payment declined
operationId: renewal-invoice-payment-declined
x-products:
- Core
tags:
- Invoices
requestBody:
$ref: '#/components/requestBodies/InvoiceAndTransaction'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
risk-score-changed:
post:
summary: Risk score changed
operationId: risk-score-changed
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/TransactionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
soft-usage-limit-reached:
post:
summary: Hard usage limit reached
operationId: hard-usage-limit-reached
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/UsageLimitWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-activated:
post:
summary: Subscription order activated
operationId: subscription-activated
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-canceled:
post:
summary: Subscription order canceled
operationId: subscription-canceled
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-churned:
post:
summary: Subscription order churned
operationId: subscription-churned
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-downgraded:
post:
summary: Subscription order downgraded
operationId: subscription-downgraded
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-items-changed:
post:
summary: Subscription items changed
operationId: subscription-items-changed
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-modified:
post:
summary: Order modified
operationId: subscription-modified
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-reactivated:
post:
summary: Subscription order reactivated
operationId: subscription-reactivated
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-renewal-reminder:
post:
summary: Subscription renewal reminder
operationId: subscription-renewal-reminder
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-renewed:
post:
summary: Subscription order renewed
operationId: subscription-renewed
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-trial-converted:
post:
summary: Subscription order trial converted
operationId: subscription-trial-converted
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-trial-end-reminder:
post:
summary: Subscription order trial end reminder
operationId: subscription-trial-end-reminder
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-trial-ended:
post:
summary: Subscription order trial ended
operationId: subscription-trial-ended
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-trial-end-changed:
post:
summary: Subscription order trial end changed
operationId: subscription-trial-end-changed
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-upgraded:
post:
summary: Subscription order upgraded
operationId: subscription-upgraded
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-paused:
post:
summary: Subscription order paused
operationId: subscription-paused
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionAndSubscriptionPause'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-pause-created:
post:
summary: Subscription order pause created
operationId: subscription-pause-created
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionAndSubscriptionPause'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-pause-modified:
post:
summary: Subscription order pause modified
operationId: subscription-pause-modified
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionAndSubscriptionPause'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-pause-revoked:
post:
summary: Subscription order pause revoked
operationId: subscription-pause-revoked
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionAndSubscriptionPause'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
subscription-resumed:
post:
summary: Subscription order resumed
operationId: subscription-resumed
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionAndSubscriptionPause'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
transaction-amount-discrepancy-found:
post:
summary: Transaction amount discrepancy found
operationId: transaction-amount-discrepancy-found
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/TransactionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
transaction-declined:
post:
summary: Transaction declined
operationId: transaction-declined
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/TransactionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
transaction-discrepancy-found:
post:
summary: Transaction discrepancy found
operationId: transaction-discrepancy-found
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/TransactionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
transaction-process-requested:
post:
summary: Transaction process requested
operationId: transaction-process-requested
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/TransactionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
transaction-processed:
post:
summary: Transaction processed
operationId: transaction-processed
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/TransactionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
transaction-timeout-resolved:
post:
summary: Transaction timeout resolved
operationId: transaction-timeout-resolved
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/TransactionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
waiting-gateway-transaction-completed:
post:
summary: Waiting gateway transaction completed
operationId: waiting-gateway-transaction-completed
x-products:
- Core
tags:
- Transactions
requestBody:
$ref: '#/components/requestBodies/TransactionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.
order-delinquency-reached:
post:
summary: Order delinquency time reached
operationId: order-delinquency-reached
x-products:
- Core
tags:
- Orders
requestBody:
$ref: '#/components/requestBodies/SubscriptionWebhook'
responses:
2xx:
description: Returns any 2xx status to indicate that data is received.