| Product | Summary |
| Digital Payments |
|
PayPal Direct Integration via JavaScript SDK
You can now integrate PayPal directly using the PayPal JavaScript SDK or mobile SDKs, allowing you to render PayPal Smart Buttons inline on your checkout without redirecting buyers to an externally hosted page. To power this, the transaction response now includes a
session_token which can be exchanged at the new POST /transactions/{id}/session endpoint to retrieve required initialisation data.
A minimal end-to-end web example is available at gr4vy/sample-paypal-direct.
Secure Fields UX Enhancements
We have added opt-in UX enhancements to Secure Fields (requires
@gr4vy/secure-fields or @gr4vy/secure-fields-react version 2.7.1 or later) to make card data entry faster and more secure. Features include
-
Auto focus: Set
autoFocuson a field to focus it as soon as it loads, so buyers can start typing without an extra click. -
Auto advance: Configure auto advance on the parent
SecureFieldsinstance to move focus to the next field as soon as the current field validates, with an optional field order to control the sequence. -
Input masking: Configure
maskInputto hide the card number and security code — mask on blur, mask in real time as the user types withmaskOnInput, or keep the last four digits visible withshowLastFour. A custom maskingcharacteris supported. -
Programmatic mask toggle: Call
redactValue()/unredactValue()on a field to build a custom show/hide control, and respond to state changes via theonRedacted/onUnredactedReact callbacks or theredacted/unredactedevents on the JS SDK. -
Field reset: Each field instance exposes a
clear()method to reset its value programmatically — useful for “use a different card” flows. -
Scheme icons: Enable
showSchemeIconson the card number field to render the detected card scheme inline, with options for additional co-branded schemes and placeholder icons before a scheme is detected.
For full setup instructions, see the Secure Fields UX options documentation.