Payment
A payment
A payment groups the approved conversions it settles. Reached through
affiliates { payments }, the totals are recalculated from that affiliate's share of the
payment rather than the payment as a whole.
caution
Cancelled payments are excluded only when the query carries at least one argument — any
argument, including limit. A bare payments { … } with no arguments returns cancelled
payments alongside the rest.
Fields
| Field | Type | Availability | Notes |
|---|---|---|---|
id | Int! | The record's Refersion id. | |
created | String | Unix timestamp in seconds, not an ISO 8601 date. | |
total_conversions | Int | Counted from the payment's approved conversions when you query it. | |
total | String | Summed from the payment's approved conversions when you query it, rather than read from the payment record. | |
commission_total | String | Summed from the payment's approved conversions when you query it, rather than read from the payment record. | |
currency | String | ISO 4217 currency code. | |
payment_method | String | How the payment was made. | |
note | String | ||
shop | Shop | ||
conversions | [Conversion] | Takes arguments — see below. | |
affiliates | [Affiliate] | Takes arguments — see below. |
Sorting
sort accepts id, created, commission_total, total on this type, and sorts descending.
Any other value is ignored without an error.
Field arguments
conversions
| Argument | Type | Notes |
|---|---|---|
id | ID | Returns only the record with this id. |
status | String | Exact match. The returned type lists the values that can appear. |
type | String | Exact match. The returned type lists the values that can appear. |
created_from | Int | Unix timestamp in seconds. Exclusive — matches rows created strictly after it. |
created_to | Int | Unix timestamp in seconds. Inclusive — matches rows created at or before it. |
affiliate_id | ID | Returns only records belonging to this affiliate. |
offer_id | ID | Returns only records tied to this offer. |
sort | String | Field to sort by, descending. Each type accepts its own short list — see Sorting on the returned type's page. Anything else is ignored without an error. |
limit | Int | Rows to return. Anything outside 1–200 is replaced by 200. |
before | ID | Returns only rows with an id lower than this. Cursor-style paging. |
after | ID | Returns only rows with an id higher than this. Cursor-style paging. |
offset | Int | Rows to skip before returning results. |
affiliates
| Argument | Type | Notes |
|---|---|---|
id | ID | Returns only the record with this id. |
status | String | Exact match. The returned type lists the values that can appear. |
email | String | Exact match on the affiliate's email address. |
created_from | Int | Unix timestamp in seconds. Exclusive — matches rows created strictly after it. |
created_to | Int | Unix timestamp in seconds. Inclusive — matches rows created at or before it. |
last_login_from | Int | Unix timestamp in seconds. Exclusive. |
last_login_to | Int | Unix timestamp in seconds. Inclusive. |
last_conversion_from | Int | Unix timestamp in seconds. Exclusive. |
last_conversion_to | Int | Unix timestamp in seconds. Inclusive. |
sort | String | Field to sort by, descending. Each type accepts its own short list — see Sorting on the returned type's page. Anything else is ignored without an error. |
before | ID | Returns only rows with an id lower than this. Cursor-style paging. |
after | ID | Returns only rows with an id higher than this. Cursor-style paging. |
limit | Int | Rows to return. Anything outside 1–200 is replaced by 200. |
offset | Int | Rows to skip before returning results. |
Referenced by
Related
- Queries — the root fields that reach this type.
- Filtering and Sorting — how arguments behave.