comecerodocs

Get invoice payment options

GET
/invoices/{invoice_id}/options

Returns how the customer can pay this invoice: the payment methods and card types your gateways take in the invoice currency, shipping choices for the customer's country, and the customer fields still needed. Call it before you show a payment form. Takes a secret, trusted or limited token. A limited token must be bound to the invoice and cannot see a draft.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

invoice_id*string

The invoice id.

Query Parameters

expand?string

Comma-separated child objects to return in full instead of as a URL, for example customer,payments. Use dot notation for nested objects (items.product), up to four levels deep. A single object takes up to 12 paths; a list takes up to 2, applied to every item. Extra paths are dropped without an error. See Expanding objects.

show?string

Comma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

hide?string

Comma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

formatted?boolean

When true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.

Defaultfalse

Response Body

The payment options.

application/json
  1. response

What the customer can do to pay this invoice right now: the payment methods and card types your gateways accept in the invoice currency, the shipping choices, and the customer fields still needed. A payment page reads this before it shows the payment form.

invoice_id?string

The invoice these options are for.

account_id?string

The account the invoice belongs to.

test?boolean

True for a test invoice.

payment_methods?array<>

The payment methods the customer can use. Each one has payment_method_type, surcharge and currency, plus the setup data its type needs in the browser (for example stripe_publishable_key for stripe, wallets and google_pay or apple_pay for wallet, amazon_pay_merchant_id for amazon_pay).

card_types?array<string>

The card brands accepted, for example visa or mastercard.

shipping_quotes?array<>

The shipping methods available for the customer's country. Empty when the country is not known yet.

customer_required_fields?array<string>

Customer fields that must be filled before payment, from your payment settings and the item types, for example billing_address.country.

customer_optional_fields?array<string>

Customer fields the payment form may ask for but does not need.

allowed_customer_countries?array<string>

The countries the customer may be in, as two-letter ISO 3166 codes.

require_cardholder_name?boolean

True when a card gateway in use needs the name on the card.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/invoices/string/options'
Example Response
{  "invoice_id": "4827-KTPMW-639",  "account_id": "AB1234",  "test": true,  "payment_methods": [    {      "payment_method_type": "credit_card",      "surcharge": 0,      "currency": null    },    {      "payment_method_type": "paypal",      "surcharge": 0,      "currency": null    }  ],  "card_types": [    "visa",    "mastercard",    "amex"  ],  "shipping_quotes": [],  "customer_required_fields": [    "name",    "email",    "billing_address.country"  ],  "customer_optional_fields": [    "billing_address.postal_code"  ],  "allowed_customer_countries": [    "US",    "CA",    "GB"  ],  "require_cardholder_name": false}