Skip to content

feat(payment): PAYPAL-6645 Tech PoC [FE]: Pay by Invoice checkout — frontend implementation approach - #3292

Draft
serhiiFilkovskyi wants to merge 1 commit into
masterfrom
PAYPAL-6645
Draft

feat(payment): PAYPAL-6645 Tech PoC [FE]: Pay by Invoice checkout — frontend implementation approach#3292
serhiiFilkovskyi wants to merge 1 commit into
masterfrom
PAYPAL-6645

Conversation

@serhiiFilkovskyi

@serhiiFilkovskyi serhiiFilkovskyi commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

What/Why?

Jira: PAYPAL-6645

Rollout/Rollback

Pay by Invoice checkout — front-end implementation approach [POC]

Testing

bcp_pay_by_invoice_succsess.mp4

@serhiiFilkovskyi serhiiFilkovskyi self-assigned this Jun 15, 2026
@serhiiFilkovskyi serhiiFilkovskyi changed the title feat(payment): PAYPAL-6645 draft feat(payment): PAYPAL-6645 Tech PoC [FE]: Pay by Invoice checkout — frontend implementation approach Jun 16, 2026
// `bigcommerce_payments` with `method: 'invoice'`. The BigPay client's id mapper
// doesn't recognise this method, so it would otherwise fall through and send the
// raw method id as the gateway. Remap the id to the provider here.
if (paymentMethod.id === 'bigcommerce_payments_invoices') {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

remove after bigcommerce/bigpay-client-js#473 will be merged

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a Proof-of-Concept frontend integration path for a new “Pay by Invoice” method under BigCommerce Payments by adding a dedicated payment strategy and ensuring the core payment request maps the method to the provider gateway expected by BigPay.

Changes:

  • Remap bigcommerce_payments_invoices to the bigcommerce_payments provider gateway when building the payment request body.
  • Add a new BigCommercePaymentsInvoicesPaymentStrategy and register/export it from the BigCommerce Payments integration package.
  • Introduce (and export) initialization options types for the new invoices strategy.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/core/src/payment/payment-request-transformer.ts Adds a remap so the invoices method sends paymentMethod.id = bigcommerce_payments to align with BigPay expectations.
packages/core/src/payment/payment-request-transformer.spec.ts Adds unit coverage for the new payment method id remap behavior.
packages/bigcommerce-payments-integration/src/index.ts Exposes the new invoices strategy and its initialize options type via the package entry point.
packages/bigcommerce-payments-integration/src/bigcommerce-payments-invoices/create-bigcommerce-payments-invoices-payment-strategy.ts Registers the invoices strategy as a resolvable module for bigcommerce_payments_invoices.
packages/bigcommerce-payments-integration/src/bigcommerce-payments-invoices/bigcommerce-payments-invoices-payment-strategy.ts Implements a minimal invoices payment strategy (initialize + submit order/payment).
packages/bigcommerce-payments-integration/src/bigcommerce-payments-invoices/bigcommerce-payments-invoices-payment-initialize-options.ts Adds initialization option types for the invoices strategy.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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