Transactions using stored payment information can be submitted in a single step. See the customer method for how to get a list of payment methods to reference from this API.
Include the following JSON object with the post to describe the transaction.
Not all fields are required. You can omit optional ones per the rules below. Depending on which fields you supply, the transaction will be classified as Level I, II or III, each of which has different fees and rates associated.
For Level II and III transactions, there are special rules to control if new or existing shipping addresses are to be used. See the choices in the table for a synopsis.
|Field||Description||Required For Level|
|ApiKey: "string",||your api key here||*||*||*|
|MID: "string",||your merchant account number||*||*||*|
|TransactionType: "string"||"sale", "auth", or "credit"||*||*||*|
|Amount: number,||total amount of transaction (including tax & shipping)||*||*||*|
|CustomerId: number,||Id of an existing customer||*||*|
|PaymentMethodId: number,||Id of an existing payment method||*||*|
|Choose one of the following for Shipping Address:|
|1) If you want to create a new Shipping Address...|
|ShippingId: number,||Set to (indicates a new shipping address is being entered)||*|
|SaveNewShippingAddress: bool,||true to save shipping address for future use; false to not save it.||*|
|Tag: "string",||Ship to recipient|
|Postal: "string",||Zip Code|
|1) If you want to reference an existing Shipping Address...|
|ShippingId: number,||Set to Id of an existing shipping address||*|
|LineItems: [||Array of 1 or more line items||*|
|ProductCode: "string",||The product code identifying an item from your product catalog||*|
|Price: number||If not specified, the default price from your product catalog will be used.|
This API returns the following in JSON format if the operation is successful.
|AuthorizationCode||Authorization code for "sale" and "auth" transaction types (null for "credit" types)|
|CustomerID||ID of the Customer|
|CustomerName||Name of the Customer|
|Account||Name of the customer account|
|TransactionType||Sale, Authorization, Credit|
|TransactionTime||Date and Time|
|TotalAmount||Total transaction amount including shipping and tax|
|CaptureAmount||Amount captured only if the transaction had a previous Auth|
|PaymentMethodID||ID of the payment method stored in the vault|
|CardType||Visa, Mastercard, Discover, Amex|
|CardLast4||Last 4 digits of the customer credit card number|
|CustomerPONumber||Level II/III only. Customer PO Number|
|TaxAmount||Level II/III only. Tax Amount|
|ShippingAmount||Level II/III only. Customer PO Number|
|ShippingAddressID||Level II/III only: ID of the shipping address|