createTransaction
MUTATIONCreates 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
The Pay Theory unique identifier for the merchant the transaction is for.
idempotency_key
Optional caller-provided key for identifying retries of this transaction request.
amountRequired
The amount of the transaction. If the FeeMode is SERVICE_FEE, this is the amount of the transaction before fees.
payment_method_id
The Pay Theory unique identifier for the payment method the transaction will be charged to.
payment_method
The payment method to be used for the transaction. This is required if you are not passing in a payment_method_id.
recurring_id
The Pay Theory unique identifier for the recurring payment the transaction is for.
invoice_id
The Pay Theory unique identifier for the invoice the transaction is for.
fee
The amount of the fee that will be charged to the payor for the transaction if the FeeMode is SERVICE_FEE.
fee_mode
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
Customer defined account code for the transaction.
reference
Customer defined reference for the transaction.
send_receipt
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
The description of the transaction that will be displayed on the receipt.
metadata
Custom defined JSON object to be stored with the transaction.
health_expense_type
The health expense type.
Values
CLINICALCOPAYDENTALHEALTHCARERXTRANSITVISION
digital_wallet
The digital wallet.
additional_purchase_data
The additional purchase data.
one_time_use_token
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
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
Customer defined account code for the transaction.
ach_return_details
The details of the ACH return if any.
additional_purchase_data
The additional purchase data.
authorization_id
The authorization id for the transaction.
avs_status
The AVS status for the transaction.
Values
NO_MATCHPOSTAL_CODE_AND_STREET_MATCHPOSTAL_CODE_MATCHSTREET_MATCHUNKNOWN
currency
The type of currency for the transaction.
device_id
-
dispute_status
The status of the dispute if any.
Values
INQUIRYLOSTPENDINGWON
failure_reasons
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
The fee mode on the transaction.
Values
CUSTOM_FEEINTERCHANGEMERCHANT_FEESERVICE_FEE
fees
The amount of the fees charged for the transaction.
flag_for_review
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
The total amount of the transaction.
invoice
The invoice object for the transaction if any.
is_settled
Whether the transaction has been settled.
merchant
The merchant object of the merchant the transaction belongs to.
merchant_uid
The Pay Theory unique identifier for the merchant the transaction is for.
metadata
Custom defined JSON object to be stored with the transaction.
net_amount
The total amount of the transaction after fees.
parent_id
The Pay Theory unique identifier for the parent transaction if any.
payment_method
The payment method used to make the transaction.
processor
-
recurring
The recurring payment that the transaction belongs to if any.
reference
Customer defined reference for the transaction.
refund_reason
The reason for the refund if any.
refund_voidable
Whether the refund can be voided.
refunded_amount
The amount of the transaction that has been refunded if any.
sale_id
The sale id for the transaction if any.
settlement_batch
The unique settlement batch number the transaction belongs to if settled.
splits
An array of split objects associated with this transaction, if any.
status
The status of the transaction.
Values
CANCELEDFAILEDPARTIALLY_REFUNDEDPENDINGREFUNDEDRETURNEDSETTLEDSUCCEEDEDVOIDED
timezone
The timezone the transaction was made in.
transaction_date
The date the transaction was made.
transaction_id
The Pay Theory unique identifier for the transaction.
transaction_type
The type of transfer that was made.
Values
ACH_RETURNDEBITFAILUREREVERSAL
updated_row_at
The date and time the transaction was last updated.