# securepayAPI

URL: https://doc.securepayapi.com/
Last updated: 2026-11-12

> Accept cards worldwide with a drop-in widget, a hosted checkout page, and the Payment Intents API.

securepayAPI accepts card payments through a drop-in widget, a hosted checkout
page, or the Payment Intents API. Card security and 3-D Secure authentication
are built in.

**[Quickstart](https://doc.securepayapi.com/quickstart)** —
Create a payment and collect a card, end to end.

**[Embedded checkout](https://doc.securepayapi.com/embedded-checkout)** —
Drop a secure payment widget into your own site.

**[Hosted checkout](https://doc.securepayapi.com/hosted-checkout)** —
Send customers to a ready-made checkout page.

**[Recurring payments](https://doc.securepayapi.com/recurring-payments)** —
Plans, the first charge in the widget, renewals, variable pricing, cancellation.

**[API reference](https://doc.securepayapi.com/api-reference)** —
The Payment Intents API for creating payments from your backend.

**[For AI coding agents](https://doc.securepayapi.com/for-ai-agents)** —
The agent handbook — the whole contract and the rules that decide money, written for your coding assistant.

## How it works

With the embedded widget:

1. **Create a payment** on your server with your secret key — you get back a
   `client_secret`.
2. **Collect the card** in the browser with the embedded widget, using that
   `client_secret`. 3-D Secure, Apple Pay and Google Pay run inside it.
3. **Confirm on your server** by reading the Payment Intent back, then fulfil.
   [Webhooks](https://doc.securepayapi.com/webhooks) keep you informed afterwards.

Your server is always the source of truth for the amount — the browser never
decides what a customer is charged.

With a hosted checkout page there is no server code at all: you create a
[product](https://doc.securepayapi.com/products) in the dashboard and share its link; the price comes from
the product and its coupons, and you learn about each payment from
[webhooks](https://doc.securepayapi.com/webhooks) and the dashboard.

## What you can build

- A **custom checkout** on your own pages using the embedded widget — with
  Apple Pay or Google Pay where the device supports it.
- **Recurring payments**: the widget takes the first charge and the customer's
  consent; the payment platform bills the following periods — fixed or
  variable price, trials, cancellation — see
  [Recurring payments](https://doc.securepayapi.com/recurring-payments).
- A **hosted page** per product, shareable as a link, with Apple Pay.
- A **catalog** of products with prices, coupons and images.

## Before you start

You need a securepayAPI merchant account and a pair of [API keys](https://doc.securepayapi.com/api-keys): a
publishable key (`sp_client_…`) for the browser and a secret key (`sp_secret_…`)
for your server. Hosted checkout pages need no keys.

> **Note:**
The Payment Intents API is currently **v1** and supports payments in **USD**.
Product prices can be set in USD, EUR or GBP. Dashboard invoices can be issued
in USD, EUR, GBP, CAD or AUD; bank pay-ins are USD only, and USDC pay-ins need
a USD or USDC invoice.

## Building with an AI coding assistant

Give your assistant the [agent handbook](https://doc.securepayapi.com/agents.md) — markdown written to be
read by a model, stating the complete contract of this documentation. The entry
file links one chapter per area:

- [Payment Intents and subscriptions](https://doc.securepayapi.com/agents/intents-subscriptions.md)
- [SDK and embedded widget](https://doc.securepayapi.com/agents/widget-sdk.md)
- [Webhooks, transactions and disputes](https://doc.securepayapi.com/agents/webhooks-transactions.md)
- [Hosted checkout, products and hosted invoices](https://doc.securepayapi.com/agents/hosted-products.md)

[Everything in one file](https://doc.securepayapi.com/agents-full.md) joins the entry and all chapters.
[How to use it](https://doc.securepayapi.com/for-ai-agents).

## Hosted invoice payment methods

Eligible hosted invoices can offer [Bank Pay-ins](https://doc.securepayapi.com/bank-payins) (ACH debit, ACH
transfer or wire) and [USDC pay-ins](https://doc.securepayapi.com/usdc-payins). Use the issued invoice link
unchanged and confirm that the invoice is paid before fulfillment. These are
separate from the Payment Intents API and JavaScript SDK; availability depends
on your account and environment configuration.
