Fluent Commerce Logo
Docs
Sign In

paymentServiceProvider graphQL query and mutation

Essential knowledge

Author:

Fluent Commerce

Changed on:

23 Nov 2023

Overview

The

`paymentServiceProvider`
is an entity that is required as part of the payment process. 


Key points

  • The page provides GQL example of how to use
    `paymentServiceProvider`
    :
    • Create
    • Update
    • Query

Create

1POST: {{fluentApiHost}}/graphql
2
3QUERY:
4
5
6
7mutation createPaymentServiceProvider ($input: CreatePaymentServiceProviderInput) {
8    createPaymentServiceProvider (input: $input) {
9        id
10        ref
11        name
12        clientId
13        clientSecret
14        serviceAuthToken
15        host
16        port
17        createdOn
18        updatedOn
19    }
20}
21Variables:
22
23
24
25{
26  "input": {
27    "ref": "PSP002:199",
28    "name": "001",
29    "clientId": "CL123",
30    "clientSecret": "verySecret01",
31    "serviceAuthToken": "Token01",
32    "host": "host:202020",
33    "port": 20000,
34    "attributes": {
35      "name": "Attr_name",
36      "type": "STRING",
37      "value": "big value"
38    },
39    "retailer": {
40      "id": 199
41    }
42  }
43}

Language: graphqlschema

Name: paymentServiceProvider Create sample

Description:

[Warning: empty required content area]

Update

1POST: {{fluentApiHost}}/graphql
2
3Query
4
5
6
7mutation updatePaymentServiceProvider ($input: UpdatePaymentServiceProviderInput) {
8    updatePaymentServiceProvider (input: $input) {
9        id
10        ref
11        name
12        clientId
13        clientSecret
14        serviceAuthToken
15        host
16        port
17        createdOn
18        updatedOn
19    }
20}
21Variables
22
23
24
25{
26  "input": {
27    "ref": "PSP002:199",
28    "name": "new PSP 2",
29"clientId": "CL123 22",
30"clientSecret": "verySecret01 22",
31    "serviceAuthToken": "Token01 222",
32    "host": "host:202020233233",
33    "port": 22222,
34    "attributes": [
35    {
36      "name": "isCredited",
37      "type": "Boolean",
38      "value": true
39    },
40    {
41    "name": "Attr_name",
42    "type": "STRING",
43    "value": "big value2"
44    }
45    ]
46  }
47}

Language: graphqlschema

Name: paymentServiceProvider update sample

Description:

[Warning: empty required content area]

Query

1POST: {{fluentApiHost}}/graphql
2
3Query:
4
5
6
7{
8    paymentServiceProvider(ref:"PSP002:199"){
9                id
10                ref
11                clientId
12                clientSecret
13                createdOn
14                updatedOn
15                host
16                name
17                port
18                retailer{
19                    id
20                }
21                serviceAuthToken
22                attributes{
23                    name
24                    type
25                    value
26                }
27
28
29            }
30
31}

Language: plain_text

Name: paymentServiceProvider query example

Description:

[Warning: empty required content area]
1POST: {{fluentApiHost}}/graphql
2
3Query:
4
5
6
7{
8    paymentServiceProviders(first:300, retailer:{id:199}){
9        edges{
10            node{
11                id
12                ref
13                clientId
14                clientSecret
15                createdOn
16                updatedOn
17                host
18                name
19                port
20                retailer{
21                    id
22                }
23                serviceAuthToken
24                attributes{
25                    name
26                    type
27                    value
28                }
29
30
31            }
32        }
33    }
34}

Language: graphqlschema

Name: paymentServiceProviders query example

Description:

[Warning: empty required content area]
Fluent Commerce

Fluent Commerce

Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo