Integrating with Your Store and Applications

Read an overview of how you can use the API's request to integrate the service with your store or applications.

This topic outlines how you can approach your integration based on the API request. Your implementation can also vary based on different scenarios, like for B2B or digital goods. Examples of these are provided in the Transaction Processing topic.

Requests

The following table summarizes the available requests:

RequestUse Case
Calculate TaxCalculate tax before a buyer's details are confirmed.
Store TransactionStore a transaction for later confirmation.
Confirm TransactionConfirm a transaction after the buyer's details are confirmed.
Retrieve TransactionRetrieve a specified transaction from the transaction database.
Retrieve Transaction RequestsRetrieve all the requests for a specified transaction.
Refund TransactionIssue a full or partial refund.

This graphic shows how some of them can be used in a webstore:

Example Requests

Example Requests

The following sections discuss examples of how you might use each request:

Integrating tax calculation (Calculate Tax)

The tax calculation function allows you to retrieve a tax rate.

To model the tax calculation function, you use the Calculate Tax request.

You can use this to integrate the tax calculation function with your checkout process. For example, you might use it to calculate the tax on a good that is displayed on a UI before a buyer makes a purchase.

Integrating stored transactions (Store Transaction)

The API models transactions where the details are not confirmed as stored transactions. This is analogous to how an unconfirmed payment might be held until the payment method is cleared in a clearing house for credit cards.

You use the Store Transaction request to integrate these types of transactions with your checkout process.

For example, you might use a Store Transaction request when a buyer places some goods in their basket but has not gone to the checkout to confirm the purchase.

Integrating confirmed transactions (Confirm Transaction)

The API models payments where the buyer's details are confirmed as confirmed transactions. The payment details are usually confirmed in these cases and the goods are dispatched.

You use the Confirm Transaction request to integrate these types of transactions with your checkout process.

For example:

curl --request POST \
  --url https://seller-transaction-api.sandbox.marketplace.taxamo.com/api/v3/seller/transactions/PJyj7WQAAAAYTSOvTCmQLpBvs7KRe1lL6v3GSnQ/confirm \
  --header 'content-type: application/json' \
  --header "x-marketplace-seller-token: $TOKEN" \
  --data '{}'

Retrieving transactions (Retrieve Transaction)

You can use the Retrieve Transaction request to retrieve the details for a specified transaction key.

Retrieving transaction requests (Retrieve Transaction Requests)

You can use the Retrieve Transaction Requests request to retrieve all the requests for a specified transaction key.

Configuring refunds (Refund Transaction)

You can integrate full or partial refunds using tax inclusive or exclusive amounts. More information is provided in the Refunds topic.