Menu
createPaymentTransaction
Record a PaymentTransaction (authorization, capture, refund) against a Payment.
Use it in a workflow
- Add a step and choose the Fluent Commerce connector.
- Pick the createPaymentTransaction action (under Create).
- Fill in the fields below, then reference the result from later steps as
{{createpaymenttransaction.response.data}}.
Query
This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.
mutation CreatePaymentTransaction($input: CreatePaymentTransactionInput) {
createPaymentTransaction(input: $input) {
amount {
amount
scale
unscaledValue
}
attributes {
name
type
value
}
authorizationKey
cardType
createdOn
currency {
alphabeticCode
}
id
payment {
amount {
amount
scale
unscaledValue
}
attributes {
name
type
value
}
billingAccount {
address
attributes
createdOn
customer
id
name
ref
retailer
status
type
updatedOn
workflow
workflowRef
workflowVersion
}
createdOn
id
ref
retailer {
id
}
status
type
updatedOn
workflow {
ref
version
}
workflowRef
workflowVersion
}
paymentMethod
paymentServiceProvider {
attributes {
name
type
value
}
clientId
clientSecret
createdOn
host
id
name
port
ref
retailer {
id
}
serviceAuthToken
updatedOn
}
ref
status
type
updatedOn
workflow {
ref
version
}
workflowRef
workflowVersion
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"input": {
"amount": {
"amount": 0,
"scale": 0,
"unscaledValue": 0
},
"currency": {
"alphabeticCode": "string"
},
"payment": {
"ref": "string"
},
"paymentMethod": "string",
"paymentServiceProvider": {
"ref": "string"
},
"ref": "string",
"type": "string",
"attributes": [
{
"name": "string",
"type": "string",
"value": "string"
}
],
"authorizationKey": "string",
"cardType": "string",
"status": "string"
}
}
Response
Read the result with {{createpaymenttransaction.response.data.data.createPaymentTransaction}}. If the API returns errors, the step fails and they are at {{createpaymenttransaction.response.data.errors}}.
Need more? See the Fluent Commerce guide for connection setup and behaviour shared by every action.
Was this page helpful?