- One-time payments process a single transaction with 3DS when required. The SDK collects card details, creates an order, and captures payment upon approval.
- Save payment methods (vaulting) store cards for future purchases. The server creates setup tokens, and the client submits card details to complete vaulting with optional 3DS.
One-time payment
On your server, create an order and define SCA and 3DS settings. Usepayment_source.card.attributes.verification.method
and supply return and cancel URLs in experience_context
.
Verification methods
- Use
SCA_ALWAYS
to attempt 3DS for eligible cards and regions. - Use
SCA_WHEN_REQUIRED
to rely on network or regulatory mandates.
Submit card details
On the client side, initialize the SDK and card fields. Submit the order and handle each possible outcome.Example order endpoint
Use this Express handler to create a PayPal order and optionally include 3DS parameters based on your request body.Save payment method
On the server, create a vault setup token to save a payment method and require 3DS. Specify a verification method in the request.Submit card with setup token
On the client side, initialize the SDK and card fields. Submit the order and handle each possible outcome.Best practices
- Include both the
return_url
andcancel_url
in all 3DS requests. - Handle every submit state and add
break;
in each switch case. - Track the liability shift in
data
to manage risk.