younifyd
Menu

Record External Transaction

Record an external payment for a manual invoices.

POST/invoices/{invoice_id}/transactions

Use it in a workflow

  1. Add a step and choose the Recurly connector.
  2. Pick the Record External Transaction action (under invoice).
  3. Fill in the fields below, then reference the result from later steps as {{recordExternalTransaction.response.data}}.

Request

Path parameters

invoice_idstringrequired

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

Request body

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

payment_methodstring

Payment method used for external transaction.

One ofbacsachamazonapple_paybraintree_apple_paycheckcredit_cardeftgoogle_paymercadopagomoney_orderotherpaypalpix_automaticorokusepadirectdebitwire_transfer

descriptionstring

Used as the transaction's description.

amountnumber (float)

The total amount of the transcaction. Cannot excceed the invoice total.

collected_atstring (date-time)

Datetime that the external payment was collected. Defaults to current datetime.

json
{
  "payment_method": "bacs",
  "description": "string",
  "amount": 0,
  "collected_at": "2025-01-01T00:00:00Z"
}

Response

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

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.

accountobject
idstring
objectstring
codestring

The unique identifier of the account.

emailstring (email)

The email address used for communicating with this customer.

first_namestring
last_namestring
companystring
parent_account_idstring
bill_tostring
dunning_campaign_idstring

Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.

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

invoiceobject
idstring
objectstring
numberstring
business_entity_idstring

Unique ID to identify the business entity assigned to the invoice. Available when the `Multiple Business Entities` feature is enabled.

typestring

One ofchargecreditlegacy

statestring

One ofopenpendingprocessingpast_duepaidclosedfailedvoidedDefault "all"

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_invoiceobject
idstring
objectstring
numberstring
business_entity_idstring

Unique ID to identify the business entity assigned to the invoice. Available when the `Multiple Business Entities` feature is enabled.

typestring

One ofchargecreditlegacy

statestring

One ofopenpendingprocessingpast_duepaidclosedfailedvoidedDefault "all"

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_addressobject
first_namestring
last_namestring
collection_methodstring

The method by which the payment was collected.

One ofautomaticmanual

payment_methodobject
objectstring

One ofbacsamazonamazon_billing_agreementapple_payapple_pay_merchant_tokenbank_account_infobraintree_apple_paycheckcredit_cardeftgateway_tokengoogle_paygoogle_pay_device_paniban_bank_accountmoney_orderotherpaypalpaypal_billing_agreementrokusepadirectdebitvenmowire_transferbraintree_v_zeroboletocash_appupi_autopaypix_automaticomercadopagoklarnabraintree_google_paystripe_link

card_typestring

Visa, MasterCard, American Express, Discover, JCB, etc.

One ofAmerican ExpressDankortDiners ClubDiscoverELOForbrugsforeningenHipercardJCBLaserMaestroMasterCardTest CardUnion PayUnknownVisaTarjeta Naranja

first_sixstring

Credit card number's first six digits.

last_fourstring

Credit card number's last four digits. Will refer to bank account if payment method is ACH.

last_twostring

The IBAN bank account's last two digits.

exp_monthinteger

Expiration month.

exp_yearinteger

Expiration year.

gateway_tokenstring

A token used in place of a credit card in order to perform transactions.

cc_bin_countrystring

The 2-letter ISO 3166-1 alpha-2 country code associated with the card's issuer, if known.

funding_sourcestring

The funding source of the card, if known.

One ofcreditdebitchargeprepaiddeferred_debit

gateway_codestring

An identifier for a specific payment gateway.

gateway_attributesobject1 fields

Gateway specific attributes associated with this PaymentMethod

card_network_preferencestring

Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network.

One ofBancontactCartesBancairesDankortMasterCardVisa

billing_agreement_idstring

Billing Agreement identifier. Only present for Amazon or Paypal payment methods.

name_on_accountstring

The name associated with the bank account.

account_typestring

The bank account type. Only present for ACH payment methods.

One ofcheckingsavings

routing_numberstring

The bank account's routing number. Only present for ACH payment methods.

routing_number_bankstring

The bank name of this routing number.

usernamestring

Username of the associated payment method. Currently only associated with Venmo.

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_gatewayobject
idstring
objectstring
typestring
namestring
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
{
  "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.

Was this page helpful?