checkout

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "1.5.0"

Version identifies the current library version. Should match the git tag

Variables

View Source
var ErrNotFound = errors.New("resource not found")

Functions

func GetUserAgent

func GetUserAgent() string

Types

type AdyenBadConfig

type AdyenBadConfig struct {
	// \`error:psp:bad_config`
	Type string `json:"type"`
	// Some fields are invalid.
	Message string `json:"message"`
	// An object containing `psp` and an array of objects with the invalid fields.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the configuration to initialize the [Adyen payment connector](/configuring-adyen) contains at least one invalid field. *

func (AdyenBadConfig) MarshalJSON

func (obj AdyenBadConfig) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type AdyenInitError

type AdyenInitError struct {
	// \`error:psp:bad_config`
	Type string `json:"type"`
	// Could not initialise Adyen.
	Message string `json:"message"`
	// An object containing `psp`, `clientKey`, and `enviroment`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the [Adyen payment connector](/configuring-adyen) cannot be initialized. *

func (AdyenInitError) Error

func (obj AdyenInitError) Error() string

func (AdyenInitError) MarshalJSON

func (obj AdyenInitError) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type AdyenTimeout

type AdyenTimeout struct {
	// \`error:psp:bad_config`
	Type string `json:"type"`
	// Timeout while initialising Adyen.
	Message string `json:"message"`
	// An object containing `psp`, `clientKey`, and `enviroment`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when a timeout error occurs while initializing the [Adyen payment connector](/configuring-adyen). *

func (AdyenTimeout) MarshalJSON

func (obj AdyenTimeout) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type Amount added in v1.5.0

type Amount struct {
	// Amount in the smallest indivisible unit of a currency, such as:
	//
	// * Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as `500`).
	// * The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as `5`).
	CentAmount int `json:"centAmount"`
	// Currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
	CurrencyCode string `json:"currencyCode"`
}

* * The amount related to a [payment action](ctp:checkout:type:PaymentAction). *

type ApplicationDeactivated

type ApplicationDeactivated struct {
	// \`error:init:bad_config`
	Type string `json:"type"`
	// Application `{applicationKey}` for commercetools Checkout `{projectKey}` is disabled.
	Message string `json:"message"`
	// An object containing `projectKey` and `applicationKey`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the requested [application](/configuring-checkout#applications) is deactivated. Activate the application in the Merchant Center to continue. *

func (ApplicationDeactivated) MarshalJSON

func (obj ApplicationDeactivated) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type ApplicationNotFound

type ApplicationNotFound struct {
	// \`error:init:bad_config`
	Type string `json:"type"`
	// Application `{applicationKey}` for commercetools Checkout `{projectKey}` not found.
	Message string `json:"message"`
	// An object containing `projectKey` and `applicationKey`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the requested [application](/configuring-checkout#applications) is not found. The application may have been deleted or its configuration is incorrect. *

func (ApplicationNotFound) MarshalJSON

func (obj ApplicationNotFound) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type BadInputData

type BadInputData struct {
	// \`error:init:bad_config`
	Type string `json:"type"`
	// Some fields are invalid.
	Message string `json:"message"`
	// An object containing an array of `field`, `message`, and `invalidValue`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the `checkoutConfig` [object](/sdk) contains one or more invalid fields. *

func (BadInputData) MarshalJSON

func (obj BadInputData) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type ByProjectKeyPaymentIntentsByPaymentIdRequestBuilder added in v1.5.0

type ByProjectKeyPaymentIntentsByPaymentIdRequestBuilder struct {
	// contains filtered or unexported fields
}

func (*ByProjectKeyPaymentIntentsByPaymentIdRequestBuilder) Post added in v1.5.0

* * Specific Error Codes: * - [MultipleActionsNotAllowed](ctp:checkout:type:MultipleActionsNotAllowedError) * - [RequiredField](ctp:checkout:type:RequiredFieldError) * - [ResourceNotFound](ctp:checkout:type:ResourceNotFoundError) *

type ByProjectKeyPaymentIntentsByPaymentIdRequestMethodPost added in v1.5.0

type ByProjectKeyPaymentIntentsByPaymentIdRequestMethodPost struct {
	// contains filtered or unexported fields
}

func (*ByProjectKeyPaymentIntentsByPaymentIdRequestMethodPost) Dump added in v1.5.0

func (*ByProjectKeyPaymentIntentsByPaymentIdRequestMethodPost) Execute added in v1.5.0

func (rb *ByProjectKeyPaymentIntentsByPaymentIdRequestMethodPost) Execute(ctx context.Context) (result *interface{}, err error)

* * Specific Error Codes: * - [MultipleActionsNotAllowed](ctp:checkout:type:MultipleActionsNotAllowedError) * - [RequiredField](ctp:checkout:type:RequiredFieldError) * - [ResourceNotFound](ctp:checkout:type:ResourceNotFoundError) *

func (*ByProjectKeyPaymentIntentsByPaymentIdRequestMethodPost) WithHeaders added in v1.5.0

type ByProjectKeyPaymentIntentsRequestBuilder added in v1.5.0

type ByProjectKeyPaymentIntentsRequestBuilder struct {
	// contains filtered or unexported fields
}

func (*ByProjectKeyPaymentIntentsRequestBuilder) WithPaymentId added in v1.5.0

type ByProjectKeyRequestBuilder added in v1.5.0

type ByProjectKeyRequestBuilder struct {
	// contains filtered or unexported fields
}

func (*ByProjectKeyRequestBuilder) PaymentIntents added in v1.5.0

type CancelPaymentAction added in v1.5.0

type CancelPaymentAction struct {
}

* * Requests to [cancel the authorization](/payments-lifecycle#authorization-cancellation) for a Payment. Checkout will cancel the Payment(/../api/projects/payments#payment) and will request the PSP to proceed with the financial process to cancel the authorization. * * You cannot request to cancel the authorization for a Payment that has already been [captured](/payments-lifecycle#payment-capture). *

func (CancelPaymentAction) MarshalJSON added in v1.5.0

func (obj CancelPaymentAction) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type CapturePaymentAction added in v1.5.0

type CapturePaymentAction struct {
	// Amount to be captured. It must be less than or equal to the [authorized](/payments-lifecycle#authorization) amount.
	Amount Amount `json:"amount"`
}

* * Requests to [capture](/payments-lifecycle#payment-capture) the given amount from the customer. Checkout will request the PSP to proceed with the financial process to capture the amount. *

func (CapturePaymentAction) MarshalJSON added in v1.5.0

func (obj CapturePaymentAction) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type CartEmptiedDuringCheckout

type CartEmptiedDuringCheckout struct {
	// \`error:cart:empty`
	Type string `json:"type"`
	// Cart `{cartId}` was emptied during checkout.
	Message string `json:"message"`
	// An object containing `cartId`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the [Cart](/../api/projects/carts) was emptied during the checkout process. It is not possible to recover from this, the customer must restart the checkout process. *

func (CartEmptiedDuringCheckout) MarshalJSON

func (obj CartEmptiedDuringCheckout) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type CartEmpty

type CartEmpty struct {
	// \`error:cart:empty`
	Type string `json:"type"`
	// Cart `{cartId}` is empty.
	Message string `json:"message"`
	// An object containing `cartId`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the [Cart](/../api/projects/carts) for the current checkout is empty. The Cart must contain at least one [Line Item](/../api/carts-orders-overview#line-items). *

func (CartEmpty) MarshalJSON

func (obj CartEmpty) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type CartNotFound

type CartNotFound struct {
	// \`error:cart:not_found`
	Type string `json:"type"`
	// Cart `{cartId}` for commercetools Checkout `{projectKey}` and application `{applicationKey}` not found.
	Message string `json:"message"`
	// An object containing `projectKey`, `applicationKey`, and `cartId`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the [Cart](/../api/projects/carts) is not found. To start the checkout process, a valid Cart with at least one [Line Item](/../api/carts-orders-overview#line-items) is required. *

func (CartNotFound) MarshalJSON

func (obj CartNotFound) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type CartWithExistingPayment added in v1.5.0

type CartWithExistingPayment struct {
	// \`error:payment:failed`
	Type string `json:"type"`
	// Cart with existing approved payment.
	Message string `json:"message"`
	// An object containing `cartId`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when trying to add a Payment(/../api/projects/payments) to a [Cart](/../api/projects/carts) that already references an approved Payment. *

func (CartWithExistingPayment) MarshalJSON added in v1.5.0

func (obj CartWithExistingPayment) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type CheckoutCancelled

type CheckoutCancelled struct {
	// \`info:app:status`
	Type string `json:"type"`
	// Checkout cancelled.
	Message string `json:"message"`
	// An object containing additional data about the event.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the customer cancels the checkout process. *

func (CheckoutCancelled) MarshalJSON

func (obj CheckoutCancelled) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type CheckoutCompleted

type CheckoutCompleted struct {
	// \`info:app:status`
	Type string `json:"type"`
	// Checkout for `{orderId}` completed.
	Message string `json:"message"`
	// An object containing `orderId`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the customer completes the checkout process. *

func (CheckoutCompleted) MarshalJSON

func (obj CheckoutCompleted) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type CheckoutLoaded

type CheckoutLoaded struct {
	// \`info:app:status`
	Type string `json:"type"`
	// Checkout loaded.
	Message string `json:"message"`
	// An object containing additional data about the event.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when Checkout has been loaded successfully and is waiting for the configuration parameters passed in the `checkoutConfig` [object](/sdk). *

func (CheckoutLoaded) MarshalJSON

func (obj CheckoutLoaded) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type CheckoutStarted

type CheckoutStarted struct {
	// \`info:app:status`
	Type string `json:"type"`
	// Checkout started.
	Message string `json:"message"`
	// An object containing additional data about the event.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the configuration parameters are passed successfully through the `checkoutConfig` [object](/sdk) and the checkout process starts. *

func (CheckoutStarted) MarshalJSON

func (obj CheckoutStarted) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg *ClientConfig) (*Client, error)

NewClient creates a new client based on the provided ClientConfig

func (*Client) WithProjectKey added in v1.5.0

func (c *Client) WithProjectKey(projectKey string) *ByProjectKeyRequestBuilder

type ClientConfig

type ClientConfig struct {
	URL         string
	Credentials *clientcredentials.Config
	LogLevel    int
	HTTPClient  *http.Client
	UserAgent   string
}

type Date

type Date struct {
	Year  int
	Month time.Month
	Day   int
}

Date holds date information for Commercetools API format

func NewDate

func NewDate(year int, month time.Month, day int) Date

NewDate initializes a Date struct

func (*Date) MarshalJSON

func (d *Date) MarshalJSON() ([]byte, error)

MarshalJSON marshals into the commercetools date format

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data into a Date struct

type DecodeStruct

type DecodeStruct interface {
	DecodeStruct(map[string]interface{}) error
}

type DeprecatedFields added in v1.5.0

type DeprecatedFields struct {
	// \`warn:init:bad_config`
	Type string `json:"type"`
	// Some fields are deprecated.
	Message string `json:"message"`
	// An object containing an array of `field` and `message`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the `checkoutConfig` [object](/sdk) contains one or more deprecated fields. *

func (DeprecatedFields) MarshalJSON added in v1.5.0

func (obj DeprecatedFields) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type ErrorObject added in v1.5.0

type ErrorObject interface{}

* * This is the representation of a single error.

type GeneralError added in v1.5.0

type GeneralError struct {
	// Description about any known details of the problem, for example, `"Write operations are temporarily unavailable"`.
	Message string `json:"message"`
}

* * Returned when a server-side problem occurs. In some cases, the requested action may successfully complete after the error is returned. Therefore, it is recommended to verify the status of the requested resource after receiving a 500 error. * * If you encounter this error, report it using the [Support Portal](https://commercetools.atlassian.net/servicedesk/customer/portal/30). *

func (GeneralError) Error added in v1.5.0

func (obj GeneralError) Error() string

func (GeneralError) MarshalJSON added in v1.5.0

func (obj GeneralError) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type GenericRequestError

type GenericRequestError struct {
	Content    []byte
	StatusCode int
	Response   *http.Response
}

func (GenericRequestError) Error

func (e GenericRequestError) Error() string

type InitTimeout

type InitTimeout struct {
	// \`error:init:timeout`
	Type string `json:"type"`
	// Timeout error, no init message received.
	Message string `json:"message"`
	// An object containing additional data about the event.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when Checkout has not received the configuration parameters passed through the `checkoutConfig` [object](/sdk) on time. *

func (InitTimeout) MarshalJSON

func (obj InitTimeout) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type InvalidToken

type InvalidToken struct {
	// \`error:token:invalid`
	Type string `json:"type"`
	// The token is invalid.
	Message string `json:"message"`
	// An object containing additional data about the event.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the `accessToken` is invalid. *

func (InvalidToken) MarshalJSON

func (obj InvalidToken) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type MultipleActionsNotAllowedError added in v1.5.0

type MultipleActionsNotAllowedError struct {
	// `"Actions accepts only one action at time. Array size must be 1."`
	Message string `json:"message"`
}

* * Returned when `actions` in the request body contains more than one object. *

func (MultipleActionsNotAllowedError) Error added in v1.5.0

func (MultipleActionsNotAllowedError) MarshalJSON added in v1.5.0

func (obj MultipleActionsNotAllowedError) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type NoPaymentMethods

type NoPaymentMethods struct {
	// \`error:init:bad_config`
	Type string `json:"type"`
	// There are no payment methods configured.
	Message string `json:"message"`
	// An object containing additional data about the event.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when no payment method is set up for an [application](/configuring-checkout#applications). Add at least one **Payment method** to the application in the Merchant Center. *

func (NoPaymentMethods) MarshalJSON

func (obj NoPaymentMethods) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type NoShippingMethods

type NoShippingMethods struct {
	// \`warn:init:bad_config`
	Type string `json:"type"`
	// There are no shipping methods matching cart.
	Message string `json:"message"`
	// An object containing `cartId`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when no [Shipping Method](/../api/projects/shippingMethods) is available for the shipping address of the [Cart](/../api/projects/carts). This may indicate an incomplete configuration. *

func (NoShippingMethods) MarshalJSON

func (obj NoShippingMethods) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type OrderCreated

type OrderCreated struct {
	// \`info:order:status`
	Type string `json:"type"`
	// Order `{orderId}` created.
	Message string `json:"message"`
	// An object containing `orderId`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when an [Order](/../api/projects/orders) is created after a successful checkout process. *

func (OrderCreated) MarshalJSON

func (obj OrderCreated) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type OrderCreationError added in v1.5.0

type OrderCreationError struct {
	// \`error:order:failed`
	Type string `json:"type"`
	// Order creation failed with approved payment.
	Message string `json:"message"`
	// An object containing `cartId` and `errors`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when an [Order](/../api/projects/orders) that references an approved Payment(/../api/projects/payments) cannot be created. *

func (OrderCreationError) Error added in v1.5.0

func (obj OrderCreationError) Error() string

func (OrderCreationError) MarshalJSON added in v1.5.0

func (obj OrderCreationError) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type Payment added in v1.5.0

type Payment struct {
	// Action to execute for the given Payment.
	Actions []PaymentAction `json:"actions"`
}

type PaymentAction added in v1.5.0

type PaymentAction struct {
	// Action to execute for the given Payment.
	Action PaymentOperation `json:"action"`
	// Amount to be captured or refunded.
	Amount *Amount `json:"amount,omitempty"`
}

* * Depending on the action specified, Checkout requests the [Payment Service Provider](/../checkout/configuring-checkout#supported-payment-service-providers) to capture, refund, or cancel the authorization for the given Payment. *

type PaymentOperation added in v1.5.0

type PaymentOperation string

* * The possible values for a [payment action](ctp:checkout:type:PaymentAction). *

const (
	PaymentOperationCapturePayment PaymentOperation = "capturePayment"
	PaymentOperationRefundPayment  PaymentOperation = "refundPayment"
	PaymentOperationCancelPayment  PaymentOperation = "cancelPayment"
)

type ProjectIsDeactivated added in v1.5.0

type ProjectIsDeactivated struct {
	// \`error:init:bad_config`
	Type string `json:"type"`
	// commercetools Checkout `{projectKey}` is deactivated.
	Message string `json:"message"`
	// An object containing `projectKey`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the commercetools Checkout [`projectKey`](/sdk) is deactivated and cannot be initialized. Contact support via the [Support Portal](https://commercetools.atlassian.net/servicedesk/customer/portal/30). *

func (ProjectIsDeactivated) MarshalJSON added in v1.5.0

func (obj ProjectIsDeactivated) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type RefundPaymentAction added in v1.5.0

type RefundPaymentAction struct {
	// Amount to be refunded. It must be less than or equal to the [captured](/payments-lifecycle#payment-capture) amount.
	Amount *Amount `json:"amount,omitempty"`
}

* * Requests to [refund](/payments-lifecycle#refund) the given amount to the customer. Checkout will request the PSP to proceed with the financial process to refund the amount. *

func (RefundPaymentAction) MarshalJSON added in v1.5.0

func (obj RefundPaymentAction) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type Region added in v1.5.0

type Region string

* * The Region in which the Checkout application is [hosted](/../checkout/installing-checkout#regions-and-hosts). *

const (
	RegionEuropeWest1Gcp         Region = "europe-west1.gcp"
	RegionUsCentral1Gcp          Region = "us-central1.gcp"
	RegionAustraliaSoutheast1Gcp Region = "australia-southeast1.gcp"
)

type RequiredFieldError added in v1.5.0

type RequiredFieldError struct {
	// `"A value is required for field $field."`
	Message string `json:"message"`
	// Name of the field missing the value.
	Field string `json:"field"`
}

* * Returned when a value is not defined for a required field. *

func (RequiredFieldError) Error added in v1.5.0

func (obj RequiredFieldError) Error() string

func (RequiredFieldError) MarshalJSON added in v1.5.0

func (obj RequiredFieldError) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type ResourceNotFoundError added in v1.5.0

type ResourceNotFoundError struct {
	// `"The Resource with ID $resourceId was not found."`
	Message string `json:"message"`
}

* * Returned when the resource addressed by the request URL does not exist. *

func (ResourceNotFoundError) Error added in v1.5.0

func (obj ResourceNotFoundError) Error() string

func (ResourceNotFoundError) MarshalJSON added in v1.5.0

func (obj ResourceNotFoundError) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type ResponseMessage

type ResponseMessage interface{}

type SetUserAgentTransport

type SetUserAgentTransport struct {
	T http.RoundTripper
	// contains filtered or unexported fields
}

func (*SetUserAgentTransport) RoundTrip

func (sat *SetUserAgentTransport) RoundTrip(req *http.Request) (*http.Response, error)

type ShippingAddressMissing

type ShippingAddressMissing struct {
	// \`error:cart:field_required`
	Type string `json:"type"`
	// The shippingAddress field is missing for cart `{cartId}`.
	Message string `json:"message"`
	// An object containing `cartId`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the checkout is initialised with [`skipShipping` set to `true`](/installing-checkout#placeholder-values). You must populate the `shippingAddress` field of the Cart with at least the shipping country. *

func (ShippingAddressMissing) MarshalJSON

func (obj ShippingAddressMissing) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type UnallowedOrigin

type UnallowedOrigin struct {
	// \`error:init:bad_config`
	Type string `json:"type"`
	// Unallowed origin `{origin}`, allowed origins `{allowedOrigins}`.
	Message string `json:"message"`
	// An object containing `origin` and `allowedOrigins`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when Checkout cannot be initialized because the URL that is trying to initialize it is not in the list of the allowed URLs for the [application](/configuring-checkout#applications). Add the URL to the **Origin URLs** list in your application settings in the Merchant Center. *

func (UnallowedOrigin) MarshalJSON

func (obj UnallowedOrigin) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

type UnavailableLocale

type UnavailableLocale struct {
	// \`error:init:bad_config`
	Type string `json:"type"`
	// The provided locale `{locale}` is not available for translated definitions.
	Message string `json:"message"`
	// An object containing `locale`.
	Payload *interface{} `json:"payload,omitempty"`
}

* * Generated when the provided `locale` is not [available for localization](/installing-checkout#locales). The localization falls back to English. *

func (UnavailableLocale) MarshalJSON

func (obj UnavailableLocale) MarshalJSON() ([]byte, error)

MarshalJSON override to set the discriminator value or remove optional nil slices

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL