feat: forward provision_network_token in card action payload#261
Merged
piotr-gralicki-cko merged 2 commits intoMay 12, 2026
Merged
Conversation
There was a problem hiding this comment.
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_tokento the allowlisted payload fields inhandleCardActions. - Bump package version from
1.9.2to1.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.
lukasz-k-bieszczad-cko
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The card action payload built in
handleCardActionsis an explicit whitelist of allowed fields, so anything passed throughoptionsthat is not on that list gets silently dropped before the request leaves the SDK.provision_network_token(introduced server-side in POCP-1128 onprocessout/api#5420, exposed onPOST /invoices/{id}/capture,POST /invoices/{id}/authorizeandPOST /customers/{id}/tokens) is one such field, so callers usingmakeCardPayment/makeCardTokenwithprovision_network_token: falsewere 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=truehad noprovision_network_tokeneven though the option was passed tomakeCardPayment. After the change, the value is preserved.POCP-1145
Refs: POCP-1128, POCP-1131, POCP-1142