#Hosted checkout & payment links
Two low/zero-code ways to collect a card payment on a PlutoPay-hosted page, so you never build or host a card form yourself.
#Hosted checkout
Create a checkout session, then redirect the customer to the returned url. They pay on the PlutoPay-hosted page and return to your success_url.
POST /v1/checkout/sessions
| Field | Type | Required | Description |
|---|---|---|---|
amount |
integer | ✔ | Cents. Minimum 50. |
currency |
string | Defaults to your account currency. | |
description |
string | ||
customer_email |
string | Prefill the customer's email. | |
customer_name |
string | ||
success_url / cancel_url |
string | Where to send the customer after paying / canceling. | |
collect_email / collect_name / collect_phone / collect_address |
boolean | Fields to collect on the page. | |
expires_in |
integer | Seconds until expiry (5 min – 24 h). | |
metadata |
object |
curl https://plutopayus.com/api/v1/checkout/sessions \
-H "Authorization: Bearer sk_test_your_key_here" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: checkout_1001" \
-d '{ "amount": 4750, "currency": "usd", "description": "Order #1001",
"success_url": "https://your-site.com/thanks",
"cancel_url": "https://your-site.com/cart" }'
#Response 201
{
"data": {
"id": "019c8044-…",
"reference": "cs_9Yx2Kq…",
"url": "https://plutopayus.com/pay/cs_9Yx2Kq…",
"amount": 4750,
"currency": "usd",
"status": "open",
"expires_at": "2026-07-05T14:42:03+00:00",
"transaction_id": "019c8044-…"
}
}
Redirect the customer to data.url. Retrieve a session anytime with
GET /v1/checkout/sessions/{id}.
Idempotency-Key is honoured: a retry with the same key returns the same session and
PaymentIntent with 200, never a second one. A key already used for a different request
is refused with 409 idempotency_key_in_use.
#Fulfil on the webhook, and only on the webhook
Mark the order paid when payment.succeeded arrives — never on the redirect, and never
on the session's status alone. After paying, the customer is returned to your
success_url with ?checkout_ref=cs_… appended. That reference tells you which
session came back; it is not proof that it was paid, because the customer's browser is
the one making the request. Use payment.succeeded
(webhooks), whose signature you can verify, as the only trigger
for fulfilment.
If a session passes its expires_at without being paid, it becomes expired and
checkout.session.expired is sent within the hour.
#Checkout is anonymous
A checkout session does not create or attach a customer, so there are no saved cards
and no repeat-shopper reuse through this path: customer_email and customer_name
prefill the page and nothing more. To let a returning customer pay with a stored card,
create a customer and a setup intent
(POST /v1/customers/{customer}/setup-intents) instead.
#Payment methods are chosen for you
The hosted page offers the card brands and wallets your account is enabled for — Visa, Mastercard, Amex, Discover, plus Apple Pay and Google Pay where the customer's device supports them. Apple Pay and Google Pay need no domain verification from you on the hosted page, because the page is served from our domain. You do not select methods per session.
#Payment links
A payment link is a long-lived, shareable hosted-checkout URL — no website required.
POST /v1/payment-links
| Field | Type | Required | Description |
|---|---|---|---|
amount |
integer | ✔ | Cents. Minimum 50. |
currency |
string | Defaults to your account currency. | |
description |
string | ||
customer_email |
string | Prefill the customer's email. | |
success_url / cancel_url |
string | Redirect targets. | |
expires_in |
integer | Seconds until expiry. Min 5 min, max 90 days. | |
metadata |
object |
curl https://plutopayus.com/api/v1/payment-links \
-H "Authorization: Bearer sk_test_your_key_here" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: link_1001" \
-d '{ "amount": 4750, "currency": "usd", "description": "Invoice #1001",
"customer_email": "customer@example.com" }'
#Response 201
{
"data": {
"id": "019c8044-…",
"reference": "pl_9Yx2Kq…",
"url": "https://plutopayus.com/pay/pl_9Yx2Kq…",
"amount": 4750,
"currency": "USD",
"status": "open",
"is_test": true,
"expires_at": "2026-07-12T14:12:03+00:00",
"created_at": "2026-07-05T14:12:03+00:00"
}
}
Share data.url. Manage links with:
GET /v1/payment-links/{id} # id or reference (pl_…)
GET /v1/payment-links?limit=20
DELETE /v1/payment-links/{id} # deactivate
Want customers to stay on your own branded page instead of a hosted one? Use Elements — create a payment, then mount the Payment Element on your checkout.