Menu
Create Pending Purchase
Create a pending purchase
/purchases/pendingUse it in a workflow
- Add a step and choose the Recurly connector.
- Pick the Create Pending Purchase action (under purchase).
- 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.
currencystringrequired3-letter ISO 4217 currency code.
accountanyrequiredbilling_info_idstringThe `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_idstringThe `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_codestringThe `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_methodstringMust 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_numberstringFor manual invoicing, this identifies the PO number associated with the subscription.
net_termsintegerInteger 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_typestringOptionally 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_overrideobjectControls 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.
modestringrequiredDetermines 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_conditionsstringTerms 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_notesstringvat_reverse_charge_notesstringVAT reverse charge notes for cross border European tax settlement.
vertex_transaction_typestringUsed by Vertex for tax calculations. Possible values are sale, rental, lease.
One ofsalerentallease
credit_customer_notesstringNotes to be put on the credit invoice resulting from credits in the purchase, if any.
gateway_codestringThe 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.
shippingobjectaddress_idstringAssign a shipping address from the account's existing shipping addresses. If this and `address` are both present, `address` will take precedence.
addressobject14 fieldsfeesarray<object>3 fieldsA 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.
currencystringrequired3-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)requiredA 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_inclusivebooleanDetermines 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
quantityintegerThis number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.
Default 1
descriptionstringDescription that appears on the invoice. If `item_code`/`item_id` is part of the request then `description` must be absent.
item_codestringUnique code to identify an item. Available when the Credit Invoices feature is enabled.
item_idstringSystem-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.
revenue_schedule_typestringOne ofat_invoiceat_range_endat_range_startevenlynever
typestringrequiredLine 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_codestringThe 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_codestringAccounting Code for the `LineItem`. If `item_code`/`item_id` is part of the request then `accounting_code` must be absent.
liability_gl_account_idstringThe 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_idstringThe 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_idstringThe 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_typeintegerUsed 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_typeintegerUsed 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_typestringUsed by Vertex for tax calculations. Possible values are sale, rental, lease.
One ofsalerentallease
tax_codestringOptional 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_codestringThe 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_codestringOptional 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.
originstringOrigin `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 fieldsThe 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_sourcestringThe 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_sourcestringThe 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_codestringrequiredplan_idstringunit_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_idstringThe 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_inclusivebooleanDetermines 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
quantityintegerOptionally override the default quantity of 1.
Default 1
add_onsarray<object>9 fieldscustom_fieldsarray<object>4 fieldsThe 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 fieldstrial_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_cyclesintegerThe 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_cyclesintegerIf `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_renewbooleanWhether the subscription renews at the end of its term.
Default true
revenue_schedule_typestringOne ofat_range_endat_range_startevenlynever
ramp_intervalsarray<object>2 fieldsThe new set of ramp intervals for the subscription.
credit_application_policyobject2 fieldsControls 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.
bulkbooleanOptional 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 fieldsAllows 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_codestringA gift card redemption code to be redeemed on the purchase invoice.
transaction_typestringAn 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
{
"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>}}.
objectstringcharge_invoiceobjectidstringuuidstringobjectstringtypestringInvoices are either charge, credit, or legacy invoices.
One ofchargecreditlegacy
originstringThe event that created the invoice.
One ofcarryforward_creditcarryforward_gift_creditcreditexternal_refundgift_cardimmediate_changeimportline_item_refundopen_amount_refundprepaymentpurchaserefundrenewalterminationusage_correctionwrite_off
statestringOne ofopenpendingprocessingpast_duepaidclosedfailedvoidedDefault "all"
accountobject10 fieldsbilling_info_idstringThe `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_idstringOn 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.
numberstringIf 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_methodstringAn 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_numberstringFor manual invoicing, this identifies the PO number associated with the subscription.
net_termsintegerInteger 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_typestringOptionally 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 fieldsshipping_addressobject19 fieldscurrencystring3-letter ISO 4217 currency code.
discountnumber (float)Total discounts applied to this invoice.
coupon_redemptionsarray<object>7 fieldsThe 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 fieldstotalnumber (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 fieldsOnly for merchants using Recurly's In-The-Box taxes.
used_tax_servicebooleanWill 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_numberstringVAT 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_notesstringVAT 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_conditionsstringThis 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_notesstringThis 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 fieldshas_more_line_itemsbooleanIdentifies 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 fieldscredit_paymentsarray<object>14 fieldscreated_atstring (date-time)updated_atstring (date-time)credit_invoicesarray<object>idstringuuidstringobjectstringtypestringInvoices are either charge, credit, or legacy invoices.
One ofchargecreditlegacy
originstringThe event that created the invoice.
One ofcarryforward_creditcarryforward_gift_creditcreditexternal_refundgift_cardimmediate_changeimportline_item_refundopen_amount_refundprepaymentpurchaserefundrenewalterminationusage_correctionwrite_off
statestringOne ofopenpendingprocessingpast_duepaidclosedfailedvoidedDefault "all"
accountobject10 fieldsbilling_info_idstringThe `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_idstringOn 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.
numberstringIf 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_methodstringAn 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_numberstringFor manual invoicing, this identifies the PO number associated with the subscription.
net_termsintegerInteger 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_typestringOptionally 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 fieldsshipping_addressobject19 fieldscurrencystring3-letter ISO 4217 currency code.
discountnumber (float)Total discounts applied to this invoice.
coupon_redemptionsarray<object>7 fieldsThe 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 fieldstotalnumber (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 fieldsOnly for merchants using Recurly's In-The-Box taxes.
used_tax_servicebooleanWill 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_numberstringVAT 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_notesstringVAT 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_conditionsstringThis 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_notesstringThis 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 fieldshas_more_line_itemsbooleanIdentifies 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 fieldscredit_paymentsarray<object>14 fieldscreated_atstring (date-time)updated_atstring (date-time)verification_transactionsarray<object>Verification transactions (used for free trial payment method validation)
idstringobjectstringuuidstringThe UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.
original_transaction_idstringIf this transaction is a refund (`type=refund`), this will be the ID of the original transaction on the invoice being refunded.
accountobject10 fieldsinitiatorstringMust 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 fieldsmerchant_reason_codestringThis 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 fieldssubscription_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
originstringDescribes how the transaction was triggered.
One ofapichargebackexternal_recoveryforce_collecthppmerchantrecurly_adminrecurlyjsrecurringrefunded_externallytransparenttoken_apiapi_force_collectapi_sub_changeapi_verify_cardrefund_balanceamazon_v2_ipn
currencystring3-letter ISO 4217 currency code.
descriptionstringThe description that gets sent to the gateway.
amountnumber (float)Total transaction amount sent to the payment gateway.
statusstringThe 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
successbooleanDid this transaction complete successfully?
backup_payment_method_usedbooleanIndicates if the transaction was completed using a backup payment
refundedbooleanIndicates if part or all of this transaction was refunded.
billing_addressobject2 fieldscollection_methodstringThe method by which the payment was collected.
One ofautomaticmanual
payment_methodobject19 fieldsip_address_v4stringIP 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_countrystringstatus_codestringstatus_messagestringFor declined (`success=false`) transactions, the message displayed to the merchant.
customer_messagestringFor declined (`success=false`) transactions, the message displayed to the customer.
customer_message_localestringpayment_gatewayobject4 fieldsgateway_messagestringTransaction message from the payment gateway.
gateway_referencestringTransaction reference number from the payment gateway.
gateway_approval_codestringgateway_response_codestringgateway_response_timenumber (float)Time, in seconds, for gateway to process the transaction.
gateway_response_valuesobjectThe values in this field will vary from gateway to gateway.
cvv_checkstringWhen processed, result from checking the CVV/CVC value on the transaction.
One ofDIMNPSUX
avs_checkstringWhen processed, result from checking the overall AVS on the transaction.
One ofABCDEFGHIJKLMNOPQRSTUVWXYZ
created_atstring (date-time)updated_atstring (date-time)voided_atstring (date-time){
"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.