Charges

Retrieve a charge

get/charges/{id}

Path parameters

idinteger required

The SamCart ID for the charge

Query parameters

created_at_minstring date-time

Filter by created at date/time at or after given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 00:00:00 UTC.

created_at_maxstring date-time

Filter by created at date/time at or before given value. Accepts ISO 8601/RFC 3339 format with timezone (e.g., 2025-01-16T14:30:00Z) or date-only (e.g., 2025-01-16). Date-only values use 23:59:59 UTC.

test_modeboolean

Filter by test mode

Response

Successful operation

idinteger

The SamCart ID for the charge

customer_idinteger

The SamCart ID for the customer that created the charge

affiliate_idinteger nullable

The SamCart ID of the affiliate credited for the order

order_idinteger

The SamCart ID for the order. For subscriptions, this will be the order ID of the original purchase

subscription_rebill_idinteger nullable

The SamCart ID for the subscription rebill. If the charge is for a non-subscription product, this will be null.

test_modeboolean

Indicates whether the transaction was done while the product was in test mode

processor_name'Stripe' | 'Braintree' | 'Authorize.net' | 'PayPal'

The name of the processor for the order

processor_transaction_idstring

The processor ID generated for the charge

currencystring

The 3 letter identifier for the currency for the charge

card_usednumber nullable

The last 4 digits of the card that was used. PayPal charges will have a null value.

charge_refund_status'refunded' | 'partially_refunded' nullable

Indicates whether a refund and the type of refund. If no refund was created the value will be null.

order_datestring date-time

The UTC date and time for when the order was created

created_atstring date-time

The UTC date and time that the charge was created

totalinteger

The total (in cents) for the charge including taxes and shipping fees

Example response

{
  "id": 1337,
  "customer_id": 1234,
  "affiliate_id": 1001,
  "order_id": 1001,
  "subscription_rebill_id": 1001,
  "test_mode": true,
  "processor_name": "Stripe",
  "processor_transaction_id": "01234ABCD",
  "currency": "USD",
  "charge_refund_status": "partially_refunded",
  "order_date": "2021-03-08 00:18:35",
  "created_at": "2021-03-08 00:18:35",
  "total": 10025
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.