Transaction Modeling

Read about how you can model transactions using the API.

The API is designed to allow you to include transactional information where needed to suit your implementation. For example, you might choose the send the buyer's details in a Calculate Tax request or you may decide to send it in a Confirm Transaction request.

To facilitate this, the same structure is used for the JSON that is attached to all requests. Fields like currency_code are used to represent information like the currency. For a full list of the available fields, see Fields Reference Overview.

Some fields are generated by the API so these are known as response-only fields. For more information, see Response-Only and Inactive Fields.

You can include information at transaction and transaction line-item level. For more information, see Transaction Details.

📘

Note

If a Confirm Transaction fails, for example due to a network error, you should send a Confirm Transaction request again using the same Transaction Key to ensure it is completed successfully. If you create a new transaction with a Store Transaction request, this may cause a duplicate to be created.


Transaction Processing

The following graphic shows an example of how you can use the requests to integrate with your marketplace:

Transaction Processing

Transaction Processing

The steps are as follows:

  1. The Buyer places some goods in their basked and clicks Pay.
  2. A Store Transaction request is sent. All the relevant information is modelled in the body of this request.
  3. The Store Transaction request returns tax and other information.
  4. A Confirm Transaction request is sent. The Transaction Key is specified in the request's URL.
  5. The Confirm Transaction request returns the final transaction details.
  6. Invoice is sent.
  7. Details displayed in on the UI. Invoice sent to the buyer.

In this Section

TopicDescription
Deprecated Fields and RequestsRead about fields and requests that have been deprecated.
Transaction DetailsTransaction details are modelled at the transaction and line level.
Product ClassesThe Product Class is used to indicate whether your transaction is modelling are physical goods or shipping or other charges.
Buyers' DetailsYou need to model information about the buyer such as their name and email address.
Identifiers and ClassificationsYou can add various identifiers and classifications to your requests.
Payment AmountsYou can specify amounts as tax inclusive or exclusive.
Shipping and Other ChargesYou may want to create a method that allows buyers to include shipping or other charges in their transactions.
AddressesYou may want to model addresses for shipping or payments or billing.
Multiple GoodsYou may want to model multiple goods in a transaction.
CurrenciesCurrency conversion is an important feature of any e-commerce business or marketplace.
Transaction KeysYou use the Transaction Key to confirm a stored transaction.
DiscountsDiscounts are reductions that are applied to a transaction.
VouchersVouchers can be used to reduce the amount of a transaction.
e-Commerce or Order IDsYou can add the ID from your order or e-commerce software to your requests to help correlate transactions in the service and in your systems.
RefundsRefunds are issues to remunerate already collected amounts for a number of reasons.
Returned Tax InformationThe service returns information about tax and liability in the API responses.