The information about a payment can be retrieved with the Get Payment API.
Note that the request body and parameter schemas outlined in this guide are the exact same as in the previous version of OMS, as the Unified Commerce platform supports backwards compatibility for this API. The only change to this request is the format of the base endpoint, as shown in the below table. Remember to provide the x-vol-tenant key for authentication in the headers.
Version | 2.0 |
Production URL | https://{tenantId}-translation.mozu.com/api/v2/payment/{paymentID} |
Sandbox URL | https://{tenantId}-translation.mozu.com/api/v2/payment/{paymentID} |
Supported Formats | JSON |
HTTP Method | PUT |
Schema | https://integration.shopatron.com/api/v2/schema/payment.json |
Example
The Get Payment API call requires only one additional piece of data: the Payment ID that was generated when the payment was initiated with Add Order Item or another API action. The ID can be retrieved from either the response of these actions or by looking up the order that the payment belongs to. This could be done with a Get Order call or a Search Payment call with an Order ID as the search parameter.
Otherwise, it is a standard GET call as defined with the above table. In this example, the payment included these particular properties:
- PayPal payment type (ID 09090909) on Order 11111111
- $5.00 for Manufacturer 2000
This guide will demonstrate how to put together each section of the request to get this information.
General Information
The elements of a payment are simply the relevant IDs, amount charged, and payment method information. There are no other sections of data that are returned, so the response is fairly simple.
The Full Request
Using the URL format as outlined above, the entire call is simple to put together. This will return all of the information for the payment with the above example ID.
https://integration.shopatron.com/api/v2/payment/09090909
The Full Response
This is the full response returned by the API.
{ "paymentID": 09090909, "orderID": 11111111, "amountCharged": 5, "customerPaymentMethod": { "manufacturerID": 2000, "catalogID": 5, "currency": "USD", "paymentMethodID": 32323232, "customerID": "80808080", "billingAddressID": "65456545", "paymentType": "EB", "cardIssuer": "EB", "payPalPaymentID": "", "payPalPayerID": "6V20", "payPalToken": "321E" } }