Skip to main content
Primer Checkout recipes are short, focused how-to guides that walk you through completing a specific task. Recipes are a great way to add new features or customize behavior in your checkout by following step-by-step instructions. Each guide includes platform-specific code examples for Web, Android, and iOS.

Guides

In-depth tutorials that cover larger topics from start to finish.

Build a custom card form

Create and customize your own card payment form with full control over layout, styling, and behavior

Recipes

Quick solutions for common tasks. Each recipe shows you how to accomplish one specific thing.

Payment flow

Redirect after payment

Navigate users to a confirmation page after completing payment

Show success message

Display a custom success message or modal after payment

Track in analytics

Send payment events to your analytics platform

Log errors

Capture and log payment errors for debugging

Idempotency keys

Prevent duplicate payments by attaching an idempotency key

Use BIN data

Use BIN Data to Control Click to Pay

User experience

Pre-fill cardholder name

Automatically fill in the cardholder name from user profile

Show loading indicator

Display a loading state while payment is processing

Disable buttons

Disable external buttons while payment is processing

Custom controls

External submit button

Trigger card form submission from a button outside the checkout

Display card network

Show the card brand logo as users type their card number

Vault

Display saved methods

Show saved payment methods count and list saved cards