Skip to content

feat: forward provision_network_token in card action payload#261

Merged
piotr-gralicki-cko merged 2 commits into
masterfrom
chore/expose-provision-network-token-in-payload
May 12, 2026
Merged

feat: forward provision_network_token in card action payload#261
piotr-gralicki-cko merged 2 commits into
masterfrom
chore/expose-provision-network-token-in-payload

Conversation

@piotr-gralicki-cko
Copy link
Copy Markdown
Contributor

@piotr-gralicki-cko piotr-gralicki-cko commented May 12, 2026

The card action payload built in handleCardActions is an explicit whitelist of allowed fields, so anything passed through options that is not on that list gets silently dropped before the request leaves the SDK.

provision_network_token (introduced server-side in POCP-1128 on processout/api #5420, exposed on POST /invoices/{id}/capture, POST /invoices/{id}/authorize and POST /customers/{id}/tokens) is one such field, so callers using makeCardPayment / makeCardToken with provision_network_token: false were ending up with the value silently stripped.

Adding it to the payload makes the value reach the API.

Verification

Tested locally against complete-test-tool + local api stack. Before the change, body sent on POST /capture?legacyrequest=true had no provision_network_token even though the option was passed to makeCardPayment. After the change, the value is preserved.

POCP-1145

Refs: POCP-1128, POCP-1131, POCP-1142

Copy link
Copy Markdown

Copilot AI left a comment

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 updates the card-action request payload builder (handleCardActions) to forward the provision_network_token option through to the ProcessOut API, preventing it from being silently dropped due to the SDK’s explicit allowlist.

Changes:

  • Add provision_network_token to the allowlisted payload fields in handleCardActions.
  • Bump package version from 1.9.2 to 1.9.3.

Reviewed changes

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

File Description
src/processout/processout.ts Adds provision_network_token to the whitelisted card action payload so the option reaches capture/authorize/token endpoints.
package.json Bumps the SDK version to 1.9.3.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@piotr-gralicki-cko piotr-gralicki-cko merged commit d9980f4 into master May 12, 2026
9 checks passed
@piotr-gralicki-cko piotr-gralicki-cko deleted the chore/expose-provision-network-token-in-payload branch May 12, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants