Saltar al contenido principal

chargesDateRangeKPI

Returns sales KPI totals, time buckets and a per-payment-method breakdown of the charges of the current account over a date range. Only charges in the given currency and in the current live or test mode count. When the caller is restricted to a store or a point of sale, that restriction replaces both storeId and pointOfSaleId. start and end are Unix timestamps in seconds; when omitted, the range is the last 24 hours. The dashboard home page (Today and Reports overview cards) and Settings > Payment methods read it. Except with interval: minute, the figures come from hourly totals. A payment counts in the UTC hour of each state change: a direct sale or a capture counts as succeeded, and each refund counts in the hour it was made. The range covers whole hours: an hour counts when its start is within start to end. Payouts and authorizations not yet captured do not count as succeeded. Refunds are not subtracted from the succeeded figures: net volume is succeededAmount minus refundedAmount. With interval: minute, the range is limited to 24 hours. Each charge counts once, by its current status, in the minute of its last update (updatedAt). A charge counts as succeeded when its status is SUCCEEDED, PAID_OUT, REFUNDED or PARTIALLY_REFUNDED, as refunded when its status is REFUNDED or PARTIALLY_REFUNDED (with its total refunded amount), as canceled when CANCELED and as failed when FAILED. capturedAmount, capturedCount, directAmount and directCount are always 0 because that breakdown is not available at this granularity. Arguments: - start: Range start as a Unix timestamp (seconds). Defaults to end - 86400. - end: Range end as a Unix timestamp (seconds). Defaults to now. - interval: Bucket size for the time series. Defaults to hour. - timezone: IANA timezone for bucket alignment, for example Europe/Madrid. Defaults to UTC. Except with minute, the data comes in whole UTC hours, so bucket edges are exact only for timezones with a whole-hour offset. - storeId: Restricts the figures to one store. Ignored when pointOfSaleId is set. With it, paymentMethods is empty. - pointOfSaleId: Restricts the figures to one point of sale. With it, paymentMethods is empty. - currency: ISO 4217 currency: only charges in this currency count. Defaults to EUR.

chargesDateRangeKPI(
start: Int
end: Int
interval: Interval
timezone: String
storeId: ID
pointOfSaleId: ID
currency: Currencies
): ChargesDateRangeKPI!

Arguments​

chargesDateRangeKPI.start ● Int scalar​

chargesDateRangeKPI.end ● Int scalar​

chargesDateRangeKPI.interval ● Interval enum​

chargesDateRangeKPI.timezone ● String scalar​

chargesDateRangeKPI.storeId ● ID scalar​

chargesDateRangeKPI.pointOfSaleId ● ID scalar​

chargesDateRangeKPI.currency ● Currencies enum​

Type​

ChargesDateRangeKPI object​

Sales figures of chargesDateRangeKPI: totals, time buckets and a per-payment-method breakdown.