Edit Payment The Payment API allows an existing payment method to be edited. The entire structure of the payment method or only certain details can be changed as necessary.
Version 2.0 Call https://integration.shopatron.com/api/v2/payment/{paymentID} Supported Formats JSON HTTP Method PUT Schema https://integration.shopatron.com/api/v2/schema/payment.json
The .json address above can be used to access the schema within Postman. An example use of the Payment API follows below, or view the schema or the sample Postman Collection .
Example This example case creates a call that will edit an existing payment. The request will specify the following properties:
Customer 900000 paying for Order 232323 Setting payment as a standard credit card This guide will demonstrate how to put together each section of the call to make these changes.
Required Parameters Two parameters are always required to edit a payment:
Parameters Type Description orderID integer A unique identifier for the order. The minimum value is “1”. customerPaymentMethod object The payment information for the customer’s method. One of 8 options.
Optional Parameters The API can also change these additional elements:
Parameters Type Description paymentID integer A unique identifier for the payment. The minimum value is “0”. holdType enum The type of the payment hold (WAITING_FOR_PAYMENT) if applicable. maxCharge number The maximum amount to charge to the card (null or -1 to indicate that there is no limit, or a positive number to indicate the maximum). This is the same as the maxAmount parameter of the Create Order API. amountCharged number The actual amount be charged as payment.
Customer Payment Method There are eight different options for building a customer’s payment method (/customerPaymentMethod/{object} ). The below properties are used as a base for all methods, with only billingAddressID being required.
Parameters Type Description paymentMethodID integer A unique identifier for the payment method. The minimum value is “1”. customerID string A unique identifier for the customer, usually an integer. The minimum length is 1. billingAddressID string A unique identifier for the billing address, usually an integer. The minimum length is 1. manufacturerID integer A unique identifier for the manufacturer. The minimum value is “1”. catalogID integer The catalog number for a manufacturer. The minimum value is “0”. catalogIDs array A single or list of catalogIDs, which must be positive integers. The minimum length is 1. currency enum The International Standards Organization Code for the payment currency (USD, CAD, etc.). locale enum The Internet Engineering Task Force code for the language. The default is “en-US”.
From here, the other parameters vary depending on how the customer is paying. This example uses the below structure for a standard card payment, based on the full card number. Go to the schema for the full list of available options.
Parameters Type Description paymentType enum The payment type (CC). cardIssuer enum The abbreviation for the card issuer (VI, BC, etc.). cardNumber string The full credit card number. cardSecurityCode string The Card Security Code or Card Verification Value number. The maximum length is 20. cardExpiration string The card expiration date, ex: 04-2018.
The Full Request This is the full request that will edit a payment method.
{
"orderID":232323,
"customerPaymentMethod":{
"billingAddressID":1111111,
"customerID":900000,
"paymentType":"CC",
"cardIssuer":"VI",
"cardNumber":"4111111111111111",
"cardSecurityCode":"123",
"cardExpiration":"02-2018"
},
"maxCharge":1000
}
The returned response follows the same structure as the Get Payment API, providing information about the payment that was changed.