From b02280b5cd07db87dd4a3676f319cade8441f6c8 Mon Sep 17 00:00:00 2001 From: "integrations-recurly[bot]" Date: Mon, 2 Dec 2024 21:05:12 +0000 Subject: [PATCH] Deploy to GitHub pages --- assets/scripts.min.js | 8 + assets/style.css | 4 + assets/styles.min.css | 4 + index.html | 52279 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 52295 insertions(+) create mode 100644 assets/scripts.min.js create mode 100644 assets/style.css create mode 100644 assets/styles.min.css create mode 100644 index.html diff --git a/assets/scripts.min.js b/assets/scripts.min.js new file mode 100644 index 00000000..d22a9d5a --- /dev/null +++ b/assets/scripts.min.js @@ -0,0 +1,8 @@ +parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c .anchorjs-link, .anchorjs-link:focus { opacity: 1; }",e.sheet.cssRules.length),e.sheet.insertRule(" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }",e.sheet.cssRules.length),e.sheet.insertRule(' @font-face { font-family: "anchorjs-icons"; src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype"); }',e.sheet.cssRules.length)}}(),n=document.querySelectorAll("[id]"),o=[].map.call(n,function(A){return A.id}),a=0;a\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&(" "+A.firstChild.className+" ").indexOf(" anchorjs-link ")>-1,t=A.lastChild&&(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ")>-1;return e||t||!1}}}); +},{}],"S+Fx":[function(require,module,exports) { +var e=require("anchor-js"),t=new e;t.options.placement="left",t.add("h3");var n=document.getElementById("toc").getElementsByTagName("a");document.getElementById("filter-input").addEventListener("keyup",function(e){var t,s,i;if(13===e.keyCode)for(t=0;tdiv{box-sizing:border-box}@media (min-width:40em){.sm-flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.sm-flex>div{box-sizing:border-box}}@media (min-width:52em){.md-flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.md-flex>div{box-sizing:border-box}}@media (min-width:64em){.lg-flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.lg-flex>div{box-sizing:border-box}}body{color:#222;background-color:#fff}a{color:#0074d9;text-decoration:none}a:hover{text-decoration:underline}hr{border:0;border-bottom:1px solid rgba(0,0,0,.125)}.button{color:#fff;background-color:#0074d9;border-radius:3px}.button:hover{box-shadow:inset 0 0 0 20rem rgba(0,0,0,.0625)}.button:focus{outline:none;border-color:rgba(0,0,0,.125);box-shadow:0 0 2px 1px rgba(0,0,0,.25)}.button.is-active,.button:active{box-shadow:inset 0 0 0 20rem rgba(0,0,0,.125),inset 0 3px 4px 0 rgba(0,0,0,.25),0 0 1px rgba(0,0,0,.125)}.button.is-disabled,.button:disabled{opacity:.5}.field-light{background-color:#fff;-webkit-transition:box-shadow .2s ease;transition:box-shadow .2s ease;border:1px solid rgba(0,0,0,.125);border-radius:3px}.field-light:focus{outline:none;border-color:#0074d9;box-shadow:0 0 2px rgba(0,116,217,.5)}.field-light:disabled{color:#aaa}.field-light:disabled,.field-light:read-only:not(select){background-color:rgba(0,0,0,.125)}.field-light:invalid{border-color:#ff4136}.field-light.is-success{border-color:#2ecc40}.field-light.is-warning{border-color:#ffdc00}.field-light.is-error{border-color:#ff4136}.checkbox-light,.radio-light{-webkit-transition:box-shadow .2s ease;transition:box-shadow .2s ease}.radio-light{border-radius:50%}.checkbox-light:focus,.radio-light:focus{outline:none;box-shadow:0 0 2px rgba(0,116,217,.5)}.field-dark{color:#fff;background-color:rgba(0,0,0,.25);border:1px solid rgba(0,0,0,.0625);border-radius:3px}.field-dark::-webkit-input-placeholder{color:hsla(0,0%,100%,.75)}.field-dark::-moz-placeholder{color:hsla(0,0%,100%,.75)}.field-dark:-ms-input-placeholder{color:hsla(0,0%,100%,.75)}.field-dark::placeholder{color:hsla(0,0%,100%,.75)}.field-dark:focus{outline:0;border:1px solid hsla(0,0%,100%,.5)}.field-dark:read-only:not(select){background-color:hsla(0,0%,100%,.25)}.field-dark:invalid{border-color:#ff4136}.field-dark.is-success{border-color:#2ecc40}.field-dark.is-warning{border-color:#ffdc00}.field-dark.is-error{border-color:#ff4136}input[type=range]{vertical-align:middle;background-color:transparent}.range-light{color:inherit;-webkit-appearance:none;padding-top:.5rem;padding-bottom:.5rem}.range-light::-webkit-slider-thumb{-webkit-appearance:none;position:relative;width:.5rem;height:1.25rem;border-radius:3px;background-color:currentcolor;cursor:pointer;margin-top:-.5rem}.range-light::-webkit-slider-thumb:before{content:"";display:block;position:absolute;top:-.5rem;left:-.875rem;width:2.25rem;height:2.25rem;opacity:0}.range-light::-moz-range-thumb{width:.5rem;height:1.25rem;border-radius:3px;border-color:transparent;border-width:0;background-color:currentcolor;cursor:pointer}.range-light::-webkit-slider-runnable-track{height:.25rem;cursor:pointer;border-radius:3px;background-color:rgba(0,0,0,.25)}.range-light::-moz-range-track{height:.25rem;cursor:pointer;border-radius:3px;background-color:rgba(0,0,0,.25)}.range-light:focus{outline:none}.range-light:focus::-webkit-slider-thumb{outline:none;border:0;box-shadow:0 0 1px 2px currentcolor}.range-light:focus::-moz-range-thumb{outline:none;border:0;box-shadow:0 0 1px 2px currentcolor}.progress{display:block;width:100%;height:.5625rem;margin:.5rem 0;background-color:rgba(0,0,0,.125);border:0;border-radius:10000px;overflow:hidden;-webkit-appearance:none;cursor:pointer}.progress::-webkit-progress-bar{-webkit-appearance:none;background-color:rgba(0,0,0,.125)}.progress::-webkit-progress-value{-webkit-appearance:none;background-color:currentColor}.progress::-moz-progress-bar{background-color:currentColor}.table-light td,.table-light th{border-bottom:1px solid rgba(0,0,0,.125)}.table-light tr:last-child td{border-bottom:0}.button-outline{position:relative;z-index:2;color:inherit;background-color:transparent;border-radius:3px;border:1px solid;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;-webkit-transition-property:box-shadow,background-color;transition-property:box-shadow,background-color}.button-outline:before{content:"";width:100%;height:100%;display:block;position:absolute;z-index:-1;top:-1px;left:-1px;border:1px solid transparent;background-color:currentcolor;border-radius:3px;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;-webkit-transition-property:opacity;transition-property:opacity;opacity:0}.button-outline:hover{box-shadow:none}.button-outline:hover:before{opacity:.125}.button-outline:focus{outline:none;border:1px solid;box-shadow:0 0 3px 1px}.button-outline.is-active,.button-outline:active{box-shadow:inset 0 1px 5px 0,0 0 1px}.button-outline.is-disabled,.button-outline:disabled{opacity:.5}.button-transparent{position:relative;z-index:2;color:inherit;background-color:transparent;border-radius:0;border:1px solid transparent}.button-transparent:before{content:"";width:100%;height:100%;display:block;position:absolute;z-index:-1;top:-1px;left:-1px;border:1px solid transparent;background-color:currentcolor;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;-webkit-transition-property:opacity;transition-property:opacity;opacity:0}.button-transparent:hover{box-shadow:none}.button-transparent:hover:before{opacity:.0625;opacity:.09375}.button-transparent:focus{outline:none;border-color:transparent;box-shadow:0 0 3px}.button-transparent.is-active:before,.button-transparent:active:before{opacity:.0625}.button-transparent.is-disabled,.button-transparent:disabled{opacity:.5}.bg-cover{background-size:cover}.bg-contain{background-size:contain}.bg-center{background-position:50%}.bg-top{background-position:top}.bg-right{background-position:100%}.bg-bottom{background-position:bottom}.bg-left{background-position:0}.border{border:1px solid rgba(0,0,0,.125)}.border-top{border-top:1px solid rgba(0,0,0,.125)}.border-right{border-right:1px solid rgba(0,0,0,.125)}.border-bottom{border-bottom:1px solid rgba(0,0,0,.125)}.border-left{border-left:1px solid rgba(0,0,0,.125)}.rounded{border-radius:3px}.circle{border-radius:50%}.rounded-top{border-radius:3px 3px 0 0}.rounded-right{border-radius:0 3px 3px 0}.rounded-bottom{border-radius:0 0 3px 3px}.rounded-left{border-radius:3px 0 0 3px}.not-rounded{border-radius:0}.black,.dark-gray{color:#222}.gray,.mid-gray{color:#aaa}.light-gray,.silver{color:#ddd}.white{color:#fff}.aqua{color:#7fdbff}.blue{color:#0074d9}.navy{color:#001f3f}.teal{color:#39cccc}.green{color:#2ecc40}.olive{color:#3d9970}.lime{color:#01ff70}.yellow{color:#ffdc00}.orange{color:#ff851b}.red{color:#ff4136}.fuchsia{color:#f012be}.purple{color:#b10dc9}.maroon{color:#85144b}.bg-black,.bg-dark-gray{background-color:#222}.bg-gray,.bg-mid-gray{background-color:#aaa}.bg-light-gray,.bg-silver{background-color:#ddd}.bg-white{background-color:#fff}.bg-aqua{background-color:#7fdbff}.bg-blue{background-color:#0074d9}.bg-navy{background-color:#001f3f}.bg-teal{background-color:#39cccc}.bg-green{background-color:#2ecc40}.bg-olive{background-color:#3d9970}.bg-lime{background-color:#01ff70}.bg-yellow{background-color:#ffdc00}.bg-orange{background-color:#ff851b}.bg-red{background-color:#ff4136}.bg-fuchsia{background-color:#f012be}.bg-purple{background-color:#b10dc9}.bg-maroon{background-color:#85144b}.bg-darken-0{background-color:rgba(0,0,0,.03125)}.bg-darken-1{background-color:rgba(0,0,0,.0625)}.bg-darken-2{background-color:rgba(0,0,0,.125)}.bg-darken-3{background-color:rgba(0,0,0,.25)}.bg-darken-4{background-color:rgba(0,0,0,.5)}.border-aqua{border-color:#7fdbff}.border-blue{border-color:#0074d9}.border-navy{border-color:#001f3f}.border-teal{border-color:#39cccc}.border-green{border-color:#2ecc40}.border-olive{border-color:#3d9970}.border-lime{border-color:#01ff70}.border-yellow{border-color:#ffdc00}.border-orange{border-color:#ff851b}.border-red{border-color:#ff4136}.border-fuchsia{border-color:#f012be}.border-purple{border-color:#b10dc9}.border-maroon{border-color:#85144b}.border-black{border-color:#222}.border-gray{border-color:#aaa}.border-silver{border-color:#ddd}.border-white{border-color:#fff}.border-darken-1{border-color:rgba(0,0,0,.0625)}.border-darken-2{border-color:rgba(0,0,0,.125)}.border-darken-3{border-color:rgba(0,0,0,.25)}.border-darken-4{border-color:rgba(0,0,0,.5)}.muted{opacity:.5}.hljs{color:#333;background:#f8f8f8;-webkit-text-size-adjust:none}.diff .hljs-header,.hljs-comment,.hljs-javadoc{color:#998;font-style:italic}.css .rule .hljs-keyword,.hljs-keyword,.hljs-request,.hljs-status,.hljs-subst,.hljs-winutils,.nginx .hljs-title{color:#1184ce}.hljs-dartdoc,.hljs-hexcolor,.hljs-number,.hljs-phpdoc,.hljs-string,.hljs-tag .hljs-value,.ruby .hljs-constant,.tex .hljs-formula{color:#ed225d}.hljs-id,.hljs-title,.scss .hljs-preprocessor{color:#900;font-weight:700}.hljs-list .hljs-keyword,.hljs-subst{font-weight:400}.hljs-class .hljs-title,.hljs-type,.tex .hljs-command,.vhdl .hljs-literal{color:#458;font-weight:700}.django .hljs-tag .hljs-keyword,.hljs-rules .hljs-property,.hljs-tag,.hljs-tag .hljs-title{color:navy;font-weight:400}.hljs-attribute,.hljs-variable,.lisp .hljs-body{color:teal}.hljs-regexp{color:#009926}.clojure .hljs-keyword,.hljs-prompt,.hljs-symbol,.lisp .hljs-keyword,.ruby .hljs-symbol .hljs-string,.scheme .hljs-keyword,.tex .hljs-special{color:#990073}.hljs-built_in{color:#0086b3}.hljs-cdata,.hljs-doctype,.hljs-pi,.hljs-pragma,.hljs-preprocessor,.hljs-shebang{color:#999;font-weight:700}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.diff .hljs-change{background:#0086b3}.hljs-chunk{color:#aaa}.hljs{display:block;overflow-x:auto;padding:.5em;background:#232323;color:#e6e1dc}.hljs-comment,.hljs-quote{color:#bc9458;font-style:italic}.hljs-keyword,.hljs-selector-tag{color:#c26230}.hljs-number,.hljs-regexp,.hljs-string,.hljs-template-variable,.hljs-variable{color:#a5c261}.hljs-subst{color:#519f50}.hljs-name,.hljs-tag{color:#e8bf6a}.hljs-type{color:#da4939}.hljs-attr,.hljs-built_in,.hljs-builtin-name,.hljs-bullet,.hljs-link,.hljs-symbol{color:#6d9cbe}.hljs-params{color:#d0d0ff}.hljs-attribute{color:#cda869}.hljs-meta{color:#9b859d}.hljs-section,.hljs-title{color:#ffc66d}.hljs-addition{background-color:#144212}.hljs-addition,.hljs-deletion{color:#e6e1dc;display:inline-block;width:100%}.hljs-deletion{background-color:#600}.hljs-selector-class{color:#9b703f}.hljs-selector-id{color:#8b98ab}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}.documentation{font-family:system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;overflow-x:hidden}.documentation a{color:#298ee6}.documentation a.black{color:#052e52}.container-small{max-width:58rem;margin-left:auto;margin-right:auto}.font-smaller{font-size:80%}.dark a.quiet{color:#fff}.dark a{color:#d2d2d2}.fade{opacity:.5}.button-indent{padding:.25rem 1.5rem;font-size:90%}.section-indent{border-left:2px solid #eee}.force-inline *{display:inline}section:target{background:#fafafa}.documentation-sidebar a:active{background:#298ee6;color:#fff}.documentation h1,.documentation h2,.documentation h3,.documentation h4,.documentation h5,.documentation h6{font-family:inherit;font-weight:700}p{font-family:inherit;line-height:1.7rem;color:#464646}.documentation code,.documentation pre,.documentation samp{font-family:Consolas,Inconsolata,Source Code Pro,monospace}pre{border-radius:3px;word-break:break-word;white-space:pre-wrap;display:block}h4{font-size:.8rem}.quiet{color:#7d7d7d}.small{font-size:.9rem}td{word-break:break-word}th.small{font-size:.8rem}.strong{font-weight:700}li{margin-top:10px}.keyline-all{border:1px solid #7d7d7d}.keyline-light{border:1px solid #e0e0e0}.fill-light{background:#efefef}li>code,p>code,td>code>a{font-weight:700}.documentation pre{padding:1rem;background:#052e52;color:#e6e1dc;font-size:.9rem}.bg-midnight{background:#052e52}.dark-link a,.dark-link code{color:#052e52}table p,table td{font-size:.9rem;line-height:1.3rem}.documentation td,.documentation th,.input{padding:.5rem}.input{font-family:inherit;display:block;width:100%;height:2rem;margin-bottom:1rem;border:1px solid #ccc;font-size:.875rem;border-radius:3px;box-sizing:border-box}div.keyline-top-not { + padding-left: 2rem; + padding-right: 2rem; +} diff --git a/index.html b/index.html new file mode 100644 index 00000000..24a04b60 --- /dev/null +++ b/index.html @@ -0,0 +1,52279 @@ + + + + + recurly 4.57.0 | Documentation + + + + + + +
+
+
+ +
+
+
+ + +
+
+ +

+ Getting Started +

+ + +

Installing

+

This library is published on npm under the name recurly.

+

We recommend installing via the command line:

+
npm install recurly --save-prod
+
+

Or manually insert the dependency into the dependencies section of your package.json:

+
+

Note: We do try to strictly follow SemVer so locking to a major version should be safe.

+
+
{
+  // ...
+  "recurly" : "^4.57.0"
+  // ...
+}
+
+
+

Note: When upgrading, view the CHANGELOG to see what's changed.

+
+

Creating a client

+

A client object represents a connection to the Recurly API. The client implements +each operation that can be performed in the API as a method.

+

To initialize a client, you only need an API key which can be obtained on the API Credentials Page.

+

To access Recurly API in Europe, you will need to specify the EU Region in the options.

+

Note: to import using typescript:

+

Operations

+

All operations are async and return promises (except the list* methods which return Pagers). +You can handle the promises directly with then and catch or use await:

+

Creating Resources

+

For creating or updating resources, pass a plain object to one of the create* or update* methods.

+
+

Note: Keep in mind that the API accepts snake-cased keys but this library expects camel-cased keys. We do the translation for you so this library can conform to js style standards.

+
+

Pagination

+

All list* methods on the client return a Pager. They +are not async because they are lazy and do not make any +network requests until they are iterated over. There are +two methods on Pager that return async iterators each and eachPage:

+
    +
  • each will give you an iterator over each item that matches your query.
  • +
  • eachPage will give you an iterator over each page that is returned. The result is an array of resources.
  • +
+

Efficiently Fetch the First or Last Resource

+

The Pager class implements a first method which allows you to fetch just the first or last resource from the server. +On top of being a convenient abstraction, this is implemented efficiently by only asking the server for the 1 item you want.

+

If you want to fetch the last account in this scenario, invert the order from desc to asc

+

Counting Resources

+

The Pager class implements a count method which allows you to count the resources the pager would return. +It does so by calling the endpoint with HEAD and parsing and returning the Recurly-Total-Records header. This +method respects any filtering parameters you apply to the pager, but the sorting parameters will have no effect.

+

Error Handling

+

This library currently throws 1 primary class of exceptions, recurly.ApiError. +The ApiError comes in a few flavors which help you determine what to do next. To see a full list, view the api_errors module.

+

HTTP Metadata

+

Sometimes you might want to get some additional information about the underlying HTTP request and response. Instead of +returning this information directly and forcing the programmer to unwrap it, we inject this metadata into the top level +resource that was returned. You can access the response by calling getResponse() on any Resource.

+

Warning: Do not log or render whole requests or responses as they may contain PII or sensitive data.

+

This also works on Empty responses:

+

And it can be captured on exceptions through the ApiError object:

+

Webhooks

+

Recurly can send webhooks to any publicly accessible server. When an event in Recurly triggers +a webhook (e.g., an account is opened), Recurly will attempt to send this notification to the +endpoint(s) you specify. You can specify up to 10 endpoints through the application. All +notifications will be sent to all configured endpoints for your site.

+

See our product docs to learn more about webhooks +and see our dev docs to learn about what payloads +are available.

+

Although our API is now JSON, our webhook payloads are still formatted as XML for the time being. +This library is not yet responsible for handling webhooks. If you do need webhooks, we recommend using a simple +XML to Plain Object parser such as xml2js.

+

You can do this without dependencies, but you'll need to heed warnings about security concerns. +Read more about the security implications of parsing untrusted XML in this OWASP cheatsheet.

+ + +
+
+ + + +
+ +
+ + + Extends + + BaseClient + + + + +
+ +

+ + + Client + (apiKey) + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
apiKey + string + + The private api key. +
+ + + + + + + + + + + + + +

Instance Members

+
+ +
+ +
+ + +
+ +

+ + + listSites + (options) + + +

+ +

List sites

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_sites

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.state + string + + Filter by state. +
+ + + + + + +

Returns

+ Pager<Site> + : + A list of sites. + + + + + + + + +

Examples

