Skip to content

feat(checkout): CHECKOUT-9820 implement fetching b2b checkout config for PO#3248

Closed
richapatel1510 wants to merge 1 commit into
masterfrom
CHECKOUT-9820
Closed

feat(checkout): CHECKOUT-9820 implement fetching b2b checkout config for PO#3248
richapatel1510 wants to merge 1 commit into
masterfrom
CHECKOUT-9820

Conversation

@richapatel1510

@richapatel1510 richapatel1510 commented May 14, 2026

Copy link
Copy Markdown
Contributor

What/Why?

Adds a new loadPoConfig() SDK method (plus getPoConfig(), isLoadingPoConfig(), getLoadPoConfigError() accessors) so the checkout-js usePoConfig hook can read the B2B store's purchase order (PO) configuration — whether the PO field is enabled, its label, and whether it's required.

Fetches from GET {b2bApiSettings.baseUrl}/api/v2/store-configs/checkout, authenticated with the B2B token from state (with a BC JWT fallback for the authToken header when the B2B token hasn't been loaded yet).

Rollout/Rollback

Revert this PR

Testing

  • CI checks

bcToken = body.token;
}

return this._requestSender.get(`${b2bBaseUrl}/api/v2/store-configs/checkout`, {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, we may not need to do this as PO config may be surfaced at the initializing checkout like extraFields.

@richapatel1510

Copy link
Copy Markdown
Contributor Author

This is not required anymore. Will raise separate PR to get these config from checkoutSettings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants