# Core APIs # 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://www.npmjs.com/package/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. ## 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). To create and manage API keys, see [API keys](https://www.rebilly.com/docs/dev-docs/api-keys/). # Rate limits Rebilly enforces rate limits on the API to ensure that no single organization consumes too many resources. Rate limits are applied to the organization, and not to the API key. In sandbox environment, rate limits are enforced for non-GET endpoints and are set at 3000 requests per 10 minutes. You can find the exact number of consumed requests in the `X-RateLimit-Limit` and `X-RateLimit-Remaining` headers in the response. If the rate limit is exceeded, the API returns a `429 Too Many Requests` response and a `X-RateLimit-Retry-After` header that includes a UTC timestamp of when the rate limit resets. Version: latest License: Rebilly ## Servers Sandbox server ``` https://api-sandbox.rebilly.com/organizations/{organizationId} ``` Variables: - `organizationId`: 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). Default: "{organizationId}" Live server ``` https://api.rebilly.com/organizations/{organizationId} ``` Variables: - `organizationId`: 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). Default: "{organizationId}" ## Security ### JWT JWT is a short lifetime token that can be assigned a specific expiration time. Usage format: `Bearer `. Type: http Scheme: bearer Bearer Format: JWT ### ApplicationJWT 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 `. Type: http Scheme: bearer Bearer Format: JWT ### PublishableApiKey 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). Type: apiKey In: header Name: Authorization ### SecretApiKey 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. Type: apiKey In: header Name: REB-APIKEY ### CustomerJWT 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 `. Type: http Scheme: bearer Bearer Format: JWT ## Download OpenAPI description [Core APIs](https://www.rebilly.com/_spec/docs/dev-docs/api/index.yaml) ## Customers 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). ### Retrieve customers - [GET /customers](https://www.rebilly.com/docs/dev-docs/api/customers/getcustomercollection.md): Retrieves a list of customers. ### Create a customer - [POST /customers](https://www.rebilly.com/docs/dev-docs/api/customers/postcustomer.md): 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 — to prevent duplicate customers, use the _Upsert a customer with predefined ID_ operation. For more information, see Prevent duplicate customers. ### Retrieve a customer - [GET /customers/{id}](https://www.rebilly.com/docs/dev-docs/api/customers/getcustomer.md): Retrieves a customer with a specified ID. ### Upsert a customer - [PUT /customers/{id}](https://www.rebilly.com/docs/dev-docs/api/customers/putcustomer.md): 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 — use this operation to prevent duplicate customers. For more information, see Prevent duplicate customers. ### Merge and delete a customer - [DELETE /customers/{id}](https://www.rebilly.com/docs/dev-docs/api/customers/deletecustomer.md): Merges one duplicate customer to another target customer and deletes the former. ### Retrieve a customer's lead source - [GET /customers/{id}/lead-source](https://www.rebilly.com/docs/dev-docs/api/customers/getcustomerleadsource.md): 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. ### Create a customer's lead source - [PUT /customers/{id}/lead-source](https://www.rebilly.com/docs/dev-docs/api/customers/putcustomerleadsource.md): 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. ### Delete a customer's lead source - [DELETE /customers/{id}/lead-source](https://www.rebilly.com/docs/dev-docs/api/customers/deletecustomerleadsource.md): Deletes lead source data for a customer with a specified ID. ### Retrieve a customer's EDD score - [GET /customers/{id}/edd-score](https://www.rebilly.com/docs/dev-docs/api/customers/getcustomereddscore.md): Retrieves an EDD score for a customer with a specified ID. ### Update a customer's EDD score - [PATCH /customers/{id}/edd-score](https://www.rebilly.com/docs/dev-docs/api/customers/patchcustomereddscore.md): Updates an EDD score for a customer with a specified ID. ### Retrieve customer EDD search results - [GET /customers/{id}/edd-search-results](https://www.rebilly.com/docs/dev-docs/api/customers/getcustomereddsearchresultcollection.md): Retrieve EDD search results for a customer with a specified ID. ### Retrieve a customer's EDD search result - [GET /customers/{id}/edd-search-results/{searchResultId}](https://www.rebilly.com/docs/dev-docs/api/customers/getcustomereddsearchresult.md): Retrieves an EDD search result for a customer with a specified ID. ### Customer created - [POST customer-created](https://www.rebilly.com/docs/dev-docs/api/customers/customer-created.md) ### Customer merged - [POST customer-merged](https://www.rebilly.com/docs/dev-docs/api/customers/customer-merged.md) ### Customer one-time-password requested - [POST customer-one-time-password-requested](https://www.rebilly.com/docs/dev-docs/api/customers/customer-one-time-password-requested.md) ### Customer updated - [POST customer-updated](https://www.rebilly.com/docs/dev-docs/api/customers/customer-updated.md) ### Experian check performed - [POST experian-check-performed](https://www.rebilly.com/docs/dev-docs/api/customers/experian-check-performed.md) ## Customer authentication Use these operations to validate the identity of users and manage authentication credentials. ### Retrieve authentication options - [GET /authentication-options](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/getauthenticationoption.md): Retrieves customer authentication options. ### Change authentication options - [PUT /authentication-options](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/putauthenticationoption.md): Changes customer authentication options. ### Retrieve authentication tokens - [GET /authentication-tokens](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/getauthenticationtokencollection.md): Retrieves a list of customer authentication tokens. ### Login a customer - [POST /authentication-tokens](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/postauthenticationtoken.md): Logs in a customer. ### Verify an authentication token - [GET /authentication-tokens/{token}](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/getauthenticationtokenverification.md): Verifies a customer's authentication token. ### Logout a customer - [DELETE /authentication-tokens/{token}](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/deleteauthenticationtoken.md): Logs out a customer. ### Exchange an authentication token - [POST /authentication-tokens/{token}/exchange](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/postauthenticationtokenexchange.md): Exchanges an authentication token for a JWT. By default, this operation invalidates the exchanged authentication token. ### Retrieve credentials - [GET /credentials](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/getcredentialcollection.md): Retrieves a list of authentication credentials. ### Create a credential - [POST /credentials](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/postcredential.md): Creates an authentication credential. ### Retrieve a credential - [GET /credentials/{id}](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/getcredential.md): Retrieves a credential with a specified ID. ### Upsert a credential - [PUT /credentials/{id}](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/putcredential.md): Creates or updates (upserts) an authentication credential with a specified ID. ### Delete a credential - [DELETE /credentials/{id}](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/deletecredential.md): Deletes an authentication credential with a specified ID. ### Retrieve tokens - [GET /password-tokens](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/getpasswordtokencollection.md): Retrieves a list of reset password tokens. ### Create a reset password token - [POST /password-tokens](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/postpasswordtoken.md): Creates a reset password token. ### Retrieve a reset password token - [GET /password-tokens/{id}](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/getpasswordtoken.md): Retrieves a reset password token with a specified ID. ### Delete a reset password token - [DELETE /password-tokens/{id}](https://www.rebilly.com/docs/dev-docs/api/customer-authentication/deletepasswordtoken.md): Deletes a reset password token with a specified ID. ## Tags Use tags to organize and categorize customers or KYC documents based on keywords. ### Retrieve tags - [GET /tags](https://www.rebilly.com/docs/dev-docs/api/tags/gettagcollection.md): Retrieves a list of tags. ### Create a tag - [POST /tags](https://www.rebilly.com/docs/dev-docs/api/tags/posttag.md): Creates a tag. ### Retrieve a tag - [GET /tags/{tag}](https://www.rebilly.com/docs/dev-docs/api/tags/gettag.md): Retrieves a tag with a specified name. ### Update a tag - [PATCH /tags/{tag}](https://www.rebilly.com/docs/dev-docs/api/tags/patchtag.md): Updates a tag with a specified name. ### Delete a tag - [DELETE /tags/{tag}](https://www.rebilly.com/docs/dev-docs/api/tags/deletetag.md): Deletes a tag with a specified name. This is an asynchronous operation. ### Tag a list of customers - [POST /tags/{tag}/customers](https://www.rebilly.com/docs/dev-docs/api/tags/posttagcustomercollection.md): 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. ### Untag a list of customers - [DELETE /tags/{tag}/customers](https://www.rebilly.com/docs/dev-docs/api/tags/deletetagcustomercollection.md): 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. ### Tag a customer - [POST /tags/{tag}/customers/{customerId}](https://www.rebilly.com/docs/dev-docs/api/tags/posttagcustomer.md): Tags a customer. ### Untag a customer - [DELETE /tags/{tag}/customers/{customerId}](https://www.rebilly.com/docs/dev-docs/api/tags/deletetagcustomer.md): Untags a customer. ### Tag a list of KYC documents - [POST /tags/{tag}/kyc-documents](https://www.rebilly.com/docs/dev-docs/api/tags/posttagkycdocumentcollection.md): 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. ### Untag a list of KYC documents - [DELETE /tags/{tag}/kyc-documents](https://www.rebilly.com/docs/dev-docs/api/tags/deletetagkycdocumentcollection.md): 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. ### Tag a KYC document - [POST /tags/{tag}/kyc-documents/{kycDocumentId}](https://www.rebilly.com/docs/dev-docs/api/tags/posttagkycdocument.md): Tags a KYC document. ### Untag a KYC document - [DELETE /tags/{tag}/kyc-documents/{kycDocumentId}](https://www.rebilly.com/docs/dev-docs/api/tags/deletetagkycdocument.md): Untags a KYC document. ### Tag a list of AML checks - [POST /tags/{tag}/aml-checks](https://www.rebilly.com/docs/dev-docs/api/tags/posttagamlcheckcollection.md): 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. ### Untag a list of AML checks - [DELETE /tags/{tag}/aml-checks](https://www.rebilly.com/docs/dev-docs/api/tags/deletetagamlcheckcollection.md): 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. ### Tag an AML check - [POST /tags/{tag}/aml-checks/{amlCheckId}](https://www.rebilly.com/docs/dev-docs/api/tags/posttagamlcheck.md): Tags an AML check. If an AML check in the list does not have the specified tag applied, the AML check is ignored. ### Untag an AML check - [DELETE /tags/{tag}/aml-checks/{amlCheckId}](https://www.rebilly.com/docs/dev-docs/api/tags/deletetagamlcheck.md): Untags an AML check. If an AML check in the list does not have the specified tag applied, the AML check is ignored. ### Retrieve tags rules list - [GET /tags-rules](https://www.rebilly.com/docs/dev-docs/api/tags/gettagrulecollection.md): Retrieves a list of tags rules. ### Create tags rule - [POST /tags-rules](https://www.rebilly.com/docs/dev-docs/api/tags/posttagrule.md): Creates a tags rule. ### Retrieve a tags rule - [GET /tags-rules/{id}](https://www.rebilly.com/docs/dev-docs/api/tags/gettagrule.md): Retrieves a tags rule with a specified ID. ### Create a tags rule with specified ID - [PUT /tags-rules/{id}](https://www.rebilly.com/docs/dev-docs/api/tags/puttagrule.md): Creates a tags rule with a specified ID. ### Delete tags rule - [DELETE /tags-rules/{id}](https://www.rebilly.com/docs/dev-docs/api/tags/deletetagrule.md): Deletes a tags rule with a specified ID. ## Customers timeline Use customer timelines to maintain an audit trail of changes and activity for each customer. ### Retrieve customer timeline custom event types - [GET /customer-timeline-custom-events](https://www.rebilly.com/docs/dev-docs/api/customers-timeline/getcustomertimelinecustomeventtypecollection.md): Retrieves a list of customer timeline custom event types. ### Create customer timeline custom event type - [POST /customer-timeline-custom-events](https://www.rebilly.com/docs/dev-docs/api/customers-timeline/postcustomertimelinecustomeventtype.md): Creates a customer timeline custom event type. ### Retrieve customer timeline custom event type - [GET /customer-timeline-custom-events/{id}](https://www.rebilly.com/docs/dev-docs/api/customers-timeline/getcustomertimelinecustomeventtype.md): Retrieves a customer timeline custom event type with a specified ID. ### Retrieve customer timeline messages - [GET /customers/{id}/timeline](https://www.rebilly.com/docs/dev-docs/api/customers-timeline/getcustomertimelinecollection.md): Retrieves customer timeline messages. ### Create a customer timeline comment - [POST /customers/{id}/timeline](https://www.rebilly.com/docs/dev-docs/api/customers-timeline/postcustomertimeline.md): Creates a customer timeline comment or custom defined event. ### Retrieve a customer timeline message - [GET /customers/{id}/timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/customers-timeline/getcustomertimeline.md): Retrieves a customer message with a specified ID. ### Delete a customer timeline message - [DELETE /customers/{id}/timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/customers-timeline/deletecustomertimeline.md): Deletes a customer timeline message with a specified ID. ### Retrieve EDD timeline messages - [GET /customers/{id}/edd-timeline](https://www.rebilly.com/docs/dev-docs/api/customers-timeline/getcustomereddtimelinecollection.md): Retrieves a list of EDD timeline messages. ### Create an EDD timeline comment - [POST /customers/{id}/edd-timeline](https://www.rebilly.com/docs/dev-docs/api/customers-timeline/postcustomereddtimeline.md): Creates an EDD timeline comment. ### Retrieve an EDD timeline message - [GET /customers/{id}/edd-timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/customers-timeline/getcustomereddtimeline.md): Retrieves an EDD message with a specified ID. ### Delete an EDD timeline message - [DELETE /customers/{id}/edd-timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/customers-timeline/deletecustomereddtimeline.md): Deletes an EDD timeline message with a specified ID. ## Payment instruments 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). ### Retrieve payment instruments - [GET /payment-instruments](https://www.rebilly.com/docs/dev-docs/api/payment-instruments/getpaymentinstrumentcollection.md): Retrieves a list of payment instruments. ### Create a payment instrument - [POST /payment-instruments](https://www.rebilly.com/docs/dev-docs/api/payment-instruments/postpaymentinstrument.md): Creates a payment instrument. If the payment card, bank account, or alternative payment instrument already exists it is updated. ### Retrieve a payment instrument - [GET /payment-instruments/{id}](https://www.rebilly.com/docs/dev-docs/api/payment-instruments/getpaymentinstrument.md): Retrieves a payment instrument with a specified ID. ### Update payment instrument - [PATCH /payment-instruments/{id}](https://www.rebilly.com/docs/dev-docs/api/payment-instruments/patchpaymentinstrument.md): Updates the values of a payment instrument with a specified ID. ### Deactivate a payment instrument - [POST /payment-instruments/{id}/deactivation](https://www.rebilly.com/docs/dev-docs/api/payment-instruments/postpaymentinstrumentdeactivation.md): Deactivates a payment instrument with a specified ID. ### Verify name on a payment instrument - [POST /payment-instruments/{id}/name-inquiry](https://www.rebilly.com/docs/dev-docs/api/payment-instruments/postpaymentinstrumentnameinquiry.md): Performs a name check inquiry on a payment instrument. Use this operation to confirm the name that is associated with a payment instrument. This operation supports payment cards only, using VISA ANI requests through Worldpay. ### Payment card created - [POST payment-card-created](https://www.rebilly.com/docs/dev-docs/api/payment-instruments/payment-card-created.md) ### Payment card expiration reminder - [POST payment-card-expiration-reminder](https://www.rebilly.com/docs/dev-docs/api/payment-instruments/payment-card-expiration-reminder.md) ### Payment card expired - [POST payment-card-expired](https://www.rebilly.com/docs/dev-docs/api/payment-instruments/payment-card-expired.md) ### Payment instrument modified - [POST payment-instrument-modified](https://www.rebilly.com/docs/dev-docs/api/payment-instruments/payment-instrument-modified.md) ## Payment tokens 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. ### Create a payment token - [POST /tokens](https://www.rebilly.com/docs/dev-docs/api/payment-tokens/posttoken.md): Creates a payment token which can be exchanged into a payment instrument. 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. ### Retrieve tokens - [GET /tokens](https://www.rebilly.com/docs/dev-docs/api/payment-tokens/gettokencollection.md): Retrieve a list of tokens. ### Retrieve a token - [GET /tokens/{token}](https://www.rebilly.com/docs/dev-docs/api/payment-tokens/gettoken.md): Retrieves a token with a specified ID. ### Validate a digital wallet session - [POST /digital-wallets/validation](https://www.rebilly.com/docs/dev-docs/api/payment-tokens/postdigitalwalletvalidation.md): Validates a digital wallet session. We recommend using FramePay to validate a digital wallet session. ## Transactions Use these operations to: - set up payment instruments for payments - authorize and hold funds - capture funds - make payments - make payouts - refund transactions. ### Ready to pay - [POST /ready-to-pay](https://www.rebilly.com/docs/dev-docs/api/transactions/postreadytopay.md): 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 action on the 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 event in the rules engine, and include an empty property for the action. For more information, see Update event rules and Gateway accounts. ### Create a transaction - [POST /transactions](https://www.rebilly.com/docs/dev-docs/api/transactions/posttransaction.md): Creates a transaction of type , or . Use this operation for the following transactions. #### Real-time decision and response In this transaction, you send a request and inspect the of the response for or . #### 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 value of and a value of . The property of the response has a link for the . Open the in an iframe or in a pop. A pop is a better workflow for mobile devices. ### Retrieve transactions - [GET /transactions](https://www.rebilly.com/docs/dev-docs/api/transactions/gettransactioncollection.md): Retrieves a list of transactions. ### Retrieve a transaction - [GET /transactions/{id}](https://www.rebilly.com/docs/dev-docs/api/transactions/gettransaction.md): Retrieves a transaction with a specified ID. ### Update a transaction - [PATCH /transactions/{id}](https://www.rebilly.com/docs/dev-docs/api/transactions/patchtransaction.md): Updates the custom fields of a transaction with a specified ID. ### Create a credit transaction - [POST /payouts](https://www.rebilly.com/docs/dev-docs/api/transactions/postpayout.md): Creates a transaction of type . ### Query a transaction - [POST /transactions/{id}/query](https://www.rebilly.com/docs/dev-docs/api/transactions/posttransactionquery.md): 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. ### Update a transaction status - [POST /transactions/{id}/update](https://www.rebilly.com/docs/dev-docs/api/transactions/posttransactionupdate.md): Updates the status of a transaction with a specified ID to , with a specified and optional currency and amount values. ### Refund a transaction - [POST /transactions/{id}/refund](https://www.rebilly.com/docs/dev-docs/api/transactions/posttransactionrefund.md): Refunds a transaction with a specified ID. The refund is in the same currency as the original transaction. ### Retrieve a list of payout requests - [GET /payout-requests](https://www.rebilly.com/docs/dev-docs/api/transactions/getpayoutrequestcollection.md): Retrieves a list of payout requests. ### Create a payout request - [POST /payout-requests](https://www.rebilly.com/docs/dev-docs/api/transactions/postpayoutrequest.md): Creates a payout request. In the response, the 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 value. > The selected payment gateway must be configured to support payout requests. > For more information, see the readyToPayoutInstruction field. ### Retrieve a payout request - [GET /payout-requests/{id}](https://www.rebilly.com/docs/dev-docs/api/transactions/getpayoutrequest.md): Retrieves a payout request with a specified ID. ### Upsert a payout request - [PUT /payout-requests/{id}](https://www.rebilly.com/docs/dev-docs/api/transactions/putpayoutrequest.md): Creates or updates (upserts) a payout request with a specified ID. ### Cancel a payout request - [POST /payout-requests/{id}/cancel](https://www.rebilly.com/docs/dev-docs/api/transactions/postpayoutrequestcancellation.md): Cancels a payout request with a specified ID. ### Retrieve associated payment instruments - [GET /payout-requests/{id}/payment-instruments](https://www.rebilly.com/docs/dev-docs/api/transactions/getpayoutrequestpaymentinstruments.md): Retrieves the payment gateway and a list of payment instruments that are associated with a payout request with a specified ID. ### Customer redirected offsite - [POST customer-redirected-offsite](https://www.rebilly.com/docs/dev-docs/api/transactions/customer-redirected-offsite.md) ### Customer returned - [POST customer-returned](https://www.rebilly.com/docs/dev-docs/api/transactions/customer-returned.md) ### Gateway account requested - [POST gateway-account-requested](https://www.rebilly.com/docs/dev-docs/api/transactions/gateway-account-requested.md) ### Offsite payment completed - [POST offsite-payment-completed](https://www.rebilly.com/docs/dev-docs/api/transactions/offsite-payment-completed.md) ### Payout request canceled - [POST payout-request-canceled](https://www.rebilly.com/docs/dev-docs/api/transactions/payout-request-canceled.md) ### Payout request created - [POST payout-request-created](https://www.rebilly.com/docs/dev-docs/api/transactions/payout-request-created.md) ### Payout request modified - [POST payout-request-modified](https://www.rebilly.com/docs/dev-docs/api/transactions/payout-request-modified.md) ### Risk score changed - [POST risk-score-changed](https://www.rebilly.com/docs/dev-docs/api/transactions/risk-score-changed.md) ### Transaction amount discrepancy found - [POST transaction-amount-discrepancy-found](https://www.rebilly.com/docs/dev-docs/api/transactions/transaction-amount-discrepancy-found.md) ### Transaction declined - [POST transaction-declined](https://www.rebilly.com/docs/dev-docs/api/transactions/transaction-declined.md) ### Transaction discrepancy found - [POST transaction-discrepancy-found](https://www.rebilly.com/docs/dev-docs/api/transactions/transaction-discrepancy-found.md) ### Transaction process requested - [POST transaction-process-requested](https://www.rebilly.com/docs/dev-docs/api/transactions/transaction-process-requested.md) ### Transaction processed - [POST transaction-processed](https://www.rebilly.com/docs/dev-docs/api/transactions/transaction-processed.md) ### Transaction timeout resolved - [POST transaction-timeout-resolved](https://www.rebilly.com/docs/dev-docs/api/transactions/transaction-timeout-resolved.md) ### Waiting gateway transaction completed - [POST waiting-gateway-transaction-completed](https://www.rebilly.com/docs/dev-docs/api/transactions/waiting-gateway-transaction-completed.md) ### Autodeposit lookup performed - [POST autodeposit-lookup-performed](https://www.rebilly.com/docs/dev-docs/api/transactions/autodeposit-lookup-performed.md) ## Disputes 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. ### Retrieve disputes - [GET /disputes](https://www.rebilly.com/docs/dev-docs/api/disputes/getdisputecollection.md): Retrieves a list of all disputes. ### Create a dispute - [POST /disputes](https://www.rebilly.com/docs/dev-docs/api/disputes/postdispute.md): Creates a new dispute. ### Retrieve a dispute - [GET /disputes/{id}](https://www.rebilly.com/docs/dev-docs/api/disputes/getdispute.md): Retrieves a dispute with a specified ID. ### Upsert a dispute - [PUT /disputes/{id}](https://www.rebilly.com/docs/dev-docs/api/disputes/putdispute.md): Creates or updates (upserts) a dispute with a specified ID. ### Dispute created - [POST dispute-created](https://www.rebilly.com/docs/dev-docs/api/disputes/dispute-created.md) ### Dispute modified - [POST dispute-modified](https://www.rebilly.com/docs/dev-docs/api/disputes/dispute-modified.md) ## Fees 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. ### Retrieve fee entries - [GET /fees](https://www.rebilly.com/docs/dev-docs/api/fees/getfeecollection.md): Retrieves a list of fee entries. > This operation is experimental and may not be backward compatible. ### Create a fee entry - [POST /fees](https://www.rebilly.com/docs/dev-docs/api/fees/postfee.md): Creates a fee entry. > This operation is experimental and may not be backward compatible. ### Retrieve a fee entry - [GET /fees/{id}](https://www.rebilly.com/docs/dev-docs/api/fees/getfee.md): Retrieves a fee entry. > This operation is experimental and may not be backward compatible. ### Upsert a fee entry - [PUT /fees/{id}](https://www.rebilly.com/docs/dev-docs/api/fees/putfee.md): Creates or updates (upserts) a fee entry. > This operation is experimental and may not be backward compatible. ### Patch a fee entry - [PATCH /fees/{id}](https://www.rebilly.com/docs/dev-docs/api/fees/patchfee.md): Patches a fee entry. > This operation is experimental and may not be backward compatible. ### Delete a fee entry - [DELETE /fees/{id}](https://www.rebilly.com/docs/dev-docs/api/fees/deletefee.md): Deletes a fee entry. > This operation is experimental and may not be backward compatible. ## Transactions timeline Use transaction timelines to maintain an audit trail of changes and activity for each transaction. ### Retrieve transaction timeline messages - [GET /transactions/{id}/timeline](https://www.rebilly.com/docs/dev-docs/api/transactions-timeline/gettransactiontimelinecollection.md): Retrieves a list of transaction timeline messages. ### Create a transaction timeline comment - [POST /transactions/{id}/timeline](https://www.rebilly.com/docs/dev-docs/api/transactions-timeline/posttransactiontimeline.md): Creates a transaction timeline comment. ### Retrieve a transaction Timeline message - [GET /transactions/{id}/timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/transactions-timeline/gettransactiontimeline.md): Retrieves a timeline message with a specified ID. ### Delete a transaction timeline message - [DELETE /transactions/{id}/timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/transactions-timeline/deletetransactiontimeline.md): Deletes a transaction timeline message with a specified ID. ## Orders 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). ### Retrieve orders - [GET /subscriptions](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptioncollection.md): Retrieves a list of orders. ### Create an order - [POST /subscriptions](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscription.md): Creates an order. To create or update an order with a specified ID, use the Upsert an order operation. ### Retrieve an order - [GET /subscriptions/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscription.md): Retrieves an order with a specified ID. ### Upsert an order - [PUT /subscriptions/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/putsubscription.md): Creates or updates (upserts) an order with a specified ID. ### Delete a pending order - [DELETE /subscriptions/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/deletesubscription.md): Deletes a pending order with a specified ID. ### Void a subscription order - [POST /subscriptions/{id}/void](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptionvoid.md): Voids a pending order with a specified ID. ### Change subscription order items - [POST /subscriptions/{id}/change-items](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptionitemschange.md): Changes subscription order items or quantities, and designates if or when pro-rata credits should be given. ### Update a subscription order item - [PATCH /subscriptions/{id}/items/{itemId}](https://www.rebilly.com/docs/dev-docs/api/orders/patchsubscriptionitem.md): Updates a subscription order item. This is an experimental endpoint, can be changed or removed in the future. ### Issue an interim invoice - [POST /subscriptions/{id}/interim-invoice](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptioninteriminvoice.md): 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 is supplied. ### Retrieve subscription order pauses - [GET /subscription-pauses](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptionpausecollection.md): Retrieves a list of subscription order pauses. ### Pause a subscription order - [POST /subscription-pauses](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptionpause.md): Pauses a subscription order with a specified ID. ### Retrieve a subscription order pause - [GET /subscription-pauses/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptionpause.md): Retrieves a subscription order pause with a specified ID. ### Update a subscription order pause - [PUT /subscription-pauses/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/putsubscriptionpause.md): Updates a subscription order pause. ### Delete a subscription order pause - [DELETE /subscription-pauses/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/deletesubscriptionpause.md): Deletes a subscription order pause with a specified ID. If the specified pause is , it is . If the specified pause is , it is . ### Retrieve subscription order cancellations - [GET /subscription-cancellations](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptioncancellationcollection.md): Retrieves a list of subscription order cancellations. ### Cancel a subscription order - [POST /subscription-cancellations](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptioncancellation.md): Cancels a subscription order. ### Retrieve a subscription order cancellation - [GET /subscription-cancellations/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptioncancellation.md): Retrieves a subscription order cancellation with a specified ID. ### Upsert a subscription order cancellation - [PUT /subscription-cancellations/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/putsubscriptioncancellation.md): Creates or updates (upserts) a subscription order cancellation with a specified ID. ### Update a subscription order cancellation - [PATCH /subscription-cancellations/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/patchsubscriptioncancellation.md): Updates a subscription order cancellation with a specified ID. Use this operation to update a cancellation reason and description. ### Delete a subscription order cancellation - [DELETE /subscription-cancellations/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/deletesubscriptioncancellation.md): Deletes a subscription order cancellation with a specified ID. > Only subscription order cancellations with a of can be deleted. ### Retrieve subscription order reactivations - [GET /subscription-reactivations](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptionreactivationcollection.md): Retrieves a list of subscription order reactivations. ### Reactivate a subscription order - [POST /subscription-reactivations](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptionreactivation.md): Reactivates a subscription order with a specified ID. ### Retrieve a subscription order reactivation - [GET /subscription-reactivations/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptionreactivation.md): Retrieves a subscription order reactivation with a specified ID. ### Retrieve an upcoming subscription order invoice - [GET /subscriptions/{id}/upcoming-invoice](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptionupcominginvoice.md): 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. ### Issue an upcoming invoice for early pay - [POST /subscriptions/{id}/upcoming-invoice/issue](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptionupcominginvoiceissuance.md): Issues an upcoming invoice, for a subscription order with a specified ID, for early pay. ### Preview an order - [POST /previews/orders](https://www.rebilly.com/docs/dev-docs/api/orders/postprevieworder.md): Previews an order. Use this operation to preview a draft order before making an order. ### Retrieve upcoming subscription order invoice (deprecated) - [GET /subscriptions/{id}/upcoming-invoices](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptionupcominginvoicecollection.md): Retrieves an upcoming invoice for a specified subscription order. This endpoint is deprecated. Use Retrieve an upcoming invoice instead. ### Issue a specific upcoming invoice for early pay (deprecated) - [POST /subscriptions/{id}/upcoming-invoices/{invoiceId}/issue](https://www.rebilly.com/docs/dev-docs/api/orders/postupcominginvoiceissuance.md): Issues an upcoming invoice with a specified ID for early pay. This endpoint is deprecated. Use Issue an upcoming invoice for early pay instead. ### Hard usage limit reached - [POST hard-usage-limit-reached](https://www.rebilly.com/docs/dev-docs/api/orders/hard-usage-limit-reached.md) ### Order abandoned - [POST order-abandoned](https://www.rebilly.com/docs/dev-docs/api/orders/order-abandoned.md) ### Order completed - [POST order-completed](https://www.rebilly.com/docs/dev-docs/api/orders/order-completed.md) ### Renewal invoice issued - [POST renewal-invoice-issued](https://www.rebilly.com/docs/dev-docs/api/orders/renewal-invoice-issued.md) ### Soft usage limit reached - [POST soft-usage-limit-reached](https://www.rebilly.com/docs/dev-docs/api/orders/soft-usage-limit-reached.md) ### Subscription order activated - [POST subscription-activated](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-activated.md) ### Subscription order canceled - [POST subscription-canceled](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-canceled.md) ### Subscription order churned - [POST subscription-churned](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-churned.md) ### Subscription order downgraded - [POST subscription-downgraded](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-downgraded.md) ### Subscription items changed - [POST subscription-items-changed](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-items-changed.md) ### Order modified - [POST subscription-modified](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-modified.md) ### Subscription quantity filled limit reached - [POST subscription-quantity-filled-limit-reached](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-quantity-filled-limit-reached.md) ### Subscription order reactivated - [POST subscription-reactivated](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-reactivated.md) ### Subscription renewal reminder - [POST subscription-renewal-reminder](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-renewal-reminder.md) ### Subscription order renewed - [POST subscription-renewed](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-renewed.md) ### Subscription order trial converted - [POST subscription-trial-converted](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-trial-converted.md) ### Subscription order trial end reminder - [POST subscription-trial-end-reminder](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-trial-end-reminder.md) ### Subscription order trial ended - [POST subscription-trial-ended](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-trial-ended.md) ### Subscription order trial end changed - [POST subscription-trial-end-changed](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-trial-end-changed.md) ### Subscription order upgraded - [POST subscription-upgraded](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-upgraded.md) ### Subscription order paused - [POST subscription-paused](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-paused.md) ### Subscription order pause created - [POST subscription-pause-created](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-pause-created.md) ### Subscription order pause modified - [POST subscription-pause-modified](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-pause-modified.md) ### Subscription order pause revoked - [POST subscription-pause-revoked](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-pause-revoked.md) ### Subscription order resumed - [POST subscription-resumed](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-resumed.md) ### Order delinquency time reached - [POST order-delinquency-reached](https://www.rebilly.com/docs/dev-docs/api/orders/order-delinquency-reached.md) ## Invoices 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. ### Retrieve invoices - [GET /invoices](https://www.rebilly.com/docs/dev-docs/api/invoices/getinvoicecollection.md): Retrieves a list of invoices. ### Create an invoice - [POST /invoices](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoice.md): Creates an invoice. ### Retrieve an invoice - [GET /invoices/{id}](https://www.rebilly.com/docs/dev-docs/api/invoices/getinvoice.md): Retrieves an invoice with a specified ID. ### Upsert an invoice - [PUT /invoices/{id}](https://www.rebilly.com/docs/dev-docs/api/invoices/putinvoice.md): Creates or updates (upserts) an invoice with a specified ID. ### Retrieve invoice items - [GET /invoices/{id}/items](https://www.rebilly.com/docs/dev-docs/api/invoices/getinvoiceitemcollection.md): Retrieves invoice items with a specified invoice ID. ### Create an invoice item - [POST /invoices/{id}/items](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoiceitem.md): Creates an invoice item. ### Retrieve an invoice item - [GET /invoices/{id}/items/{itemId}](https://www.rebilly.com/docs/dev-docs/api/invoices/getinvoiceitem.md): Retrieves an invoice item. ### Update an invoice item - [PUT /invoices/{id}/items/{itemId}](https://www.rebilly.com/docs/dev-docs/api/invoices/putinvoiceitem.md): Updates an invoice item. ### Delete an invoice item - [DELETE /invoices/{id}/items/{itemId}](https://www.rebilly.com/docs/dev-docs/api/invoices/deleteinvoiceitem.md): Deletes an invoice item. ### Issue an invoice - [POST /invoices/{id}/issue](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoiceissuance.md): Issues an invoice with a specified ID. The invoice must be in status. ### Abandon an invoice - [POST /invoices/{id}/abandon](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoiceabandonment.md): Abandons an invoice with a specified ID. ### Void an invoice - [POST /invoices/{id}/void](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoicevoid.md): Voids an invoice with a specified ID. ### Recalculate an invoice - [POST /invoices/{id}/recalculate](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoicerecalculation.md): 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. ### Reissue an invoice - [POST /invoices/{id}/reissue](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoicereissuance.md): Reissues an invoice with a specified ID. The status of the invoice must be , , or . ### Retrieve transaction amounts allocations - [GET /invoices/{id}/transaction-allocations](https://www.rebilly.com/docs/dev-docs/api/invoices/getinvoicetransactionallocationcollection.md): Retrieves amounts from a transaction that are allocated as invoice payments. ### Apply a transaction to an invoice - [POST /invoices/{id}/transaction](https://www.rebilly.com/docs/dev-docs/api/invoices/postinvoicetransaction.md): Applies a transaction to an invoice. The invoice status must be , and the transaction must have a non-zero unused amount. ### Invoice tax calculation failed - [POST invoice-tax-calculation-failed](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-tax-calculation-failed.md) ### Invoice abandoned - [POST invoice-abandoned](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-abandoned.md) ### Invoice created - [POST invoice-created](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-created.md) ### Invoice issued - [POST invoice-issued](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-issued.md) ### Invoice modified - [POST invoice-modified](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-modified.md) ### Invoice paid - [POST invoice-paid](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-paid.md) ### Invoice partially paid - [POST invoice-partially-paid](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-partially-paid.md) ### Invoice refunded - [POST invoice-refunded](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-refunded.md) ### Invoice partially refunded - [POST invoice-partially-refunded](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-partially-refunded.md) ### Invoice past due - [POST invoice-past-due](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-past-due.md) ### Invoice past due reminder - [POST invoice-past-due-reminder](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-past-due-reminder.md) ### Invoice reissued - [POST invoice-reissued](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-reissued.md) ### Invoice voided - [POST invoice-voided](https://www.rebilly.com/docs/dev-docs/api/invoices/invoice-voided.md) ### Renewal invoice payment canceled - [POST renewal-invoice-payment-canceled](https://www.rebilly.com/docs/dev-docs/api/invoices/renewal-invoice-payment-canceled.md) ### Renewal invoice payment declined - [POST renewal-invoice-payment-declined](https://www.rebilly.com/docs/dev-docs/api/invoices/renewal-invoice-payment-declined.md) ## Usage 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). ### Retrieve usage records - [GET /usages](https://www.rebilly.com/docs/dev-docs/api/usage/getusagecollection.md): Retrieves a list of usage records. ### Create a usage record - [POST /usages](https://www.rebilly.com/docs/dev-docs/api/usage/postusage.md): Creates a usage report. ### Retrieve a usage record - [GET /usages/{id}](https://www.rebilly.com/docs/dev-docs/api/usage/getusage.md): Retrieves a usage record with a specified ID. ### Delete a usage record - [DELETE /usages/{id}](https://www.rebilly.com/docs/dev-docs/api/usage/deleteusage.md): Deletes a usage record with a specified ID. ## Credit memos 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). ### Retrieve credit memos - [GET /credit-memos](https://www.rebilly.com/docs/dev-docs/api/credit-memos/getcreditmemocollection.md): Retrieves a list of credit memos. ### Create a credit memo - [POST /credit-memos](https://www.rebilly.com/docs/dev-docs/api/credit-memos/postcreditmemo.md): Creates a credit memo. ### Retrieve a credit memo - [GET /credit-memos/{id}](https://www.rebilly.com/docs/dev-docs/api/credit-memos/getcreditmemo.md): Retrieves a credit memo with a specified ID. ### Upsert a credit memo - [PUT /credit-memos/{id}](https://www.rebilly.com/docs/dev-docs/api/credit-memos/putcreditmemo.md): Creates or updates (upserts) a credit memo with a specified ID. ### Partially update a credit memo - [PATCH /credit-memos/{id}](https://www.rebilly.com/docs/dev-docs/api/credit-memos/patchcreditmemo.md): Partially updates a credit memo with a specified ID. ### Void a credit memo - [POST /credit-memos/{id}/void](https://www.rebilly.com/docs/dev-docs/api/credit-memos/postcreditmemovoid.md): Voids a credit memo with a specified ID. ### Credit memo applied - [POST credit-memo-applied](https://www.rebilly.com/docs/dev-docs/api/credit-memos/credit-memo-applied.md) ### Credit memo created - [POST credit-memo-created](https://www.rebilly.com/docs/dev-docs/api/credit-memos/credit-memo-created.md) ### Credit memo modified - [POST credit-memo-modified](https://www.rebilly.com/docs/dev-docs/api/credit-memos/credit-memo-modified.md) ### Credit memo partially applied - [POST credit-memo-partially-applied](https://www.rebilly.com/docs/dev-docs/api/credit-memos/credit-memo-partially-applied.md) ### Credit memo voided - [POST credit-memo-voided](https://www.rebilly.com/docs/dev-docs/api/credit-memos/credit-memo-voided.md) ## Plans 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/). ### Retrieve plans - [GET /plans](https://www.rebilly.com/docs/dev-docs/api/plans/getplancollection.md): Retrieves a list of plans. ### Create a plan - [POST /plans](https://www.rebilly.com/docs/dev-docs/api/plans/postplan.md): Creates a plan. ### Retrieve a plan - [GET /plans/{id}](https://www.rebilly.com/docs/dev-docs/api/plans/getplan.md): Retrieves a plan with a specified ID. ### Upsert a plan - [PUT /plans/{id}](https://www.rebilly.com/docs/dev-docs/api/plans/putplan.md): Creates or updates (upserts) a plan with a specified ID. ### Delete a plan - [DELETE /plans/{id}](https://www.rebilly.com/docs/dev-docs/api/plans/deleteplan.md): Deletes a plan with a specified ID. ## Products 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). ### Retrieve products - [GET /products](https://www.rebilly.com/docs/dev-docs/api/products/getproductcollection.md): Retrieves a list of products. ### Create a product - [POST /products](https://www.rebilly.com/docs/dev-docs/api/products/postproduct.md): Creates a product. ### Retrieve a product - [GET /products/{id}](https://www.rebilly.com/docs/dev-docs/api/products/getproduct.md): Retrieves a product with a specified ID. ### Upsert a product - [PUT /products/{id}](https://www.rebilly.com/docs/dev-docs/api/products/putproduct.md): Creates or updates (upserts) a product with a specified ID. ### Delete a product - [DELETE /products/{id}](https://www.rebilly.com/docs/dev-docs/api/products/deleteproduct.md): Deletes a product with a specified ID. ## Coupons 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. ### Retrieve coupon redemptions - [GET /coupons-redemptions](https://www.rebilly.com/docs/dev-docs/api/coupons/getcouponredemptioncollection.md): Retrieves a list of coupon redemptions. ### Redeem a coupon - [POST /coupons-redemptions](https://www.rebilly.com/docs/dev-docs/api/coupons/postcouponredemption.md): Redeems a coupon. ### Retrieve a coupon redemption - [GET /coupons-redemptions/{id}](https://www.rebilly.com/docs/dev-docs/api/coupons/getcouponredemption.md): Retrieves a coupon redemption with a specified ID. ### Cancel a coupon redemption - [POST /coupons-redemptions/{id}/cancel](https://www.rebilly.com/docs/dev-docs/api/coupons/postcouponredemptioncancellation.md): Cancels a coupon redemption with a specified ID. ### Retrieve coupons - [GET /coupons](https://www.rebilly.com/docs/dev-docs/api/coupons/getcouponcollection.md): Retrieves a list of coupons. ### Create a coupon - [POST /coupons](https://www.rebilly.com/docs/dev-docs/api/coupons/postcoupon.md): Creates a coupon. ### Retrieve a coupon - [GET /coupons/{id}](https://www.rebilly.com/docs/dev-docs/api/coupons/getcoupon.md): Retrieves a coupon with a specified ID. ### Upsert a coupon - [PUT /coupons/{id}](https://www.rebilly.com/docs/dev-docs/api/coupons/putcoupon.md): Creates or updates (upserts) a coupon with a specified coupon ID. ### Specify a coupon expiration time - [POST /coupons/{id}/expiration](https://www.rebilly.com/docs/dev-docs/api/coupons/postcouponexpiration.md): Specifies the expiration time of a coupon with a specified ID. The of a coupon must be greater than its . > This operation cannot be performed on expired coupons. ### Coupon application removed - [POST coupon-application-removed](https://www.rebilly.com/docs/dev-docs/api/coupons/coupon-application-removed.md) ### Coupon applied - [POST coupon-applied](https://www.rebilly.com/docs/dev-docs/api/coupons/coupon-applied.md) ### Coupon expiration modified - [POST coupon-expiration-modified](https://www.rebilly.com/docs/dev-docs/api/coupons/coupon-expiration-modified.md) ### Coupon expired - [POST coupon-expired](https://www.rebilly.com/docs/dev-docs/api/coupons/coupon-expired.md) ### Coupon issued - [POST coupon-issued](https://www.rebilly.com/docs/dev-docs/api/coupons/coupon-issued.md) ### Coupon modified - [POST coupon-modified](https://www.rebilly.com/docs/dev-docs/api/coupons/coupon-modified.md) ### Coupon redeemed - [POST coupon-redeemed](https://www.rebilly.com/docs/dev-docs/api/coupons/coupon-redeemed.md) ### Coupon redemption canceled - [POST coupon-redemption-canceled](https://www.rebilly.com/docs/dev-docs/api/coupons/coupon-redemption-canceled.md) ## Quotes 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. ### Retrieve quotes - [GET /quotes](https://www.rebilly.com/docs/dev-docs/api/quotes/getquotecollection.md): Retrieves a list of quotes. ### Create a quote - [POST /quotes](https://www.rebilly.com/docs/dev-docs/api/quotes/postquote.md): Creates a quote. ### Retrieve a quote - [GET /quotes/{id}](https://www.rebilly.com/docs/dev-docs/api/quotes/getquote.md): Retrieves a quote with a specified ID. ### Upsert a quote - [PUT /quotes/{id}](https://www.rebilly.com/docs/dev-docs/api/quotes/putquote.md): Creates or updates a quote with a specified ID. The update operation can only be used for quotes with a of . ### Partially update a quote - [PATCH /quotes/{id}](https://www.rebilly.com/docs/dev-docs/api/quotes/patchquote.md): Partially updates a quote with a specified ID. The update operation can only be used for quotes with a of . ### Accept a quote - [POST /quotes/{id}/accept](https://www.rebilly.com/docs/dev-docs/api/quotes/postquoteacceptance.md): Accepts an issued quote with a specified ID. ### Cancel a quote - [POST /quotes/{id}/cancel](https://www.rebilly.com/docs/dev-docs/api/quotes/postquotecancellation.md): Cancels a draft or issued quote with a specified ID. ### Issue a quote - [POST /quotes/{id}/issue](https://www.rebilly.com/docs/dev-docs/api/quotes/postquoteissuance.md): Issues a draft quote with a specified ID. ### Recall a quote - [POST /quotes/{id}/recall](https://www.rebilly.com/docs/dev-docs/api/quotes/postquoterecall.md): Recalls an issued quote with a specified ID so that it can be edited. Recalled quotes are assigned the of . ### Reject a quote - [POST /quotes/{id}/reject](https://www.rebilly.com/docs/dev-docs/api/quotes/postquoterejection.md): Rejects an issued quote with specified ID. ### Quote accepted - [POST quote-accepted](https://www.rebilly.com/docs/dev-docs/api/quotes/quote-accepted.md) ### Quote canceled - [POST quote-canceled](https://www.rebilly.com/docs/dev-docs/api/quotes/quote-canceled.md) ### Quote created - [POST quote-created](https://www.rebilly.com/docs/dev-docs/api/quotes/quote-created.md) ### Quote expired - [POST quote-expired](https://www.rebilly.com/docs/dev-docs/api/quotes/quote-expired.md) ### Quote issued - [POST quote-issued](https://www.rebilly.com/docs/dev-docs/api/quotes/quote-issued.md) ### Quote recalled - [POST quote-recalled](https://www.rebilly.com/docs/dev-docs/api/quotes/quote-recalled.md) ### Quote rejected - [POST quote-rejected](https://www.rebilly.com/docs/dev-docs/api/quotes/quote-rejected.md) ### Quote updated - [POST quote-updated](https://www.rebilly.com/docs/dev-docs/api/quotes/quote-updated.md) ## Quotes timeline Use quote timelines to maintain an audit trail of changes and activity for each quote. ### Retrieve quote timeline messages - [GET /quotes/{id}/timeline](https://www.rebilly.com/docs/dev-docs/api/quotes-timeline/getquotetimelinecollection.md): Retrieves quote timeline messages. ### Create a quote timeline comment - [POST /quotes/{id}/timeline](https://www.rebilly.com/docs/dev-docs/api/quotes-timeline/postquotetimeline.md): Creates a quote timeline comment or custom defined event. ### Retrieve a quote timeline message - [GET /quotes/{id}/timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/quotes-timeline/getquotetimeline.md): Retrieves a quote timeline message with a specified ID. ### Delete a quote timeline message - [DELETE /quotes/{id}/timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/quotes-timeline/deletequotetimeline.md): Deletes a quote timeline message with a specified ID. ## Shipping rates Use these operations to manage shipping rates. A shipping rate contains a filter and a pricing for a specific shipping destination. ### Retrieve shipping rates - [GET /shipping-rates](https://www.rebilly.com/docs/dev-docs/api/shipping-rates/getshippingratecollection.md): Retrieves a list of shipping rates. ### Create a shipping rate - [POST /shipping-rates](https://www.rebilly.com/docs/dev-docs/api/shipping-rates/postshippingrate.md): Creates a shipping rate. ### Retrieve a shipping rate - [GET /shipping-rates/{id}](https://www.rebilly.com/docs/dev-docs/api/shipping-rates/getshippingrate.md): Retrieves a shipping rate with a specified ID. ### Create a shipping rate with ID - [PUT /shipping-rates/{id}](https://www.rebilly.com/docs/dev-docs/api/shipping-rates/putshippingrate.md): Creates a shipping rate with a specified ID. ### Delete a shipping rate - [DELETE /shipping-rates/{id}](https://www.rebilly.com/docs/dev-docs/api/shipping-rates/deleteshippingrate.md): Deletes a shipping rate with a specified ID. ## Orders timeline Use order timelines to maintain an audit trail of changes and activity for each order. ### Retrieve order timeline messages - [GET /subscriptions/{id}/timeline](https://www.rebilly.com/docs/dev-docs/api/orders-timeline/getsubscriptiontimelinecollection.md): Retrieves a list of order timeline messages. ### Create an order timeline comment - [POST /subscriptions/{id}/timeline](https://www.rebilly.com/docs/dev-docs/api/orders-timeline/postsubscriptiontimeline.md): Creates an order timeline comment. ### Retrieve an order timeline message - [GET /subscriptions/{id}/timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/orders-timeline/getsubscriptiontimeline.md): Retrieves a order message with a specified ID. ### Delete an order timeline message - [DELETE /subscriptions/{id}/timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/orders-timeline/deletesubscriptiontimeline.md): Deletes an order timeline message with a specified ID. ## Invoices timeline Use invoice timelines to maintain an audit trail of changes and activity for each invoice. ### Retrieve invoice timeline messages - [GET /invoices/{id}/timeline](https://www.rebilly.com/docs/dev-docs/api/invoices-timeline/getinvoicetimelinecollection.md): Retrieves a list of invoice timeline messages. ### Create an invoice timeline comment - [POST /invoices/{id}/timeline](https://www.rebilly.com/docs/dev-docs/api/invoices-timeline/postinvoicetimeline.md): Creates an invoice timeline comment. ### Retrieve an invoice timeline message - [GET /invoices/{id}/timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/invoices-timeline/getinvoicetimeline.md): Retrieves an invoice timeline message with a specified ID. ### Delete an invoice timeline message - [DELETE /invoices/{id}/timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/invoices-timeline/deleteinvoicetimeline.md): Deletes an invoice timeline message with a specified ID. ## Credit memos timeline 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. ### Retrieve credit memo timeline messages - [GET /credit-memos/{id}/timeline](https://www.rebilly.com/docs/dev-docs/api/credit-memos-timeline/getcreditmemotimelinecollection.md): Retrieves a list of credit memo timeline messages. ### Create a credit memo timeline message - [POST /credit-memos/{id}/timeline](https://www.rebilly.com/docs/dev-docs/api/credit-memos-timeline/postcreditmemotimeline.md): Creates a credit memo timeline message. ### Retrieve a credit memo timeline message - [GET /credit-memos/{id}/timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/credit-memos-timeline/getcreditmemotimeline.md): Retrieves a credit memo timeline message with a specified ID. ### Delete a credit memo timeline message - [DELETE /credit-memos/{id}/timeline/{messageId}](https://www.rebilly.com/docs/dev-docs/api/credit-memos-timeline/deletecreditmemotimeline.md): Deletes a credit memo timeline message with a specified ID. ## Blocklists 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. ### Retrieve blocklists - [GET /blocklists](https://www.rebilly.com/docs/dev-docs/api/blocklists/getblocklistcollection.md): Retrieves a list of all blocklists. ### Create a blocklist - [POST /blocklists](https://www.rebilly.com/docs/dev-docs/api/blocklists/postblocklist.md): Creates a blocklist. ### Retrieve a blocklist - [GET /blocklists/{id}](https://www.rebilly.com/docs/dev-docs/api/blocklists/getblocklist.md): Retrieves a blocklist with a specified ID. ### Create a blocklist with specified ID - [PUT /blocklists/{id}](https://www.rebilly.com/docs/dev-docs/api/blocklists/putblocklist.md): Creates a blocklist with a specified ID. ### Delete a blocklist - [DELETE /blocklists/{id}](https://www.rebilly.com/docs/dev-docs/api/blocklists/deleteblocklist.md): Deletes a blocklist with a specified ID. ## Allowlists 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. ### Retrieve allowlist collection - [GET /allowlists](https://www.rebilly.com/docs/dev-docs/api/allowlists/getallowlistcollection.md): Retrieves allowlist collection. ### Create allowlist record - [POST /allowlists](https://www.rebilly.com/docs/dev-docs/api/allowlists/postallowlist.md): Creates allowlist record. ### Retrieve allowlist record - [GET /allowlists/{id}](https://www.rebilly.com/docs/dev-docs/api/allowlists/getallowlist.md): Retrieves allowlist record. ### Delete allowlist record - [DELETE /allowlists/{id}](https://www.rebilly.com/docs/dev-docs/api/allowlists/deleteallowlist.md): Deletes allowlist record with a specified ID. ## KYC documents 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. ### Create a KYC request - [POST /kyc-requests](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/postkycrequest.md): Creates a KYC request. The customer is redirected to the link. After the customer completes the KYC process, they are redirected back to the 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 request is successful, it returns a value of or . The corresponding and documents are not requested. ### Retrieve KYC requests - [GET /kyc-requests](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/getkycrequestcollection.md): Retrieves a list of KYC requests. ### Retrieve a KYC request - [GET /kyc-requests/{id}](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/getkycrequest.md): Retrieves a KYC request with a specified ID. ### Update a KYC request - [PATCH /kyc-requests/{id}](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/patchkycrequest.md): Updates a KYC request with a specified ID. ### Delete the KYC request - [DELETE /kyc-requests/{id}](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/deletekycrequest.md): Deletes a KYC request with a specified ID. ### Retrieve KYC documents - [GET /kyc-documents](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/getkycdocumentcollection.md): Retrieves a list of KYC documents. ### Create a KYC document - [POST /kyc-documents](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/postkycdocument.md): Creates a KYC document. ### Retrieve a KYC document - [GET /kyc-documents/{id}](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/getkycdocument.md): Retrieves a KYC document with a specified ID. ### Upsert a KYC document - [PUT /kyc-documents/{id}](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/putkycdocument.md): Creates or updates (upserts) a KYC document with a specified ID. ### Accept a KYC document - [POST /kyc-documents/{id}/acceptance](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/postkycdocumentacceptance.md): Accepts a KYC document and changes the documents to . The review time and reviewer information is also updated. > Use this operation for manual overrides. ### Update KYC document matches - [POST /kyc-documents/{id}/matches](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/postkycdocumentmatches.md): Updates the document matches of a KYC document with a specified ID. > Use this operation for manual overrides. ### Reject a KYC document - [POST /kyc-documents/{id}/rejection](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/postkycdocumentrejection.md): Rejects a KYC document and changes the to . The review time and reviewer information is also updated. > Use this operation for manual overrides. ### Review a KYC document - [POST /kyc-documents/{id}/review](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/postkycdocumentreview.md): Updates the and of a KYC document with a specified ID. ### Start review of a KYC document - [POST /kyc-documents/{id}/start-review](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/postkycdocumentstartreview.md): Starts the review process of a KYC document with a specified ID. This operation also sets the KYC document to the current date-time, and updates the review information. ### Stop review of a KYC document - [POST /kyc-documents/{id}/stop-review](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/postkycdocumentstopreview.md): Stops the review of a KYC document with a specified ID. This operation also sets the KYC document 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. ### Retrieve KYC settings - [GET /kyc-settings](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/getkycsettings.md): Retrieves KYC settings. ### Update KYC settings - [PUT /kyc-settings](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/putkycsettings.md): Updates KYC settings. ### KYC document accepted - [POST kyc-document-accepted](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/kyc-document-accepted.md) ### KYC document modified - [POST kyc-document-modified](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/kyc-document-modified.md) ### KYC document rejected - [POST kyc-document-rejected](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/kyc-document-rejected.md) ### KYC document reviewed - [POST kyc-document-reviewed](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/kyc-document-reviewed.md) ### KYC document archived - [POST kyc-document-archived](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/kyc-document-archived.md) ### KYC request attempted - [POST kyc-request-attempted](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/kyc-request-attempted.md) ### KYC request failed - [POST kyc-request-failed](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/kyc-request-failed.md) ### KYC request fulfilled - [POST kyc-request-fulfilled](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/kyc-request-fulfilled.md) ### KYC request partially fulfilled - [POST kyc-request-partially-fulfilled](https://www.rebilly.com/docs/dev-docs/api/kyc-documents/kyc-request-partially-fulfilled.md) ## AML 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. ### Retrieve AML checks - [GET /aml-checks](https://www.rebilly.com/docs/dev-docs/api/aml/getamlcheckcollection.md): Retrieves a list of AML checks. These checks are records of customer data and potentially matching data in AML lists. ### Retrieve an AML check - [GET /aml-checks/{id}](https://www.rebilly.com/docs/dev-docs/api/aml/getamlcheck.md): Retrieves the results of a customer's AML check. Customer metadata and an array of matching AML hits is returned. ### Start review of an AML check - [POST /aml-checks/{id}/start-review](https://www.rebilly.com/docs/dev-docs/api/aml/postamlcheckstartreview.md): Starts the manual review process for an AML check with a specified ID. This operation also sets the AML check to the current date-time, and updates the review information. ### Stop review of an AML check - [POST /aml-checks/{id}/stop-review](https://www.rebilly.com/docs/dev-docs/api/aml/postamlcheckstopreview.md): Stops the manual review process for an AML check with a specified ID. This operation also sets the AML check 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. ### Review an AML check - [POST /aml-checks/{id}/review](https://www.rebilly.com/docs/dev-docs/api/aml/postamlcheckreview.md): Reviews an AML check. The AML check can be either confirmed or marked as a false positive with a customer tag. ### Retrieve AML settings - [GET /aml-settings](https://www.rebilly.com/docs/dev-docs/api/aml/getamlsettings.md): Retrieves AML settings. ### Update AML settings - [PUT /aml-settings](https://www.rebilly.com/docs/dev-docs/api/aml/putamlsettings.md): Updates AML settings. ### AML list possibly matched - [POST aml-list-possibly-matched](https://www.rebilly.com/docs/dev-docs/api/aml/aml-list-possibly-matched.md) ## Risk score Use risk score operations to configure blocklists based on transaction risk factors. ### Retrieve risk score rules - [GET /risk-score-rules](https://www.rebilly.com/docs/dev-docs/api/risk-score/getriskscorerules.md): Retrieves risk score rules. ### Modify risk score rules - [PUT /risk-score-rules](https://www.rebilly.com/docs/dev-docs/api/risk-score/putriskscorerules.md): Modifies risk score rules. ### Retrieve risk score blocklist rules - [GET /risk-score-rules/blocklists](https://www.rebilly.com/docs/dev-docs/api/risk-score/getriskscoreblocklistrules.md): Retrieves risk score blocklist rules. ### Modify risk score blocklist rules - [PUT /risk-score-rules/blocklists](https://www.rebilly.com/docs/dev-docs/api/risk-score/putriskscoreblocklistrules.md): Modifies risk score blocklist rules. ### Retrieve risk score simulation jobs - [GET /risk-score-simulation-jobs](https://www.rebilly.com/docs/dev-docs/api/risk-score/getriskscoresimulationjobcollection.md): Retrieves a list of simulation jobs. ### Create new risk score simulation job - [POST /risk-score-simulation-jobs](https://www.rebilly.com/docs/dev-docs/api/risk-score/postriskscoresimulationjob.md): Creates a new risk score simulation job. ### Retrieve risk score simulation job - [GET /risk-score-simulation-jobs/{id}](https://www.rebilly.com/docs/dev-docs/api/risk-score/getriskscoresimulationjob.md): Retrieves a specified risk score simulation job. ### Stop an active risk score simulation job - [POST /risk-score-simulation-jobs/{id}/stop](https://www.rebilly.com/docs/dev-docs/api/risk-score/postriskscoresimulationjobstop.md): Stops an active risk score simulation job. ### Retrieve risk score simulated transactions - [GET /risk-score-simulation-jobs/{id}/transactions](https://www.rebilly.com/docs/dev-docs/api/risk-score/getriskscoresimulatedtransactioncollection.md): Retrieves a list of affected transactions for a specified risk score simulation. ## Custom fields 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). ### Retrieve custom fields - [GET /custom-fields/{resource}](https://www.rebilly.com/docs/dev-docs/api/custom-fields/getcustomfieldcollection.md): Retrieves the custom fields schema for a specified resource. ### Retrieve a custom field - [GET /custom-fields/{resource}/{name}](https://www.rebilly.com/docs/dev-docs/api/custom-fields/getcustomfield.md): Retrieves a specified custom field schema for a specified resource. ### Create or alter a custom field - [PUT /custom-fields/{resource}/{name}](https://www.rebilly.com/docs/dev-docs/api/custom-fields/putcustomfield.md): Creates or alters a specified custom field schema for a specified resource. ## Files 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 — by sending the file contents as the POST body, and fetching from URL — 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. ### Retrieve attachments - [GET /attachments](https://www.rebilly.com/docs/dev-docs/api/files/getattachmentcollection.md): Retrieves a list of attachments. You may sort attachments by: , , , , , , and . ### Create an attachment - [POST /attachments](https://www.rebilly.com/docs/dev-docs/api/files/postattachment.md): 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. ### Retrieve an attachment - [GET /attachments/{id}](https://www.rebilly.com/docs/dev-docs/api/files/getattachment.md): Retrieves an attachment with a specified ID. ### Update an attachment - [PUT /attachments/{id}](https://www.rebilly.com/docs/dev-docs/api/files/putattachment.md): Updates an attachment with a specified ID. ### Delete an attachment - [DELETE /attachments/{id}](https://www.rebilly.com/docs/dev-docs/api/files/deleteattachment.md): Deletes an attachment with a specified ID. ### Retrieve files - [GET /files](https://www.rebilly.com/docs/dev-docs/api/files/getfilecollection.md): Retrieves a list of files. ### Create a file - [POST /files](https://www.rebilly.com/docs/dev-docs/api/files/postfile.md): 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 . No additional properties can be set with the request data. Permitted file types: , , , and . 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. ### Retrieve a file record - [GET /files/{id}](https://www.rebilly.com/docs/dev-docs/api/files/getfile.md): Retrieves a file with a specified ID. ### Update a file - [PUT /files/{id}](https://www.rebilly.com/docs/dev-docs/api/files/putfile.md): Updates a file with a specified ID. > Files can only be uploaded by POST request. For more information, see the Create a file operation. ### Delete a file - [DELETE /files/{id}](https://www.rebilly.com/docs/dev-docs/api/files/deletefile.md): Deletes a file with a specified ID. ### Download a file - [GET /files/{id}/download](https://www.rebilly.com/docs/dev-docs/api/files/getfiledownload.md): Downloads a file with a specified ID. ## Search Use search operations to search data on customers, invoices, orders, transactions and more. ### Search merchant data - [GET /search](https://www.rebilly.com/docs/dev-docs/api/search/getsearch.md): Searches merchant data to return resources such as customers, invoices, orders, transactions.