+ + +
const sites = client.listSites({ params: { limit: 200 } })
+
+for await (const site of sites.each()) {
+  console.log(site.subdomain)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getSite + (siteId, options) + + +

+ +

Fetch a site

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_site

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
siteId + string + + Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2 +. For subdomain use prefix +subdomain- +, e.g. +subdomain-recurly +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Site> + : + A site. + + + + + + + + +

Examples

+ + +
try {
+  const site = await client.getSite(siteId)
+  console.log('Fetched site: ', site)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listAccounts + (options) + + +

+ +

List a site's accounts

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_accounts

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.email + string + + Filter for accounts with this exact email address. A blank value will return accounts with both +null + and +"" + email addresses. Note that multiple accounts can share one email address. +
options.params.subscriber + boolean + + Filter for accounts with or without a subscription in the +active +, + +canceled +, or +future + state. +
options.params.pastDue + string + + Filter for accounts with an invoice in the +past_due + state. +
+ + + + + + +

Returns

+ Pager<Account> + : + A list of the site's accounts. + + + + + + + + +

Examples

+ + +
const accounts = client.listAccounts({ params: { limit: 200 } })
+
+for await (const account of accounts.each()) {
+  console.log(account.code)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createAccount + (body, options) + + +

+ +

Create an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + AccountCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {AccountCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Account> + : + An account. + + + + + + + + +

Examples

+ + +
try {
+  const accountCreate = {
+    code: accountCode,
+    firstName: 'Benjamin',
+    lastName: 'Du Monde',
+    preferredTimeZone: 'America/Chicago',
+    address: {
+      street1: '900 Camp St',
+      city: 'New Orleans',
+      region: 'LA',
+      postalCode: '70115',
+      country: 'US'
+    }
+  }
+  const account = await client.createAccount(accountCreate)
+  console.log('Created Account: ', account.code)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getAccount + (accountId, options) + + +

+ +

Fetch an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Account> + : + An account. + + + + + + + + +

Examples

+ + +
try {
+  const account = await client.getAccount(accountId)
+  console.log('Fetched account: ', account.code)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateAccount + (accountId, body, options) + + +

+ +

Update an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
body + AccountUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {AccountUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Account> + : + An account. + + + + + + + + +

Examples

+ + +
try {
+  const accountUpdate = {
+    firstName: 'Aaron',
+    lastName: 'Du Monde'
+  }
+  const account = await client.updateAccount(accountId, accountUpdate)
+  console.log('Updated account: ', account)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + deactivateAccount + (accountId, options) + + +

+ +

Deactivate an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Account> + : + An account. + + + + + + + + +

Examples

+ + +
try {
+  const account = await client.deactivateAccount(accountId)
+  console.log('Deleted account: ', account.code)
+} catch (err) {
+  if (err && err.type === 'not-found') {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  }
+  // If we don't know what to do with the err, we should
+  // probably re-raise and let our web framework and logger handle it
+  throw err
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getAccountAcquisition + (accountId, options) + + +

+ +

Fetch an account's acquisition data

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_account_acquisition

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<AccountAcquisition> + : + An account's acquisition data. + + + + + + + + +

Examples

+ + +
try {
+  const acquisition = await client.getAccountAcquisition(accountId)
+  console.log('Fetched account acquisition: ', acquisition.id)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateAccountAcquisition + (accountId, body, options) + + +

+ +

Update an account's acquisition data

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_account_acquisition

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
body + AccountAcquisitionUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {AccountAcquisitionUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<AccountAcquisition> + : + An account's updated acquisition data. + + + + + + + + +

Examples

+ + +
try {
+  const acquisitionUpdate = {
+    campaign: "big-event-campaign",
+    channel: "social_media",
+    subchannel: "twitter"
+  }
+  const accountAcquisition = await client.updateAccountAcquisition(accountId, acquisitionUpdate)
+  console.log('Edited Account Acquisition: ', accountAcquisition)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + removeAccountAcquisition + (accountId, options) + + +

+ +

Remove an account's acquisition data

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/remove_account_acquisition

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Empty> + : + Acquisition data was succesfully deleted. + + + + + + + + +

Examples

+ + +
try {
+  await client.removeAccountAcquisition(accountId)
+  console.log('Removed account acquisition from account: ', accountId)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + reactivateAccount + (accountId, options) + + +

+ +

Reactivate an inactive account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/reactivate_account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Account> + : + An account. + + + + + + + + +

Examples

+ + +
try {
+  const account = await client.reactivateAccount(accountId)
+  console.log('Reactivated account: ', account.code)
+} catch (err) {
+  if (err && err.type === 'not_found') {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  }
+  // If we don't know what to do with the err, we should
+  // probably re-raise and let our web framework and logger handle it
+  throw err
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getAccountBalance + (accountId, options) + + +

+ +

Fetch an account's balance and past due status

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_account_balance

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<AccountBalance> + : + An account's balance. + + + + + + + + +

Examples

+ + +
try {
+  const balance = await client.getAccountBalance(accountId)
+  console.log('Fetched account balance: ', balance.balances)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getBillingInfo + (accountId, options) + + +

+ +

Fetch an account's billing information

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_billing_info

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<BillingInfo> + : + An account's billing information. + + + + + + + + +

Examples

+ + +
try {
+  const billingInfo = await client.getBillingInfo(accountId)
+  console.log('Fetched Billing Info: ', billingInfo.id)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateBillingInfo + (accountId, body, options) + + +

+ +

Set an account's billing information

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_billing_info

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
body + BillingInfoCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {BillingInfoCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<BillingInfo> + : + Updated billing information. + + + + + + + + +

Examples

+ + +
try {
+  const billingInfoUpdate = {
+    firstName: 'Aaron',
+    lastName: 'Du Monde',
+  }
+  const billingInfo = await client.updateBillingInfo(accountId, billingInfoUpdate)
+  console.log('Updated billing info: ', billingInfo.id)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + removeBillingInfo + (accountId, options) + + +

+ +

Remove an account's billing information

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/remove_billing_info

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Empty> + : + Billing information deleted + + + + + + + + +

Examples

+ + +
try {
+  client.removeBillingInfo(accountId)
+  console.log('Removed billing info from account: ', accountId)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + verifyBillingInfo + (accountId, options) + + +

+ +

Verify an account's credit card billing information

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/verify_billing_info

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.body + BillingInfoVerify + + The object representing the JSON request to send to the server. It should conform to the schema of {BillingInfoVerify} +
+ + + + + + +

Returns

+ Promise<Transaction> + : + Transaction information from verify. + + + + + + + + +

Examples

+ + +
try {
+  const transaction = await client.verifyBillingInfo(accountId)
+  console.log('Fetched Transaction: ', transaction.id)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + verifyBillingInfoCvv + (accountId, body, options) + + +

+ +

Verify an account's credit card billing cvv

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/verify_billing_info_cvv

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
body + BillingInfoVerifyCVV + + The object representing the JSON request to send to the server. It should conform to the schema of {BillingInfoVerifyCVV} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Transaction> + : + Transaction information from verify. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listBillingInfos + (accountId, options) + + +

+ +

Get the list of billing information associated with an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_billing_infos

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
+ + + + + + +

Returns

+ Pager<BillingInfo> + : + A list of the the billing information for an account's + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createBillingInfo + (accountId, body, options) + + +

+ +

Add new billing information on an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_billing_info

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
body + BillingInfoCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {BillingInfoCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<BillingInfo> + : + Updated billing information. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getABillingInfo + (accountId, billingInfoId, options) + + +

+ +

Fetch a billing info

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_a_billing_info

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
billingInfoId + string + + Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<BillingInfo> + : + A billing info. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateABillingInfo + (accountId, billingInfoId, body, options) + + +

+ +

Update an account's billing information

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_a_billing_info

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
billingInfoId + string + + Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature. +
body + BillingInfoCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {BillingInfoCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<BillingInfo> + : + Updated billing information. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + removeABillingInfo + (accountId, billingInfoId, options) + + +

+ +

Remove an account's billing information

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/remove_a_billing_info

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
billingInfoId + string + + Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Empty> + : + Billing information deleted + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listAccountCouponRedemptions + (accountId, options) + + +

+ +

List the coupon redemptions for an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_account_coupon_redemptions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.state + string + + Filter by state. +
+ + + + + + +

Returns

+ Pager<CouponRedemption> + : + A list of the the coupon redemptions on an account. + + + + + + + + +

Examples

+ + +
const redemptions = client.listAccountCouponRedemptions(accountId, { params: { limit: 200 } })
+
+for await (const redemption of redemptions.each()) {
+  console.log(redemption.id)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listActiveCouponRedemptions + (accountId, options) + + +

+ +

List the coupon redemptions that are active on an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_active_coupon_redemptions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Pager<CouponRedemption> + : + Active coupon redemptions on an account. + + + + + + + + +

Examples

+ + +
const redemptions = await client.listActiveCouponRedemptions(accountId, { params: { limit: 200 } })
+
+for await (const redemption of redemptions.each()) {
+  console.log('Fetched coupon redemption: ', redemption.id)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createCouponRedemption + (accountId, body, options) + + +

+ +

Generate an active coupon redemption on an account or subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_coupon_redemption

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
body + CouponRedemptionCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {CouponRedemptionCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<CouponRedemption> + : + Returns the new coupon redemption. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + removeCouponRedemption + (accountId, options) + + +

+ +

Delete the active coupon redemption from an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/remove_coupon_redemption

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<CouponRedemption> + : + Coupon redemption deleted. + + + + + + + + +

Examples

+ + +
try {
+  const redemption = await client.removeCouponRedemption(accountId)
+  console.log('Removed coupon redemption: ', redemption.id)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listAccountCreditPayments + (accountId, options) + + +

+ +

List an account's credit payments

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_account_credit_payments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
+ + + + + + +

Returns

+ Pager<CreditPayment> + : + A list of the account's credit payments. + + + + + + + + +

Examples

+ + +
const payments = client.listAccountCreditPayments(accountId, { params: { limit: 200 } })
+
+for await (const payment of payments.each()) {
+  console.log(payment.uuid)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listAccountExternalAccount + (accountId, options) + + +

+ +

List external accounts for an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_account_external_account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Pager<ExternalAccount> + : + A list of external accounts on an account. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createAccountExternalAccount + (accountId, body, options) + + +

+ +

Create an external account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_account_external_account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
body + ExternalAccountCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {ExternalAccountCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalAccount> + : + A representation of the created external_account. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getAccountExternalAccount + (accountId, externalAccountId, options) + + +

+ +

Get an external account for an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_account_external_account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
externalAccountId + string + + External account ID, e.g. +s28zov4fw0cb +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalAccount> + : + A external account on an account. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateAccountExternalAccount + (accountId, externalAccountId, body, options) + + +

+ +

Update an external account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_account_external_account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
externalAccountId + string + + External account ID, e.g. +s28zov4fw0cb +. +
body + ExternalAccountUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {ExternalAccountUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalAccount> + : + A representation of the updated external_account. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + deleteAccountExternalAccount + (accountId, externalAccountId, options) + + +

+ +

Delete an external account for an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/delete_account_external_account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
externalAccountId + string + + External account ID, e.g. +s28zov4fw0cb +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalAccount> + : + Successful Delete + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listAccountExternalInvoices + (accountId, options) + + +

+ +

List the external invoices on an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_account_external_invoices

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
+ + + + + + +

Returns

+ Pager<ExternalInvoice> + : + A list of the the external_invoices on an account. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listAccountInvoices + (accountId, options) + + +

+ +

List an account's invoices

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_account_invoices

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.state + string + + Invoice state. +
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.type + string + + Filter by type when: +
    +
  • type=charge, only charge invoices will be returned.
  • +
  • type=credit, only credit invoices will be returned.
  • +
  • type=non-legacy, only charge and credit invoices will be returned.
  • +
  • type=legacy, only legacy invoices will be returned.
  • +
+
+ + + + + + +

Returns

+ Pager<Invoice> + : + A list of the account's invoices. + + + + + + + + +

Examples

+ + +
const invoices = client.listAccountInvoices(accountId, { params: { limit: 200 } })
+
+for await (const invoice of invoices.each()) {
+  console.log(invoice.number)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createInvoice + (accountId, body, options) + + +

+ +

Create an invoice for pending line items

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_invoice

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
body + InvoiceCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {InvoiceCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<InvoiceCollection> + : + Returns the new invoices. + + + + + + + + +

Examples

+ + +
try {
+  let invoiceCreate = {
+    currency: 'USD',
+    collectionMethod: 'automatic'
+  }
+  let invoiceCollection = await client.createInvoice(accountId, invoiceCreate)
+  console.log('Created Invoice')
+  console.log('Charge Invoice: ', invoiceCollection.chargeInvoice)
+  console.log('Credit Invoices: ', invoiceCollection.creditInvoices)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + previewInvoice + (accountId, body, options) + + +

+ +

Preview new invoice for pending line items

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/preview_invoice

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
body + InvoiceCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {InvoiceCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<InvoiceCollection> + : + Returns the invoice previews. + + + + + + + + +

Examples

+ + +
try {
+  const collection = await client.previewInvoice(accountId, {
+    currency: "USD",
+    collectionMethod: "automatic"
+  })
+  console.log(`Previewed invoice due at ${collection.chargeInvoice.dueAt}`)
+  console.log(collection.chargeInvoice)
+  console.log(collection.creditInvoices)
+} catch(err) {
+
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listAccountLineItems + (accountId, options) + + +

+ +

List an account's line items

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_account_line_items

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.original + string + + Filter by original field. +
options.params.state + string + + Filter by state field. +
options.params.type + string + + Filter by type field. +
+ + + + + + +

Returns

+ Pager<LineItem> + : + A list of the account's line items. + + + + + + + + +

Examples

+ + +
const lineItems = client.listAccountLineItems(accountId, { params: { limit: 200 } })
+
+for await (const lineItem of lineItems.each()) {
+  console.log(lineItem.id)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createLineItem + (accountId, body, options) + + +

+ +

Create a new line item for the account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_line_item

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
body + LineItemCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {LineItemCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<LineItem> + : + Returns the new line item. + + + + + + + + +

Examples

+ + +
try {
+  let lineItemReq = {
+    currency: 'USD',
+    unitAmount: 1000,
+    type: 'charge' // choose "credit" for a credit
+  }
+  let lineItem = await client.createLineItem(accountId, lineItemReq)
+  console.log('Created Line Item: ', lineItem.uuid)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listAccountNotes + (accountId, options) + + +

+ +

List an account's notes

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_account_notes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
+ + + + + + +

Returns

+ Pager<AccountNote> + : + A list of an account's notes. + + + + + + + + +

Examples

+ + +
const notes = client.listAccountNotes(accountId, { params: { limit: 200 } })
+
+for await (const note of notes.each()) {
+  console.log(note.message)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getAccountNote + (accountId, accountNoteId, options) + + +

+ +

Fetch an account note

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_account_note

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
accountNoteId + string + + Account Note ID. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<AccountNote> + : + An account note. + + + + + + + + +

Examples

+ + +
try {
+  console.log(accountId)
+  const note = await client.getAccountNote(accountId, accountNoteId)
+  console.log('Fetched account note: ', note.message)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listShippingAddresses + (accountId, options) + + +

+ +

Fetch a list of an account's shipping addresses

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_shipping_addresses

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
+ + + + + + +

Returns

+ Pager<ShippingAddress> + : + A list of an account's shipping addresses. + + + + + + + + +

Examples

+ + +
const addresses = client.listShippingAddresses(accountId, { params: { limit: 200 } })
+
+for await (const address of addresses.each()) {
+  console.log(address.street1)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createShippingAddress + (accountId, body, options) + + +

+ +

Create a new shipping address for the account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_shipping_address

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
body + ShippingAddressCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {ShippingAddressCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ShippingAddress> + : + Returns the new shipping address. + + + + + + + + +

Examples

+ + +
try {
+  const shippingAddressCreate = {
+    firstName: 'Aaron',
+    lastName: 'Du Monde',
+    street1: '900 Camp St.',
+    city: 'New Orleans',
+    region: 'LA',
+    postalCode: '70115',
+    country: 'US'
+  }
+  const address = await client.createShippingAddress(accountId, shippingAddressCreate)
+  console.log('Created shipping address: ', address.street1)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getShippingAddress + (accountId, shippingAddressId, options) + + +

+ +

Fetch an account's shipping address

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_shipping_address

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
shippingAddressId + string + + Shipping Address ID. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ShippingAddress> + : + A shipping address. + + + + + + + + +

Examples

+ + +
try {
+  const address = await client.getShippingAddress(accountId, shippingAddressId)
+  console.log('Fetched shipping address: ', address.street1)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateShippingAddress + (accountId, shippingAddressId, body, options) + + +

+ +

Update an account's shipping address

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_shipping_address

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
shippingAddressId + string + + Shipping Address ID. +
body + ShippingAddressUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {ShippingAddressUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ShippingAddress> + : + The updated shipping address. + + + + + + + + +

Examples

+ + +
try {
+  const shadUpdate = {
+    firstName: "Benjamin",
+    lastName: "Du Monde"
+  }
+  const address = await client.updateShippingAddress(accountId, shippingAddressId, shadUpdate)
+  console.log('Updated shipping address: ', address.street1)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + removeShippingAddress + (accountId, shippingAddressId, options) + + +

+ +

Remove an account's shipping address

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/remove_shipping_address

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
shippingAddressId + string + + Shipping Address ID. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Empty> + : + Shipping address deleted. + + + + + + + + +

Examples

+ + +
try {
+  await client.removeShippingAddress(accountId, shippingAddress.id)
+  console.log('Removed shipping address: ', shippingAddress.street1)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listAccountSubscriptions + (accountId, options) + + +

+ +

List an account's subscriptions

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_account_subscriptions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.state + string + + Filter by state. +
    +
  • When state=active, state=canceled, state=expired, or state=future, subscriptions with states that match the query and only those subscriptions will be returned.
  • +
  • When state=in_trial, only subscriptions that have a trial_started_at date earlier than now and a trial_ends_at date later than now will be returned.
  • +
  • When state=live, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
  • +
+
+ + + + + + +

Returns

+ Pager<Subscription> + : + A list of the account's subscriptions. + + + + + + + + +

Examples

+ + +
const subscriptions = client.listAccountSubscriptions(accountId, { params: { limit: 200 } })
+
+for await (const subscription of subscriptions.each()) {
+  console.log(subscription.uuid)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listAccountTransactions + (accountId, options) + + +

+ +

List an account's transactions

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_account_transactions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.type + string + + Filter by type field. The value +payment + will return both +purchase + and +capture + transactions. +
options.params.success + string + + Filter by success field. +
+ + + + + + +

Returns

+ Pager<Transaction> + : + A list of the account's transactions. + + + + + + + + +

Examples

+ + +
const transactions = client.listAccountTransactions(accountId, { params: { limit: 200 } })
+
+for await (const transaction of transactions.each()) {
+  console.log(transaction.uuid)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listChildAccounts + (accountId, options) + + +

+ +

List an account's child accounts

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_child_accounts

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.email + string + + Filter for accounts with this exact email address. A blank value will return accounts with both +null + and +"" + email addresses. Note that multiple accounts can share one email address. +
options.params.subscriber + boolean + + Filter for accounts with or without a subscription in the +active +, + +canceled +, or +future + state. +
options.params.pastDue + string + + Filter for accounts with an invoice in the +past_due + state. +
+ + + + + + +

Returns

+ Pager<Account> + : + A list of an account's child accounts. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listAccountAcquisition + (options) + + +

+ +

List a site's account acquisition data

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_account_acquisition

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
+ + + + + + +

Returns

+ Pager<AccountAcquisition> + : + A list of the site's account acquisition data. + + + + + + + + +

Examples

+ + +
const acquisitions = client.listAccountAcquisition({ params: { limit: 200 } })
+
+for await (const acquisition of acquisitions.each()) {
+  console.log(acquisition.id)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listCoupons + (options) + + +

+ +

List a site's coupons

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_coupons

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
+ + + + + + +

Returns

+ Pager<Coupon> + : + A list of the site's coupons. + + + + + + + + +

Examples

+ + +
const coupons = client.listCoupons({ params: { limit: 200 } })
+
+for await (const coupon of coupons.each()) {
+  console.log(coupon.code)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createCoupon + (body, options) + + +

+ +

Create a new coupon

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_coupon

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + CouponCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {CouponCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Coupon> + : + A new coupon. + + + + + + + + +

Examples

+ + +
try {
+  const couponCreate = {
+    name: "Promotional Coupon",
+    code: couponCode,
+    discount_type: "fixed",
+    currencies: [{"currency": "USD", "discount": 10}],
+  }
+  const coupon = await client.createCoupon(couponCreate)
+  console.log('Created coupon: ', coupon.id)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getCoupon + (couponId, options) + + +

+ +

Fetch a coupon

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_coupon

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
couponId + string + + Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-10off +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Coupon> + : + A coupon. + + + + + + + + +

Examples

+ + +
try {
+  const coupon = await client.getCoupon(couponId)
+  console.log('Fetched coupon: ', coupon.code)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateCoupon + (couponId, body, options) + + +

+ +

Update an active coupon

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_coupon

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
couponId + string + + Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-10off +. +
body + CouponUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {CouponUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Coupon> + : + The updated coupon. + + + + + + + + +

Examples

+ + +
try {
+  const couponUpdate = {
+    name: "New Coupon Name"
+  }
+  const coupon = await client.updateCoupon(couponId, couponUpdate)
+  console.log('Updated coupon: ', coupon)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + deactivateCoupon + (couponId, options) + + +

+ +

Expire a coupon

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_coupon

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
couponId + string + + Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-10off +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Coupon> + : + The expired Coupon + + + + + + + + +

Examples

+ + +
try {
+  const coupon = await client.deactivateCoupon(couponId)
+  console.log('Deactivated coupon: ', coupon.code)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + generateUniqueCouponCodes + (couponId, body, options) + + +

+ +

Generate unique coupon codes

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/generate_unique_coupon_codes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
couponId + string + + Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-10off +. +
body + CouponBulkCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {CouponBulkCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<UniqueCouponCodeParams> + : + A set of parameters that can be passed to the +list_unique_coupon_codes + +endpoint to obtain only the newly generated +UniqueCouponCodes +. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + restoreCoupon + (couponId, body, options) + + +

+ +

Restore an inactive coupon

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/restore_coupon

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
couponId + string + + Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-10off +. +
body + CouponUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {CouponUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Coupon> + : + The restored coupon. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listUniqueCouponCodes + (couponId, options) + + +

+ +

List unique coupon codes associated with a bulk coupon

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_unique_coupon_codes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
couponId + string + + Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-10off +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
+ + + + + + +

Returns

+ Pager<UniqueCouponCode> + : + A list of unique coupon codes that were generated + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listCreditPayments + (options) + + +

+ +

List a site's credit payments

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_credit_payments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
+ + + + + + +

Returns

+ Pager<CreditPayment> + : + A list of the site's credit payments. + + + + + + + + +

Examples

+ + +
const payments = client.listCreditPayments({ params: { limit: 200 } })
+
+for await (const payment of payments.each()) {
+  console.log(payment.uuid)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getCreditPayment + (creditPaymentId, options) + + +

+ +

Fetch a credit payment

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_credit_payment

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
creditPaymentId + string + + Credit Payment ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<CreditPayment> + : + A credit payment. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listCustomFieldDefinitions + (options) + + +

+ +

List a site's custom field definitions

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_custom_field_definitions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.relatedType + string + + Filter by related type. +
+ + + + + + +

Returns

+ Pager<CustomFieldDefinition> + : + A list of the site's custom field definitions. + + + + + + + + +

Examples

+ + +
const definitions = client.listCustomFieldDefinitions({ params: { limit: 200 } })
+
+for await (const definition of definitions.each()) {
+  console.log(definition.displayName)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getCustomFieldDefinition + (customFieldDefinitionId, options) + + +

+ +

Fetch an custom field definition

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_custom_field_definition

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
customFieldDefinitionId + string + + Custom Field Definition ID +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<CustomFieldDefinition> + : + A custom field definition. + + + + + + + + +

Examples

+ + +
try {
+  const definition = await client.getCustomFieldDefinition(definitionId)
+  console.log('Fetched custom field definition: ', definition.displayName)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createGeneralLedgerAccount + (body, options) + + +

+ +

Create a new general ledger account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_general_ledger_account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + GeneralLedgerAccountCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {GeneralLedgerAccountCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<GeneralLedgerAccount> + : + A new general ledger account. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listGeneralLedgerAccounts + (options) + + +

+ +

List a site's general ledger accounts

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_general_ledger_accounts

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.accountType + string + + General Ledger Account type by which to filter the response. +
+ + + + + + +

Returns

+ Pager<GeneralLedgerAccount> + : + A list of the site's general ledger accounts. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getGeneralLedgerAccount + (generalLedgerAccountId, options) + + +

+ +

Fetch a general ledger account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_general_ledger_account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
generalLedgerAccountId + string + + General Ledger Account ID +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<GeneralLedgerAccount> + : + A general ledger account. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateGeneralLedgerAccount + (generalLedgerAccountId, body, options) + + +

+ +

Update a general ledger account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_general_ledger_account

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
generalLedgerAccountId + string + + General Ledger Account ID +
body + GeneralLedgerAccountUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {GeneralLedgerAccountUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<GeneralLedgerAccount> + : + The updated general ledger account. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getPerformanceObligation + (performanceObligationId, options) + + +

+ +

Get a single Performance Obligation.

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_performance_obligation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
performanceObligationId + string + + Performance Obligation id. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<PerformanceObligation> + : + A single Performance Obligation. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getPerformanceObligations + (options) + + +

+ +

Get a site's Performance Obligations

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_performance_obligations

+ + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + any + + = {} +
+ + + + + + +

Returns

+ Pager<PerformanceObligation> + : + A list of Performance Obligations. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listInvoiceTemplateAccounts + (invoiceTemplateId, options) + + +

+ +

List an invoice template's associated accounts

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_template_accounts

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceTemplateId + string + + Invoice template ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.email + string + + Filter for accounts with this exact email address. A blank value will return accounts with both +null + and +"" + email addresses. Note that multiple accounts can share one email address. +
options.params.subscriber + boolean + + Filter for accounts with or without a subscription in the +active +, + +canceled +, or +future + state. +
options.params.pastDue + string + + Filter for accounts with an invoice in the +past_due + state. +
+ + + + + + +

Returns

+ Pager<Account> + : + A list of an invoice template's associated accounts. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listItems + (options) + + +

+ +

List a site's items

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_items

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.state + string + + Filter by state. +
+ + + + + + +

Returns

+ Pager<Item> + : + A list of the site's items. + + + + + + + + +

Examples

+ + +
const items = client.listItems({ params: { limit: 200 } })
+
+for await (const item of items.each()) {
+  console.log(item.code)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createItem + (body, options) + + +

+ +

Create a new item

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_item

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + ItemCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {ItemCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Item> + : + A new item. + + + + + + + + +

Examples

+ + +
try {
+  const itemCreate = {
+    code: itemCode,
+    name: "Item Name",
+    description: "Item Description",
+    external_sku: "a35JE-44",
+    accounting_code: "item-code-127",
+    revenue_schedule_type: "at_range_end",
+    custom_fields: [{
+      name: "custom-field-1",
+      value: "Custom Field 1 value"
+    }]
+  }
+  const item = await client.createItem(itemCreate)
+  console.log('Created Item: ', item.code)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getItem + (itemId, options) + + +

+ +

Fetch an item

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_item

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
itemId + string + + Item ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-red +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Item> + : + An item. + + + + + + + + +

Examples

+ + +
try {
+  const item = await client.getItem(itemId)
+  console.log('Fetched item: ', item.code)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateItem + (itemId, body, options) + + +

+ +

Update an active item

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_item

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
itemId + string + + Item ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-red +. +
body + ItemUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {ItemUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Item> + : + The updated item. + + + + + + + + +

Examples

+ + +
try {
+  const itemUpdate = {
+    name: 'New Item Name',
+    description: 'New Item Description'
+  }
+  const item = await client.updateItem(itemId, itemUpdate)
+  console.log('Updated item: ', item)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + deactivateItem + (itemId, options) + + +

+ +

Deactivate an item

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_item

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
itemId + string + + Item ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-red +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Item> + : + An item. + + + + + + + + +

Examples

+ + +
try {
+  const item = await client.deactivateItem(itemId)
+  console.log('Deleted item: ', item.code)
+} catch (err) {
+  if (err && err.type === 'not-found') {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  }
+  // If we don't know what to do with the err, we should
+  // probably re-raise and let our web framework and logger handle it
+  throw err
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + reactivateItem + (itemId, options) + + +

+ +

Reactivate an inactive item

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/reactivate_item

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
itemId + string + + Item ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-red +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Item> + : + An item. + + + + + + + + +

Examples

+ + +
try {
+  const item = await client.reactivateItem(itemId)
+  console.log('Reactivated item: ', item.code)
+} catch (err) {
+  if (err && err.type === 'not_found') {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  }
+  // If we don't know what to do with the err, we should
+  // probably re-raise and let our web framework and logger handle it
+  throw err
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listMeasuredUnit + (options) + + +

+ +

List a site's measured units

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_measured_unit

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.state + string + + Filter by state. +
+ + + + + + +

Returns

+ Pager<MeasuredUnit> + : + A list of the site's measured units. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createMeasuredUnit + (body, options) + + +

+ +

Create a new measured unit

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_measured_unit

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + MeasuredUnitCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {MeasuredUnitCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<MeasuredUnit> + : + A new measured unit. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getMeasuredUnit + (measuredUnitId, options) + + +

+ +

Fetch a measured unit

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_measured_unit

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
measuredUnitId + string + + Measured unit ID or name. For ID no prefix is used e.g. +e28zov4fw0v2 +. For name use prefix +name- +, e.g. +name-Storage +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<MeasuredUnit> + : + An item. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateMeasuredUnit + (measuredUnitId, body, options) + + +

+ +

Update a measured unit

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_measured_unit

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
measuredUnitId + string + + Measured unit ID or name. For ID no prefix is used e.g. +e28zov4fw0v2 +. For name use prefix +name- +, e.g. +name-Storage +. +
body + MeasuredUnitUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {MeasuredUnitUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<MeasuredUnit> + : + The updated measured_unit. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + removeMeasuredUnit + (measuredUnitId, options) + + +

+ +

Remove a measured unit

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/remove_measured_unit

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
measuredUnitId + string + + Measured unit ID or name. For ID no prefix is used e.g. +e28zov4fw0v2 +. For name use prefix +name- +, e.g. +name-Storage +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<MeasuredUnit> + : + A measured unit. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listExternalProducts + (options) + + +

+ +

List a site's external products

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_external_products

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
+ + + + + + +

Returns

+ Pager<ExternalProduct> + : + A list of the the external_products on a site. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createExternalProduct + (body, options) + + +

+ +

Create an external product

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_external_product

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + ExternalProductCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {ExternalProductCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalProduct> + : + Returns the external product + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getExternalProduct + (externalProductId, options) + + +

+ +

Fetch an external product

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_external_product

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
externalProductId + string + + External product id +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalProduct> + : + Settings for an external product. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateExternalProduct + (externalProductId, body, options) + + +

+ +

Update an external product

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_external_product

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
externalProductId + string + + External product id +
body + ExternalProductUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {ExternalProductUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalProduct> + : + Settings for an external product. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + deactivateExternalProducts + (externalProductId, options) + + +

+ +

Deactivate an external product

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_external_products

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
externalProductId + string + + External product id +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalProduct> + : + Deactivated external product. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listExternalProductExternalProductReferences + (externalProductId, options) + + +

+ +

List the external product references for an external product

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_external_product_external_product_references

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
externalProductId + string + + External product id +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
+ + + + + + +

Returns

+ Pager<ExternalProductReferenceCollection> + : + A list of the the external product references for an external product. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createExternalProductExternalProductReference + (externalProductId, body, options) + + +

+ +

Create an external product reference on an external product

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_external_product_external_product_reference

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
externalProductId + string + + External product id +
body + ExternalProductReferenceCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {ExternalProductReferenceCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalProductReferenceMini> + : + Details for the external product reference. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getExternalProductExternalProductReference + (externalProductId, externalProductReferenceId, options) + + +

+ +

Fetch an external product reference

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_external_product_external_product_reference

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
externalProductId + string + + External product id +
externalProductReferenceId + string + + External product reference ID, e.g. +d39iun2fw1v4 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalProductReferenceMini> + : + Details for an external product reference. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + deactivateExternalProductExternalProductReference + (externalProductId, externalProductReferenceId, options) + + +

+ +

Deactivate an external product reference

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_external_product_external_product_reference

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
externalProductId + string + + External product id +
externalProductReferenceId + string + + External product reference ID, e.g. +d39iun2fw1v4 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalProductReferenceMini> + : + Details for an external product reference. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listExternalSubscriptions + (options) + + +

+ +

List a site's external subscriptions

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscriptions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
+ + + + + + +

Returns

+ Pager<ExternalSubscription> + : + A list of the the external_subscriptions on a site. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getExternalSubscription + (externalSubscriptionId, options) + + +

+ +

Fetch an external subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_external_subscription

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
externalSubscriptionId + string + + External subscription ID, external_id or uuid. For ID no prefix is used e.g. +e28zov4fw0v2 +. For external_id use prefix +external-id- +, e.g. +external-id-123456 + and for uuid use prefix +uuid- + e.g. +uuid-7293239bae62777d8c1ae044a9843633 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalSubscription> + : + Settings for an external subscription. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listExternalSubscriptionExternalInvoices + (externalSubscriptionId, options) + + +

+ +

List the external invoices on an external subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscription_external_invoices

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
externalSubscriptionId + string + + External subscription id +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
+ + + + + + +

Returns

+ Pager<ExternalInvoice> + : + A list of the the external_invoices on a site. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listInvoices + (options) + + +

+ +

List a site's invoices

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_invoices

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.state + string + + Invoice state. +
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.type + string + + Filter by type when: +
    +
  • type=charge, only charge invoices will be returned.
  • +
  • type=credit, only credit invoices will be returned.
  • +
  • type=non-legacy, only charge and credit invoices will be returned.
  • +
  • type=legacy, only legacy invoices will be returned.
  • +
+
+ + + + + + +

Returns

+ Pager<Invoice> + : + A list of the site's invoices. + + + + + + + + +

Examples

+ + +
const invoices = client.listInvoices({ params: { limit: 200 } })
+
+for await (const invoice of invoices.each()) {
+  console.log(invoice.number)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getInvoice + (invoiceId, options) + + +

+ +

Fetch an invoice

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_invoice

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Invoice> + : + An invoice. + + + + + + + + +

Examples

+ + +
try {
+  const invoice = await client.getInvoice(invoiceId)
+  console.log('Fetched Invoice: ', invoice.number)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateInvoice + (invoiceId, body, options) + + +

+ +

Update an invoice

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_invoice

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
body + InvoiceUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {InvoiceUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Invoice> + : + An invoice. + + + + + + + + +

Examples

+ + +
try {
+  const invoiceUpdate = {
+    customerNotes: "New notes",
+    termsAndConditions: "New terms and conditions"
+  }
+
+  const invoice = await client.updateInvoice(invoiceId, invoiceUpdate)
+  console.log('Edited invoice: ', invoice.number)
+} catch(err) {
+
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getInvoicePdf + (invoiceId, options) + + +

+ +

Fetch an invoice as a PDF

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_invoice_pdf

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<BinaryFile> + : + An invoice as a PDF. + + + + + + + + +

Examples

+ + +
try {
+  const invoice = await client.getInvoicePdf(invoiceId)
+  console.log('Fetched Invoice: ', invoice)
+  const filename = `${downloadDirectory}/nodeinvoice-${invoiceId}.pdf`
+  await fs.writeFile(filename, invoice.data, 'binary', (err) => {
+    // throws an error, you could also catch it here
+    if (err) throw err;
+
+    // success case, the file was saved
+    console.log('Saved Invoice PDF to', filename)
+  })
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + applyCreditBalance + (invoiceId, options) + + +

+ +

Apply available credit to a pending or past due charge invoice

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/apply_credit_balance

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Invoice> + : + The updated invoice. + + + + + + + + +

Examples

+ + +
try {
+  const invoice = await client.applyCreditBalance(invoiceId)
+  console.log('Applied credit balance to invoice: ', invoice)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + collectInvoice + (invoiceId, options) + + +

+ +

Collect a pending or past due, automatic invoice

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/collect_invoice

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.body + InvoiceCollect + + The object representing the JSON request to send to the server. It should conform to the schema of {InvoiceCollect} +
+ + + + + + +

Returns

+ Promise<Invoice> + : + The updated invoice. + + + + + + + + +

Examples

+ + +
try {
+  const invoice = await client.collectInvoice(invoiceId)
+  console.log('Collected invoice: ', invoice.number)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + markInvoiceFailed + (invoiceId, options) + + +

+ +

Mark an open invoice as failed

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_failed

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Invoice> + : + The updated invoice. + + + + + + + + +

Examples

+ + +
try {
+  const invoice = await client.markInvoiceFailed(invoiceId)
+  console.log('Failed invoice: ', invoice.number)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + markInvoiceSuccessful + (invoiceId, options) + + +

+ +

Mark an open invoice as successful

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_successful

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Invoice> + : + The updated invoice. + + + + + + + + +

Examples

+ + +
try {
+  const invoice = await client.markInvoiceSuccessful(invoiceId)
+  console.log(`Marked invoice #${invoice.number} successful`)
+} catch(err) {
+
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + reopenInvoice + (invoiceId, options) + + +

+ +

Reopen a closed, manual invoice

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/reopen_invoice

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Invoice> + : + The updated invoice. + + + + + + + + +

Examples

+ + +
try {
+  const invoice = await client.reopenInvoice(invoiceId)
+  console.log('Reopened invoice: ', invoice.number)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + voidInvoice + (invoiceId, options) + + +

+ +

Void a credit invoice.

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/void_invoice

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Invoice> + : + The updated invoice. + + + + + + + + +

Examples

+ + +
try {
+  const invoice = await client.voidInvoice(invoiceId)
+  console.log('Voided invoice: ', invoice)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + recordExternalTransaction + (invoiceId, body, options) + + +

+ +

Record an external payment for a manual invoices.

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/record_external_transaction

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
body + ExternalTransaction + + The object representing the JSON request to send to the server. It should conform to the schema of {ExternalTransaction} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Transaction> + : + The recorded transaction. + + + + + + + + +

Examples

+ + +
try {
+  const externalTrx = {
+    description: "A check collected outside of Recurly",
+    amount: 10.0,
+    payment_method: 'check'
+  }
+  const transaction = await client.recordExternalTransaction(invoiceId, externalTrx)
+  console.log('External Transaction: ', transaction)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listInvoiceLineItems + (invoiceId, options) + + +

+ +

List an invoice's line items

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_line_items

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.original + string + + Filter by original field. +
options.params.state + string + + Filter by state field. +
options.params.type + string + + Filter by type field. +
+ + + + + + +

Returns

+ Pager<LineItem> + : + A list of the invoice's line items. + + + + + + + + +

Examples

+ + +
const lineItems = client.listInvoiceLineItems(invoiceId, { params: { limit: 200 } })
+
+for await (const lineItem of lineItems.each()) {
+  console.log(lineItem.id)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listInvoiceCouponRedemptions + (invoiceId, options) + + +

+ +

List the coupon redemptions applied to an invoice

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_coupon_redemptions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
+ + + + + + +

Returns

+ Pager<CouponRedemption> + : + A list of the the coupon redemptions associated with the invoice. + + + + + + + + +

Examples

+ + +
const redemptions = client.listInvoiceCouponRedemptions(invoiceId, { params: { limit: 200 } })
+
+for await (const redemption of redemptions.each()) {
+  console.log(redemption.id)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listRelatedInvoices + (invoiceId, options) + + +

+ +

List an invoice's related credit or charge invoices

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_related_invoices

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Pager<Invoice> + : + A list of the credit or charge invoices associated with the invoice. + + + + + + + + +

Examples

+ + +
const invoices = client.listRelatedInvoices(invoiceId, { params: { limit: 200 } })
+
+for await (const invoice of invoices.each()) {
+  console.log(invoice.number)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + refundInvoice + (invoiceId, body, options) + + +

+ +

Refund an invoice

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/refund_invoice

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceId + string + + Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2 +. For number use prefix +number- +, e.g. +number-1000 +. +
body + InvoiceRefund + + The object representing the JSON request to send to the server. It should conform to the schema of {InvoiceRefund} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Invoice> + : + Returns the new credit invoice. + + + + + + + + +

Examples

+ + +
try {
+  const invoiceRefund = {
+    creditCustomerNotes: "Notes on credits",
+    type: "amount", // could also be "line_items"
+    amount: 100
+  }
+
+  const invoice = await client.refundInvoice(invoiceId, invoiceRefund)
+  console.log('Refunded invoice: ', invoice.number)
+} catch(err) {
+
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listLineItems + (options) + + +

+ +

List a site's line items

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_line_items

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.original + string + + Filter by original field. +
options.params.state + string + + Filter by state field. +
options.params.type + string + + Filter by type field. +
+ + + + + + +

Returns

+ Pager<LineItem> + : + A list of the site's line items. + + + + + + + + +

Examples

+ + +
const lineItems = client.listLineItems({ params: { limit: 200 } })
+
+for await (const item of lineItems.each()) {
+  console.log(`Item ${item.id} for ${item.amount}`)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getLineItem + (lineItemId, options) + + +

+ +

Fetch a line item

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_line_item

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
lineItemId + string + + Line Item ID. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<LineItem> + : + A line item. + + + + + + + + +

Examples

+ + +
try {
+  const lineItem = await client.getLineItem(lineItemId)
+  console.log('Fetched line item: ', lineItem.uuid)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + removeLineItem + (lineItemId, options) + + +

+ +

Delete an uninvoiced line item

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/remove_line_item

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
lineItemId + string + + Line Item ID. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Empty> + : + Line item deleted. + + + + + + + + +

Examples

+ + +
try {
+  await client.removeLineItem(lineItemId)
+  console.log('Removed line item: ', lineItemId)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listPlans + (options) + + +

+ +

List a site's plans

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_plans

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.state + string + + Filter by state. +
+ + + + + + +

Returns

+ Pager<Plan> + : + A list of plans. + + + + + + + + +

Examples

+ + +
const plans = client.listPlans({ params: { limit: 200 } })
+
+for await (const plan of plans.each()) {
+  console.log(plan.code)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createPlan + (body, options) + + +

+ +

Create a plan

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_plan

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + PlanCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {PlanCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Plan> + : + A plan. + + + + + + + + +

Examples

+ + +
try {
+  const planCreate = {
+    name: 'Monthly Coffee Subscription',
+    code: planCode,
+    currencies: [
+      {
+        currency: 'USD',
+        unitAmount: 10000
+      }
+    ]
+  }
+  const plan = await client.createPlan(planCreate)
+  console.log('Created Plan: ', plan.code)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getPlan + (planId, options) + + +

+ +

Fetch a plan

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_plan

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
planId + string + + Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Plan> + : + A plan. + + + + + + + + +

Examples

+ + +
try {
+  const plan = await client.getPlan(planId)
+  console.log('Fetched plan: ', plan.code)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updatePlan + (planId, body, options) + + +

+ +

Update a plan

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_plan

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
planId + string + + Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
body + PlanUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {PlanUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Plan> + : + A plan. + + + + + + + + +

Examples

+ + +
try {
+  const planUpdate = {
+    name: 'New monthly coffee subscription'
+  }
+  const plan = await client.updatePlan(planId, planUpdate)
+  console.log('Updated plan: ', plan.code)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + removePlan + (planId, options) + + +

+ +

Remove a plan

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/remove_plan

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
planId + string + + Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Plan> + : + Plan deleted + + + + + + + + +

Examples

+ + +
try {
+  const plan = await client.removePlan(planId)
+  console.log('Removed plan: ', plan.code)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listPlanAddOns + (planId, options) + + +

+ +

List a plan's add-ons

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_plan_add_ons

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
planId + string + + Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.state + string + + Filter by state. +
+ + + + + + +

Returns

+ Pager<AddOn> + : + A list of add-ons. + + + + + + + + +

Examples

+ + +
const addOns = client.listPlanAddOns(planId, { params: { limit: 200 } })
+
+for await (const addOn of addOns.each()) {
+  console.log(addOn.code)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createPlanAddOn + (planId, body, options) + + +

+ +

Create an add-on

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_plan_add_on

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
planId + string + + Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
body + AddOnCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {AddOnCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<AddOn> + : + An add-on. + + + + + + + + +

Examples

+ + +
try {
+  const addOnCreate = {
+    code: 'coffee_grinder',
+    name: 'A quality grinder for your beans',
+    defaultQuantity: 1,
+    currencies: [
+      {
+        currency: 'USD',
+        unitAmount: 10000
+      }
+    ]
+  }
+
+  const addOn = await client.createPlanAddOn(planId, addOnCreate)
+  console.log('Created add-on: ', addOn.code)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getPlanAddOn + (planId, addOnId, options) + + +

+ +

Fetch a plan's add-on

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_plan_add_on

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
planId + string + + Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
addOnId + string + + Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<AddOn> + : + An add-on. + + + + + + + + +

Examples

+ + +
try {
+  const addOn = await client.getPlanAddOn(planId, addOnId)
+  console.log('Fetched add-on: ', addOn.code)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updatePlanAddOn + (planId, addOnId, body, options) + + +

+ +

Update an add-on

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_plan_add_on

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
planId + string + + Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
addOnId + string + + Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
body + AddOnUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {AddOnUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<AddOn> + : + An add-on. + + + + + + + + +

Examples

+ + +
try {
+  const addOnUpdate = {
+    name: 'New AddOn Name',
+  }
+  const addOn = await client.updatePlanAddOn(planId, addOnId, addOnUpdate)
+  console.log('Updated add-on: ', addOn)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + removePlanAddOn + (planId, addOnId, options) + + +

+ +

Remove an add-on

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/remove_plan_add_on

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
planId + string + + Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
addOnId + string + + Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<AddOn> + : + Add-on deleted + + + + + + + + +

Examples

+ + +
try {
+  const addOn = await client.removePlanAddOn(planId, addOnId)
+  console.log('Removed plan add-on: ', addOn)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listAddOns + (options) + + +

+ +

List a site's add-ons

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_add_ons

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.state + string + + Filter by state. +
+ + + + + + +

Returns

+ Pager<AddOn> + : + A list of add-ons. + + + + + + + + +

Examples

+ + +
const addOns = client.listAddOns({ params: { limit: 200 } })
+
+for await (const addOn of addOns.each()) {
+  console.log(addOn.code)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getAddOn + (addOnId, options) + + +

+ +

Fetch an add-on

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_add_on

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
addOnId + string + + Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<AddOn> + : + An add-on. + + + + + + + + +

Examples

+ + +
try {
+  const addOn = await client.getAddOn(addOnId)
+  console.log('Fetched add-on: ', addOn)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listShippingMethods + (options) + + +

+ +

List a site's shipping methods

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_shipping_methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
+ + + + + + +

Returns

+ Pager<ShippingMethod> + : + A list of the site's shipping methods. + + + + + + + + +

Examples

+ + +
const methods = client.listShippingMethods({ params: { limit: 200 } })
+
+for await (const method of methods.each()) {
+  console.log(method.code)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createShippingMethod + (body, options) + + +

+ +

Create a new shipping method

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_shipping_method

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + ShippingMethodCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {ShippingMethodCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ShippingMethod> + : + A new shipping method. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getShippingMethod + (shippingMethodId, options) + + +

+ +

Fetch a shipping method

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_shipping_method

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
shippingMethodId + string + + Shipping Method ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-usps_2-day +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ShippingMethod> + : + A shipping method. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateShippingMethod + (shippingMethodId, body, options) + + +

+ +

Update an active Shipping Method

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_shipping_method

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
shippingMethodId + string + + Shipping Method ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-usps_2-day +. +
body + ShippingMethodUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {ShippingMethodUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ShippingMethod> + : + The updated shipping method. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + deactivateShippingMethod + (shippingMethodId, options) + + +

+ +

Deactivate a shipping method

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_shipping_method

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
shippingMethodId + string + + Shipping Method ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-usps_2-day +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ShippingMethod> + : + A shipping method. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listSubscriptions + (options) + + +

+ +

List a site's subscriptions

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_subscriptions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.state + string + + Filter by state. +
    +
  • When state=active, state=canceled, state=expired, or state=future, subscriptions with states that match the query and only those subscriptions will be returned.
  • +
  • When state=in_trial, only subscriptions that have a trial_started_at date earlier than now and a trial_ends_at date later than now will be returned.
  • +
  • When state=live, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
  • +
+
+ + + + + + +

Returns

+ Pager<Subscription> + : + A list of the site's subscriptions. + + + + + + + + +

Examples

+ + +
const subscriptions = client.listSubscriptions({ params: { limit: 200 } })
+
+for await (const subscription of subscriptions.each()) {
+  console.log(subscription.uuid)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createSubscription + (body, options) + + +

+ +

Create a new subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_subscription

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + SubscriptionCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {SubscriptionCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Subscription> + : + A subscription. + + + + + + + + +

Examples

+ + +
try {
+  let subscriptionReq = {
+    planCode: planCode,
+    currency: `USD`,
+    account: {
+      code: accountCode
+    }
+  }
+  let sub = await client.createSubscription(subscriptionReq)
+  console.log('Created subscription: ', sub.uuid)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getSubscription + (subscriptionId, options) + + +

+ +

Fetch a subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_subscription

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Subscription> + : + A subscription. + + + + + + + + +

Examples

+ + +
try {
+  const subscription = await client.getSubscription(subscriptionId)
+  console.log('Fetched subscription: ', subscription.uuid)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateSubscription + (subscriptionId, body, options) + + +

+ +

Update a subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_subscription

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
body + SubscriptionUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {SubscriptionUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Subscription> + : + A subscription. + + + + + + + + +

Examples

+ + +
try {
+  const update = {
+    termsAndConditions: "Some new terms and conditions",
+    customerNotes: "Some new customer notes"
+  }
+  const subscription = await client.updateSubscription(subscriptionId, update)
+  console.log('Modified subscription: ', subscription.uuid)
+} catch(err) {
+
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + terminateSubscription + (subscriptionId, options) + + +

+ +

Terminate a subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/terminate_subscription

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.refund + string + + The type of refund to perform: +
    +
  • full - Performs a full refund of the last invoice for the current subscription term.
  • +
  • partial - Prorates a refund based on the amount of time remaining in the current bill cycle.
  • +
  • none - Terminates the subscription without a refund.
  • +
+

In the event that the most recent invoice is a $0 invoice paid entirely by credit, Recurly will apply the credit back to the customer’s account.

+

You may also terminate a subscription with no refund and then manually refund specific invoices.

+
options.params.charge + boolean + + Applicable only if the subscription has usage based add-ons and unbilled usage logged for the current billing cycle. If true, current billing cycle unbilled usage is billed on the final invoice. If false, Recurly will create a negative usage record for current billing cycle usage that will zero out the final invoice line items. +
+ + + + + + +

Returns

+ Promise<Subscription> + : + An expired subscription. + + + + + + + + +

Examples

+ + +
try {
+  const subscription = await client.terminateSubscription(subscriptionId)
+  console.log('Terminated subscription: ', subscription.uuid)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + cancelSubscription + (subscriptionId, options) + + +

+ +

Cancel a subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/cancel_subscription

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.body + SubscriptionCancel + + The object representing the JSON request to send to the server. It should conform to the schema of {SubscriptionCancel} +
+ + + + + + +

Returns

+ Promise<Subscription> + : + A canceled or failed subscription. + + + + + + + + +

Examples

+ + +
try {
+  let expiredSub = await client.cancelSubscription(subscriptionId)
+  console.log('Canceled Subscription: ', expiredSub.uuid)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + reactivateSubscription + (subscriptionId, options) + + +

+ +

Reactivate a canceled subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/reactivate_subscription

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Subscription> + : + An active subscription. + + + + + + + + +

Examples

+ + +
try {
+  const subscription = await client.reactivateSubscription(subscriptionId)
+  console.log('Reactivated subscription: ', subscription.uuid)
+} catch(err) {
+
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + pauseSubscription + (subscriptionId, body, options) + + +

+ +

Pause subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/pause_subscription

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
body + SubscriptionPause + + The object representing the JSON request to send to the server. It should conform to the schema of {SubscriptionPause} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Subscription> + : + A subscription. + + + + + + + + +

Examples

+ + +
try {
+  let pauseReq = {
+    remaining_pause_cycles: 2,
+  }
+  const subscription = await client.pauseSubscription(subscriptionId, pauseReq)
+  console.log('Paused subscription: ', subscription.id)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + resumeSubscription + (subscriptionId, options) + + +

+ +

Resume subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/resume_subscription

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Subscription> + : + A subscription. + + + + + + + + +

Examples

+ + +
try {
+  const subscription = await client.resumeSubscription(subscriptionId)
+  console.log('Resumed subscription: ', subscription.id)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + convertTrial + (subscriptionId, options) + + +

+ +

Convert trial subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/convert_trial

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Subscription> + : + A subscription. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getPreviewRenewal + (subscriptionId, options) + + +

+ +

Fetch a preview of a subscription's renewal invoice(s)

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_preview_renewal

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<InvoiceCollection> + : + A preview of the subscription's renewal invoice(s). + + + + + + + + +

Examples

+ + +
try {
+  const invoiceCollection = await client.getPreviewRenewal(subscriptionId)
+  console.log('Fetched Renewal Preview with total: ', invoiceCollection.chargeInvoice.total)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getSubscriptionChange + (subscriptionId, options) + + +

+ +

Fetch a subscription's pending change

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_subscription_change

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<SubscriptionChange> + : + A subscription's pending change. + + + + + + + + +

Examples

+ + +
try {
+  const change = await client.getSubscriptionChange(subscriptionId)
+  console.log('Fetched subscription change: ', change.id)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createSubscriptionChange + (subscriptionId, body, options) + + +

+ +

Create a new subscription change

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_subscription_change

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
body + SubscriptionChangeCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {SubscriptionChangeCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<SubscriptionChange> + : + A subscription change. + + + + + + + + +

Examples

+ + +
try {
+  const subscriptionChangeCreate = {
+    planCode: newPlanCode,
+    timeframe: 'now'
+  }
+
+  const change = await client.createSubscriptionChange(subscriptionId, subscriptionChangeCreate)
+  console.log('Created subscription change: ', change.id)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + removeSubscriptionChange + (subscriptionId, options) + + +

+ +

Delete the pending subscription change

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/remove_subscription_change

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Empty> + : + Subscription change was deleted. + + + + + + + + +

Examples

+ + +
try {
+  await client.removeSubscriptionChange(subscriptionId)
+  console.log('Removed subscription change: ', subscriptionId)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + previewSubscriptionChange + (subscriptionId, body, options) + + +

+ +

Preview a new subscription change

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/preview_subscription_change

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
body + SubscriptionChangeCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {SubscriptionChangeCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<SubscriptionChange> + : + A subscription change. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listSubscriptionInvoices + (subscriptionId, options) + + +

+ +

List a subscription's invoices

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_invoices

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.state + string + + Invoice state. +
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.type + string + + Filter by type when: +
    +
  • type=charge, only charge invoices will be returned.
  • +
  • type=credit, only credit invoices will be returned.
  • +
  • type=non-legacy, only charge and credit invoices will be returned.
  • +
  • type=legacy, only legacy invoices will be returned.
  • +
+
+ + + + + + +

Returns

+ Pager<Invoice> + : + A list of the subscription's invoices. + + + + + + + + +

Examples

+ + +
const invoices = client.listSubscriptionInvoices(subscriptionId, { params: { limit: 200 } })
+
+for await (const invoice of invoices.each()) {
+  console.log(invoice.number)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listSubscriptionLineItems + (subscriptionId, options) + + +

+ +

List a subscription's line items

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_line_items

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.original + string + + Filter by original field. +
options.params.state + string + + Filter by state field. +
options.params.type + string + + Filter by type field. +
+ + + + + + +

Returns

+ Pager<LineItem> + : + A list of the subscription's line items. + + + + + + + + +

Examples

+ + +
const lineItems = client.listSubscriptionLineItems(subscriptionId, { params: { limit: 200 } })
+
+for await (const lineItem of lineItems.each()) {
+  console.log(lineItem.id)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listSubscriptionCouponRedemptions + (subscriptionId, options) + + +

+ +

List the coupon redemptions for a subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_coupon_redemptions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
+ + + + + + +

Returns

+ Pager<CouponRedemption> + : + A list of the the coupon redemptions on a subscription. + + + + + + + + +

Examples

+ + +
const redemptions = client.listSubscriptionCouponRedemptions(subscriptionId, { params: { limit: 200 } })
+
+for await (const redemption of redemptions.each()) {
+  console.log(redemption.id)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listUsage + (subscriptionId, addOnId, options) + + +

+ +

List a subscription add-on's usage records

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_usage

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
addOnId + string + + Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +usage_timestamp + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=usage_timestamp + or +sort=recorded_timestamp +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=usage_timestamp + or +sort=recorded_timestamp +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.billingStatus + string + + Filter by usage record's billing status +
+ + + + + + +

Returns

+ Pager<Usage> + : + A list of the subscription add-on's usage records. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createUsage + (subscriptionId, addOnId, body, options) + + +

+ +

Log a usage record on this subscription add-on

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_usage

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
subscriptionId + string + + Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
addOnId + string + + Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-gold +. +
body + UsageCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {UsageCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Usage> + : + The created usage record. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getUsage + (usageId, options) + + +

+ +

Get a usage record

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_usage

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
usageId + string + + Usage Record ID. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Usage> + : + The usage record. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + updateUsage + (usageId, body, options) + + +

+ +

Update a usage record

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/update_usage

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
usageId + string + + Usage Record ID. +
body + UsageCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {UsageCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Usage> + : + The updated usage record. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + removeUsage + (usageId, options) + + +

+ +

Delete a usage record.

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/remove_usage

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
usageId + string + + Usage Record ID. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Empty> + : + Usage was successfully deleted. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listTransactions + (options) + + +

+ +

List a site's transactions

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_transactions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.type + string + + Filter by type field. The value +payment + will return both +purchase + and +capture + transactions. +
options.params.success + string + + Filter by success field. +
+ + + + + + +

Returns

+ Pager<Transaction> + : + A list of the site's transactions. + + + + + + + + +

Examples

+ + +
const transactions = client.listTransactions({ params: { limit: 200 } })
+
+for await (const transaction of transactions.each()) {
+  console.log(transaction.uuid)
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getTransaction + (transactionId, options) + + +

+ +

Fetch a transaction

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_transaction

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
transactionId + string + + Transaction ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<Transaction> + : + A transaction. + + + + + + + + +

Examples

+ + +
try {
+  const transaction = await client.getTransaction(transactionId)
+  console.log('Fetched transaction: ', transaction.uuid)
+} catch (err) {
+  if (err instanceof recurly.errors.NotFoundError) {
+    // If the request was not found, you may want to alert the user or
+    // just return null
+    console.log('Resource Not Found')
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getUniqueCouponCode + (uniqueCouponCodeId, options) + + +

+ +

Fetch a unique coupon code

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_unique_coupon_code

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
uniqueCouponCodeId + string + + Unique Coupon Code ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-abc-8dh2-def +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<UniqueCouponCode> + : + A unique coupon code. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + deactivateUniqueCouponCode + (uniqueCouponCodeId, options) + + +

+ +

Deactivate a unique coupon code

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_unique_coupon_code

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
uniqueCouponCodeId + string + + Unique Coupon Code ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-abc-8dh2-def +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<UniqueCouponCode> + : + A unique coupon code. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + reactivateUniqueCouponCode + (uniqueCouponCodeId, options) + + +

+ +

Restore a unique coupon code

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/reactivate_unique_coupon_code

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
uniqueCouponCodeId + string + + Unique Coupon Code ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-abc-8dh2-def +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<UniqueCouponCode> + : + A unique coupon code. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createPurchase + (body, options) + + +

+ +

Create a new purchase

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_purchase

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + PurchaseCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {PurchaseCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<InvoiceCollection> + : + Returns the new invoices + + + + + + + + +

Examples

+ + +
try {
+  let purchaseReq = {
+    currency: 'USD',
+    account: {
+      code: accountCode,
+      firstName: 'Benjamin',
+      lastName: 'Du Monde',
+      billingInfo: {
+        tokenId: rjsTokenId
+      }
+    },
+    subscriptions: [
+      { planCode: planCode },
+    ]
+  }
+  let invoiceCollection = await client.createPurchase(purchaseReq)
+  console.log('Created Charge Invoice: ', invoiceCollection.chargeInvoice)
+  console.log('Created Credit Invoices: ', invoiceCollection.creditInvoices)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + previewPurchase + (body, options) + + +

+ +

Preview a new purchase

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/preview_purchase

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + PurchaseCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {PurchaseCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<InvoiceCollection> + : + Returns preview of the new invoices + + + + + + + + +

Examples

+ + +
try {
+  let purchaseReq = {
+    currency: 'USD',
+    account: {
+      firstName: 'Benjamin',
+      lastName: 'Du Monde',
+      code: accountCode,
+      billingInfo: {
+        tokenId: rjsTokenId
+      }
+    },
+    subscriptions: [
+      { planCode: planCode },
+    ]
+  }
+  let invoiceCollection = await client.previewPurchase(purchaseReq)
+  console.log('Preview Charge Invoice: ', invoiceCollection.chargeInvoice)
+  console.log('Preview Credit Invoices: ', invoiceCollection.creditInvoices)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createPendingPurchase + (body, options) + + +

+ +

Create a pending purchase

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_pending_purchase

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + PurchaseCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {PurchaseCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<InvoiceCollection> + : + Returns the pending invoice + + + + + + + + +

Examples

+ + +
try {
+  const purchaseReq = {
+    currency: 'EUR',
+    account: {
+      code: accountCode,
+      email: 'example@recurly.com',
+      billingInfo: {
+        firstName: 'Benjamin',
+        lastName: 'Du Monde',
+        onlineBankingPaymentType: 'ideal'
+      },
+    },
+    lineItems: [
+      {
+        currency: 'EUR',
+        unitAmount: 1000,
+        type: 'charge'
+      }
+    ]
+  };
+  const invoiceCollection = await client.createPendingPurchase(purchaseReq)
+  console.log('Created ChargeInvoice with UUID: ', invoiceCollection.chargeInvoice.uuid)
+} catch (err) {
+  if (err instanceof recurly.errors.ValidationError) {
+    // If the request was not valid, you may want to tell your user
+    // why. You can find the invalid params and reasons in err.params
+    console.log('Failed validation', err.params)
+  } else {
+    // If we don't know what to do with the err, we should
+    // probably re-raise and let our web framework and logger handle it
+    console.log('Unknown Error: ', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createAuthorizePurchase + (body, options) + + +

+ +

Authorize a purchase

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_authorize_purchase

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + PurchaseCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {PurchaseCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<InvoiceCollection> + : + Returns the authorize invoice + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createCapturePurchase + (transactionId, options) + + +

+ +

Capture a purchase

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_capture_purchase

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
transactionId + string + + Transaction ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<InvoiceCollection> + : + Returns the captured invoice + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + cancelpurchase + (transactionId, options) + + +

+ +

Cancel Purchase

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/cancelPurchase

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
transactionId + string + + Transaction ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For UUID use prefix +uuid- +, e.g. +uuid-123457890 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<InvoiceCollection> + : + Returns the cancelled invoice + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getExportDates + (options) + + +

+ +

List the dates that have an available export to download.

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_export_dates

+ + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExportDates> + : + Returns a list of dates. + + + + + + + + +

Examples

+ + +
try {
+  const export_dates = await client.getExportDates()
+  export_dates.dates.forEach(date => {
+    console.log(`Exports are available for: ${date}`)
+  })
+} catch (err) {
+  if (err instanceof recurly.ApiError) {
+    console.log('Unexpected error', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getExportFiles + (exportDate, options) + + +

+ +

List of the export files that are available to download.

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_export_files

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
exportDate + string + + Date for which to get a list of available automated export files. Date must be in YYYY-MM-DD format. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExportFiles> + : + Returns a list of export files to download. + + + + + + + + +

Examples

+ + +
try {
+  const export_files = await client.getExportFiles(export_date)
+  export_files.files.forEach(file => {
+    console.log(`Export file download URL: ${file.href}`)
+  })
+} catch (err) {
+  if (err instanceof recurly.ApiError) {
+    console.log('Unexpected error', err)
+  }
+}
+ + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listDunningCampaigns + (options) + + +

+ +

List the dunning campaigns for a site

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_dunning_campaigns

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
+ + + + + + +

Returns

+ Pager<DunningCampaign> + : + A list of the the dunning_campaigns on an account. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getDunningCampaign + (dunningCampaignId, options) + + +

+ +

Fetch a dunning campaign

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_dunning_campaign

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
dunningCampaignId + string + + Dunning Campaign ID, e.g. +e28zov4fw0v2 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<DunningCampaign> + : + Settings for a dunning campaign. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + putDunningCampaignBulkUpdate + (dunningCampaignId, body, options) + + +

+ +

Assign a dunning campaign to multiple plans

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/put_dunning_campaign_bulk_update

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
dunningCampaignId + string + + Dunning Campaign ID, e.g. +e28zov4fw0v2 +. +
body + DunningCampaignsBulkUpdate + + The object representing the JSON request to send to the server. It should conform to the schema of {DunningCampaignsBulkUpdate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<DunningCampaignsBulkUpdateResponse> + : + A list of updated plans. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listInvoiceTemplates + (options) + + +

+ +

Show the invoice templates for a site

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_templates

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
+ + + + + + +

Returns

+ Pager<InvoiceTemplate> + : + A list of the the invoice templates on a site. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getInvoiceTemplate + (invoiceTemplateId, options) + + +

+ +

Fetch an invoice template

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_invoice_template

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
invoiceTemplateId + string + + Invoice template ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<InvoiceTemplate> + : + Settings for an invoice template. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listExternalInvoices + (options) + + +

+ +

List the external invoices on a site

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_external_invoices

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
+ + + + + + +

Returns

+ Pager<ExternalInvoice> + : + A list of the the external_invoices on a site. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + showExternalInvoice + (externalInvoiceId, options) + + +

+ +

Fetch an external invoice

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/show_external_invoice

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
externalInvoiceId + string + + External invoice ID, e.g. +e28zov4fw0v2 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalInvoice> + : + Returns the external invoice + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listExternalSubscriptionExternalPaymentPhases + (externalSubscriptionId, options) + + +

+ +

List the external payment phases on an external subscription

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscription_external_payment_phases

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
externalSubscriptionId + string + + External subscription id +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
+ + + + + + +

Returns

+ Pager<ExternalPaymentPhase> + : + A list of the the external_payment_phases on a site. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getExternalSubscriptionExternalPaymentPhase + (externalSubscriptionId, externalPaymentPhaseId, options) + + +

+ +

Fetch an external payment phase

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_external_subscription_external_payment_phase

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
externalSubscriptionId + string + + External subscription id +
externalPaymentPhaseId + string + + External payment phase ID, e.g. +a34ypb2ef9w1 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<ExternalPaymentPhase> + : + Details for an external payment phase. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listEntitlements + (accountId, options) + + +

+ +

List entitlements granted to an account

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_entitlements

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.state + string + + Filter the entitlements based on the state of the applicable subscription. +
    +
  • When state=active, state=canceled, state=expired, or state=future, subscriptions with states that match the query and only those subscriptions will be returned.
  • +
  • When no state is provided, subscriptions with active or canceled states will be returned.
  • +
+
+ + + + + + +

Returns

+ Pager<Entitlements> + : + A list of the entitlements granted to an account. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listAccountExternalSubscriptions + (accountId, options) + + +

+ +

List an account's external subscriptions

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_account_external_subscriptions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
accountId + string + + Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-bob +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
+ + + + + + +

Returns

+ Pager<ExternalSubscription> + : + A list of the the external_subscriptions on an account. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getBusinessEntity + (businessEntityId, options) + + +

+ +

Fetch a business entity

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_business_entity

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
businessEntityId + string + + Business Entity ID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-entity1 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<BusinessEntity> + : + Business entity details + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listBusinessEntities + (options) + + +

+ +

List business entities

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_business_entities

+ + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + any + + = {} +
+ + + + + + +

Returns

+ Pager<BusinessEntity> + : + List of all business entities on your site. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listGiftCards + (options) + + +

+ +

List gift cards

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_gift_cards

+ + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
options + any + + = {} +
+ + + + + + +

Returns

+ Pager<GiftCard> + : + List of all created gift cards on your site. + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + createGiftCard + (body, options) + + +

+ +

Create gift card

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/create_gift_card

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + GiftCardCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {GiftCardCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<GiftCard> + : + Returns the gift card + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + getGiftCard + (giftCardId, options) + + +

+ +

Fetch a gift card

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/get_gift_card

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
giftCardId + string + + Gift Card ID, e.g. +e28zov4fw0v2 +. +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<GiftCard> + : + Gift card details + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + previewGiftCard + (body, options) + + +

+ +

Preview gift card

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/preview_gift_card

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
body + GiftCardCreate + + The object representing the JSON request to send to the server. It should conform to the schema of {GiftCardCreate} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<GiftCard> + : + Returns the gift card + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + redeemGiftCard + (redemptionCode, body, options) + + +

+ +

Redeem gift card

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/redeem_gift_card

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
redemptionCode + string + + Gift Card redemption code, e.g., +N1A2T8IRXSCMO40V +. +
body + GiftCardRedeem + + The object representing the JSON request to send to the server. It should conform to the schema of {GiftCardRedeem} +
options + any + + = {} +
+ + + + + + +

Returns

+ Promise<GiftCard> + : + Redeems and returns the gift card + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + listBusinessEntityInvoices + (businessEntityId, options) + + +

+ +

List a business entity's invoices

+

API docs: https://developers.recurly.com/api/v2021-02-25#operation/list_business_entity_invoices

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
businessEntityId + string + + Business Entity ID. For ID no prefix is used e.g. +e28zov4fw0v2 +. For code use prefix +code- +, e.g. +code-entity1 +. +
options + Object + + = {} + Optional configurations for the request +
options.params + Object + + The optional url parameters for this request. +
options.params.ids + Array<string> + + Filter results by their IDs. Up to 200 IDs can be passed at once using +commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6 +. +

Important notes:

+
    +
  • The ids parameter cannot be used with any other ordering or filtering +parameters (limit, order, sort, begin_time, end_time, etc)
  • +
  • Invalid or unknown IDs will be ignored, so you should check that the +results correspond to your request.
  • +
  • Records are returned in an arbitrary order. Since results are all +returned at once you can sort the records yourself.
  • +
+
options.params.state + string + + Invoice state. +
options.params.limit + number + + Limit number of records 1-200. +
options.params.order + string + + Sort order. +
options.params.sort + string + + Sort field. You +really + only want to sort by +updated_at + in ascending +order. In descending order updated records will move behind the cursor and could +prevent some records from being returned. +
options.params.beginTime + Date + + Inclusively filter by begin_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.endTime + Date + + Inclusively filter by end_time when +sort=created_at + or +sort=updated_at +. + +Note: + this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. +
options.params.type + string + + Filter by type when: +
    +
  • type=charge, only charge invoices will be returned.
  • +
  • type=credit, only credit invoices will be returned.
  • +
  • type=non-legacy, only charge and credit invoices will be returned.
  • +
  • type=legacy, only legacy invoices will be returned.
  • +
+
+ + + + + + +

Returns

+ Pager<Invoice> + : + A list of the business entity's invoices. + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Response + () + + +

+ +

This class contains the metadata from the HTTP response +from Recurly.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
request + Request + + : The request responsible for this response. +
body + Object + + : The parsed JSON response body. +
statusCode + number + + : The HTTP status code. +
contentType + string + + : The HTTP content type. +
requestId + string + + : The unique id Recurly assigned to this request. Keep this for support. +
rateLimit + number + + : The max rate limit. +
rateLimitRemaining + number + + : The number of requests remaining until limit is reached. +
rateLimitReset + Date + + : The datetime in which the rate limiter will be reset. +
apiDeprecated + boolean + + : true if you are using a deprecated version of the API. +
apiSunsetDate + string + + : The date in which this version will be sunset. +
date + string + + : The date time from the server. +
proxyMetadata + Object + + : Metadata from the proxy (e.g. cloudflare). Can be useful for debugging. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Request + (method, path, body) + + +

+ +

This class contains the metadata from the HTTP request +sent to Recurly.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
method + string + + The HTTP method of the request. +
path + string + + The path of the request. +
body + Object + + = null + The JSON body of the request (optional). +
+ + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Pager + (client, path, options) + + +

+ +

The class responsible for pagination.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
client + Client + +
path + string + +
options + Object + +
+ + + + + + + + + + + + + +

Instance Members

+
+ +
+ +
+ + +
+ +

+ + + eachPage + () + + +

+ +

Returns an async iterator over each page of results.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + each + () + + +

+ +

Returns an async iterator over each resource in results.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + count + () + + +

+ +

Count the number of resources that match this Pager's filters

+ + + + + + + + + + + + + + + + +

Returns

+ Number + : + The count of resources + + + + + + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +

+ + + first + () + + +

+ +

Return only the first item. This is efficient because it tells +the server to only return 1 item. You can also use this method +to get the last resource by inverting the order parameter.

+ + + + + + + + + + + + + + + + +

Returns

+ Object + : + The first resource in the list + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + getResponse + () + + +

+ +

This allows you to inspect the underlying HTTP metadata which +created this resoource.

+ + + + + + + + + + + + + + + + +

Returns

+ Response + : + The underlying HTTP response. + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + getCompiledSchema + () + + +

+ +

Holds a cached copy of the compiled +Schema object for this Resource.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + cast + (v) + + +

+ +

Can cast a plain js Object to a Resource +of this class type

+ + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
v + Object + + The plain js Object to cast +
+ + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + Extends + + Resource + + + + +
+ +

+ + + Empty + () + + +

+ +

A special resource for an empty response

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Account + () + + +

+ +

Account

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
address + Address + +
billTo + string + + : An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay. +
billingInfo + BillingInfo + +
ccEmails + string + + : Additional email address that should receive account correspondence. These should be separated only by commas. These CC emails will receive all emails that the +email + field also receives. +
code + string + + : The unique identifier of the account. This cannot be changed once the account is created. +
company + string + +
createdAt + Date + + : When the account was created. +
customFields + Array<CustomField> + + : The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value. +
deletedAt + Date + + : If present, when the account was last marked inactive. +
dunningCampaignId + string + + : Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used. +
email + string + + : The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique. +
entityUseCode + string + + : The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive. +
exemptionCertificate + string + + : The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account. +
externalAccounts + Array<ExternalAccount> + + : The external accounts belonging to this account +
firstName + string + +
hasActiveSubscription + boolean + + : Indicates if the account has an active subscription. +
hasCanceledSubscription + boolean + + : Indicates if the account has a canceled subscription. +
hasFutureSubscription + boolean + + : Indicates if the account has a future subscription. +
hasLiveSubscription + boolean + + : Indicates if the account has a subscription that is either active, canceled, future, or paused. +
hasPastDueInvoice + boolean + + : Indicates if the account has a past due invoice. +
hasPausedSubscription + boolean + + : Indicates if the account has a paused subscription. +
hostedLoginToken + string + + : The unique token for automatically logging the account in to the hosted management pages. You may automatically log the user into their hosted management pages by directing the user to: +https://{subdomain}.recurly.com/account/{hosted_login_token} +. +
id + string + +
invoiceTemplateId + string + + : Unique ID to identify an invoice template. Available when the site is on a Pro or Elite plan. Used to specify if a non-default invoice template will be used to generate invoices for the account. For sites without multiple invoice templates enabled, the default template will always be used. +
lastName + string + +
object + string + + : Object type +
overrideBusinessEntityId + string + + : Unique ID to identify the business entity assigned to the account. Available when the +Multiple Business Entities + feature is enabled. +
parentAccountId + string + + : The UUID of the parent account associated with this account. +
preferredLocale + string + + : Used to determine the language and locale of emails sent on behalf of the merchant to the customer. +
preferredTimeZone + string + + : The +IANA time zone name + used to determine the time zone of emails sent on behalf of the merchant to the customer. +
shippingAddresses + Array<ShippingAddress> + + : The shipping addresses on the account. +
state + string + + : Accounts can be either active or inactive. +
taxExempt + boolean + + : The tax status of the account. +true + exempts tax on the account, +false + applies tax on the account. +
updatedAt + Date + + : When the account was last changed. +
username + string + + : A secondary value for the account. +
vatNumber + string + + : The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + AccountAcquisition + () + + +

+ +

AccountAcquisition

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
account + AccountMini + + : Account mini details +
campaign + string + + : An arbitrary identifier for the marketing campaign that led to the acquisition of this account. +
channel + string + + : The channel through which the account was acquired. +
cost + AccountAcquisitionCost + + : Account balance +
createdAt + Date + + : When the account acquisition data was created. +
id + string + +
object + string + + : Object type +
subchannel + string + + : An arbitrary subchannel string representing a distinction/subcategory within a broader channel. +
updatedAt + Date + + : When the account acquisition data was last changed. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + AccountAcquisitionCost + () + + +

+ +

AccountAcquisitionCost

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
amount + number + + : The amount of the corresponding currency used to acquire the account. +
currency + string + + : 3-letter ISO 4217 currency code. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + AccountBalance + () + + +

+ +

AccountBalance

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
account + AccountMini + + : Account mini details +
balances + Array<AccountBalanceAmount> + +
object + string + + : Object type +
pastDue + boolean + +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + AccountBalanceAmount + () + + +

+ +

AccountBalanceAmount

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
amount + number + + : Total amount the account is past due. +
availableCreditAmount + number + + : Total amount of the open balances on credit invoices for the account. +
currency + string + + : 3-letter ISO 4217 currency code. +
processingPrepaymentAmount + number + + : Total amount for the prepayment credit invoices in a +processing + state on the account. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + AccountMini + () + + +

+ +

AccountMini

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
billTo + string + +
code + string + + : The unique identifier of the account. +
company + string + +
dunningCampaignId + string + + : Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used. +
email + string + + : The email address used for communicating with this customer. +
firstName + string + +
id + string + +
lastName + string + +
object + string + + : Object type +
parentAccountId + string + +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + AccountNote + () + + +

+ +

AccountNote

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
accountId + string + +
createdAt + Date + +
id + string + +
message + string + +
object + string + + : Object type +
user + User + +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + AddOn + () + + +

+ +

AddOn

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
accountingCode + string + + : Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. +
addOnType + string + + : Whether the add-on type is fixed, or usage-based. +
avalaraServiceType + number + + : Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to +the documentation + for more available t/s types. +
avalaraTransactionType + number + + : Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to +the documentation + for more available t/s types. +
code + string + + : The unique identifier for the add-on within its plan. +
createdAt + Date + + : Created at +
currencies + Array<AddOnPricing> + + : Add-on pricing +
defaultQuantity + number + + : Default quantity for the hosted pages. +
deletedAt + Date + + : Deleted at +
displayQuantity + boolean + + : Determines if the quantity field is displayed on the hosted pages for the add-on. +
externalSku + string + + : Optional, stock keeping unit to link the item to other inventory systems. +
id + string + + : Add-on ID +
item + ItemMini + + : Just the important parts. +
liabilityGlAccountId + string + + : The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
measuredUnitId + string + + : System-generated unique identifier for an measured unit associated with the add-on. +
name + string + + : Describes your add-on and will appear in subscribers' invoices. +
object + string + + : Object type +
optional + boolean + + : Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API. +
percentageTiers + Array<PercentageTiersByCurrency> + + : This feature is currently in development and requires approval and enablement, please contact support. +
performanceObligationId + string + + : The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
planId + string + + : Plan ID +
revenueGlAccountId + string + + : The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
revenueScheduleType + string + + : When this add-on is invoiced, the line item will use this revenue schedule. If +item_code +/ +item_id + is part of the request then +revenue_schedule_type + must be absent in the request as the value will be set from the item. +
state + string + + : Add-ons can be either active or inactive. +
taxCode + string + + : Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of +unknown +, +physical +, or +digital + tax codes. If +item_code +/ +item_id + is part of the request then +tax_code + must be absent. +
tierType + string + + : The pricing model for the add-on. For more information, +click here +. See our +Guide + for an overview of how to configure quantity-based pricing models. +
tiers + Array<Tier> + + : Tiers +
updatedAt + Date + + : Last updated at +
usageCalculationType + string + + : The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used. +
usagePercentage + number + + : The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. +
usageTimeframe + string + + : The time at which usage totals are reset for billing purposes. +
usageType + string + + : Type of usage, returns usage type if +add_on_type + is +usage +. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + AddOnMini + () + + +

+ +

AddOnMini

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
accountingCode + string + + : Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. +
addOnType + string + + : Whether the add-on type is fixed, or usage-based. +
code + string + + : The unique identifier for the add-on within its plan. +
externalSku + string + + : Optional, stock keeping unit to link the item to other inventory systems. +
id + string + + : Add-on ID +
itemId + string + + : Item ID +
measuredUnitId + string + + : System-generated unique identifier for an measured unit associated with the add-on. +
name + string + + : Describes your add-on and will appear in subscribers' invoices. +
object + string + + : Object type +
usagePercentage + number + + : The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. +
usageType + string + + : Type of usage, returns usage type if +add_on_type + is +usage +. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + AddOnPricing + () + + +

+ +

AddOnPricing

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
currency + string + + : 3-letter ISO 4217 currency code. +
taxInclusive + boolean + + : This field is deprecated. Please do not use it. +
unitAmount + number + + : Allows up to 2 decimal places. Required unless +unit_amount_decimal + is provided. +
unitAmountDecimal + string + + : Allows up to 9 decimal places. Only supported when +add_on_type + = +usage +. If +unit_amount_decimal + is provided, +unit_amount + cannot be provided. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Address + () + + +

+ +

Address

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
city + string + + : City +
country + string + + : Country, 2-letter ISO 3166-1 alpha-2 code. +
geoCode + string + + : Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration +
phone + string + + : Phone number +
postalCode + string + + : Zip or postal code. +
region + string + + : State or province. +
street1 + string + + : Street 1 +
street2 + string + + : Street 2 +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + AddressWithName + () + + +

+ +

AddressWithName

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
city + string + + : City +
country + string + + : Country, 2-letter ISO 3166-1 alpha-2 code. +
firstName + string + + : First name +
geoCode + string + + : Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration +
lastName + string + + : Last name +
phone + string + + : Phone number +
postalCode + string + + : Zip or postal code. +
region + string + + : State or province. +
street1 + string + + : Street 1 +
street2 + string + + : Street 2 +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + BillingInfo + () + + +

+ +

BillingInfo

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
accountId + string + +
address + Address + +
backupPaymentMethod + boolean + + : The +backup_payment_method + field is used to indicate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. +
company + string + +
createdAt + Date + + : When the billing information was created. +
firstName + string + +
fraud + FraudInfo + + : Most recent fraud result. +
id + string + +
lastName + string + +
object + string + + : Object type +
paymentMethod + PaymentMethod + +
primaryPaymentMethod + boolean + + : The +primary_payment_method + field is used to indicate the primary billing info on the account. The first billing info created on an account will always become primary. This payment method will be used +
updatedAt + Date + + : When the billing information was last changed. +
updatedBy + BillingInfoUpdatedBy + +
valid + boolean + +
vatNumber + string + + : Customer's VAT number (to avoid having the VAT applied). This is only used for automatically collected invoices. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + BillingInfoUpdatedBy + () + + +

+ +

BillingInfoUpdatedBy

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
country + string + + : Country, 2-letter ISO 3166-1 alpha-2 code matching the origin IP address, if known by Recurly. +
ip + string + + : Customer's IP address when updating their billing information. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + BinaryFile + () + + +

+ +

BinaryFile

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
data + string + +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + BusinessEntity + () + + +

+ +

BusinessEntity

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
code + string + + : The entity code of the business entity. +
createdAt + Date + + : Created at +
defaultLiabilityGlAccountId + string + + : The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
defaultRegistrationNumber + string + + : Registration number for the customer used on the invoice. +
defaultRevenueGlAccountId + string + + : The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
defaultVatNumber + string + + : VAT number for the customer used on the invoice. +
destinationTaxAddressSource + string + + : The source of the address that will be used as the destinaion in determining taxes. Available only when the site is on an Elite plan. A value of "destination" refers to the "Customer tax address". A value of "origin" refers to the "Business entity tax address". +
id + string + + : Business entity ID +
invoiceDisplayAddress + Address + + : Address information for the business entity that will appear on the invoice. +
name + string + + : This name describes your business entity and will appear on the invoice. +
object + string + + : Object type +
originTaxAddressSource + string + + : The source of the address that will be used as the origin in determining taxes. Available only when the site is on an Elite plan. A value of "origin" refers to the "Business entity tax address". A value of "destination" refers to the "Customer tax address". +
subscriberLocationCountries + Array<string> + + : List of countries for which the business entity will be used. +
taxAddress + Address + + : Address information for the business entity that will be used for calculating taxes. +
updatedAt + Date + + : Last updated at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Coupon + () + + +

+ +

Coupon

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
appliesToAllItems + boolean + + : The coupon is valid for all items if true. If false then +items + will list the applicable items. +
appliesToAllPlans + boolean + + : The coupon is valid for all plans if true. If false then +plans + will list the applicable plans. +
appliesToNonPlanCharges + boolean + + : The coupon is valid for one-time, non-plan charges if true. +
code + string + + : The code the customer enters to redeem the coupon. +
couponType + string + + : Whether the coupon is "single_code" or "bulk". Bulk coupons will require a +unique_code_template + and will generate unique codes through the +/generate + endpoint. +
createdAt + Date + + : Created at +
discount + CouponDiscount + + : Details of the discount a coupon applies. Will contain a +type + property and one of the following properties: +percent +, +fixed +, +trial +. +
duration + string + + :
    +
  • "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the temporal_unit and temporal_amount attributes.
  • +
+
expiredAt + Date + + : The date and time the coupon was expired early or reached its +max_redemptions +. +
freeTrialAmount + number + + : Sets the duration of time the +free_trial_unit + is for. +
freeTrialUnit + string + + : Description of the unit of time the coupon is for. Used with +free_trial_amount + to determine the duration of time the coupon is for. +
hostedPageDescription + string + + : This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page. +
id + string + + : Coupon ID +
invoiceDescription + string + + : Description of the coupon on the invoice. +
items + Array<ItemMini> + + : A list of items for which this coupon applies. This will be +null + if +applies_to_all_items=true +. +
maxRedemptions + number + + : A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions. +
maxRedemptionsPerAccount + number + + : Redemptions per account is the number of times a specific account can redeem the coupon. Set redemptions per account to +1 + if you want to keep customers from gaming the system and getting more than one discount from the coupon campaign. +
name + string + + : The internal name for the coupon. +
object + string + + : Object type +
plans + Array<PlanMini> + + : A list of plans for which this coupon applies. This will be +null + if +applies_to_all_plans=true +. +
redeemBy + Date + + : The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time. +
redemptionResource + string + + : Whether the discount is for all eligible charges on the account, or only a specific subscription. +
state + string + + : Indicates if the coupon is redeemable, and if it is not, why. +
temporalAmount + number + + : If +duration + is "temporal" than +temporal_amount + is an integer which is multiplied by +temporal_unit + to define the duration that the coupon will be applied to invoices for. +
temporalUnit + string + + : If +duration + is "temporal" than +temporal_unit + is multiplied by +temporal_amount + to define the duration that the coupon will be applied to invoices for. +
uniqueCodeTemplate + string + + : On a bulk coupon, the template from which unique coupon codes are generated. +
uniqueCouponCode + Object + + : Will be populated when the Coupon being returned is a +UniqueCouponCode +. +
uniqueCouponCodesCount + number + + : When this number reaches +max_redemptions + the coupon will no longer be redeemable. +
updatedAt + Date + + : Last updated at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + CouponDiscount + () + + +

+ +

CouponDiscount

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
currencies + Array<CouponDiscountPricing> + + : This is only present when +type=fixed +. +
percent + number + + : This is only present when +type=percent +. +
trial + CouponDiscountTrial + + : This is only present when +type=free_trial +. +
type + string + +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + CouponDiscountPricing + () + + +

+ +

CouponDiscountPricing

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
amount + number + + : Value of the fixed discount that this coupon applies. +
currency + string + + : 3-letter ISO 4217 currency code. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + CouponDiscountTrial + () + + +

+ +

CouponDiscountTrial

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
length + number + + : Trial length measured in the units specified by the sibling +unit + property +
unit + string + + : Temporal unit of the free trial +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + CouponMini + () + + +

+ +

CouponMini

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
code + string + + : The code the customer enters to redeem the coupon. +
couponType + string + + : Whether the coupon is "single_code" or "bulk". Bulk coupons will require a +unique_code_template + and will generate unique codes through the +/generate + endpoint. +
discount + CouponDiscount + + : Details of the discount a coupon applies. Will contain a +type + property and one of the following properties: +percent +, +fixed +, +trial +. +
expiredAt + Date + + : The date and time the coupon was expired early or reached its +max_redemptions +. +
id + string + + : Coupon ID +
name + string + + : The internal name for the coupon. +
object + string + + : Object type +
state + string + + : Indicates if the coupon is redeemable, and if it is not, why. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + CouponRedemption + () + + +

+ +

CouponRedemption

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
account + AccountMini + + : The Account on which the coupon was applied. +
coupon + Coupon + +
createdAt + Date + + : Created at +
currency + string + + : 3-letter ISO 4217 currency code. +
discounted + number + + : The amount that was discounted upon the application of the coupon, formatted with the currency. +
id + string + + : Coupon Redemption ID +
object + string + + : Will always be +coupon +. +
removedAt + Date + + : The date and time the redemption was removed from the account (un-redeemed). +
state + string + + : Coupon Redemption state +
subscriptionId + string + + : Subscription ID +
updatedAt + Date + + : Last updated at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + CouponRedemptionMini + () + + +

+ +

CouponRedemptionMini

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
coupon + CouponMini + +
createdAt + Date + + : Created at +
discounted + number + + : The amount that was discounted upon the application of the coupon, formatted with the currency. +
id + string + + : Coupon Redemption ID +
object + string + + : Will always be +coupon +. +
state + string + + : Invoice state +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + CreditPayment + () + + +

+ +

CreditPayment

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
account + AccountMini + + : Account mini details +
action + string + + : The action for which the credit was created. +
amount + number + + : Total credit payment amount applied to the charge invoice. +
appliedToInvoice + InvoiceMini + + : Invoice mini details +
createdAt + Date + + : Created at +
currency + string + + : 3-letter ISO 4217 currency code. +
id + string + + : Credit Payment ID +
object + string + + : Object type +
originalCreditPaymentId + string + + : For credit payments with action +refund +, this is the credit payment that was refunded. +
originalInvoice + InvoiceMini + + : Invoice mini details +
refundTransaction + Transaction + +
updatedAt + Date + + : Last updated at +
uuid + string + + : The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. +
voidedAt + Date + + : Voided at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + CustomerPermission + () + + +

+ +

CustomerPermission

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
code + string + + : Customer permission code. +
description + string + + : Description of customer permission. +
id + string + + : Customer permission ID. +
name + string + + : Customer permission name. +
object + string + + : It will always be "customer_permission". +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + CustomField + () + + +

+ +

CustomField

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
name + string + + : Fields must be created in the UI before values can be assigned to them. +
value + string + + : Any values that resemble a credit card number or security code (CVV/CVC) will be rejected. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + CustomFieldDefinition + () + + +

+ +

CustomFieldDefinition

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
createdAt + Date + + : Created at +
deletedAt + Date + + : Definitions are initially soft deleted, and once all the values are removed from the accouts or subscriptions, will be hard deleted an no longer visible. +
displayName + string + + : Used to label the field when viewing and editing the field in Recurly's admin UI. +
id + string + + : Custom field definition ID +
name + string + + : Used by the API to identify the field or reading and writing. The name can only be used once per Recurly object type. +
object + string + + : Object type +
relatedType + string + + : Related Recurly object type +
tooltip + string + + : Displayed as a tooltip when editing the field in the Recurly admin UI. +
updatedAt + Date + + : Last updated at +
userAccess + string + + : The access control applied inside Recurly's admin UI: - +api_only + - No one will be able to view or edit this field's data via the admin UI. - +read_only + - Users with the Customers role will be able to view this field's data via the admin UI, but editing will only be available via the API. - +write + - Users with the Customers role will be able to view and edit this field's data via the admin UI. - +set_only + - Users with the Customers role will be able to set this field's data via the admin console. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + DunningCampaign + () + + +

+ +

DunningCampaign

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
code + string + + : Campaign code. +
createdAt + Date + + : When the current campaign was created in Recurly. +
defaultCampaign + boolean + + : Whether or not this is the default campaign for accounts or plans without an assigned dunning campaign. +
deletedAt + Date + + : When the current campaign was deleted in Recurly. +
description + string + + : Campaign description. +
dunningCycles + Array<DunningCycle> + + : Dunning Cycle settings. +
id + string + +
name + string + + : Campaign name. +
object + string + + : Object type +
updatedAt + Date + + : When the current campaign was updated in Recurly. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + DunningCampaignsBulkUpdateResponse + () + + +

+ +

DunningCampaignsBulkUpdateResponse

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
object + string + + : Object type +
plans + Array<Plan> + + : An array containing all of the +Plan + resources that have been updated. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + DunningCycle + () + + +

+ +

DunningCycle

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
appliesToManualTrial + boolean + + : Whether the dunning settings will be applied to manual trials. Only applies to trial cycles. +
createdAt + Date + + : When the current settings were created in Recurly. +
expireSubscription + boolean + + : Whether the subscription(s) should be cancelled at the end of the dunning cycle. +
failInvoice + boolean + + : Whether the invoice should be failed at the end of the dunning cycle. +
firstCommunicationInterval + number + + : The number of days after a transaction failure before the first dunning email is sent. +
intervals + Array<DunningInterval> + + : Dunning intervals. +
sendImmediatelyOnHardDecline + boolean + + : Whether or not to send an extra email immediately to customers whose initial payment attempt fails with either a hard decline or invalid billing info. +
totalDunningDays + number + + : The number of days between the first dunning email being sent and the end of the dunning cycle. +
totalRecyclingDays + number + + : The number of days between a transaction failure and the end of the dunning cycle. +
type + string + + : The type of invoice this cycle applies to. +
updatedAt + Date + + : When the current settings were updated in Recurly. +
version + number + + : Current campaign version. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + DunningInterval + () + + +

+ +

DunningInterval

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
days + number + + : Number of days before sending the next email. +
emailTemplate + string + + : Email template being used. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Entitlement + () + + +

+ +

Entitlement

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
createdAt + Date + + : Time object was created. +
customerPermission + CustomerPermission + +
grantedBy + Array<GrantedBy> + + : Subscription or item that granted the customer permission. +
object + string + + : Entitlement +
updatedAt + Date + + : Time the object was last updated +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Entitlements + () + + +

+ +

Entitlements

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
data + Array<Entitlement> + +
hasMore + boolean + + : Indicates there are more results on subsequent pages. +
next + string + + : Path to subsequent page of results. +
object + string + + : Object Type +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Error + () + + +

+ +

Error

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
message + string + + : Message +
params + Array<Object> + + : Parameter specific errors +
type + string + + : Type +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ErrorMayHaveTransaction + () + + +

+ +

ErrorMayHaveTransaction

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
message + string + + : Message +
params + Array<Object> + + : Parameter specific errors +
transactionError + TransactionError + + : This is only included on errors with +type=transaction +. +
type + string + + : Type +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ExportDates + () + + +

+ +

ExportDates

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
dates + Array<string> + + : An array of dates that have available exports. +
object + string + + : Object type +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ExportFile + () + + +

+ +

ExportFile

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
href + string + + : A presigned link to download the export file. +
md5sum + string + + : MD5 hash of the export file. +
name + string + + : Name of the export file. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ExportFiles + () + + +

+ +

ExportFiles

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
files + Array<ExportFile> + +
object + string + + : Object type +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ExternalAccount + () + + +

+ +

ExternalAccount

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
createdAt + Date + + : Created at +
externalAccountCode + string + + : Represents the account code for the external account. +
externalConnectionType + string + + : Represents the connection type. +AppleAppStore + or +GooglePlayStore +
id + string + + : UUID of the external_account . +
object + string + +
updatedAt + Date + + : Last updated at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ExternalCharge + () + + +

+ +

ExternalCharge

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
account + AccountMini + + : Account mini details +
createdAt + Date + + : When the external charge was created in Recurly. +
currency + string + + : 3-letter ISO 4217 currency code. +
description + string + +
externalProductReference + ExternalProductReferenceMini + + : External Product Reference details +
id + string + + : System-generated unique identifier for an external charge ID, e.g. +e28zov4fw0v2 +. +
object + string + + : Object type +
quantity + number + +
unitAmount + string + + : Unit Amount +
updatedAt + Date + + : When the external charge was updated in Recurly. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ExternalInvoice + () + + +

+ +

ExternalInvoice

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
account + AccountMini + + : Account mini details +
createdAt + Date + + : When the external invoice was created in Recurly. +
currency + string + + : 3-letter ISO 4217 currency code. +
externalId + string + + : An identifier which associates the external invoice to a corresponding object in an external platform. +
externalSubscription + ExternalSubscription + + : Subscription from an external resource such as Apple App Store or Google Play Store. +
id + string + + : System-generated unique identifier for an external invoice ID, e.g. +e28zov4fw0v2 +. +
lineItems + Array<ExternalCharge> + +
object + string + + : Object type +
purchasedAt + Date + + : When the invoice was created in the external platform. +
state + string + +
total + string + + : Total +
updatedAt + Date + + : When the external invoice was updated in Recurly. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ExternalPaymentPhase + () + + +

+ +

ExternalPaymentPhase

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
amount + string + + : Allows up to 9 decimal places +
createdAt + Date + + : When the external subscription was created in Recurly. +
currency + string + + : 3-letter ISO 4217 currency code. +
endingBillingPeriodIndex + number + + : Ending Billing Period Index +
endsAt + Date + + : Ends At +
id + string + + : System-generated unique identifier for an external payment phase ID, e.g. +e28zov4fw0v2 +. +
object + string + + : Object type +
offerName + string + + : Name of the discount offer given, e.g. "introductory" +
offerType + string + + : Type of discount offer given, e.g. "FREE_TRIAL" +
periodCount + number + + : Number of billing periods +
periodLength + string + + : Billing cycle length +
startedAt + Date + + : Started At +
startingBillingPeriodIndex + number + + : Starting Billing Period Index +
updatedAt + Date + + : When the external subscription was updated in Recurly. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ExternalProduct + () + + +

+ +

ExternalProduct

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
createdAt + Date + + : When the external product was created in Recurly. +
externalProductReferences + Array<ExternalProductReferenceMini> + + : List of external product references of the external product. +
id + string + + : System-generated unique identifier for an external product ID, e.g. +e28zov4fw0v2 +. +
name + string + + : Name to identify the external product in Recurly. +
object + string + + : Object type +
plan + PlanMini + + : Just the important parts. +
updatedAt + Date + + : When the external product was updated in Recurly. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ExternalProductReferenceCollection + () + + +

+ +

ExternalProductReferenceCollection

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
data + Array<ExternalProductReferenceMini> + +
hasMore + boolean + + : Indicates there are more results on subsequent pages. +
next + string + + : Path to subsequent page of results. +
object + string + + : Will always be List. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ExternalProductReferenceMini + () + + +

+ +

ExternalProductReferenceMini

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
createdAt + Date + + : When the external product was created in Recurly. +
externalConnectionType + string + + : Source connection platform. +
id + string + + : System-generated unique identifier for an external product ID, e.g. +e28zov4fw0v2 +. +
object + string + + : object +
referenceCode + string + + : A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store. +
updatedAt + Date + + : When the external product was updated in Recurly. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ExternalSubscription + () + + +

+ +

ExternalSubscription

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
account + AccountMini + + : Account mini details +
activatedAt + Date + + : When the external subscription was activated in the external platform. +
appIdentifier + string + + : Identifier of the app that generated the external subscription. +
autoRenew + boolean + + : An indication of whether or not the external subscription will auto-renew at the expiration date. +
canceledAt + Date + + : When the external subscription was canceled in the external platform. +
createdAt + Date + + : When the external subscription was created in Recurly. +
expiresAt + Date + + : When the external subscription expires in the external platform. +
externalId + string + + : The id of the subscription in the external systems., I.e. Apple App Store or Google Play Store. +
externalPaymentPhases + Array<ExternalPaymentPhase> + + : The phases of the external subscription payment lifecycle. +
externalProductReference + ExternalProductReferenceMini + + : External Product Reference details +
id + string + + : System-generated unique identifier for an external subscription ID, e.g. +e28zov4fw0v2 +. +
imported + boolean + + : An indication of whether or not the external subscription was created by a historical data import. +
inGracePeriod + boolean + + : An indication of whether or not the external subscription is in a grace period. +
lastPurchased + Date + + : When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade. +
object + string + + : Object type +
quantity + number + + : An indication of the quantity of a subscribed item's quantity. +
state + string + + : External subscriptions can be active, canceled, expired, past_due, voided, revoked, or paused. +
test + boolean + + : An indication of whether or not the external subscription was purchased in a sandbox environment. +
trialEndsAt + Date + + : When the external subscription trial period ends in the external platform. +
trialStartedAt + Date + + : When the external subscription trial period started in the external platform. +
updatedAt + Date + + : When the external subscription was updated in Recurly. +
uuid + string + + : Universally Unique Identifier created automatically. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + FraudInfo + () + + +

+ +

FraudInfo

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
decision + string + + : Kount decision +
riskRulesTriggered + Object + + : Kount rules +
score + number + + : Kount score +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + FraudRiskRule + () + + +

+ +

FraudRiskRule

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
code + string + + : The Kount rule number. +
message + string + + : Description of why the rule was triggered +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + GatewayAttributes + () + + +

+ +

GatewayAttributes

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
accountReference + string + + : Used by Adyen and Braintree gateways. For Adyen the Shopper Reference value used when the external token was created. For Braintree the PayPal PayerID is populated in the response. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + GeneralLedgerAccount + () + + +

+ +

GeneralLedgerAccount

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
accountType + string + +
code + string + + : Unique code to identify the ledger account. Each code must start with a letter or number. The following special characters are allowed: +-_.,: +
createdAt + Date + + : Created at +
description + string + + : Optional description. +
id + string + + : The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
object + string + + : Object type +
updatedAt + Date + + : Last updated at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + GiftCard + () + + +

+ +

GiftCard

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
balance + number + + : The remaining credit on the recipient account associated with this gift card. Only has a value once the gift card has been redeemed. Can be used to create gift card balance displays for your customers. +
canceledAt + Date + + : When the gift card was canceled. +
createdAt + Date + + : Created at +
currency + string + + : 3-letter ISO 4217 currency code. +
deliveredAt + Date + + : When the gift card was sent to the recipient by Recurly via email, if method was email and the "Gift Card Delivery" email template was enabled. This will be empty for post delivery or email delivery where the email template was disabled. +
delivery + GiftCardDelivery + + : The delivery details for the gift card. +
gifterAccountId + string + + : The ID of the account that purchased the gift card. +
id + string + + : Gift card ID +
liabilityGlAccountId + string + + : The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
object + string + + : Object type +
performanceObligationId + string + + : The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
productCode + string + + : The product code or SKU of the gift card product. +
purchaseInvoiceId + string + + : The ID of the invoice for the gift card purchase made by the gifter. +
recipientAccountId + string + + : The ID of the account that redeemed the gift card redemption code. Does not have a value until gift card is redeemed. +
redeemedAt + Date + + : When the gift card was redeemed by the recipient. +
redemptionCode + string + + : The unique redemption code for the gift card, generated by Recurly. Will be 16 characters, alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the recipient account to create a credit in the amount of the +unit_amount + on their account. +
redemptionInvoiceId + string + + : The ID of the invoice for the gift card redemption made by the recipient. Does not have a value until gift card is redeemed. +
revenueGlAccountId + string + + : The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
unitAmount + number + + : The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. +
updatedAt + Date + + : Last updated at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + GiftCardDelivery + () + + +

+ +

GiftCardDelivery

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
deliverAt + Date + + : When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. +
emailAddress + string + + : The email address of the recipient. +
firstName + string + + : The first name of the recipient. +
gifterName + string + + : The name of the gifter for the purpose of a message displayed to the recipient. +
lastName + string + + : The last name of the recipient. +
method + string + + : Whether the delivery method is email or postal service. +
personalMessage + string + + : The personal message from the gifter to the recipient. +
recipientAddress + Address + + : Address information for the recipient. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + GrantedBy + () + + +

+ +

GrantedBy

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
id + string + + : The ID of the subscription or external subscription that grants the permission to the account. +
object + string + + : Object Type +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Invoice + () + + +

+ +

Invoice

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
account + AccountMini + + : Account mini details +
address + InvoiceAddress + +
balance + number + + : The outstanding balance remaining on this invoice. +
billingInfoId + string + + : The +billing_info_id + is the value that represents a specific billing info for an end customer. When +billing_info_id + is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. +billing_info_id + can ONLY be used for sites utilizing the Wallet feature. +
businessEntityId + string + + : Unique ID to identify the business entity assigned to the invoice. Available when the +Multiple Business Entities + feature is enabled. +
closedAt + Date + + : Date invoice was marked paid or failed. +
collectionMethod + string + + : An automatic invoice means a corresponding transaction is run using the account's billing information at the same time the invoice is created. Manual invoices are created without a corresponding transaction. The merchant must enter a manual payment transaction or have the customer pay the invoice with an automatic method, like credit card, PayPal, Amazon, or ACH bank payment. +
createdAt + Date + + : Created at +
creditPayments + Array<CreditPayment> + + : Credit payments +
currency + string + + : 3-letter ISO 4217 currency code. +
customerNotes + string + + : This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes. +
discount + number + + : Total discounts applied to this invoice. +
dueAt + Date + + : Date invoice is due. This is the date the net terms are reached. +
dunningCampaignId + string + + : Unique ID to identify the dunning campaign used when dunning the invoice. For sites without multiple dunning campaigns enabled, this will always be the default dunning campaign. +
dunningEventsSent + number + + : Number of times the event was sent. +
finalDunningEvent + boolean + + : Last communication attempt. +
hasMoreLineItems + boolean + + : Identifies if the invoice has more line items than are returned in +line_items +. If +has_more_line_items + is +true +, then a request needs to be made to the +list_invoice_line_items + endpoint. +
id + string + + : Invoice ID +
lineItems + Array<LineItem> + + : Line Items +
netTerms + number + + : Integer paired with +Net Terms Type + and representing the number of days past the current date (for +net + Net Terms Type) or days after the last day of the current month (for +eom + Net Terms Type) that the invoice will become past due. For +manual + collection method, an additional 24 hours is added to ensure the customer has the entire last day to make payment before becoming past due. For example: If an invoice is due +net 0 +, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due +net 30 +, it will become past due at 31 days exactly. If an invoice is due +eom 30 +, it will become past due 31 days from the last day of the current month. For +automatic + collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and +net 30 + will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. When +eom + Net Terms Type is passed, the value for +Net Terms + is restricted to +0, 15, 30, 45, 60, or 90 +. For more information on how net terms work with +manual + collection visit our docs page ( +https://docs.recurly.com/docs/manual-payments#section-collection-terms +) or visit ( +https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms +) for information about net terms using +automatic + collection. +
netTermsType + string + + : Optionally supplied string that may be either +net + or +eom + (end-of-month). When +net +, an invoice becomes past due the specified number of +Net Terms + days from the current date. When +eom + an invoice becomes past due the specified number of +Net Terms + days from the last day of the current month. +
number + string + + : If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence. +
object + string + + : Object type +
origin + string + + : The event that created the invoice. +
paid + number + + : The total amount of successful payments transaction on this invoice. +
poNumber + string + + : For manual invoicing, this identifies the PO number associated with the subscription. +
previousInvoiceId + string + + : On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from. This field is only populated for sites without the +Only Bill What Changed + feature enabled. Sites with Only Bill What Changed enabled should use the +related_invoices endpoint + to see purchase invoices refunded by this invoice. +
refundableAmount + number + + : The refundable amount on a charge invoice. It will be null for all other invoices. +
shippingAddress + ShippingAddress + +
state + string + + : Invoice state +
subscriptionIds + Array<string> + + : If the invoice is charging or refunding for one or more subscriptions, these are their IDs. +
subtotal + number + + : The summation of charges and credits, before discounts and taxes. +
tax + number + + : The total tax on this invoice. +
taxInfo + TaxInfo + + : Only for merchants using Recurly's In-The-Box taxes. +
termsAndConditions + string + + : This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions. +
total + number + + : The final total on this invoice. The summation of invoice charges, discounts, credits, and tax. +
transactions + Array<Transaction> + + : Transactions +
type + string + + : Invoices are either charge, credit, or legacy invoices. +
updatedAt + Date + + : Last updated at +
usedTaxService + boolean + + : Will be +true + when the invoice had a successful response from the tax service and +false + when the invoice was not sent to tax service due to a lack of address or enabled jurisdiction or was processed without tax due to a non-blocking error returned from the tax service. +
uuid + string + + : Invoice UUID +
vatNumber + string + + : VAT registration number for the customer on this invoice. This will come from the VAT Number field in the Billing Info or the Account Info depending on your tax settings and the invoice collection method. +
vatReverseChargeNotes + string + + : VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own. This will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + InvoiceAddress + () + + +

+ +

InvoiceAddress

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
city + string + + : City +
company + string + + : Company +
country + string + + : Country, 2-letter ISO 3166-1 alpha-2 code. +
firstName + string + + : First name +
geoCode + string + + : Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration +
lastName + string + + : Last name +
nameOnAccount + string + + : Name on account +
phone + string + + : Phone number +
postalCode + string + + : Zip or postal code. +
region + string + + : State or province. +
street1 + string + + : Street 1 +
street2 + string + + : Street 2 +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + InvoiceCollection + () + + +

+ +

InvoiceCollection

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
chargeInvoice + Invoice + +
creditInvoices + Array<Invoice> + + : Credit invoices +
object + string + + : Object type +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + InvoiceMini + () + + +

+ +

InvoiceMini

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
businessEntityId + string + + : Unique ID to identify the business entity assigned to the invoice. Available when the +Multiple Business Entities + feature is enabled. +
id + string + + : Invoice ID +
number + string + + : Invoice number +
object + string + + : Object type +
state + string + + : Invoice state +
type + string + + : Invoice type +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + InvoiceTemplate + () + + +

+ +

InvoiceTemplate

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
code + string + + : Invoice template code. +
createdAt + Date + + : When the invoice template was created in Recurly. +
description + string + + : Invoice template description. +
id + string + +
name + string + + : Invoice template name. +
updatedAt + Date + + : When the invoice template was updated in Recurly. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Item + () + + +

+ +

Item

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
accountingCode + string + + : Accounting code for invoice line items. +
avalaraServiceType + number + + : Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to +the documentation + for more available t/s types. +
avalaraTransactionType + number + + : Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to +the documentation + for more available t/s types. +
code + string + + : Unique code to identify the item. +
createdAt + Date + + : Created at +
currencies + Array<Pricing> + + : Item Pricing +
customFields + Array<CustomField> + + : The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value. +
deletedAt + Date + + : Deleted at +
description + string + + : Optional, description. +
externalSku + string + + : Optional, stock keeping unit to link the item to other inventory systems. +
id + string + + : Item ID +
liabilityGlAccountId + string + + : The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
name + string + + : This name describes your item and will appear on the invoice when it's purchased on a one time basis. +
object + string + + : Object type +
performanceObligationId + string + + : The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
revenueGlAccountId + string + + : The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
revenueScheduleType + string + + : Revenue schedule type +
state + string + + : The current state of the item. +
taxCode + string + + : Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of +unknown +, +physical +, or +digital + tax codes. +
taxExempt + boolean + + : true + exempts tax on the item, +false + applies tax on the item. +
updatedAt + Date + + : Last updated at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ItemMini + () + + +

+ +

ItemMini

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
code + string + + : Unique code to identify the item. +
description + string + + : Optional, description. +
id + string + + : Item ID +
name + string + + : This name describes your item and will appear on the invoice when it's purchased on a one time basis. +
object + string + + : Object type +
state + string + + : The current state of the item. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + LineItem + () + + +

+ +

LineItem

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
account + AccountMini + + : Account mini details +
accountingCode + string + + : Internal accounting code to help you reconcile your revenue to the correct ledger. Line items created as part of a subscription invoice will use the plan or add-on's accounting code, otherwise the value will only be present if you define an accounting code when creating the line item. +
addOnCode + string + + : If the line item is a charge or credit for an add-on, this is its code. +
addOnId + string + + : If the line item is a charge or credit for an add-on this is its ID. +
amount + number + + : (quantity * unit_amount) - (discount + tax) +
avalaraServiceType + number + + : Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to +the documentation + for more available t/s types. +
avalaraTransactionType + number + + : Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to +the documentation + for more available t/s types. +
billForAccountId + string + + : The UUID of the account responsible for originating the line item. +
createdAt + Date + + : When the line item was created. +
creditApplied + number + + : The amount of credit from this line item that was applied to the invoice. +
creditReasonCode + string + + : The reason the credit was given when line item is +type=credit +. +
currency + string + + : 3-letter ISO 4217 currency code. +
customFields + Array<CustomField> + + : The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value. +
description + string + + : Description that appears on the invoice. For subscription related items this will be filled in automatically. +
destinationTaxAddressSource + string + + : The source of the address that will be used as the destinaion in determining taxes. Available only when the site is on an Elite plan. A value of "destination" refers to the "Customer tax address". A value of "origin" refers to the "Business entity tax address". +
discount + number + + : The discount applied to the line item. +
endDate + Date + + : If this date is provided, it indicates the end of a time range. +
externalSku + string + + : Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled. +
id + string + + : Line item ID +
invoiceId + string + + : Once the line item has been invoiced this will be the invoice's ID. +
invoiceNumber + string + + : Once the line item has been invoiced this will be the invoice's number. If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence. +
itemCode + string + + : Unique code to identify an item. Available when the Credit Invoices feature is enabled. +
itemId + string + + : System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled. +
legacyCategory + string + + : Category to describe the role of a line item on a legacy invoice: - "charges" refers to charges being billed for on this invoice. - "credits" refers to refund or proration credits. This portion of the invoice can be considered a credit memo. - "applied_credits" refers to previous credits applied to this invoice. See their original_line_item_id to determine where the credit first originated. - "carryforwards" can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account. +
liabilityGlAccountCode + string + + : Unique code to identify the ledger account. Each code must start with a letter or number. The following special characters are allowed: +-_.,: +
object + string + + : Object type +
origin + string + + : A credit created from an original charge will have the value of the charge's origin. +
originTaxAddressSource + string + + : The source of the address that will be used as the origin in determining taxes. Available only when the site is on an Elite plan. A value of "origin" refers to the "Business entity tax address". A value of "destination" refers to the "Customer tax address". +
originalLineItemInvoiceId + string + + : The invoice where the credit originated. Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund. +
performanceObligationId + string + + : The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
planCode + string + + : If the line item is a charge or credit for a plan or add-on, this is the plan's code. +
planId + string + + : If the line item is a charge or credit for a plan or add-on, this is the plan's ID. +
previousLineItemId + string + + : Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund. +
productCode + string + + : For plan-related line items this will be the plan's code, for add-on related line items it will be the add-on's code. For item-related line items it will be the item's +external_sku +. +
prorationRate + number + + : When a line item has been prorated, this is the rate of the proration. Proration rates were made available for line items created after March 30, 2017. For line items created prior to that date, the proration rate will be +null +, even if the line item was prorated. +
quantity + number + + : This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes. +
quantityDecimal + string + + : A floating-point alternative to Quantity. If this value is present, it will be used in place of Quantity for calculations, and Quantity will be the rounded integer value of this number. This field supports up to 9 decimal places. The Decimal Quantity feature must be enabled to utilize this field. +
refund + boolean + + : Refund? +
refundedQuantity + number + + : For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds). +
refundedQuantityDecimal + string + + : A floating-point alternative to Refunded Quantity. For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds). The Decimal Quantity feature must be enabled to utilize this field. +
revenueGlAccountCode + string + + : Unique code to identify the ledger account. Each code must start with a letter or number. The following special characters are allowed: +-_.,: +
revenueScheduleType + string + + : Revenue schedule type +
shippingAddress + ShippingAddress + +
startDate + Date + + : If an end date is present, this is value indicates the beginning of a billing time range. If no end date is present it indicates billing for a specific date. +
state + string + + : Pending line items are charges or credits on an account that have not been applied to an invoice yet. Invoiced line items will always have an +invoice_id + value. +
subscriptionId + string + + : If the line item is a charge or credit for a subscription, this is its ID. +
subtotal + number + + : quantity * unit_amount +
tax + number + + : The tax amount for the line item. +
taxCode + string + + : Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of +unknown +, +physical +, or +digital + tax codes. +
taxExempt + boolean + + : true + exempts tax on charges, +false + applies tax on charges. If not defined, then defaults to the Plan and Site settings. This attribute does not work for credits (negative line items). Credits are always applied post-tax. Pre-tax discounts should use the Coupons feature. +
taxInclusive + boolean + + : Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to utilize this flag. +
taxInfo + TaxInfo + + : Only for merchants using Recurly's In-The-Box taxes. +
taxable + boolean + + : true + if the line item is taxable, +false + if it is not. +
type + string + + : Charges are positive line items that debit the account. Credits are negative line items that credit the account. +
unitAmount + number + + : Positive amount for a charge, negative amount for a credit. +
unitAmountDecimal + string + + : Positive amount for a charge, negative amount for a credit. +
updatedAt + Date + + : When the line item was last changed. +
uuid + string + + : The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + MeasuredUnit + () + + +

+ +

MeasuredUnit

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
createdAt + Date + + : Created at +
deletedAt + Date + + : Deleted at +
description + string + + : Optional internal description. +
displayName + string + + : Display name for the measured unit. Can only contain spaces, underscores and must be alphanumeric. +
id + string + + : Item ID +
name + string + + : Unique internal name of the measured unit on your site. +
object + string + + : Object type +
state + string + + : The current state of the measured unit. +
updatedAt + Date + + : Last updated at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + PaymentMethod + () + + +

+ +

PaymentMethod

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
accountType + string + + : The bank account type. Only present for ACH payment methods. +
billingAgreementId + string + + : Billing Agreement identifier. Only present for Amazon or Paypal payment methods. +
cardNetworkPreference + string + + : Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network. +
cardType + string + + : Visa, MasterCard, American Express, Discover, JCB, etc. +
ccBinCountry + string + + : The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled. +
expMonth + number + + : Expiration month. +
expYear + number + + : Expiration year. +
firstSix + string + + : Credit card number's first six digits. +
gatewayAttributes + GatewayAttributes + + : Gateway specific attributes associated with this PaymentMethod +
gatewayCode + string + + : An identifier for a specific payment gateway. +
gatewayToken + string + + : A token used in place of a credit card in order to perform transactions. +
lastFour + string + + : Credit card number's last four digits. Will refer to bank account if payment method is ACH. +
lastTwo + string + + : The IBAN bank account's last two digits. +
nameOnAccount + string + + : The name associated with the bank account. +
object + string + +
routingNumber + string + + : The bank account's routing number. Only present for ACH payment methods. +
routingNumberBank + string + + : The bank name of this routing number. +
username + string + + : Username of the associated payment method. Currently only associated with Venmo. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + PercentageTier + () + + +

+ +

PercentageTier

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
endingAmount + number + + : Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier. +
usagePercentage + string + + : The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + PercentageTiersByCurrency + () + + +

+ +

PercentageTiersByCurrency

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
currency + string + + : 3-letter ISO 4217 currency code. +
tiers + Array<PercentageTier> + + : Tiers +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + PerformanceObligation + () + + +

+ +

PerformanceObligation

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
createdAt + Date + + : Created At +
id + string + + : The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
name + string + + : Performance Obligation Name +
updatedAt + Date + + : Last updated at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Plan + () + + +

+ +

Plan

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
accountingCode + string + + : Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code. +
allowAnyItemOnSubscriptions + boolean + + : Used to determine whether items can be assigned as add-ons to individual subscriptions. If +true +, items can be assigned as add-ons to individual subscription add-ons. If +false +, only plan add-ons can be used. +
autoRenew + boolean + + : Subscriptions will automatically inherit this value once they are active. If +auto_renew + is +true +, then a subscription will automatically renew its term at renewal. If +auto_renew + is +false +, then a subscription will expire at the end of its term. +auto_renew + can be overridden on the subscription record itself. +
avalaraServiceType + number + + : Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to +the documentation + for more available t/s types. +
avalaraTransactionType + number + + : Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to +the documentation + for more available t/s types. +
code + string + + : Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports. +
createdAt + Date + + : Created at +
currencies + Array<PlanPricing> + + : Pricing +
customFields + Array<CustomField> + + : The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value. +
deletedAt + Date + + : Deleted at +
description + string + + : Optional description, not displayed. +
dunningCampaignId + string + + : Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used. +
hostedPages + PlanHostedPages + + : Hosted pages settings +
id + string + + : Plan ID +
intervalLength + number + + : Length of the plan's billing interval in +interval_unit +. +
intervalUnit + string + + : Unit for the plan's billing interval. +
name + string + + : This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice. +
object + string + + : Object type +
pricingModel + string + + : A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease. +
rampIntervals + Array<PlanRampInterval> + + : Ramp Intervals +
revenueScheduleType + string + + : Revenue schedule type +
setupFeeAccountingCode + string + + : Accounting code for invoice line items for the plan's setup fee. If no value is provided, it defaults to plan's accounting code. +
setupFeeRevenueScheduleType + string + + : Setup fee revenue schedule type +
state + string + + : The current state of the plan. +
taxCode + string + + : Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of +unknown +, +physical +, or +digital + tax codes. +
taxExempt + boolean + + : true + exempts tax on the plan, +false + applies tax on the plan. +
totalBillingCycles + number + + : Automatically terminate subscriptions after a defined number of billing cycles. Number of billing cycles before the plan automatically stops renewing, defaults to +null + for continuous, automatic renewal. +
trialLength + number + + : Length of plan's trial period in +trial_units +. +0 + means +no trial +. +
trialRequiresBillingInfo + boolean + + : Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee. +
trialUnit + string + + : Units for the plan's trial period. +
updatedAt + Date + + : Last updated at +
vertexTransactionType + string + + : Used by Vertex for tax calculations. Possible values are +sale +, +rental +, +lease +. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + PlanHostedPages + () + + +

+ +

PlanHostedPages

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
bypassConfirmation + boolean + + : If +true +, the customer will be sent directly to your +success_url + after a successful signup, bypassing Recurly's hosted confirmation page. +
cancelUrl + string + + : URL to redirect to on canceled signup on the hosted payment pages. +
displayQuantity + boolean + + : Determines if the quantity field is displayed on the hosted pages for the plan. +
successUrl + string + + : URL to redirect to after signup on the hosted payment pages. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + PlanMini + () + + +

+ +

PlanMini

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
code + string + + : Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports. +
id + string + + : Plan ID +
name + string + + : This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice. +
object + string + + : Object type +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + PlanPricing + () + + +

+ +

PlanPricing

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
currency + string + + : 3-letter ISO 4217 currency code. +
setupFee + number + + : Amount of one-time setup fee automatically charged at the beginning of a subscription billing cycle. For subscription plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not increase with the quantity of a subscription plan. +
taxInclusive + boolean + + : This field is deprecated. Please do not use it. +
unitAmount + number + + : This field should not be sent when the pricing model is 'ramp'. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + PlanRampInterval + () + + +

+ +

PlanRampInterval

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
currencies + Array<PlanRampPricing> + + : Represents the price for the ramp interval. +
startingBillingCycle + number + + : Represents the billing cycle where a ramp interval starts. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + PlanRampPricing + () + + +

+ +

PlanRampPricing

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
currency + string + + : 3-letter ISO 4217 currency code. +
unitAmount + number + + : Represents the price for the Ramp Interval. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Pricing + () + + +

+ +

Pricing

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
currency + string + + : 3-letter ISO 4217 currency code. +
taxInclusive + boolean + + : This field is deprecated. Please do not use it. +
unitAmount + number + + : Unit price +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Settings + () + + +

+ +

Settings

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
acceptedCurrencies + Array<string> + +
billingAddressRequirement + string + + :
    +
  • full: Full Address (Street, City, State, Postal Code and Country) - streetzip: Street and Postal Code only - zip: Postal Code only - none: No Address
  • +
+
defaultCurrency + string + + : The default 3-letter ISO 4217 currency code. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ShippingAddress + () + + +

+ +

ShippingAddress

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
accountId + string + + : Account ID +
city + string + +
company + string + +
country + string + + : Country, 2-letter ISO 3166-1 alpha-2 code. +
createdAt + Date + + : Created at +
email + string + +
firstName + string + +
geoCode + string + + : Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration +
id + string + + : Shipping Address ID +
lastName + string + +
nickname + string + +
object + string + + : Object type +
phone + string + +
postalCode + string + + : Zip or postal code. +
region + string + + : State or province. +
street1 + string + +
street2 + string + +
updatedAt + Date + + : Updated at +
vatNumber + string + +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ShippingMethod + () + + +

+ +

ShippingMethod

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
accountingCode + string + + : Accounting code for shipping method. +
code + string + + : The internal name used identify the shipping method. +
createdAt + Date + + : Created at +
deletedAt + Date + + : Deleted at +
id + string + + : Shipping Method ID +
liabilityGlAccountId + string + + : The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
name + string + + : The name of the shipping method displayed to customers. +
object + string + + : Object type +
performanceObligationId + string + + : The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
revenueGlAccountId + string + + : The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. +
taxCode + string + + : Used by Avalara, Vertex, and Recurly’s built-in tax feature. The tax code values are specific to each tax system. If you are using Recurly’s built-in taxes the values are: - +FR + – Common Carrier FOB Destination - +FR022000 + – Common Carrier FOB Origin - +FR020400 + – Non Common Carrier FOB Destination - +FR020500 + – Non Common Carrier FOB Origin - +FR010100 + – Delivery by Company Vehicle Before Passage of Title - +FR010200 + – Delivery by Company Vehicle After Passage of Title - +NT + – Non-Taxable +
updatedAt + Date + + : Last updated at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ShippingMethodMini + () + + +

+ +

ShippingMethodMini

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
code + string + + : The internal name used identify the shipping method. +
id + string + + : Shipping Method ID +
name + string + + : The name of the shipping method displayed to customers. +
object + string + + : Object type +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Site + () + + +

+ +

Site

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
address + Address + +
createdAt + Date + + : Created at +
deletedAt + Date + + : Deleted at +
features + Array<string> + + : A list of features enabled for the site. +
id + string + + : Site ID +
mode + string + + : Mode +
object + string + + : Object type +
publicApiKey + string + + : This value is used to configure RecurlyJS to submit tokenized billing information. +
settings + Settings + +
subdomain + string + +
updatedAt + Date + + : Updated at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Subscription + () + + +

+ +

Subscription

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
account + AccountMini + + : Account mini details +
actionResult + Object + + : Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort. +
activatedAt + Date + + : Activated at +
activeInvoiceId + string + + : The invoice ID of the latest invoice created for an active subscription. +
addOns + Array<SubscriptionAddOn> + + : Add-ons +
addOnsTotal + number + + : Total price of add-ons +
autoRenew + boolean + + : Whether the subscription renews at the end of its term. +
bankAccountAuthorizedAt + Date + + : Recurring subscriptions paid with ACH will have this attribute set. This timestamp is used for alerting customers to reauthorize in 3 years in accordance with NACHA rules. If a subscription becomes inactive or the billing info is no longer a bank account, this timestamp is cleared. +
billingInfoId + string + + : Billing Info ID. +
canceledAt + Date + + : Canceled at +
collectionMethod + string + + : Collection method +
convertedAt + Date + + : When the subscription was converted from a gift card. +
couponRedemptions + Array<CouponRedemptionMini> + + : Returns subscription level coupon redemptions that are tied to this subscription. +
createdAt + Date + + : Created at +
currency + string + + : 3-letter ISO 4217 currency code. +
currentPeriodEndsAt + Date + + : Current billing period ends at +
currentPeriodStartedAt + Date + + : Current billing period started at +
currentTermEndsAt + Date + + : When the term ends. This is calculated by a plan's interval and +total_billing_cycles + in a term. Subscription changes with a +timeframe=renewal + will be applied on this date. +
currentTermStartedAt + Date + + : The start date of the term when the first billing period starts. The subscription term is the length of time that a customer will be committed to a subscription. A term can span multiple billing periods. +
customFields + Array<CustomField> + + : The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value. +
customerNotes + string + + : Customer notes +
expirationReason + string + + : Expiration reason +
expiresAt + Date + + : Expires at +
gatewayCode + string + + : If present, this subscription's transactions will use the payment gateway with this code. +
id + string + + : Subscription ID +
netTerms + number + + : Integer paired with +Net Terms Type + and representing the number of days past the current date (for +net + Net Terms Type) or days after the last day of the current month (for +eom + Net Terms Type) that the invoice will become past due. For +manual + collection method, an additional 24 hours is added to ensure the customer has the entire last day to make payment before becoming past due. For example: If an invoice is due +net 0 +, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due +net 30 +, it will become past due at 31 days exactly. If an invoice is due +eom 30 +, it will become past due 31 days from the last day of the current month. For +automatic + collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and +net 30 + will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. When +eom + Net Terms Type is passed, the value for +Net Terms + is restricted to +0, 15, 30, 45, 60, or 90 +. For more information on how net terms work with +manual + collection visit our docs page ( +https://docs.recurly.com/docs/manual-payments#section-collection-terms +) or visit ( +https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms +) for information about net terms using +automatic + collection. +
netTermsType + string + + : Optionally supplied string that may be either +net + or +eom + (end-of-month). When +net +, an invoice becomes past due the specified number of +Net Terms + days from the current date. When +eom + an invoice becomes past due the specified number of +Net Terms + days from the last day of the current month. +
object + string + + : Object type +
pausedAt + Date + + : Null unless subscription is paused or will pause at the end of the current billing period. +
pendingChange + SubscriptionChange + + : Subscription Change +
plan + PlanMini + + : Just the important parts. +
poNumber + string + + : For manual invoicing, this identifies the PO number associated with the subscription. +
quantity + number + + : Subscription quantity +
rampIntervals + Array<SubscriptionRampIntervalResponse> + + : The ramp intervals representing the pricing schedule for the subscription. +
remainingBillingCycles + number + + : The remaining billing cycles in the current term. +
remainingPauseCycles + number + + : Null unless subscription is paused or will pause at the end of the current billing period. +
renewalBillingCycles + number + + : If +auto_renew=true +, when a term completes, +total_billing_cycles + takes this value as the length of subsequent terms. Defaults to the plan's +total_billing_cycles +. +
revenueScheduleType + string + + : Revenue schedule type +
shipping + SubscriptionShipping + + : Subscription shipping details +
startedWithGift + boolean + + : Whether the subscription was started with a gift certificate. +
state + string + + : State +
subtotal + number + + : Estimated total, before tax. +
tax + number + + : Only for merchants using Recurly's In-The-Box taxes. +
taxInclusive + boolean + + : Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to utilize this flag. +
taxInfo + TaxInfo + + : Only for merchants using Recurly's In-The-Box taxes. +
termsAndConditions + string + + : Terms and conditions +
total + number + + : Estimated total +
totalBillingCycles + number + + : The number of cycles/billing periods in a term. When +remaining_billing_cycles=0 +, if +auto_renew=true + the subscription will renew and a new term will begin, otherwise the subscription will expire. +
trialEndsAt + Date + + : Trial period ends at +
trialStartedAt + Date + + : Trial period started at +
unitAmount + number + + : Subscription unit price +
updatedAt + Date + + : Last updated at +
uuid + string + + : The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + SubscriptionAddOn + () + + +

+ +

SubscriptionAddOn

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
addOn + AddOnMini + + : Just the important parts. +
addOnSource + string + + : Used to determine where the associated add-on data is pulled from. If this value is set to +plan_add_on + or left blank, then add-on data will be pulled from the plan's add-ons. If the associated +plan + has +allow_any_item_on_subscriptions + set to +true + and this field is set to +item +, then the associated add-on data will be pulled from the site's item catalog. +
createdAt + Date + + : Created at +
expiredAt + Date + + : Expired at +
id + string + + : Subscription Add-on ID +
object + string + + : Object type +
percentageTiers + Array<SubscriptionAddOnPercentageTier> + + : If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage. There must be one tier without an +ending_amount + value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support. +
quantity + number + + : Add-on quantity +
revenueScheduleType + string + + : Revenue schedule type +
subscriptionId + string + + : Subscription ID +
tierType + string + + : The pricing model for the add-on. For more information, +click here +. See our +Guide + for an overview of how to configure quantity-based pricing models. +
tiers + Array<SubscriptionAddOnTier> + + : If tiers are provided in the request, all existing tiers on the Subscription Add-on will be removed and replaced by the tiers in the request. If add_on.tier_type is tiered or volume and add_on.usage_type is percentage use percentage_tiers instead. There must be one tier without an +ending_quantity + value which represents the final tier. +
unitAmount + number + + : Supports up to 2 decimal places. +
unitAmountDecimal + string + + : Supports up to 9 decimal places. +
updatedAt + Date + + : Updated at +
usageCalculationType + string + + : The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used. +
usagePercentage + number + + : The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if add_on_type is usage and usage_type is percentage. +
usageTimeframe + string + + : The time at which usage totals are reset for billing purposes. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + SubscriptionAddOnPercentageTier + () + + +

+ +

SubscriptionAddOnPercentageTier

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
endingAmount + number + + : Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier. +
usagePercentage + string + + : The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + SubscriptionAddOnTier + () + + +

+ +

SubscriptionAddOnTier

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
endingQuantity + number + + : Ending quantity for the tier. This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier. +
unitAmount + number + + : Allows up to 2 decimal places. Optionally, override the tiers' default unit amount. If add-on's +add_on_type + is +usage + and +usage_type + is +percentage +, cannot be provided. +
unitAmountDecimal + string + + : Allows up to 9 decimal places. Optionally, override tiers' default unit amount. If +unit_amount_decimal + is provided, +unit_amount + cannot be provided. If add-on's +add_on_type + is +usage + and +usage_type + is +percentage +, cannot be provided. +
usagePercentage + string + + : (deprecated) -- Use the percentage_tiers object instead. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + SubscriptionChange + () + + +

+ +

SubscriptionChange

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
activateAt + Date + + : Activated at +
activated + boolean + + : Returns +true + if the subscription change is activated. +
addOns + Array<SubscriptionAddOn> + + : These add-ons will be used when the subscription renews. +
billingInfo + SubscriptionChangeBillingInfo + + : Accept nested attributes for three_d_secure_action_result_token_id +
createdAt + Date + + : Created at +
customFields + Array<CustomField> + + : The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value. +
deletedAt + Date + + : Deleted at +
id + string + + : The ID of the Subscription Change. +
invoiceCollection + InvoiceCollection + + : Invoice Collection +
object + string + + : Object type +
plan + PlanMini + + : Just the important parts. +
quantity + number + + : Subscription quantity +
rampIntervals + Array<SubscriptionRampIntervalResponse> + + : The ramp intervals representing the pricing schedule for the subscription. +
revenueScheduleType + string + + : Revenue schedule type +
shipping + SubscriptionShipping + + : Subscription shipping details +
subscriptionId + string + + : The ID of the subscription that is going to be changed. +
taxInclusive + boolean + + : This field is deprecated. Please do not use it. +
unitAmount + number + + : Unit amount +
updatedAt + Date + + : Updated at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + SubscriptionChangeBillingInfo + () + + +

+ +

SubscriptionChangeBillingInfo

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
threeDSecureActionResultTokenId + string + + : A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + SubscriptionRampIntervalResponse + () + + +

+ +

SubscriptionRampIntervalResponse

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
endingOn + Date + + : Date the ramp interval ends +
remainingBillingCycles + number + + : Represents how many billing cycles are left in a ramp interval. +
startingBillingCycle + number + + : Represents the billing cycle where a ramp interval starts. +
startingOn + Date + + : Date the ramp interval starts +
unitAmount + number + + : Represents the price for the ramp interval. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + SubscriptionShipping + () + + +

+ +

SubscriptionShipping

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
address + ShippingAddress + +
amount + number + + : Subscription's shipping cost +
method + ShippingMethodMini + +
object + string + + : Object type +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + TaxDetail + () + + +

+ +

TaxDetail

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
billable + boolean + + : Whether or not the line item is taxable. Only populated for a single LineItem fetch when Avalara for Communications is enabled. +
level + string + + : Provides the jurisdiction level for the Communications tax applied. Example values include city, state and federal. Present only when Avalara for Communications is enabled. +
name + string + + : Provides the name of the Communications tax applied. Present only when Avalara for Communications is enabled. +
rate + number + + : Provides the tax rate for the region. +
region + string + + : Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code. Not present when Avalara for Communications is enabled. +
tax + number + + : The total tax applied for this tax type. +
type + string + + : Provides the tax type for the region or type of Comminications tax when Avalara for Communications is enabled. For Canadian Sales Tax, this will be GST, HST, QST or PST. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + TaxInfo + () + + +

+ +

TaxInfo

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
rate + number + + : The combined tax rate. Not present when Avalara for Communications is enabled. +
region + string + + : Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST. Not present when Avalara for Communications is enabled. +
taxDetails + Array<TaxDetail> + + : Provides additional tax details for Communications taxes when Avalara for Communications is enabled or Canadian Sales Tax when there is tax applied at both the country and province levels. This will only be populated for the Invoice response when fetching a single invoice and not for the InvoiceList or LineItemList. Only populated for a single LineItem fetch when Avalara for Communications is enabled. +
type + string + + : Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries. Not present when Avalara for Communications is enabled. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Tier + () + + +

+ +

Tier

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
currencies + Array<TierPricing> + + : Tier pricing +
endingQuantity + number + + : Ending quantity for the tier. This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier. +
usagePercentage + string + + : (deprecated) -- Use the percentage_tiers object instead. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + TierPricing + () + + +

+ +

TierPricing

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
currency + string + + : 3-letter ISO 4217 currency code. +
unitAmount + number + + : Allows up to 2 decimal places. Required unless +unit_amount_decimal + is provided. +
unitAmountDecimal + string + + : Allows up to 9 decimal places. Only supported when +add_on_type + = +usage +. If +unit_amount_decimal + is provided, +unit_amount + cannot be provided. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Transaction + () + + +

+ +

Transaction

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
account + AccountMini + + : Account mini details +
actionResult + Object + + : Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort. +
amount + number + + : Total transaction amount sent to the payment gateway. +
avsCheck + string + + : When processed, result from checking the overall AVS on the transaction. +
backupPaymentMethodUsed + boolean + + : Indicates if the transaction was completed using a backup payment +
billingAddress + AddressWithName + +
collectedAt + Date + + : Collected at, or if not collected yet, the time the transaction was created. +
collectionMethod + string + + : The method by which the payment was collected. +
createdAt + Date + + : Created at +
currency + string + + : 3-letter ISO 4217 currency code. +
customerMessage + string + + : For declined ( +success=false +) transactions, the message displayed to the customer. +
customerMessageLocale + string + + : Language code for the message +
cvvCheck + string + + : When processed, result from checking the CVV/CVC value on the transaction. +
fraudInfo + TransactionFraudInfo + + : Fraud information +
gatewayApprovalCode + string + + : Transaction approval code from the payment gateway. +
gatewayMessage + string + + : Transaction message from the payment gateway. +
gatewayReference + string + + : Transaction reference number from the payment gateway. +
gatewayResponseCode + string + + : For declined transactions ( +success=false +), this field lists the gateway error code. +
gatewayResponseTime + number + + : Time, in seconds, for gateway to process the transaction. +
gatewayResponseValues + Object + + : The values in this field will vary from gateway to gateway. +
id + string + + : Transaction ID +
invoice + InvoiceMini + + : Invoice mini details +
ipAddressCountry + string + + : Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly. +
ipAddressV4 + string + + : IP address provided when the billing information was collected: - When the customer enters billing information into the Recurly.js or Hosted Payment Pages, Recurly records the IP address. - When the merchant enters billing information using the API, the merchant may provide an IP address. - When the merchant enters billing information using the UI, no IP address is recorded. +
object + string + + : Object type +
origin + string + + : Describes how the transaction was triggered. +
originalTransactionId + string + + : If this transaction is a refund ( +type=refund +), this will be the ID of the original transaction on the invoice being refunded. +
paymentGateway + TransactionPaymentGateway + +
paymentMethod + PaymentMethod + +
refunded + boolean + + : Indicates if part or all of this transaction was refunded. +
status + string + + : The current transaction status. Note that the status may change, e.g. a +pending + transaction may become +declined + or +success + may later become +void +. +
statusCode + string + + : Status code +
statusMessage + string + + : For declined ( +success=false +) transactions, the message displayed to the merchant. +
subscriptionIds + Array<string> + + : If the transaction is charging or refunding for one or more subscriptions, these are their IDs. +
success + boolean + + : Did this transaction complete successfully? +
type + string + + :
    +
  • authorization – verifies billing information and places a hold on money in the customer's account. - capture – captures funds held by an authorization and completes a purchase. - purchase – combines the authorization and capture in one transaction. - refund – returns all or a portion of the money collected in a previous transaction to the customer. - verify – a $0 or $1 transaction used to verify billing information which is immediately voided.
  • +
+
updatedAt + Date + + : Updated at +
uuid + string + + : The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. +
vatNumber + string + + : VAT number for the customer on this transaction. If the customer's Billing Info country is BR or AR, then this will be their Tax Identifier. For all other countries this will come from the VAT Number field in the Billing Info. +
voidedAt + Date + + : Voided at +
voidedByInvoice + InvoiceMini + + : Invoice mini details +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + TransactionError + () + + +

+ +

TransactionError

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
category + string + + : Category +
code + string + + : Code +
declineCode + string + + : Decline code +
fraudInfo + TransactionFraudInfo + + : Fraud information +
merchantAdvice + string + + : Merchant message +
message + string + + : Customer message +
object + string + + : Object type +
threeDSecureActionTokenId + string + + : Returned when 3-D Secure authentication is required for a transaction. Pass this value to Recurly.js so it can continue the challenge flow. +
transactionId + string + + : Transaction ID +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + TransactionFraudInfo + () + + +

+ +

TransactionFraudInfo

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
decision + string + + : Kount decision +
object + string + + : Object type +
reference + string + + : Kount transaction reference ID +
riskRulesTriggered + Array<FraudRiskRule> + + : A list of fraud risk rules that were triggered for the transaction. +
score + number + + : Kount score +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + TransactionPaymentGateway + () + + +

+ +

TransactionPaymentGateway

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
id + string + +
name + string + +
object + string + + : Object type +
type + string + +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + UniqueCouponCode + () + + +

+ +

UniqueCouponCode

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
bulkCouponCode + string + + : The Coupon code of the parent Bulk Coupon +
bulkCouponId + string + + : The Coupon ID of the parent Bulk Coupon +
code + string + + : The code the customer enters to redeem the coupon. +
createdAt + Date + + : Created at +
expiredAt + Date + + : The date and time the coupon was expired early or reached its +max_redemptions +. +
id + string + + : Unique Coupon Code ID +
object + string + + : Object type +
redeemedAt + Date + + : The date and time the unique coupon code was redeemed. +
state + string + + : Indicates if the unique coupon code is redeemable or why not. +
updatedAt + Date + + : Updated at +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + UniqueCouponCodeParams + () + + +

+ +

UniqueCouponCodeParams

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
beginTime + Date + + : The date-time to be included when listing UniqueCouponCodes +
limit + number + + : The number of UniqueCouponCodes that will be generated +
order + string + + : Sort order to list newly generated UniqueCouponCodes (should always be +asc +) +
sort + string + + : Sort field to list newly generated UniqueCouponCodes (should always be +created_at +) +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Usage + () + + +

+ +

Usage

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
amount + number + + : The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500"). +
billedAt + Date + + : When the usage record was billed on an invoice. +
createdAt + Date + + : When the usage record was created in Recurly. +
id + string + +
measuredUnitId + string + + : The ID of the measured unit associated with the add-on the usage record is for. +
merchantTag + string + + : Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint. +
object + string + + : Object type +
percentageTiers + Array<SubscriptionAddOnPercentageTier> + + : The percentage tiers of the subscription based on the usage_timestamp. If tier_type = flat, percentage_tiers = []. This feature is currently in development and requires approval and enablement, please contact support. +
recordingTimestamp + Date + + : When the usage was recorded in your system. +
tierType + string + + : The pricing model for the add-on. For more information, +click here +. See our +Guide + for an overview of how to configure quantity-based pricing models. +
tiers + Array<SubscriptionAddOnTier> + + : The tiers and prices of the subscription based on the usage_timestamp. If tier_type = flat, tiers = [] +
unitAmount + number + + : Unit price +
unitAmountDecimal + string + + : Unit price that can optionally support a sub-cent value. +
updatedAt + Date + + : When the usage record was billed on an invoice. +
usagePercentage + number + + : The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. +
usageTimestamp + Date + + : When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. +
usageType + string + + : Type of usage, returns usage type if +add_on_type + is +usage +. +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + + () + + +

+ +

This file is automatically created by Recurly's OpenAPI generation process +and thus any edits you make by hand will be lost. If you wish to make a +change to this file, please create a Github issue explaining the changes you +need and we will usher them to the appropriate places.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + User + () + + +

+ +

User

+ + +

+ Type: + Object +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertytypedescription
createdAt + Date + +
deletedAt + Date + +
email + string + +
firstName + string + +
id + string + +
lastName + string + +
object + string + + : Object type +
timeZone + string + +
+ + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + PrimitiveProperty + () + + +

+ +

Represents a primitive:

+
    +
  • String
  • +
  • Number
  • +
  • Boolean
  • +
  • Object (plain js object)
  • +
  • Array (of primitives only)
  • +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + DateProperty + () + + +

+ +

Represents a Date in the schema

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ResourceProperty + (type) + + +

+ +

Represents an embedded Resource in the schema

+ + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
type + any + +
+ + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + ArrayProperty + (type) + + +

+ +

Represents an array of other schema properties.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
type + Property + + Should be Property for element type +
+ + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + build + (typeSig) + + +

+ +

Factory method to build a Property from a type signature. +You should only create Properties through this method.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
typeSig + any + +
+ + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+ +

+ + + Schema + (resourceType) + + +

+ +

The class responsible a compiled schema.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
resourceType + Resource + + the resource type +
+ + + + + + + + + + + + + + + + + +
+ + + +
+
+
+
+ + +