use Checkout Settingshook
Returns the applied to the checkout.
Anchor to useCheckoutSettingsuse Checkout Settings()
- orderSubmission"DRAFT_ORDER" | "ORDER"
The type of order that will be created once the buyer completes checkout.
- shippingAddress
Settings describing the behavior of the shipping address.
- paymentTermsTemplate
Represents the merchant configured payment terms.
CheckoutSettings
UseCheckoutSettingsGeneratedType
Returns the `checkoutSettings` applied to the checkout.
CheckoutSettings
export function useCheckoutSettings<
Target extends RenderExtensionTarget = RenderExtensionTarget,
>(): CheckoutSettings {
return useSubscription(useApi<Target>().checkoutSettings);
}
CheckoutSettings
Settings describing the behavior of the buyer's checkout.
- orderSubmission
The type of order that will be created once the buyer completes checkout.
"DRAFT_ORDER" | "ORDER"
- paymentTermsTemplate
Represents the merchant configured payment terms.
PaymentTermsTemplate
- shippingAddress
Settings describing the behavior of the shipping address.
ShippingAddressSettings
export interface CheckoutSettings {
/**
* The type of order that will be created once the buyer completes checkout.
*/
orderSubmission: 'DRAFT_ORDER' | 'ORDER';
/**
* Represents the merchant configured payment terms.
*/
paymentTermsTemplate?: PaymentTermsTemplate;
/**
* Settings describing the behavior of the shipping address.
*/
shippingAddress: ShippingAddressSettings;
}
PaymentTermsTemplate
Represents the payment terms template object.
- id
A globally-unique ID.
string
- name
The name of the payment terms translated to the buyer's current language. See [localization.language](/docs/api/checkout-ui-extensions/apis/standardapi#properties-propertydetail-localization).
string
- dueDate
The due date for net payment terms as a ISO 8601 formatted string `YYYY-MM-DDTHH:mm:ss.sssZ`.
string
- dueInDays
The number of days between the issued date and due date if using net payment terms.
number
export interface PaymentTermsTemplate {
/**
* A globally-unique ID.
* @example 'gid://shopify/PaymentTermsTemplate/1'
*/
id: string;
/**
* The name of the payment terms translated to the buyer's current language. See [localization.language](/docs/api/checkout-ui-extensions/apis/standardapi#properties-propertydetail-localization).
*/
name: string;
/**
* The due date for net payment terms as a ISO 8601 formatted string `YYYY-MM-DDTHH:mm:ss.sssZ`.
*/
dueDate?: string;
/**
* The number of days between the issued date and due date if using net payment terms.
*/
dueInDays?: number;
}
ShippingAddressSettings
Settings describing the behavior of the shipping address.
- isEditable
Describes whether the buyer can ship to any address during checkout.
boolean
export interface ShippingAddressSettings {
/**
* Describes whether the buyer can ship to any address during checkout.
*/
isEditable: boolean;
}