Skip to main content
Version: Lab (preview)

createTransaction

MUTATION

Creates a transaction. With a non-empty idempotency_key, retrying the same request returns the original transaction, including a declined result. Reusing the key with changed request details returns a conflict. Concurrent requests with the same key create one transaction. Without a key or with an empty key, repeated requests can create separate transactions. Unicode keys are supported.

Arguments

merchant_uidRequired
String
The Pay Theory unique identifier for the merchant the transaction is for.
idempotency_key
String
Optional caller-provided key for identifying retries of this transaction request.
amountRequired
Int
The amount of the transaction. If the FeeMode is SERVICE_FEE, this is the amount of the transaction before fees.
payment_method_id
String
The Pay Theory unique identifier for the payment method the transaction will be charged to.
payment_method
PaymentMethodInput
The payment method to be used for the transaction. This is required if you are not passing in a payment_method_id.
recurring_id
String
The Pay Theory unique identifier for the recurring payment the transaction is for.
invoice_id
String
The Pay Theory unique identifier for the invoice the transaction is for.
fee
Int
The amount of the fee that will be charged to the payor for the transaction if the FeeMode is SERVICE_FEE.
fee_mode
FeeMode
The fee mode on the transaction. SERVICE_FEE charges the fees to the payor. MERCHANT_FEE charges the fees to the merchant. Options are:
Values
CUSTOM_FEEINTERCHANGEMERCHANT_FEESERVICE_FEE
account_code
String
Customer defined account code for the transaction.
reference
String
Customer defined reference for the transaction.
send_receipt
Boolean
If the receipt should be sent to the payor. Defaults to false. It is sent to the email address on file with the payment method.
receipt_description
String
The description of the transaction that will be displayed on the receipt.
metadata
AWSJSON
Custom defined JSON object to be stored with the transaction.
health_expense_type
HealthExpenseType
The health expense type.
Values
CLINICALCOPAYDENTALHEALTHCARERXTRANSITVISION
digital_wallet
DigitalWalletInput
The digital wallet.
additional_purchase_data
AdditionalPurchaseDataInput
The additional purchase data.
one_time_use_token
Boolean
If the payment method token should be used for a single transaction. Defaults to false. If set to true the is_active flag on the payment method will be set to false after the transaction
split
[SplitInput]
An array of split objects to distribute the transaction amount to different accounts. The sum of all split amounts must equal less than or equal to the amount of the transaction.

Response

Transaction
account_code
String| null
Customer defined account code for the transaction.
ach_return_details
AchReturnDetails| null
The details of the ACH return if any.
additional_purchase_data
AdditionalPurchaseData| null
The additional purchase data.
authorization_id
String| null
The authorization id for the transaction.
avs_status
AvsStatus| null
The AVS status for the transaction.
Values
NO_MATCHPOSTAL_CODE_AND_STREET_MATCHPOSTAL_CODE_MATCHSTREET_MATCHUNKNOWN
currency
String| null
The type of currency for the transaction.
device_id
String| null
-
dispute_status
DisputeStatus| null
The status of the dispute if any.
Values
INQUIRYLOSTPENDINGWON
failure_reasons
[String]| null
List of strings, if any, detailing the reason a transaction failed. See Failure Codes for a complete list of failure codes and descriptions.
fee_mode
FeeMode| null
The fee mode on the transaction.
Values
CUSTOM_FEEINTERCHANGEMERCHANT_FEESERVICE_FEE
fees
Int| null
The amount of the fees charged for the transaction.
flag_for_review
TransactionReviewStatus| null
A status indiciator for any transactions that are in review. When a transaction is in review the funds will not settle to the merchant until resolved.
Values
EXCEEDS_AUTHEXCEEDS_FEE_LIMITEXCEEDS_THRESHOLDPOTENTIAL_DUPLICATE
gross_amount
Int| null
The total amount of the transaction.
invoice
Invoice| null
The invoice object for the transaction if any.
is_settled
Boolean| null
Whether the transaction has been settled.
merchant
ListMerchant| null
The merchant object of the merchant the transaction belongs to.
merchant_uid
String| null
The Pay Theory unique identifier for the merchant the transaction is for.
metadata
AWSJSON| null
Custom defined JSON object to be stored with the transaction.
net_amount
Int| null
The total amount of the transaction after fees.
parent_id
String| null
The Pay Theory unique identifier for the parent transaction if any.
payment_method
PaymentMethodToken| null
The payment method used to make the transaction.
processor
String| null
-
recurring
RecurringPayment| null
The recurring payment that the transaction belongs to if any.
reference
String| null
Customer defined reference for the transaction.
refund_reason
RefundReason| null
The reason for the refund if any.
refund_voidable
Boolean| null
Whether the refund can be voided.
refunded_amount
Int| null
The amount of the transaction that has been refunded if any.
sale_id
String| null
The sale id for the transaction if any.
settlement_batch
Int| null
The unique settlement batch number the transaction belongs to if settled.
splits
[Split]| null
An array of split objects associated with this transaction, if any.
status
TransactionStatus| null
The status of the transaction.
Values
CANCELEDFAILEDPARTIALLY_REFUNDEDPENDINGREFUNDEDRETURNEDSETTLEDSUCCEEDEDVOIDED
timezone
String| null
The timezone the transaction was made in.
transaction_date
AWSDateTime| null
The date the transaction was made.
transaction_id
String| null
The Pay Theory unique identifier for the transaction.
transaction_type
TransactionType| null
The type of transfer that was made.
Values
ACH_RETURNDEBITFAILUREREVERSAL
updated_row_at
AWSDateTime| null
The date and time the transaction was last updated.