Transactions API

Read Transaction

Changed on

Retrieves transaction data.

get/transactions/{transaction_id}

Request

  • Base URL
    https://sandbox.affirm.com/api/v1
  • URL
    https://sandbox.affirm.com/api/v1/transactions/{transaction_id}
  • Auth
    HTTP basic

Path parameters

transaction_idstring required
Example:ABCD-1234

A unique ID representing the transaction’s loan or charge ID. Displays as id in the response.

Query parameters

expandstring

A comma-separated set of related objects to expand in the response. Allowed values are 'checkout' and 'events'.

Headers

Has-Strict-Validationboolean

Optional param to denote whether client-side strict validation is used. Defaults to True if no param provided.

Response

HTTP 200 OK

checkout_idstring

A unique identifier representing the transaction’s checkout ID.

provider_idinteger

A unique identifier of the provider that is financing the transaction.

remove_taxboolean

Indicates if tax was paid by the provider (Affirm, LTO). Used by platform integrations to remove tax.

statusstring

The status of the transaction.

currencystring

The local currency of the transaction with its being a valid subset of the ISO 4217 currency code.

createdstring

The time when the transaction was created. The value is formatted in RFC 3339.

authorization_expirationstring

The time when the transaction can no longer be authorized. The value is formatted in RFC 3339.

amount_refundedinteger

The amount refunded back to the customer from this transaction. The value may be less than the total amount financed if a partial refund was issued. The value is non-negative and is represented in the smallest currency unit, such as cents instead of dollars.

amountinteger

The original amount financed to the customer in this transaction. The value is non-negative and is represented in the smallest currency unit, such as cents instead of dollars.

idstring

A unique ID representing the transaction’s loan or charge ID.

order_idstring

Identifies the order within the merchant's order management system that this transaction corresponds to.

Example response

{
  "checkout_id": "HTSZAGURU7PZ8ZAG",
  "provider_id": 1,
  "remove_tax": true,
  "status": "captured",
  "currency": "USD",
  "created": "2019-01-01T00:00:00.000Z",
  "authorization_expiration": "2019-01-01T00:00:00.000Z",
  "amount_refunded": 5000,
  "amount": 20000,
  "id": "ABCD-1234",
  "order_id": "order_125",
  "events": [
    {
      "amount": 20000,
      "id": "ABCD-1234",
      "currency": "USD",
      "type": "auth",
      "created": "2019-01-01T00:00:00.000Z"
    }
  ]
}

Changes

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status