API v1: Transactions
Recurly supports creating immediate, one-time transactions using the Transactions API. To record a charge that will be automatically invoiced on a subscription renewal, please see the Charges API.
API v1 is deprecated. Please see our latest documentation.
Creating a Transaction
The Recurly API provides a shortcut for creating an invoice, charge, and optionally account, and processing the payment immediately. When creating an account all of the required account attributes must be supplied. When charging an existing account only the account_code must be supplied.
- Amount of the transaction in cents.
- Description of the transaction that will appear on the invoice.
At a minimum,
account_code must be specified. If the account does not exist, Recurly will automatically create the account if the transaction is successful.
- Unique ID for the Account. This parameter is required.
Please see the Account API for a list of valid account attributes.
Billing Info Parameters
If billing information is not provided, Recurly will use the account's billing information on file. If billing information is provided and the transaction is successful, Recurly will update the account's stored billing information with the new information.
Please see the Billing Info API for a list of valid attributes. Recurly strongly recommends providing an IP address when capturing new or updated billing information.
Content-Type: application/xml; charset=utf-8 Accept: application/xml
Get Transaction Details
Lists details for an individual transaction.
- 32-character unique ID
- Account's unique ID
- "Payment" or "Refund"
- "Authorize", "Capture", "Purchase", or "Refund"
- Date of the transaction
- Amount of the transaction in cents. Divide by 100.
- "Success", "Failed", or "Voided". "Voided" indicates the original transaction was successful and was later voided.
- An error message from the payment gateway if the transaction failed.
- Payment gateway's reference ID for the transaction
- 1-character CVV result from the payment gateway
- 1-character AVS result from the payment gateway. Combines the result for the street and postal code.
- 1-character AVS result for the street adtress
- 1-character AVS result for the postal code
- "True" for test transactions, "False" for production transactions
- Indicates that the transaction may be voidable. Depending on when your gateway settles payments, the transaction may no longer be voidable.
- Indicates that the transaction may be refundable.
Void a Transaction
A transaction can only be voided if it has not settled yet (typically occurs nightly around 12-4 AM in your merchant bank's timezone). Once a transaction settles, it can be reversed by refunding the transaction.
Refund a Transaction
A transaction can refunded if it has settled successfully. It can be refunded for any amount equal to or less than the original amount. Please note, some payment gateways do not allow the same credit card to be refunded twice on the same day.
List an Account's Transactions
Lists all transactions for an account.
List All Transactions
Lists all transactions.
- Successful (/transactions?show=successful)
- Failed (/transactions?show=failed)
- Payments (/transactions?show=payments)
- Refunds (/transactions?show=refunds)
- Voided (/transactions?show=voided)