HomeProduct DocsAPI ReferenceChangelog
RecurlyAPI GuidesRecurly.jsWebhooksAPI ReferenceSupportBook demo
API Reference

Authorize Purchase

A purchase is a hybrid checkout containing at least one or more subscriptions or one-time charges (adjustments) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. A purchase is only a request data type and is not persistent in Recurly and an invoice collection will be the returned type.

The authorize endpoint will create a pending purchase that can be activated at a later time once payment has been completed on an external source (e.g. Adyen's Hosted Payment Pages).

For additional information regarding shipping fees, please see https://docs.recurly.com/docs/shipping

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
account
object
required

An account object. This can be an existing account or a new account. If using a new account and adding shipping addresses, the last shipping address in the list will apply to every subscription and adjustment in the purchase.

string

The billing_info_uuid is the value that represents a specific billing info for an end customer. When billing_info_uuid 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_uuid can ONLY be used for sites utilizing the Wallet feature.

adjustments
array of objects
required

This should be a list of Adjustment objects. Required if there are no subscriptions.

adjustments*
string
enum
Defaults to automatic

Optional field to set the collection for an invoice as automatic or manual. The default is automatic if it's not set.

Allowed:
string
required
length ≤ 3

3-letter ISO 4217 currency code.

integer
≥ 0
Defaults to 0

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.

string
enum
Defaults to net

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.

Allowed:
gift_card
object
coupon_codes
array of objects

Provide this elements if you want to redeem multiple coupons. You must have Multiple Coupons Per Account enabled in Coupon Settings in order to redeem multiple coupons.

coupon_codes
subscriptions
array

A list of Subscriptions to invoice in this purchase. Required if there are no adjustments.

subscriptions
int64

All subscriptions and adjustments on the purchase will use this shipping address unless they specify one of their own. Any subscriptions for which this address might apply will also use it in future renewals unless changed or removed. Cannot be used if a new shipping address is created at the account level.

shipping_address
object

Optional nested object to use if you want to create a new shipping
address on a new subscription/account. The nested object contains
the information for the account shipping address:
first_name, last_name, company_name, email, phone,
vat_number, address1, address2, city, state,
zip, country, nickname. When providing a shipping
address, the following are required: first_name, last_name,
address1, city, state, zip, and country. Required if using
shipping_method_code and no shipping_address_id is
specified.

string

Optional notes field. This will default to the Customer Notes text specified on the Invoice Settings page in your Recurly admin. Specify custom notes with this tag to add or override Customer Notes. Custom notes will stay with a subscription on all renewals. Custom notes made on an invoice for a one time charge will not carry over to subsequent invoices.

string

Optional notes field. This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes with this tag to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals.

transaction
object

(Transaction Data, Card on File) - Options for flagging transactions as Customer or Merchant Initiated Unscheduled.

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. Specify custom notes with this tag to add or override VAT Reverse Charge Notes. Custom notes will stay with a subscription on all renewals.

string
enum

Used by Vertex for tax calculations. Possible values are sale, rental, lease.

Allowed:
Response

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/xml