younifyd
Menu

createPaymentTransaction

Record a PaymentTransaction (authorization, capture, refund) against a Payment.

Use it in a workflow

  1. Add a step and choose the Fluent Commerce connector.
  2. Pick the createPaymentTransaction action (under Create).
  3. 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.

graphql
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.

inputobject
amountobjectrequired3 fields
attributesarray<object>3 fields
authorizationKeystring
cardTypestring
currencyobjectrequired1 fields
paymentobjectrequired1 fields
paymentMethodstringrequired
paymentServiceProviderobjectrequired1 fields
refstringrequired
statusstring
typestringrequired
json
{
  "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}}.

amountobject
amountnumber
scalenumber
unscaledValuenumber
attributesarray<object>
nameobject
typeobject
valueobject
authorizationKeystring
cardTypestring
createdOnstring
currencyobject
alphabeticCodestring
idstring
paymentobject
amountobject3 fields
attributesarray<object>
billingAccountobject14 fields
createdOnstring
idstring
refstring
retailerobject1 fields
statusstring
typestring
updatedOnstring
workflowobject2 fields
workflowRefstring
workflowVersionnumber
paymentMethodstring
paymentServiceProviderobject
attributesarray<object>
clientIdstring
clientSecretstring
createdOnstring
hoststring
idstring
namestring
portnumber
refstring
retailerobject1 fields
serviceAuthTokenstring
updatedOnstring
refstring
statusstring
typestring
updatedOnstring
workflowobject
refstring
versionnumber
workflowRefstring
workflowVersionnumber

Need more? See the Fluent Commerce guide for connection setup and behaviour shared by every action.