Express methods and billing details
Show Apple Pay, Google Pay, and other express methods where customers look for them, and collect only the billing details you need.
Customers find their wallet wherever they look for it, and they're asked only for the details you need. Fewer fields mean faster checkouts, and you keep only the data you asked for.
Where express methods appear
Every method that supports express checkout, such as Apple Pay and Google Pay, appears in two places:
- The express row, at the top of the checkout, where the wallet fills in the customer's details and pays in one step.
- The method list, alongside the other payment methods, where it only pays, and the customer fills in the details on the page.
You can turn either place off, for a design profile or for a single session. For a session, set express_methods.express_row.enabled or express_methods.method_list.enabled to false.
Collect only what you need
For each session, choose which billing details the checkout collects, in the session's collection object:
| Detail | Options | collection field |
|---|---|---|
| Name | Collect or not | name.enabled |
| Collect or not | email.enabled | |
| Phone | Collect or not | phone_number.enabled |
| Address | None, country, postal code, or full address | billing_address.level set to none, country, postal_code, or full |
Wallets ask only for the details you chose that the page hasn't collected yet. The same collection object also turns on the shipping address and the tax ID.
When Pay.com needs more
When the seller, the tax, the payment method, or shipping needs more than you chose, Pay.com asks the customer for it too. The session lists each added field in collection.added, with reason set to seller, tax, payment_method, or shipping. A payment method that needs more than the customer can give isn't shown.
In this session, Pay.com sells as the merchant of record and adds the email address, which it needs to send the receipt in its name:
curl https://api.sandbox.pay.com/v1/checkout \
-u ':sk-pay-com-sandbox-…' \
-H "Content-Type: application/json" \
-H "idempotency-key: $(uuidgen)" \
-d '{
"mode": "payment",
"customer_reference_id": "cust-jane-doe-001",
"line_items": [{ "price": "prc_691180255557328896", "quantity": 1 }],
"collection": {
"name": { "enabled": false },
"email": { "enabled": false },
"phone_number": { "enabled": false },
"billing_address": { "level": "postal_code" }
},
"express_methods": { "method_list": { "enabled": false } }
}'{
"id": "cs_691215118460661760",
"resource": "checkout_session",
"mode": "payment",
"status": "open",
"url": "https://checkout.pay.com/a/Wm2kR9cXb4Nd",
"seller_of_record": { "type": "pay_com", "entity": "ent_685022401904148480" },
"collection": {
"name": { "enabled": false },
"email": { "enabled": false },
"phone_number": { "enabled": false },
"billing_address": { "level": "postal_code" },
"added": [{ "field": "email", "reason": "seller" }]
},
"express_methods": {
"express_row": { "enabled": true },
"method_list": { "enabled": false }
}
}See Create a checkout session in the Commerce API reference for every field.
Apple Pay and postal codes
Apple Pay can't ask for a postal code alone. When you collect only the postal code, Pay.com asks Apple Pay for the billing address, keeps the postal code and country, and drops the rest before storing anything.