Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate payment processor fees #506

Merged
merged 6 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions docs/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,45 +48,45 @@ The URL should be: https://opencollective.com/{slug}/admin/for-developers

## Fields

| Name | GraphQL v2 | Description | Included? |
| -------------------- | -------------------------------- | --------------------------------------------------------- | ------------------------------- |
| Name | GraphQL v2 | Description | Included? |
| -------------------- | -------------------------------- | --------------------------------------------------------- | ------------------------------------------- |
| date | createdAt | UTC date (ISO 8601) |
| datetime | createdAt | UTC date and time with a second precision (ISO 8601) | Yes |
| datetime | createdAt | UTC date and time with a second precision (ISO 8601) | Yes |
| id | id | unique identifier for the transaction |
| shortId | id | first 8 characters of the `id` | Yes |
| shortId | id | first 8 characters of the `id` | Yes |
| legacyId | legacyId | auto-increment identifier for the transaction |
| group | group | group identifier of the transaction |
| shortGroup | group | first 8 characters of the `group` | Yes |
| description | description | human readable description of the transaction | Yes |
| type | type | `CREDIT` or `DEBIT` | Yes |
| kind | kind | `CONTRIBUTION`, `ADDED_FUNDS`, `EXPENSE`, etc ... | Yes |
| isRefund | isRefund | `REFUND` if it's a refund, empty if not | Yes |
| isRefunded | isRefunded | `REFUNDED` if it was refunded, empty if not | Yes |
| displayAmount | amount | user facing amount and currency as a string | Yes |
| amount | amountInHostCurrency.value | accounted amount | Yes |
| paymentProcessorFee | paymentProcessorFee.value | accounted payment processor fee | Yes |
| hostFee | hostFee.value | accounted host fee | Yes (if flattenHostFee is used) |
| netAmount | netAmountInHostCurrency.value | accounted amount after payment processor fees | Yes |
| balance | balanceInHostCurrency.value | balance of the account after the transaction | Yes (not for hostTransactions) |
| currency | netAmountInHostCurrency.currency | accounted currency | Yes |
| accountSlug | account.slug | slug of the account on the main side of the transaction | Yes |
| accountName | account.name | name of the account on the main side of the transaction | Yes |
| shortGroup | group | first 8 characters of the `group` | Yes |
| description | description | human readable description of the transaction | Yes |
| type | type | `CREDIT` or `DEBIT` | Yes |
| kind | kind | `CONTRIBUTION`, `ADDED_FUNDS`, `EXPENSE`, etc ... | Yes |
| isRefund | isRefund | `REFUND` if it's a refund, empty if not | Yes |
| isRefunded | isRefunded | `REFUNDED` if it was refunded, empty if not | Yes |
| displayAmount | amount | user facing amount and currency as a string | Yes |
| amount | amountInHostCurrency.value | accounted amount | Yes |
| paymentProcessorFee | paymentProcessorFee.value | accounted payment processor fee | Yes (if flattenPaymentProcessorFee is used) |
| hostFee | hostFee.value | accounted host fee | Yes (if flattenHostFee is used) |
| netAmount | netAmountInHostCurrency.value | accounted amount after payment processor fees | Yes |
| balance | balanceInHostCurrency.value | balance of the account after the transaction | Yes (not for hostTransactions) |
| currency | netAmountInHostCurrency.currency | accounted currency | Yes |
| accountSlug | account.slug | slug of the account on the main side of the transaction | Yes |
| accountName | account.name | name of the account on the main side of the transaction | Yes |
| accountType | account.type | type of the account on the main side of the transaction |
| oppositeAccountSlug | oppositeAccount.slug | slug of the account on the opposite side | Yes |
| oppositeAccountName | oppositeAccount.name | name of the account on the opposite side | Yes |
| oppositeAccountSlug | oppositeAccount.slug | slug of the account on the opposite side | Yes |
| oppositeAccountName | oppositeAccount.name | name of the account on the opposite side | Yes |
| oppositeAccountType | oppositeAccount.type | type of the account on the opposite side |
| hostSlug | host.slug | slug of the host accounting the transaction |
| oppositeAccountName | oppositeAccount.name | name of the host accounting the transaction |
| oppositeAccountType | oppositeAccount.type | type of the host accounting the transaction |
| orderId | order.id | unique identifier for the order |
| orderLegacyId | order.legacyId | auto-increment identifier for the order |
| orderFrequency | order.frequency | frequency of the order (`ONETIME`, `MONTHLY` or `YEARLY`) |
| paymentMethodService | paymentMethod.service | service of the payment method ( `STRIPE`, etc ...) | Yes |
| paymentMethodType | paymentMethod.type | type of the payment method (`CREDITCARD`, etc ...) | Yes |
| paymentMethodService | paymentMethod.service | service of the payment method ( `STRIPE`, etc ...) | Yes |
| paymentMethodType | paymentMethod.type | type of the payment method (`CREDITCARD`, etc ...) | Yes |
| expenseId | expense.id | unique identifier for the expense |
| expenseLegacyId | expense.legacyId | auto-increment identifier for the expense |
| expenseType | expense.type | type of the expense (`INVOICE`, `RECEIPT`, etc ...) | Yes |
| payoutMethodType | payoutMethod.type | type of the payout method (`PAYPAL`, etc ...) | Yes |
| expenseType | expense.type | type of the expense (`INVOICE`, `RECEIPT`, etc ...) | Yes |
| payoutMethodType | payoutMethod.type | type of the payout method (`PAYPAL`, etc ...) | Yes |

### Adding fields

Expand Down
Loading