Retrieve a browser payment request
Returns the arguments for the browser's Payment Request API for an Apple Pay checkout on this cart: the method data, the display items, shipping options and total, and which shopper details to ask for. Only apple_pay is supported (404 for another type). Google Pay is set up from the wallet payment option in the cart options instead. A currency with no Apple Pay gateway is 400. Any token type may call it; a limited token only for a bound cart.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
cart_id*stringThe id of the cart.
payment_method_type*"apple_pay"The payment method type. Only apple_pay is supported; another valid type is 404, an unknown one 400.
"apple_pay"The browser payment request.
application/json- response
The arguments for the browser's Payment Request API (new PaymentRequest(methodData, details, paymentOptions)) for this cart, built from its items, tax, shipping quotes and required customer fields. Only Apple Pay (apple_pay) is built this way. The field names inside follow the W3C Payment Request API, so they are camel case.
url*stringThe URL of this payment request.
uripayment_url*stringWhere to send the payment when the shopper approves, POST /carts/{cart_id}/payments.
urimethodData*array<>The payment methods the browser may offer.
details*What the payment sheet shows.
paymentOptions*Which shopper details the sheet asks for, from the cart's required customer fields.
merchant_validation_url?stringPresent for Apple Pay. Send the browser's validation URL here from the onmerchantvalidation handler.
uricurl -X GET 'https://api.comecero.com/api/v1/carts/string/user_agent_payment_request/apple_pay'{ "url": "https://api.comecero.com/api/v1/carts/0091307952465CafhFSTa1/user_agent_payment_request/apple_pay", "payment_url": "https://api.comecero.com/api/v1/carts/0091307952465CafhFSTa1/payments", "methodData": [ { "supportedMethods": "https://apple.com/apple-pay", "data": { "version": 1, "merchantIdentifier": "merchant.com.example.shop", "merchantCapabilities": [ "supports3DS", "supportsCredit", "supportsDebit" ], "supportedNetworks": [ "visa", "masterCard", "amex" ], "countryCode": "US", "requiredBillingContactFields": [ "postalAddress" ] } } ], "details": { "displayItems": [ { "label": "PDF Viewer Pro", "amount": { "currency": "USD", "value": "199.90" }, "pending": false }, { "label": "Tax", "amount": { "currency": "USD", "value": "14.99" }, "pending": false } ], "shippingOptions": [ { "id": "digital", "label": "Digital", "amount": { "currency": "USD", "value": "0.00" }, "selected": false } ], "modifiers": [], "total": { "label": "Total", "amount": { "currency": "USD", "value": "214.89" }, "pending": false } }, "paymentOptions": { "requestPayerName": true, "requestPayerEmail": true, "requestPayerPhone": false, "requestShipping": true }, "merchant_validation_url": "https://api.comecero.com/api/v1/carts/0091307952465CafhFSTa1/user_agent_payment_request/apple_pay/merchant_validate"}List cart up-sells GET
Returns up-sell offers for the cart: a better product in place of one in the cart, picked from your active up-sell promotions. Each offer says which product it replaces and how much more it costs. To take an offer, add its product with its `up_sell_id`; the replaced item is removed. One page. Any token type may call it; a limited token only for a bound cart.
Update a browser payment request POST
Sends a change from the Apple Pay sheet (a new shipping address or shipping option) to the cart. The cart's customer and shipping method change, tax and shipping are worked out again, and the new payment request comes back for `updateWith()`. Only `apple_pay` is supported. A closed cart is `422`. Any token type may call it; a limited token only for a bound cart.