younifyd
Menu

Create Pending Purchase

Create a pending purchase

POST/purchases/pending

Use it in a workflow

  1. Add a step and choose the Recurly connector.
  2. Pick the Create Pending Purchase action (under purchase).
  3. Fill in the fields below, then reference the result from later steps as {{createPendingPurchase.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

currencystringrequired

3-letter ISO 4217 currency code.

accountanyrequired
billing_info_idstring

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.

business_entity_idstring

The `business_entity_id` is the value that represents a specific business entity for an end customer. When `business_entity_id` is used to assign a business entity to the subscription, all future billing events for the subscription will bill to the specified business entity. Available when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used.

business_entity_codestring

The `business_entity_code` is the value that represents a specific business entity for an end customer. When `business_entity_code` is used to assign a business entity to the subscription, all future billing events for the subscription will bill to the specified business entity. Available when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used.

collection_methodstring

Must be set to manual in order to preview a purchase for an Account that does not have payment information associated with the Billing Info.

One ofautomaticmanualDefault "automatic"

po_numberstring

For manual invoicing, this identifies the PO number associated with the subscription.

net_termsinteger

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.

Default 0

net_terms_typestring

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.

One ofneteomDefault "net"

credit_application_policy_overrideobject

Controls whether credit invoices are automatically applied to new invoices. The `mode` field determines the application behavior. When mode is `all`, the optional `allowed_origins` array can restrict which credit invoice origins are applied.

modestringrequired

Determines which credit invoices are applied to invoices: - `all`: All available credit invoices are applied (default) - `none`: No credit invoices are applied automatically

One ofallnoneDefault "all"

allowed_originsarray<string>

Optional array of credit invoice origin types to allow when mode is `all`. If not specified when mode is `all`, credits from all origins are applied. Only valid when mode is `all`.

terms_and_conditionsstring

Terms and conditions to be put on the purchase invoice.

transactionobject

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

customer_notesstring
vat_reverse_charge_notesstring

VAT reverse charge notes for cross border European tax settlement.

vertex_transaction_typestring

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

One ofsalerentallease

credit_customer_notesstring

Notes to be put on the credit invoice resulting from credits in the purchase, if any.

gateway_codestring

The default payment gateway identifier to be used for the purchase transaction. This will also be applied as the default for any subscriptions included in the purchase request.

shippingobject
address_idstring

Assign a shipping address from the account's existing shipping addresses. If this and `address` are both present, `address` will take precedence.

addressobject14 fields
feesarray<object>3 fields

A list of shipping fees to be created as charges with the purchase.

line_itemsarray<object>

A list of one time charges or credits to be created with the purchase.

currencystringrequired

3-letter ISO 4217 currency code. If `item_code`/`item_id` is part of the request then `currency` is optional, if the site has a single default currency. `currency` is required if `item_code`/`item_id` is present, and there are multiple currencies defined on the site. If `item_code`/`item_id` is not present `currency` is required.

unit_amountnumber (float)required

A positive or negative amount with `type=charge` will result in a positive `unit_amount`. A positive or negative amount with `type=credit` will result in a negative `unit_amount`. If `item_code`/`item_id` is present, `unit_amount` can be passed in, to override the `Item`'s `unit_amount`. If `item_code`/`item_id` is not present then `unit_amount` is required.

tax_inclusiveboolean

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 use this flag.

Default false

quantityinteger

This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.

Default 1

descriptionstring

Description that appears on the invoice. If `item_code`/`item_id` is part of the request then `description` must be absent.

item_codestring

Unique code to identify an item. Available when the Credit Invoices feature is enabled.

item_idstring

System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.

revenue_schedule_typestring

One ofat_invoiceat_range_endat_range_startevenlynever

typestringrequired

Line item type. If `item_code`/`item_id` is present then `type` should not be present. If `item_code`/`item_id` is not present then `type` is required.

One ofchargecredit

credit_reason_codestring

The reason the credit was given when line item is `type=credit`. When the Credit Invoices feature is enabled, the value can be set and will default to `general`. When the Credit Invoices feature is not enabled, the value will always be `null`.

One ofgeneralpromotionalserviceDefault "general"

accounting_codestring

Accounting Code for the `LineItem`. If `item_code`/`item_id` is part of the request then `accounting_code` must be absent.

liability_gl_account_idstring

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.

revenue_gl_account_idstring

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.

performance_obligation_idstring

The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.

tax_exemptboolean

`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.

avalara_transaction_typeinteger

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](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `LineItem`, then the `avalara_transaction_type` must be absent.

avalara_service_typeinteger

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](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `LineItem`, then the `avalara_service_type` must be absent.

vertex_transaction_typestring

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

One ofsalerentallease

tax_codestring

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.

harmonized_system_codestring

The Harmonized System (HS) code is an internationally standardized system of names and numbers to classify traded products. The HS code, sometimes called Commodity Code, is used by customs authorities around the world to identify products when assessing duties and taxes. The HS code may also be referred to as the tariff code or customs code. Values should contain only digits and decimals. If `item_code`/`item_id` is part of the request then `harmonized_system_code` must be absent.

product_codestring

Optional field to track a product code or SKU for the line item. This can be used to later reporting on product purchases. For Vertex tax calculations, this field will be used as the Vertex `product` field. If `item_code`/`item_id` is part of the request then `product_code` must be absent.

originstring

Origin `external_gift_card` is allowed if the Gift Cards feature is enabled on your site, `type` is `credit` and `tax_exempt` is `true` if you are using taxes. Set this value in order to track gift card credits from external gift cards (like InComm). It also skips billing information requirements. Origin `prepayment` is only allowed if `type` is `charge` and `tax_exempt` is left blank or set to true. This origin creates a charge and opposite credit on the account to be used for future invoices.

One ofexternal_gift_cardprepayment

custom_fieldsarray<object>4 fields

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.

start_datestring (date-time)

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. Defaults to the current date-time.

end_datestring (date-time)

If this date is provided, it indicates the end of a time range.

origin_tax_address_sourcestring

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".

One oforigindestinationDefault "origin"

destination_tax_address_sourcestring

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".

One ofdestinationoriginDefault "destination"

subscriptionsarray<object>

A list of subscriptions to be created with the purchase.

plan_codestringrequired
plan_idstring
unit_amountnumber (float)

Override the unit amount of the subscription plan by setting this value. If not provided, the subscription will inherit the price from the subscription plan for the provided currency.

price_segment_idstring

The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For requests, the code can also be used. Use prefix `code-`, e.g. `code-gold`.

tax_inclusiveboolean

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 use this flag.

Default false

quantityinteger

Optionally override the default quantity of 1.

Default 1

add_onsarray<object>9 fields
custom_fieldsarray<object>4 fields

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.

shippingobject4 fields
trial_ends_atstring (date-time)

If set, overrides the default trial behavior for the subscription. When the current date time or a past date time is provided the subscription will begin with no trial phase (overriding any plan default trial). When a future date time is provided the subscription will begin with a trial phase ending at the specified date time.

starts_atstring (date-time)

If set, the subscription will begin on this specified date. The subscription will apply the setup fee and trial period, unless the plan has no trial. Omit this field if the subscription should be started immediately.

next_bill_datestring (date-time)

If present, this sets the date the subscription's next billing period will start (`current_period_ends_at`). This can be used to align the subscription’s billing to a specific day of the month. The initial invoice will be prorated for the period between the subscription's activation date and the billing period end date. Subsequent periods will be based off the plan interval. For a subscription with a trial period, this will change when the trial expires.

total_billing_cyclesinteger

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.

renewal_billing_cyclesinteger

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`.

auto_renewboolean

Whether the subscription renews at the end of its term.

Default true

revenue_schedule_typestring

One ofat_range_endat_range_startevenlynever

ramp_intervalsarray<object>2 fields

The new set of ramp intervals for the subscription.

credit_application_policyobject2 fields

Controls whether credit invoices are automatically applied to new invoices. The `mode` field determines the application behavior. When mode is `all`, the optional `allowed_origins` array can restrict which credit invoice origins are applied.

bulkboolean

Optional field to be used only when needing to bypass the 60 second limit on creating subscriptions. Should only be used when creating subscriptions in bulk from the API.

Default false

proration_settingsobject1 fields

Allows you to control how any resulting charges will be calculated and prorated.

coupon_codesarray<string>

A list of coupon_codes to be redeemed on the subscription or account during the purchase.

gift_card_redemption_codestring

A gift card redemption code to be redeemed on the purchase invoice.

transaction_typestring

An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.

One ofmoto

json
{
  "currency": "string",
  "account": null,
  "billing_info_id": "string",
  "business_entity_id": "string",
  "business_entity_code": "string",
  "collection_method": "automatic",
  "po_number": "string",
  "net_terms": 0,
  "net_terms_type": "net",
  "credit_application_policy_override": {
    "mode": "all",
    "allowed_origins": [
      "line_item_refund"
    ]
  },
  "terms_and_conditions": "string",
  "transaction": {}
}

Response

Returns 200 with an object. Read it in later steps with {{createPendingPurchase.response.data.<field>}}.

objectstring
charge_invoiceobject
idstring
uuidstring
objectstring
typestring

Invoices are either charge, credit, or legacy invoices.

One ofchargecreditlegacy

originstring

The event that created the invoice.

One ofcarryforward_creditcarryforward_gift_creditcreditexternal_refundgift_cardimmediate_changeimportline_item_refundopen_amount_refundprepaymentpurchaserefundrenewalterminationusage_correctionwrite_off

statestring

One ofopenpendingprocessingpast_duepaidclosedfailedvoidedDefault "all"

accountobject10 fields
billing_info_idstring

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.

subscription_idsarray<string>

If the invoice is charging or refunding for one or more subscriptions, these are their IDs.

previous_invoice_idstring

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](https://docs.recurly.com/docs/only-bill-what-changed) feature enabled. Sites with Only Bill What Changed enabled should use the [related_invoices endpoint](https://recurly.com/developers/api/v2021-02-25/index.html#operation/list_related_invoices) to see purchase invoices refunded by this invoice.

numberstring

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.

collection_methodstring

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.

One ofautomaticmanualDefault "automatic"

po_numberstring

For manual invoicing, this identifies the PO number associated with the subscription.

net_termsinteger

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.

Default 0

net_terms_typestring

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.

One ofneteomDefault "net"

addressobject2 fields
shipping_addressobject19 fields
currencystring

3-letter ISO 4217 currency code.

discountnumber (float)

Total discounts applied to this invoice.

coupon_redemptionsarray<object>7 fields

The coupon redemptions applied to this invoice.

subtotalnumber (float)

The summation of charges and credits, before discounts and taxes.

subtotal_after_discountnumber (float)

The summation of charges and credits, after discounts applied.

taxnumber (float)

The total tax on this invoice.

reference_only_currency_conversionobject6 fields
totalnumber (float)

The final total on this invoice. The summation of invoice charges, discounts, credits, and tax.

refundable_amountnumber (float)

The refundable amount on a charge invoice. It will be null for all other invoices.

paidnumber (float)

The total amount of successful payments transaction on this invoice.

balancenumber (float)

The outstanding balance remaining on this invoice.

tax_infoobject4 fields

Only for merchants using Recurly's In-The-Box taxes.

used_tax_serviceboolean

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.

vat_numberstring

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.

vat_reverse_charge_notesstring

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.

terms_and_conditionsstring

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.

customer_notesstring

This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes.

line_itemsarray<object>40 fields
has_more_line_itemsboolean

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.

transactionsarray<object>40 fields
credit_paymentsarray<object>14 fields
created_atstring (date-time)
updated_atstring (date-time)
credit_invoicesarray<object>
idstring
uuidstring
objectstring
typestring

Invoices are either charge, credit, or legacy invoices.

One ofchargecreditlegacy

originstring

The event that created the invoice.

One ofcarryforward_creditcarryforward_gift_creditcreditexternal_refundgift_cardimmediate_changeimportline_item_refundopen_amount_refundprepaymentpurchaserefundrenewalterminationusage_correctionwrite_off

statestring

One ofopenpendingprocessingpast_duepaidclosedfailedvoidedDefault "all"

accountobject10 fields
billing_info_idstring

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.

subscription_idsarray<string>

If the invoice is charging or refunding for one or more subscriptions, these are their IDs.

previous_invoice_idstring

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](https://docs.recurly.com/docs/only-bill-what-changed) feature enabled. Sites with Only Bill What Changed enabled should use the [related_invoices endpoint](https://recurly.com/developers/api/v2021-02-25/index.html#operation/list_related_invoices) to see purchase invoices refunded by this invoice.

numberstring

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.

collection_methodstring

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.

One ofautomaticmanualDefault "automatic"

po_numberstring

For manual invoicing, this identifies the PO number associated with the subscription.

net_termsinteger

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.

Default 0

net_terms_typestring

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.

One ofneteomDefault "net"

addressobject2 fields
shipping_addressobject19 fields
currencystring

3-letter ISO 4217 currency code.

discountnumber (float)

Total discounts applied to this invoice.

coupon_redemptionsarray<object>7 fields

The coupon redemptions applied to this invoice.

subtotalnumber (float)

The summation of charges and credits, before discounts and taxes.

subtotal_after_discountnumber (float)

The summation of charges and credits, after discounts applied.

taxnumber (float)

The total tax on this invoice.

reference_only_currency_conversionobject6 fields
totalnumber (float)

The final total on this invoice. The summation of invoice charges, discounts, credits, and tax.

refundable_amountnumber (float)

The refundable amount on a charge invoice. It will be null for all other invoices.

paidnumber (float)

The total amount of successful payments transaction on this invoice.

balancenumber (float)

The outstanding balance remaining on this invoice.

tax_infoobject4 fields

Only for merchants using Recurly's In-The-Box taxes.

used_tax_serviceboolean

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.

vat_numberstring

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.

vat_reverse_charge_notesstring

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.

terms_and_conditionsstring

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.

customer_notesstring

This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes.

line_itemsarray<object>40 fields
has_more_line_itemsboolean

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.

transactionsarray<object>40 fields
credit_paymentsarray<object>14 fields
created_atstring (date-time)
updated_atstring (date-time)
verification_transactionsarray<object>

Verification transactions (used for free trial payment method validation)

idstring
objectstring
uuidstring

The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.

original_transaction_idstring

If this transaction is a refund (`type=refund`), this will be the ID of the original transaction on the invoice being refunded.

accountobject10 fields
initiatorstring

Must be sent for one-time transactions in order to provide context on which entity is submitting the transaction to ensure proper fraud checks are observed, such as 3DS. If the customer is in session, send `customer`. If this is a merchant initiated one-time transaction, send `merchant`.

One ofcustomermerchant

invoiceobject6 fields
merchant_reason_codestring

This conditional parameter is useful for merchants in specific industries who need to submit one-time Merchant Initiated transactions in specific cases. Not all gateways support these methods, but will support a generic one-time Merchant Initiated transaction. Only use this if the initiator value is "merchant". Otherwise, it will be ignored. - Incremental: Send `incremental` with an additional purchase if the original authorization amount is not sufficient to cover the costs of your service or product. For example, if the customer adds goods or services or there are additional expenses. - No Show: Send `no_show` if you charge customers a fee due to an agreed-upon cancellation policy in your industry. - Resubmission: Send `resubmission` if you need to attempt collection on a declined transaction. You may also use the force collection behavior which has the same effect. - Service Extension: Send `service_extension` if you are in a service industry and the customer has increased/extended their service in some way. For example: adding a day onto a car rental agreement. - Split Shipment: Send `split_shipment` if you sell physical product and need to split up a shipment into multiple transactions when the customer is no longer in session. - Top Up: Send `top_up` if you process one-time transactions based on a pre-arranged agreement with your customer where there is a pre-arranged account balance that needs maintaining. For example, if the customer has agreed to maintain an account balance of 30.00 and their current balance is 20.00, the MIT amount would be at least 10.00 to meet that 30.00 threshold.

One ofincrementalno_showresubmissionservice_extensionsplit_shipmenttop_upDefault "none"

voided_by_invoiceobject6 fields
subscription_idsarray<string>

If the transaction is charging or refunding for one or more subscriptions, these are their IDs.

typestring

- `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.

One ofauthorizationcapturepurchaserefundverify

originstring

Describes how the transaction was triggered.

One ofapichargebackexternal_recoveryforce_collecthppmerchantrecurly_adminrecurlyjsrecurringrefunded_externallytransparenttoken_apiapi_force_collectapi_sub_changeapi_verify_cardrefund_balanceamazon_v2_ipn

currencystring

3-letter ISO 4217 currency code.

descriptionstring

The description that gets sent to the gateway.

amountnumber (float)

Total transaction amount sent to the payment gateway.

statusstring

The current transaction status. Note that the status may change, e.g. a `pending` transaction may become `declined` or `success` may later become `void`.

One ofchargebackdeclinederrorpendingprocessingscheduledsuccessvoid

successboolean

Did this transaction complete successfully?

backup_payment_method_usedboolean

Indicates if the transaction was completed using a backup payment

refundedboolean

Indicates if part or all of this transaction was refunded.

billing_addressobject2 fields
collection_methodstring

The method by which the payment was collected.

One ofautomaticmanual

payment_methodobject19 fields
ip_address_v4string

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.

ip_address_countrystring
status_codestring
status_messagestring

For declined (`success=false`) transactions, the message displayed to the merchant.

customer_messagestring

For declined (`success=false`) transactions, the message displayed to the customer.

customer_message_localestring
payment_gatewayobject4 fields
gateway_messagestring

Transaction message from the payment gateway.

gateway_referencestring

Transaction reference number from the payment gateway.

gateway_approval_codestring
gateway_response_codestring
gateway_response_timenumber (float)

Time, in seconds, for gateway to process the transaction.

gateway_response_valuesobject

The values in this field will vary from gateway to gateway.

cvv_checkstring

When processed, result from checking the CVV/CVC value on the transaction.

One ofDIMNPSUX

avs_checkstring

When processed, result from checking the overall AVS on the transaction.

One ofABCDEFGHIJKLMNOPQRSTUVWXYZ

created_atstring (date-time)
updated_atstring (date-time)
voided_atstring (date-time)
json
{
  "object": "string",
  "charge_invoice": {
    "id": "string",
    "uuid": "string",
    "object": "string",
    "type": "charge",
    "origin": "carryforward_credit",
    "state": "all",
    "account": {
      "id": "string",
      "object": "string",
      "code": "string",
      "email": "name@example.com",
      "first_name": "string",
      "last_name": "string",
      "company": "string",
      "parent_account_id": "string",
      "bill_to": "string",
      "dunning_campaign_id": "string"
    },
    "billing_info_id": "string",
    "subscription_ids": [
      "string"
    ],
    "previous_invoice_id": "string",
    "number": "string",
    "collection_method": "automatic"
  },
  "credit_invoices": [
    {
      "id": "string",
      "uuid": "string",
      "object": "string",
      "type": "charge",
      "origin": "carryforward_credit",
      "state": "all",
      "account": {
        "id": "string",
        "object": "string",
        "code": "string",
        "email": "name@example.com",
        "first_name": "string",
        "last_name": "string",
        "company": "string",
        "parent_account_id": "string",
        "bill_to": "string",
        "dunning_campaign_id": "string"
      },
      "billing_info_id": "string",
      "subscription_ids": [
        "string"
      ],
      "previous_invoice_id": "string",
      "number": "string",
      "collection_method": "automatic"
    }
  ],
  "verification_transactions": [
    {
      "id": "string",
      "object": "string",
      "uuid": "string",
      "original_transaction_id": "string",
      "account": {
        "id": "string",
        "object": "string",
        "code": "string",
        "email": "name@example.com",
        "first_name": "string",
        "last_name": "string",
        "company": "string",
        "parent_account_id": "string",
        "bill_to": "string",
        "dunning_campaign_id": "string"
      },
      "initiator": "customer",
      "invoice": {
        "id": "string",
        "object": "string",
        "number": "string",
        "business_entity_id": "string",
        "type": "charge",
        "state": "all"
      },
      "merchant_reason_code": "none",
      "voided_by_invoice": {
        "id": "string",
        "object": "string",
        "number": "string",
        "business_entity_id": "string",
        "type": "charge",
        "state": "all"
      },
      "subscription_ids": [
        "string"
      ],
      "type": "authorization",
      "origin": "api"
    }
  ]
}

Need more? See the Recurly guide for connection setup and behaviour shared by every action.