transactions

Description

This link relationship returns a collection of resources. You can easily paginate through this collection using the hypermedia links provided and the link relationships of first, prev, next, and last. Scroll down to view a representation of a single resource embedded within this collection.

Embedded Resource: transaction

Description

A transaction is a historical record of a cart that has been purchased by a customer. To create a transaction, you post to a cart. The only aspects of a transaction which can be modified are hide_transaction and data_is_fed.

The receipt_url link relationship leads to the full HTML receipt.

If you create custom attributes for a transaction, they will automatically be included in the response as embedded resources without having to zoom in on them.

For some stores and gateways, you may see additional link relationships which allow you to modify a transaction in the following ways:

capture: For Auth Only transactions, you can capture them on the gateway by POSTing to the capture link relationship href with an empty body.

void: To reverse a recent transaction (usually within the same day it was completed but before batched by the gateway), POST an empty body to the void link relationship href.

refund: To reverse a transaction completed in the past, POST an empty body to the void link relationship href.

transaction_logs: When modifications are made to a transaction, logs will be available for all changes to the transaction. These can be obtained via GET to the transation_logs link relationship href. You can also zoom into details by adding ?zoom=transaction_log_details

Actions

For some stores and gateways, modify this transaction via capture, void, or refund.

HEAD

Get just the header response

OPTIONS

Get a response explaining which HTTP methods are supported

Properties

Property

Description

Type

Constraints

id

The order number.

Integer

Read only

is_test

True if this transaction was a test transaction and not run against a live payment gateway.

Boolean

Read only

hide_transaction

Set this to true to hide it in the FoxyCart admin.

Boolean

True or false, 1 or 0.

data_is_fed

If the webhook for this transaction has been successfully sent, this will be true. You can also modify this to meet your needs.

Boolean

True or false, 1 or 0.

transaction_date

The date of this transaction shown in the timezone of the store. The format used is ISO 8601 (or 'c' format string for PHP developers).

Date

Read only

locale_code

The locale code of this transaction. This will be a copy of the store's local_code at the time of the transaction.

String

Read only

customer_first_name

The customer's given name at the time of the transaction.

String

Read only

customer_last_name

The customer's surname at the time of the transaction.

String

Read only

customer_tax_id

If the customer provided a tax_id during checkout, it will be included here.

String

Read only

customer_email

The customer's email address at the time of the transaction.

Email

Read only

customer_ip

The customer's ip address at the time of the transaction.

String

Read only

ip_country

The country of the customer's ip address.

String

Read only

total_item_price

Total amount of the items in this transaction.

Decimal

Read only

total_tax

Total amount of the taxes for this transaction.

Decimal

Read only

total_shipping

Total amount of the shipping costs for this transaction.

Decimal

Read only

total_future_shipping

If this transaction has any shippable subscription items which will process in the future, this will be the total amount of shipping costs for those items.

Decimal

Read only

total_order

Total amount of this transaction including all items, taxes, shipping costs and discounts.

Decimal

Read only

status

Used for transactions processed with a hosted payment gateway which can change the status of the transaction after it is originally posted. If the status is empty, a normal payment gateway was used and the transaction should be considered completed.

Conditional Link Relationsips

If this transaction has a subscription associated with it, it will include a subscription and a sub_token_url link relationship.

Only select gateways and stores currently support transactions modifications. For those stores, the void, refund, and transaction_logs link relationships will be available. If the transaction was completed as an authorize only, the capture link relationship will be available for these stores as well.

Zoomable Resources

The following related resources can be embedded within this resource by including a ?zoom=<child_resource> parameter. You can also filter by child resources by ?child_resource:property=<property_value>