Support
Manage orders and customersView transactions

How to view transactions

View as Markdown

Look up payment transaction history for a store — authorizations, captures, sales, refunds, and adjustments.

Overview

Transactions represent payment activity associated with orders: authorizations, captures, sales, refunds, and adjustments. The Transaction API is a read-only REST API under v2 (this differs from the other Commerce REST endpoints which use v1).

Prerequisites

The following prerequisites are required before you view transactions:

  • a GoDaddy account with an active commerce store
  • a Personal Access Token (PAT) with the commerce.transaction:read scope
  • your storeId

    Find your store ID

    Go to Your stores to find your store ID.

List transactions

GET /v2/commerce/stores/{storeId}/transactions retrieves all transactions for a store. The following optional query parameters narrow the results:

ParameterTypeDescription
pageintegerPage number to retrieve (default: 1)
pageSizeintegerResults per page (default: 10)
totalRequiredbooleanInclude total count in the response
transactionIdsstringComma-separated transaction IDs to filter
updatedAtAfterdatetimeFilter transactions updated after this timestamp
updatedAtBeforedatetimeFilter transactions updated before this timestamp
sortBystringField to sort by (updatedAt)
sortOrderstringSort direction (ASC or DESC, default: ASC)

The following procedure lists the most recent 20 transactions.

  1. Retrieve a page of transactions:

    curl -s "https://api.godaddy.com/v2/commerce/stores/${STORE_ID}/transactions?pageSize=20&sortOrder=DESC" \
      -H "Authorization: Bearer $GODADDY_PAT"
  2. Review the response including the paginated list of transactions:

    {
      "items": [
        {
          "id": "<TRANSACTION_ID>",
          "orderId": "<ORDER_ID>",
          "type": "<TRANSACTION_TYPE>",
          "status": "<TRANSACTION_STATUS>",
          "amount": {
            "value": "<TRANSACTION_AMOUNT>",
            "currency": "<ISO_4217_CURRENCY_CODE>"
          },
          "createdAt": "<ISO8601_CREATED_TIMESTAMP>",
          "updatedAt": "<ISO8601_UPDATED_TIMESTAMP>"
        }
      ],
      "page": 1,
      "pageSize": 20
    }

Get a transaction

GET /v2/commerce/stores/{storeId}/transactions/{transactionId} retrieves a single transaction by ID.

The following procedure reads a single transaction by ID.

  • Retrieve a single transaction by its id:

    TRANSACTION_ID="<TRANSACTION_ID>"
    
    curl -s "https://api.godaddy.com/v2/commerce/stores/${STORE_ID}/transactions/${TRANSACTION_ID}" \
      -H "Authorization: Bearer $GODADDY_PAT"

Common errors

The following table lists common errors when viewing transactions, the most likely cause, and additional notes:

StatusMost likely causeNote
401PAT is missing or expired.Go to Authentication to generate a new token.
403Token doesn't include the commerce.transaction:read scope.
404Store ID or transaction ID doesn't exist or isn't accessible with the provided token.
429Rate limit exceeded.Honor the Retry-After header before retrying.

Agent & Automation Notes

Scopescommerce.transaction:read
IdempotentYes
DestructiveNo
On failureSafe to retry on any error. Transaction reads are idempotent.

Last updated on

How is this guide?

On this page