Menu
Mark Invoice Successful
Mark an open invoice as successful
/invoices/{invoice_id}/mark_successfulUse it in a workflow
- Add a step and choose the Recurly connector.
- Pick the Mark Invoice Successful action (under invoice).
- Fill in the fields below, then reference the result from later steps as
{{markInvoiceSuccessful.response.data}}.
Request
Path parameters
invoice_idstringrequiredInvoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
Response
Returns 200 with an object. Read it in later steps with {{markInvoiceSuccessful.response.data.<field>}}.
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"
accountobjectidstringobjectstringcodestringThe unique identifier of the account.
emailstring (email)The email address used for communicating with this customer.
first_namestringlast_namestringcompanystringparent_account_idstringbill_tostringdunning_campaign_idstringUnique 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.
billing_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"
addressobjectname_on_accountstringcompanystringshipping_addressobjectidstringobjectstringaccount_idstringnicknamestringfirst_namestringlast_namestringcompanystringemailstringvat_numberstringphonestringstreet1stringstreet2stringcitystringregionstringState or province.
postal_codestringZip or postal code.
countrystringCountry, 2-letter ISO 3166-1 alpha-2 code.
geo_codestringCode that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
created_atstring (date-time)updated_atstring (date-time)currencystring3-letter ISO 4217 currency code.
discountnumber (float)Total discounts applied to this invoice.
coupon_redemptionsarray<object>The coupon redemptions applied to this invoice.
idstringobjectstringWill always be `coupon`.
couponobject8 fieldsstatestringOne ofactiveinactive
remaining_durationobject3 fieldsdiscountednumber (float)The amount that was discounted upon the application of the coupon, formatted with the currency.
created_atstring (date-time)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_conversionobjectcurrencystring3-letter ISO 4217 currency code.
subtotal_in_centsnumber (float)The subtotal converted to the currency.
tax_in_centsnumber (float)The tax converted to the currency.
ratestringThe conversion rate to the currency.
sourcestringThe source of the conversion rate.
datestring (date)The date of the conversion rate.
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_infoobjectOnly for merchants using Recurly's In-The-Box taxes.
typestringProvides 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.
regionstringProvides 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.
ratenumber (float)The combined tax rate. Not present when Avalara for Communications is enabled.
tax_detailsarray<object>7 fieldsProvides additional tax details for Communications taxes when Avalara for Communications or Vertex Tax Breakdown is enabled or Canadian Sales Tax. Tax details 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.
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>idstringobjectstringuuidstringThe UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.
typestringCharges are positive line items that debit the account. Credits are negative line items that credit the account.
One ofchargecredit
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.
external_skustringOptional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled.
revenue_schedule_typestringOne ofat_invoiceat_range_endat_range_startevenlynever
statestringPending 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.
One ofinvoicedpending
legacy_categorystringCategory 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.
One ofapplied_creditcarryforwardchargecredit
accountobject10 fieldsbill_for_account_idstringThe UUID of the account responsible for originating the line item.
subscription_idstringIf the line item is a charge or credit for a subscription, this is its ID.
plan_idstringIf the line item is a charge or credit for a plan or add-on, this is the plan's ID.
plan_codestringIf the line item is a charge or credit for a plan or add-on, this is the plan's code.
add_on_idstringIf the line item is a charge or credit for an add-on this is its ID.
add_on_codestringIf the line item is a charge or credit for an add-on, this is its code.
invoice_idstringOnce the line item has been invoiced this will be the invoice's ID.
invoice_numberstringOnce 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.
previous_line_item_idstringWill 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.
original_line_item_invoice_idstringThe 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.
originstringA credit created from an original charge will have the value of the charge's origin.
One ofadd_onadd_on_trialcarryforwardcouponcreditdebitone_timeplanplan_trialsetup_feeprepayment
accounting_codestringInternal 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.
product_codestringFor 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`.
credit_reason_codestringThe reason the credit was given when line item is `type=credit`.
One ofgeneralgift_cardpromotionalrefundservicewrite_offDefault "general"
currencystring3-letter ISO 4217 currency code.
amountnumber (float)`(quantity * unit_amount) - discount + tax`
descriptionstringDescription that appears on the invoice. For subscription related items this will be filled in automatically.
quantityintegerThis number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.
Default 1
quantity_decimalstringA 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.
unit_amountnumber (float)Positive amount for a charge, negative amount for a credit.
unit_amount_decimalstringPositive amount for a charge, negative amount for a credit.
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 utilize this flag.
subtotalnumber (float)`quantity * unit_amount`
discountnumber (float)The sum of all discounts applied to the line item.
discountsarray<object>6 fieldsThe breakdown of discounts applied to the line item by coupon redemption.
liability_gl_account_codestringUnique code to identify the ledger account. Each code must start with a letter or number. The following special characters are allowed: `-_.,:`
revenue_gl_account_codestringUnique code to identify the ledger account. Each code must start with a letter or number. The following special characters are allowed: `-_.,:`
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.
taxnumber (float)The tax amount for the line item.
has_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>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)credit_paymentsarray<object>idstringobjectstringuuidstringThe UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.
actionstringThe action for which the credit was created.
One ofpaymentreductionrefundwrite_off
accountobject10 fieldsapplied_to_invoiceobject6 fieldsoriginal_invoiceobject6 fieldscurrencystring3-letter ISO 4217 currency code.
amountnumber (float)Total credit payment amount applied to the charge invoice.
original_credit_payment_idstringFor credit payments with action `refund`, this is the credit payment that was refunded.
refund_transactionobject40 fieldscreated_atstring (date-time)updated_atstring (date-time)voided_atstring (date-time)created_atstring (date-time)updated_atstring (date-time){
"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"
}
Need more? See the Recurly guide for connection setup and behaviour shared by every action.