financialTransaction graphQL query and mutation
Author:
Fluent Commerce
Changed on:
23 Nov 2023
Overview
The
`financialTransaction`
Key points
- The page provides GQL example of how to use :
`financialTransaction`
- Create
- Update
- Query
Create
1POST: {{fluentApiHost}}/graphql
2
3QUERY:
4
5
6
7mutation createFinancialTransaction ($input: CreateFinancialTransactionInput) {
8 createFinancialTransaction (input: $input) {
9 id
10 ref
11 type
12 status
13 workflowRef
14 workflowVersion
15 createdOn
16 updatedOn
17 total
18 currency
19 externalTransactionCode
20 externalTransactionId
21 cardType
22 paymentMethod
23 paymentProviderName
24 }
25}
26Variables:
27
28
29
30{
31 "input": {
32 "cardType": "VISA",
33 "ref": "202311210002",
34 "paymentMethod": "CARD",
35 "paymentProvider": "CYBERSOURCE1",
36 "type": "PAYMENT",
37 "externalTransactionCode": "EXT12333332",
38 "externalTransactionId": "EXTID9292922",
39 "amount": 1200.0,
40 "currency": "AUD",
41 "order": {
42 "id": "5004501"
43 }
44 }
45}
Language: graphqlschema
Name: financialTransaction create example
Description:
[Warning: empty required content area]Update
1POST: {{fluentApiHost}}/graphql
2
3Query
4
5
6
7mutation UpdateFinancialTransaction ($input: UpdateFinancialTransactionInput) {
8 updateFinancialTransaction (input: $input) {
9 id
10 createdOn
11 updatedOn
12 status
13 ref
14 }
15}
16
17
18Variables
19
20
21
22{
23 "input": {
24 "id": 5000304,
25 "status": "SAVED"
26 }
27}
Language: graphqlschema
Name: financialTransaction update example
Description:
[Warning: empty required content area]Query
1POST: {{fluentApiHost}}/graphql
2
3Query:
4
5
6
7{
8 financialTransaction(id:5000316){
9 id
10 attributes{
11 name
12 }
13 status
14 cardType
15 ref
16 createdOn
17 id
18 status
19 paymentMethod
20 type
21 externalTransactionCode
22 externalTransactionId
23 total
24 currency
25 order{
26 id
27 ref
28 }
29
30
31 }
32}
Language: plain_text
Name: financialTransaction query example
Description:
[Warning: empty required content area]1POST: {{fluentApiHost}}/graphql
2
3Query:
4
5
6
7{
8 financialTransactions(first:2000){
9 edges{
10 node{
11 id
12 attributes{
13 name
14 }
15 status
16 cardType
17 ref
18 createdOn
19 id
20 status
21 paymentMethod
22 type
23 externalTransactionCode
24 externalTransactionId
25 total
26 currency
27 order{
28 id
29 ref
30 }
31
32 }
33 }
34 }
35}
Language: plain_text
Name: financialTransactions query example
Description:
[Warning: empty required content area]