| Base URL |
|---|
| https://checkout.north.com |
Embed individual payment fields directly into your existing form. The Embedded Fields integration method gives you complete control over your checkout layout while we securely handle the sensitive payment information for you. All sensitive transaction data is sent directly from the hosted fields to the payment processor, bypassing your server environment and reducing your PCI compliance requirements.
Prerequisites
Before you begin, ensure you complete the following prerequisites. Once you create and save a checkout using the Checkout Designer in step 1 of this guide, your credentials will be available by navigating to the Embedded Checkout dashboard and selecting the checkout instance.
To get started quickly, clone the Embedded Checkout GitHub repository for sample code that sends the fields to North from your site. You'll need:
- A checkout created using the Checkout Designer
- Your Private Embedded Checkout API Key
- Your Checkout ID
- Your Profile ID (your merchant profile identifier)
Migrating to Embedded Checkout
Existing North clients migrating to Embedded Checkout can use your existing North Developer login and Merchant IDs (MIDs). Contact Sales Engineering to make your MIDs available in your developer account so they can be assigned to an Embedded Checkout instance.
Transaction Types
Transactions completed with the Embedded Checkout Fields are Sales—meaning Auth and Capture are completed in one request. After the initial sale, a transaction token is returned in the response that can be used for subsequent payment functionality, such as voids, refunds, and reversals. Read the API Specification to learn more and contact us to discuss adding additional transaction types to your integration.
Quick Start
What You'll Build
Use this guide to embed payment fields into your custom checkout form. You control the form layout and submit button, while the embedded fields securely capture payment details. When your customer submits your form, you'll call our submit method to process the payment and handle the result.
Checkout Flow
- Create and save your checkout using the Checkout Designer, then copy your credentials from the Embedded Checkout dashboard.
- Add the checkout.js script to your page.
- For each payment attempt, create a checkout session on your server.
- Mount the payment fields in your form. Access the global checkout object exposed by the script. checkout.mount() will use the session token to render the secure payment fields inside the specified DOM element on your page.
- Submit the payment when your form is submitted using checkout.submit().
- Handle the payment response and verify completion via the session status endpoint.
Session Lifecycle and Statuses
A checkout session progresses through the following statuses. See step 6 in this guide for more details.
status | Meaning |
|---|---|
Open | Session created, checkout not yet loaded |
Verified | Checkout form loaded and verified |
Approved | Payment successfully processed and approved; body contains payment response |
Declined | Payment was declined |
Step 1: Create Checkout and Get Credentials
Open the Checkout Designer while signed in to your North Developer account. Customize the way your embedded payment fields look and behave including payment methods, receipt behavior, custom branding, and more.
When you save a new checkout or save updates to an existing draft, you are redirected to that checkout’s page in the Embedded Checkout dashboard. Your integration credentials are available there after a checkout is saved. Generate or copy your API key from that page.
- checkoutId — Checkout configuration identifier located toward the top of the page.
- profileId — Merchant profile identifier located toward the bottom of the page in the merchants list.
- Private API Key — Authenticates your server; click Generate Keys to display the API Keys modal for the first time. Afterward, click View API Key to view your existing key or create a new one. Store it only on the server and never in client-side code.
- Webhook signing secret — Used for webhook verification; located in the API Keys modal if you added a webhook domain when creating your checkout with the Checkout Designer.
Step 2: Create a Checkout Session
From your server, create a checkout session by calling the Create Session API endpoint and passing your private API key in the header as a bearer token. This request returns a short-lived token that you'll pass to your client to mount the payment fields. Sessions expire after 30 minutes.
The request body must include an amount, an array of products, or both. For example, if you're building an ecommerce store with a shopping cart, you may want to provide an array of products. If you're building an online donation page, you may only wish to provide the amount.
If both are provided, the calculated total amount of the products must match the provided amount value. If a products array is not provided, amount is required. Additionally, when the payment request is submitted, the amount in the request must match the amount in the session object.
API Endpoint
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer {YOUR_PRIVATE_API_KEY} |
Request Body
Request Parameters
(*required if products array is provided)
Example cURL Request
Response
Step 3: Add the Checkout Script
Include the checkout.js script on your page. This script provides the checkout object used to mount the payment fields and submit payments.
Script Tag
The payment fields will render inside the specified div. You control everything else—form layout, additional fields, and the submit button. The data entered by the customer into the hosted payment fields will not enter your server environment.
Step 4: Mount the Payment Fields
On your client, fetch the session token from your server and call checkout.mount() to render the payment input fields on your page.
Mounting Example
Parameters
Step 5: Submit the Payment
When your form is submitted, call checkout.submit() to process the payment. This method triggers the secure payment processing and returns a promise with the payment result.
Submit Method Signature
How It Works
- Your customer fills in the payment fields.
- When they click your submit button, your code calls
checkout.submit(). - The method securely transmits the payment data.
- A promise resolves with the payment result.
- You process the rest of the form.
Important: The checkout.submit() method must be called after the fields have been mounted. If you call it before mounting, it will throw an error.
Step 6: Handle the Payment Response
The checkout.submit() method returns a promise that resolves with the payment result.
Response Structure
Success Response
Failure Response
Key Response Fields
Server-Side Verification
Your server should never trust the client alone. When the user reaches your confirmation page (e.g., after a redirect), your backend must verify payment completion. There are two ways:
Method 1: Verify Payment Completion (Session Status Endpoint)
Endpoint: GET /api/sessions/status
Use this endpoint to verify whether a payment was approved or declined before fulfilling an order. The session status and payment response are stored at the server and cannot be tampered with by the client, so the status endpoint gives your backend a trusted source of truth.
Typical Flow
- The user completes payment in your form (via
checkout.submit()). - The front-end redirects to your callback URL (e.g., a confirmation page), potentially passing the session token or payment data in the URL or via client-side state. Your backend must not trust that client-side data as a user could tamper with URL parameters or state.
- When the user reaches your callback page, your backend calls the
/statusendpoint with the API key and session token, and receives the authoritative status and payment response from the server. - That response gives your backend a trusted source of truth for whether the payment was approved or declined and what the response was, which should be used to decide whether to fulfill the order.
Authentication
- API key in
Authorizationheader as Bearer token - Session token in
SessionTokenheader
Request (API key + session token in header)
Note: The session token must not be sent from browser-based JavaScript. Use server-side code only to avoid exposing the session token. The status endpoint rejects requests with an
Originheader.
Response (200 OK)
status | Meaning |
|---|---|
Open | Session created, checkout not yet loaded |
Verified | Checkout form loaded and verified |
Approved | Payment successfully processed and approved; body contains payment response |
Declined | Payment was declined; body may contain decline response |
When status is Approved, body contains the full payment authorization response (receipt data). When status is Declined, body may contain the decline response.
Method 2: Transaction Webhook (Receipt)
Configure a webhook URL in your checkout using the Checkout Designer. When a payment completes, the API sends a POST request to your URL with the transaction and receipt data. The webhook URL must use HTTPS.
Note: You will need to provide this webhook URL for whitelisting during the certification process for Production notifications to be delivered to your endpoint.
Webhook Delivery
- URL:
{webhookURL}/transaction - Method: POST
- Content-Type: application/json
Request Headers
| Header | Description |
|---|---|
Content-Type | application/json |
X-YourApp-Signature-256 | HMAC-SHA256 signature for verification |
X-YourApp-Timestamp | Unix timestamp (milliseconds) |
Request Body
- transaction – The transaction record. Includes
id,tranType,authCode,authResponseText,authResp,authCardType,maskedAccountNumber,amount,authGuid,fullResponse, and other fields. - additionalFormFields – (Optional) Custom form fields submitted with the checkout.
Verifying Webhook Signatures
Verify the X-YourApp-Signature-256 header using your checkout's private key:
Compare expected_header with X-YourApp-Signature-256. Reject the request if they do not match. Use the exact raw request body bytes you receive, not a re-stringified parsed object. JSON serialization can differ (key order, whitespace, etc.) and will break the signature check.
Signup Webhook
Each night, newly boarded merchants associated with your account are automatically added to your default checkout. When this occurs, the API sends a POST request to your webhook URL with the merchant data. Configure a webhook URL in your checkout using the Checkout Designer. The webhook URL must use HTTPS.
Webhook Delivery
- URL:
{webhookURL}/signup - Method: POST
- Content-Type: application/json
Request Headers
| Header | Description |
|---|---|
Content-Type | application/json |
X-Webhook-Signature | HMAC-SHA256 signature for verification (see format below) |
X-Webhook-Timestamp | Unix timestamp (milliseconds) |
Request Body
The body is a JSON array containing one or more merchant signup objects:
Verifying Webhook Signatures
Verify the X-Webhook-Signature header using your webhook signing secret. The signing secret is prefixed with sec_ and can be created from your checkout instance page using the Generate Key or View API Key button.
1. Parse the signature header
The X-Webhook-Signature header contains a timestamp prefixed with t= and a signature prefixed with v1=, separated by a comma:
Extract the timestamp and signature values from the header.
2. Compute the expected signature
3. Compare signatures
Compare the computed hex digest with the v1 value from the header. Reject the request if they do not match. Use a timing-safe comparison function to prevent timing attacks.
Use the exact raw request body bytes you receive, not a re-stringified parsed object. JSON serialization can differ (key order, whitespace, etc.) and will break the signature check.
Step 7: Test the Integration
When a checkout is in Draft Mode, requests are automatically made in the Sandbox environment. When you're ready to go live and make requests in the Production environment, we'll certify your checkout with no need to manually switch environments.
In Draft Mode, requests are sent to the payment processor's Sandbox environment, guaranteeing that your tests receive real results from the processor, not mock responses, so that you can build accurate response handling into your application with confidence. To test various payment response codes in Draft Mode, the transaction amount can be modified to a designated value that will trigger a specific response code. Read more about response code triggers.
UI/UX testing can also be done from the Checkout Designer using the integrated card testing tools, however these are mock payment requests that do not return real results from the payment processor.
Use the following test card numbers in the Sandbox environment:
| Card Number | Brand | Result |
|---|---|---|
| 4111 1111 1111 1111 | Visa | Successful transaction |
| 3700 000000 00002 | Amex | Successful transaction |
Test Card Details:
- Expiration: Any future date (e.g., "12/30")
- CVV: Any 3 digits (e.g., "123") or 4 digits for Amex
- ZIP: Any 5 digits (e.g., "12345")
Customization Options
The Embedded Fields integration supports extensive styling customization through the Checkout Designer. Available options include:
Colors
- Secondary Background Color - Background color for field containers
- Border Color - Border color for input fields
- Input Background - Background color inside inputs
- Input Focus Color - Border/highlight color when input is focused
- Text Color - Color for input text
- Placeholder Color - Color for placeholder text
Typography
- Body Font - Font family for all text
- Input Font Size - Size of text in input fields
- Placeholder Font Weight - Font weight for placeholder text
Layout
- Border Width - Width of input borders
- Border Radius - Roundness of input corners
- Input Padding - Internal padding within inputs
- Input Y Gap - Vertical spacing between fields
- Input X Gap - Horizontal spacing between fields
Field Options
- Cardholder Name - Show/hide the cardholder name field
- Input Placeholders - Show/hide placeholder text
- Input Labels - Show/hide field labels
Configure these options in the Checkout Designer.
Apple Pay
Embedded Checkout supports Apple Pay as an alternative payment method. The sections below describe what is needed to enable Apple Pay on your domain when using Embedded Checkout Fields. Because the hosted payment fields load in iframes on your page, there are specific requirements that you as the integrator must fulfill.
How It Works
Apple Pay on the web requires that every domain displaying the Apple Pay button is registered and verified with Apple. Since the hosted payment fields run inside iframes on your domain, Apple requires both your domain (the parent page) and the payment field iframe domains to be verified. As a platform integrator, we handle the registration of our own checkout domain. Your responsibility is to register your domain(s) where the embedded payment fields are displayed.
Requirements
To enable Apple Pay on your domain, complete two steps:
Step 1: Host the domain verification file
Apple verifies domain ownership by checking for a specific file on your domain. You must host the following file at this exact path on your website:
File contents
Copy the following hex string exactly as-is into the file. Do not decode, modify, or re-encode it:
The file must be served as plain text with no authentication, redirects, or bot protection blocking it. Apple will fetch this file to verify your domain. If Apple cannot access it (e.g., due to a WAF, CDN challenge page, or 403 error), domain registration will fail.
To verify the file is accessible, run:
You should see the hex string returned with no HTML wrappers or redirect responses.
Step 2: Register your domain
Once the verification file is hosted and publicly accessible, navigate to Embedded Checkouts on your dashboard and select a checkout instance to reach the checkout management page, then click Register Domain with Apple Pay. This will trigger the domain registration process with Apple on your behalf. This calls Apple’s registerMerchant API using our platform integrator credentials and registers your domain against our Platform Integrator ID. You do not need your own Apple Developer account or merchant ID to complete this step.
What happens during registration
| Step | Action | Who |
|---|---|---|
| 1 | Host the .well-known verification file on your domain. | You (the integrator) |
| 2 | Click Register Domain with Apple Pay on the checkout page. | You (the integrator) |
| 3 | Apple fetches the verification file from your domain. | Apple (automated) |
| 4 | Domain is registered under our Platform Integrator ID. | Our platform (automated) |
Iframe requirements
When your page embeds the hosted payment fields, ensure the iframe elements include the payment permission attribute:
This is required by Safari 17+ for Apple Pay to function within iframes. Without this attribute, the Apple Pay button may not appear or may fail when clicked.
Troubleshooting
| Issue | Solution |
|---|---|
| 403 Forbidden during registration | Your WAF, CDN (e.g., Cloudflare), or hosting provider is blocking Apple’s verification bot. Whitelist the .well-known path or disable bot protection for that route. |
| 302 redirect returned | Your server is redirecting the .well-known request (e.g., HTTP to HTTPS redirect, or a login redirect). Ensure the file is served directly at the HTTPS URL with no redirects. |
"Content of Apple merchant validation is incorrect" | The file content does not match what Apple expects. Ensure you are using the exact hex string provided in this guide, with no extra whitespace, line breaks, or encoding changes. |
| Apple Pay button does not appear | Verify the iframe has allow="payment" set. Also confirm the user is on Safari or a supported browser with an Apple Pay–capable device. |
Google Pay
Embedded Checkout supports Google Pay™ as an alternative payment method. The sections below describe what is needed to enable Google Pay on your domain when using Embedded Checkout Fields.
When offering Google Pay to your customers, you must use the official Google Pay logo and button assets in compliance with the Google Pay Web Brand Guidelines, without modifying the asset colors, proportions, or appearance. The button rendered inside the hosted payment field iframes is created by Google's official JavaScript client library and is already compliant.
How It Works
As a payment service provider (PSP), we handle the Google Pay integration centrally. Individual merchants using our Embedded Checkout do not need to register individually with Google for Google Pay — our PSP registration with Google covers all merchants using Embedded Checkout.
Because Embedded Checkout Fields is a hosted integration, our iframes generate the IsReadyToPayRequest and PaymentDataRequest objects on your behalf, load the Google Pay JavaScript client library, render the compliant Google Pay button, and handle the returned payment token server-side. You do not need to call Google's APIs directly.
By enabling Google Pay on your checkout, you and your merchants agree to the Google Pay and Wallet API Acceptable Use Policy and the terms defined in the Google Pay API Terms of Service.
Reference Documentation
If you want to learn more about how Google Pay works on the web, refer to the resources below. Most integrators will not need these — the embedded checkout handles the full web integration — but they are useful for understanding the underlying flow and for fulfilling brand requirements.
Requirements for Integrators
There is no domain verification or file hosting required for Google Pay. The Google Pay button and payment flow are handled entirely within the hosted payment field iframes.
To enable Google Pay on your checkout, ensure the following:
-
HTTPS required — Your domain must serve the page containing your form with embedded payment fields over HTTPS. Google Pay will not function on insecure (HTTP) pages.
-
Browser compatibility — Google Pay on the web works across Chrome, Safari, Firefox, and other modern Chromium-based browsers. The button will only render for users whose browser and device combination is eligible and who have at least one supported payment method saved to their Google account.
-
Payment configuration — When setting up your checkout, ensure that Google Pay is enabled in your payment configuration. The checkout will automatically display the Google Pay button to users who have eligible payment methods saved to their Google account. Use the Checkout Designer to configure payment methods.
-
Acceptable use — Your use of Google Pay through Embedded Checkout is subject to the Google Pay and Wallet API Acceptable Use Policy and the Google Pay API Terms of Service.
Supported Authorization Methods
Google Pay provides two authorization methods. Embedded Checkout supports both.
| Method | Description | 3DS Required |
|---|---|---|
PAN_ONLY | Physical card credentials stored in the user's Google account. Returns the clear card number and expiration date after decryption. | Not applied by Embedded Checkout. PAN_ONLY credentials are processed as standard card-not-present transactions. |
CRYPTOGRAM_3DS | Tokenized device-bound credentials (a network-issued DPAN). Returns a network token along with a cryptogram (TAVV) and ECI indicator. | No merchant action required. Authentication is performed by Google Pay and the cryptogram is submitted to the network on your behalf. |
Settlement is currently supported in the United States (USD).
Supported Card Networks
Embedded Checkout supports the following card networks through Google Pay:
- VISA
- MASTERCARD
- AMEX
- DISCOVER
- JCB
- INTERAC
The card networks offered to a customer at runtime are also constrained by the networks enabled on your North merchant account.
Gateway Configuration
When Embedded Checkout builds the Google Pay PaymentDataRequest, it sets the following TokenizationSpecification:
gatewayis fixed tonorth— this is the gateway identifier we registered with Google during technical onboarding.gatewayMerchantIdis set to the unique identifier of your checkout configuration (the checkout ID visible in your Embedded Checkouts dashboard). Do not change this value — it is what we use to route the decrypted payload to the correct merchant account.
Separately, in PRODUCTION the Google Pay PaymentDataRequest includes a merchantInfo.merchantId value — this is North's PSP-level Google Wallet Console merchant ID. It is shared across all checkouts using Embedded Checkout and is managed by the platform. Merchants do not need to register individually with the Google Pay & Wallet Console.
Because the iframe owns the Google Pay request, you do not need to set any of these values yourself. They are shown here for transparency and so that you can verify them with your browser's developer tools if needed.
Billing Address
By default, Embedded Checkout does not request a billing address from Google Pay (billingAddressRequired is not set on the Google Pay request). If your checkout form collects billing address fields separately (for AVS purposes), those are gathered through the embedded fields rather than through Google Pay. If you need billing address data to be pulled from the user's Google account instead, contact your North integration engineer.
What the Customer Sees
When the customer taps the Google Pay button, the Google Pay sheet displays:
- The total price, labeled "Total", in USD.
- The customer's eligible cards and the option to pick another card.
Handling the Google Pay Payload
Merchants do not send the Google Pay encrypted payload to their own servers. Embedded Checkout performs the full token handoff for you:
- The customer taps the Google Pay button rendered inside the payment field iframe.
- Google returns a
PaymentDataresponse containing the encryptedpaymentMethodData.tokenizationData.token. Because Embedded Checkout setsemailRequired: true, the response also includes the customer's Google-account email, which is forwarded to our Checkout API alongside the token for use in receipts, webhooks, and transaction metadata. - The iframe sends the token to our Checkout API at
POST /api/google-payalong with the session token issued for the checkout. - Our Google Pay decryption service verifies the signature against Google's signing keys (using the
ECv2protocol and thegateway:northrecipient ID) and decrypts the payload. - The decrypted card credentials — including the network cryptogram (
tavv) and ECI indicator (tavv_eci) forCRYPTOGRAM_3DStokens — are submitted to the configured payment gateway to authorize the charge. - The transaction result is returned to the iframe and posted back to your page (and to your configured webhook, if any).
As an integrator you do not need to implement token decryption, manage signing keys, or call Google's APIs directly.
Google Pay Environment
| Environment | Behavior | Notes |
|---|---|---|
| SANDBOX | Returns dummy payment methods for testing. No real charges are made. | Use for development. |
| PRODUCTION | Returns real payment methods. Transactions affect real bank accounts. | Requires our production Google Pay registration. |
In the Sandbox environment, Google Pay returns simulated card data. You can use this to verify your end-to-end checkout flow without processing real payments.
Additional Notes
Success Checklist
Before submitting your checkout for review and certification, verify the following:
- Payment fields render correctly on your page
- Test card transactions are approved successfully
- Declined card transactions show proper error messages
- Your form validates properly before submission
- Webhook or session status endpoint receives transaction notifications
- Success response redirects or displays confirmation
- Error states are handled gracefully
- Mobile responsiveness works as expected
- If you offer Apple Pay or Google Pay, complete the checks in Apple Pay and Google Pay
Protect Your API Keys
- Never expose your private API key in client-side code
- Store API keys in environment variables
- Generate session tokens only on your server
Domain Restriction
In the Production environment, the domain where your checkout is hosted is limited to the domain set during checkout configuration. This prevents unauthorized use of your checkout configuration. This rule is not applied in Draft Mode.
For draft checkouts, we disable the frame-ancestors directive in the Content-Security-Policy (CSP) on hosted checkout responses. That allows the embedded experience (hosted payment field iframes and related frames) to load while you develop from flexible origins such as localhost, preview deployments, or staging URLs. After publishing to Production, frame-ancestors is enforced from your configured allowed domains, so those domains must include every parent page where you embed the checkout.
When testing in Sandbox, set the checkout domain in the Checkout Designer to your test site's URL (include a non-default port if you use one). Sandbox payments are still test-only; this just keeps the checkout configuration aligned with where you integrate before publish.
Session Token Expiration
Session tokens expire after 30 minutes. Generate a new token for each checkout session rather than reusing tokens.
Submit Timeout
The checkout.submit() method has a 10-second timeout. If the payment processing takes longer than 10 seconds, the promise will reject with a timeout error. Handle this gracefully in your error handling:
Error Handling Best Practices
Always wrap your submit call in a try-catch block and handle both the response types and potential errors:
Next Steps
- Contact Support — Get help with your integration.
- Certify and Go Live — When development is complete, use the Request Publish button on a checkout instance to submit the checkout for review by Sales Engineering and begin the certification process. You can keep using the same dashboard-issued credentials after certification is complete and your checkout is published to the Production environment.
- Manage MIDs — Each checkout instance can be used by one or more Merchant IDs (MIDs). Open a checkout and use the Add Merchants button to assign the MIDs that should use this configuration. Only MIDs that are successfully onboarded to North and provisioned for your organization appear in the search results. If a MID is missing, ensure merchant onboarding is complete or ask your North contact to link it to your account.