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 paginated list of transactions in the response:

    {
      "items": [
        {
          "transactionId": "<TRANSACTION_ID>",
          "type": "SALE",
          "status": "COMPLETED",
          "amount": {
            "amountType": "DETAILED",
            "total": 1099,
            "subTotal": 1099,
            "currency": "USD"
          },
          "references": [
            { "type": "CUSTOM", "value": "<ORDER_ID>" }
          ],
          "createdAt": "<ISO8601_CREATED_TIMESTAMP>",
          "updatedAt": "<ISO8601_UPDATED_TIMESTAMP>"
        }
      ],
      "links": [
        { "rel": "self", "href": "/v2/commerce/stores/<STORE_ID>/transactions?page=1&pageSize=20&sortOrder=DESC" }
      ]
    }

Response fields

Each transaction returns more fields than shown here, including the funding source and the processor response. type is one of AUTHORIZE, CAPTURE, REFUND, ADJUSTMENT, or SALE. status is one of INITIATED, PENDING, FAILED, COMPLETED, or VOIDED. Amounts are in the currency's minor unit, so 1099 is $10.99. references links the transaction to the order it paid for.

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 transactionId:

    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