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.
Parameters
- amount_in_cents
- Amount of the transaction in cents.
- description
- Description of the transaction that will appear on the invoice.
Account Parameters
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.
- account_code
- 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.
Request
Content-Type: application/xml; charset=utf-8 Accept: application/xml
1 | <?xml version="1.0"?> |
Get Transaction Details
Lists details for an individual transaction.
Attributes
- id
- 32-character unique ID
- account_code
- Account's unique ID
- type
- "Payment" or "Refund"
- action
- "Authorize", "Capture", "Purchase", or "Refund"
- date
- Date of the transaction
- amount_in_cents
- Amount of the transaction in cents. Divide by 100.
- status
- "Success", "Failed", or "Voided". "Voided" indicates the original transaction was successful and was later voided.
- message
- An error message from the payment gateway if the transaction failed.
- reference
- Payment gateway's reference ID for the transaction
- cvv_result
- 1-character CVV result from the payment gateway
- avs_result
- 1-character AVS result from the payment gateway. Combines the result for the street and postal code.
- avs_result_street
- 1-character AVS result for the street adtress
- avs_result_postal
- 1-character AVS result for the postal code
- test
- "True" for test transactions, "False" for production transactions
- voidable
- Indicates that the transaction may be voidable. Depending on when your gateway settles payments, the transaction may no longer be voidable.
- refundable
- 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.
Filters:
- Successful (/transactions?show=successful)
- Failed (/transactions?show=failed)
- Payments (/transactions?show=payments)
- Refunds (/transactions?show=refunds)
- Voided (/transactions?show=voided)
