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.

Topics

You can add information for the following concepts and entities as fields in the JSON: