Get Customer Payment Method Information
The Get Customer Payment Method API retrieves information specifically about a customer’s payment method. This is related to the Payment APIs, as the Payment APIs involve the use of payment method objects. POST requests made to the Payment API create a Customer Payment Method that is tied to a given order, as demonstrated in the Create Payment guide.
However, making this GET request to /customerPaymentMethod is slightly different from a GET request to /payment. The Payment API returns not only the payment method but also information about the associated order and amount charged for that particular payment instance. The Customer Payment Method API, as shown in this guide, returns only the information about the method itself.
Version | 2.0 |
Call | https://integration.shopatron.com/api/v2/customerPaymentMethod/{paymentMethodID} |
Supported Formats | JSON |
HTTP Method | GET |
Schema | https://integration.shopatron.com/api/v2/schema/customerPaymentMethod.json |
The .json address above can be used to access the schema within Postman. An example use of the Customer Payment Method API follows below, or view the schema or the sample Postman collection.
Example
In this example, the payment method details included these particular properties:
- Payment Method ID 01234567
- USD Paypal payment
General Information
The response returns the following information about a payment method:
- Identification Information (Manufacturer, Catalog, Payment, etc. IDs)
- Payment Details (currency, card types, any relevant tokens)
The Full Request
Using the URL format as outlined in the table above, the entire call is simple to put together.
https://integration.shopatron.com/api/v2/customerPaymentMethod/01234567
The Full Response
This is the full response returned by the API.
{
"manufacturerID": 0000,
"catalogID": 2,
"currency": "USD",
"paymentMethodID": 01234567,
"customerID": "76543210",
"billingAddressID": "11111111",
"paymentType": "PP",
"cardIssuer": "",
"payPalPaymentID": "O-999999999999",
"payPalPayerID": "AAAAAAAAAAAAA",
"payPalToken": "AA-BB11CC22"
}