Sponsoring
Checkout
verify/payment.json
method: GET
secured: true
url: /v1/promote/checkout/verify/payment.json
If the cart has enough information to calculate a balance then you will see a response like this:
{ "CartId": 0, "ClearedCards": null, "PaymentMethod": null, "Balance": { "due": { "value": 52.85, "key": "TotalDue", "label": "Total Due", "formattedValue": "$52.85" }, "extra": [ { "value": 1.23, "key": "TotalFreight", "label": "Freight Amount", "formattedValue": "$1.23" }, { "value": 6, "key": "TotalHandling", "label": "Handling Charge", "formattedValue": "$6.00" }, { "value": 4.62, "key": "TotalTax", "label": "Tax Amount", "formattedValue": "$4.62" } ] }, "AutoShipBalance": { "due": { "value": 41, "key": "TotalAutoShip", "label": "My Monthly Autoship", "formattedValue": "$41.00" } }, "Details": { "Retail": { "value": 56.6, "key": "TotalRetail", "label": "Total Retail", "formattedValue": "$56.60" }, "Cost": { "value": 41, "key": "TotalCost", "label": "Cost", "formattedValue": "$41.00" }, "PV": { "value": 36, "key": "TotalPV", "label": "Total PV", "formattedValue": "36" }, "BV": { "value": 41, "key": "TotalBV", "label": "Total BV", "formattedValue": "41.00" }, "items": { "value": 1, "key": "TotalItems", "label": "Total Items", "formattedValue": "1" } }, "RequireSignature": null, "ShippingMethod": { "value": 11130, "label": "Delivered" }, "ShippingMethods": [ { "value": 11130, "label": "Delivered" }, { "value": 11131, "label": "Delivered-Next Day" } ], "HasAutoShip": true, "AutoShipDayMin": 8, "AutoShipDayMax": 20, "success": true, "error": [] }
The following values are significant
Property | Notes |
---|---|
Balance.due |
This is the amount that will be charged to the credit card |
Balance.extra |
This is an array of values that contribute to the Balance.due like Taxes, Freight and Handeling. Each market has unique rules of which of these extra charges to show (and in what amount). To keep this logic out of the app this is provided as an array with correct labels. The order of this array is also the intended display order. The sum of Details.cost.value and all of the Balance.extra.value properties will always equal the Balance.due.value .
|
Details.cost |
This is amount of the Balance.due that the products are contirbuting to. |
method: POST
secured: true
url: /v1/promote/checkout/verify/payment.json
Field | Notes |
---|---|
CardType |
A ENUM represeting the various supported credit cards
Type: String (VISA|MASTERCARD|DISCOVER) |
CardNumber |
The full credit card number (non neumeric values are stripped so it will accept spaces or hyphens)
Type: String |
ExpMonth |
The expiration month of the credit card.
Type: Integer |
ExpYear |
The full 4 digit expiration year of the credit card.
Type: Integer |
PostalCode |
The postal code of the owner of the credit card.
Type: String |
AutoShipDay |
The day of the month where autoship will take place. The default is the 12th.
Type: Integer (Optional, 12 if not passed) |
If you pass any invalid data you will see a response like this:
{ "CartId": 0, "ClearedCards": null, "PaymentMethod": null, "Balance": null, "success": false, "error": [ { "field": "CreditCard", "error": "ErrorCreditCard", "message": "Credit Card Number is not valid" } ] }
If you pass valid data you will see a response like this:
{ "CartId": 101259, "ClearedCards": null, "PaymentMethod": null, "Balance": null, "success": true, "error": [] }