Layout
This topic describes how to configure the Rebilly Instruments JS library to change the layout of elements.
Address
Use thepaymentInstrument.address
property, in the RebillyInstruments.mount()
function, to configure your address forms. If this option is not passed, the default Rebilly layout will be used.For a complete list of options, see Rebilly Instruments reference.
import RebillyInstruments from '@rebilly/instruments';
RebillyInstruments.mount({
publishableKey: 'pk_sandbox_123',
organizationId: 'org-123',
websiteId: 'my-website-id',
apiMode: 'sandbox',
paymentInstruments: {
address: {
name: 'combined',
region: 'split',
}
}
});
Name | |
---|---|
default |
![]() |
stacked |
![]() |
combined |
![]() |
Region | |
---|---|
default |
![]() |
stacked |
![]() |
split |
![]() |
Coupons
To configure whether coupons are available, use thefeatures.showCoupons
property in the RebillyInstruments.mount()
function. By default coupons are not available, and the default value is null
.To specify where coupons are displayed, provide an array with one or more of the following keys.
Key | Description |
---|---|
summary | Displays the coupons within the summary details. |
confirmation | Displays coupons within the confirmation screen before the customer confirms their purchase details. |
import RebillyInstruments from '@rebilly/instruments';
RebillyInstruments.mount({
publishableKey: 'pk_sandbox_123',
organizationId: 'org-123',
websiteId: 'my-website-id',
apiMode: 'sandbox',
features: {
showCoupons: ['summary', 'confirmation'],
}
});