Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create Payment

Create a payment with POST /Payments to generate one or more hosted payment URLs. The hosted payment page handles the checkout experience for supported crypto and digital wallet tenders.

You can optionally pass tender-selection details when you want to direct the shopper into a specific tender flow or limit the hosted page to a curated tender subset. If you omit tenderTypes, Bead uses the active tender configuration for the terminal.

POST /Payments/crypto is deprecated. It is still supported and takes the same request body, so existing integrations keep working. New integrations should use POST /Payments, and existing integrations should plan to move to it. POST /Payments returns every rejection in the standard problem details format.

Overview

Endpoint:

POST /Payments

Sandbox base URL:

https://api.test.devs.beadpay.io

Use this endpoint to:

  • create a hosted payment session

  • return one or more hosted payment URLs

  • optionally pass order, invoice, customer, receipt, redirect, webhook, and tender-selection details

  • allow Bead's hosted payment page to manage the payer experience

For an end-to-end Sandbox flow, see Quick Start.

Step 1: Authenticate

Payments use header-based authentication with a terminal API key.

The terminal API key is the secret credential used to authenticate requests. The masked API key is a display value only and cannot be used to authenticate.

Required headers:

Authentication guidance:

  • Preferred for new integrations: use X-Api-Key

  • Supported for existing legacy Payments integrations: OAuth password grant with Authorization: Bearer {access_token}

  • Do not place the API key in the request body or URL

  • Do not expose the API key in browser or mobile client code

See Authentication for full token and legacy OAuth details.

Step 2: Create a hosted payment URL

Send a request to create a payment. The response includes paymentId, trackingId, paymentPageId, paymentUrls, and unavailableTenders.

Endpoint:

Headers:

Request shape guidance

At a minimum, payment creation requests should include:

  • terminalId

  • merchantId

  • requestedAmount

Other common fields include:

  • reference

  • description

  • cartItems

  • redirectUrl

  • emailReceipt

  • smsReceipt

  • refundEmail

  • webhookUrls

  • customer

  • tenderTypes

  • splitFunding, the split funding block, only for merchants enrolled in the Split Funding Program

Required fields can vary by tender type, terminal configuration, and risk or compliance requirements. customer and refundEmail are both required for virtual terminals, see below. Use the simplest request body that matches your flow, and add optional fields only when your terminal type and tender flow require them.

Terminal type considerations

Terminals have a type of either virtual or physical.

A virtual terminal is generally used for ecommerce, hosted checkout, remote payment, or other customer-not-present flows.

A physical terminal is generally used for in-store, point-of-sale, or customer-present flows. For guidance on building an in-person checkout, see In-Person Payments (Physical Terminals).

Terminal type = virtual

For virtual terminals, both the customer object and refundEmail are required. Include the full set of required customer fields, and a valid refundEmail, on every virtual terminal payment request. A virtual terminal request that omits refundEmail returns 400 Bad Request, even if customer is present and complete. refundEmail must be sent explicitly and is not inferred from customer.email on virtual terminals.

Terminal type = physical

For physical terminals, the request can generally use the basic payment fields without a customer object or refundEmail. Physical terminal flows are typically customer-present and do not need customer details in the common case. Integrators commonly omit customer entirely for physical terminal transactions.

If your specific tender flow or terminal configuration does require customer details on a physical terminal, include the complete customer object.

refundEmail is optional on physical terminals. If you omit it but include a customer object with email, Bead uses customer.email for reclaim instead. See Reclaiming Unconverted Crypto for the full behavior.

Customer object rule

Do not send a partial customer object.

If you include customer (required on virtual, optional on physical unless your flow requires it), provide all required customer fields:

  • firstName

  • lastName

  • email

  • address

  • city

  • state

  • postalCode

  • countryCode

Optional customer fields include:

  • phone

  • address2

  • birthday

If you send a partial customer object, the API may return 400 Bad Request with validation errors.

Cart items

Use cartItems when you want to pass order, invoice, or basket-level detail with the payment.

cartItems can be omitted when you do not have item-level detail. Do not send placeholder or blank cart item values.

When you include cartItems, each item should include:

  • id, your item, SKU, invoice line, or service identifier

  • name, optional display name for the item, which may be null

  • quantity, quantity for the item

  • price, price for the item

When possible, keep the cart item detail consistent with requestedAmount so reporting and reconciliation remain clear.

Tender type selection

Use tenderTypes when you want to limit or direct a payment to one or more specific tender types that are already available for the merchant, location, and terminal.

Passing tenderTypes on a payment request does not enable a new tender type for the merchant or terminal. It only narrows or directs the hosted payment experience to tender types that are already approved and active for that payment context.

If tenderTypes is omitted, Bead uses the available tender configuration for the terminal and hosted payment experience.

Before using payment-level tenderTypes, confirm the terminal's active tender set with GET /Terminals/{terminalId}. If a tender type is not active on the terminal, the merchant may need additional onboarding, pricing, provider enrollment, or operational support before that tender can be used.

Tenders left off the hosted page

A tender you asked for is not always a tender the consumer gets. The response carries an unavailableTenders array listing each tender that was excluded from the hosted page, with the reason. An empty array means every eligible tender is on the page.

Field
Meaning

tenderType

The tender that was left off

reason

feeNotCovered or noContractedRate

fee

Bead's fee for that tender on this payment. Null when there is no contracted rate to compute it

transactionRate

The contracted tender rate. Null when there is no contracted rate

perItemFee

The contracted per-item fee. Null when there is no contracted rate

feeNotCovered means the withheld partner portion was smaller than Bead's fee for that tender, so the tender was removed rather than settling the merchant short. noContractedRate means your partner fee schedule has no rate row for that tender. A missing contracted rate excludes the tender. It is not treated as free.

Check unavailableTenders on every split funding payment. It is the only signal at creation time that the consumer will see fewer ways to pay than you intended.

Split funding payments

If the merchant is enrolled in the Split Funding Program, add an optional splitFunding object to specify exactly how much of the payment the merchant keeps and how much is withheld for the partner. This is unrelated to tender selection and can be combined with any tender flow. Omit the object for a standard payment. Enrolled merchants can send both kinds and they settle side by side.

The object was previously named rebate. That name is no longer accepted. There was no dual-accept transition window: as of the current release, a request that sends rebate gets 200 OK with the payment created as an ordinary payment. The field is silently dropped, nothing is withheld for the partner, and no error is returned. If your integration still sends rebate, switch it to splitFunding before relying on partner withholding, and confirm the change against a real split funding transaction report, since a successful response alone will not tell you the field was ignored.

Four things to know before you build against it:

  • The amounts must balance to the cent. merchantPortion + partnerPortion must exactly equal total, and total must equal requestedAmount.

  • Bead's fee is charged on total. The contracted tender rate applies to the full amount the consumer paid, not to the merchant portion, plus the per-item fee. The whole fee comes out of the partner portion, so size the partner portion against the consumer total rather than against the merchant's price.

  • The destinations are fixed. The merchant portion funds the merchant's account on file and the partner portion funds your partner account on file. There is no way to name any other payee on the payment.

  • The program carries obligations. It is normally operated with a consumer fee that you size, disclose and present yourself, per tender. Read What this program requires of you before you scope the work.

BTC (on-chain) tender selection

BTC (on-chain) refers to Bitcoin on-chain payments. When you want to direct the hosted payment experience to BTC (on-chain), use bitcoin in the tenderTypes array.

Do not use bitcoin_Lightning for BTC (on-chain). Bitcoin Lightning is a separate BTC payment rail with a faster customer-facing payment experience.

Only present BTC (on-chain) when the merchant's payment environment can support delayed confirmation. BTC (on-chain) is usually appropriate for invoices, ecommerce orders with later shipment, service payments before pickup, deposits, and high-ticket or high-touch purchases. It is usually not appropriate for fast in-person checkout or instant digital delivery.

If a payment is limited to BTC (on-chain), make sure your integration can:

  • show the customer that the payment has been detected when the status reaches processing

  • keep the order, invoice, or service request in a pending payment state

  • use webhooks or status polling to detect the outcome

  • fulfill only after the payment reaches completed or overpaid

Minimum payment amounts

Minimum payment amounts can vary by tender.

For USDC on Base and USDC on Solana, the minimum Bead payment amount is $1.00 USD. If a payment request is limited to either of these tenders, or if the hosted payment experience is expected to present either of these tenders as an available option, use a requestedAmount of 1.00 or higher.

This minimum is separate from any network fee the payer's wallet may require to submit the transaction.

Sandbox transaction amount limit

In Sandbox, the test server may enforce a $100 maximum transaction amount. If you send a requestedAmount greater than 100.00, the API may return 400 Bad Request with a message similar to:

This is expected Sandbox behavior. Use amounts at or below 100.00 for normal happy-path testing.

You should also test your integration's error handling by intentionally sending a payment amount above the limit and confirming that your point-of-sale or checkout experience displays a clear message to the merchant.

In Production, maximum transaction limits can vary by merchant and terminal configuration and are typically based on the merchant's approval.

Example request body: basic hosted payment

Use this as the default hosted payment example for a physical terminal.

Example request body: virtual terminal

This example is appropriate for a common virtual terminal checkout flow. The customer object is required for virtual terminals.

Example request body: physical terminal

This example is appropriate for a common physical terminal payment flow. The customer object is omitted unless your specific tender flow or terminal configuration requires it.

Example request body: with customer details

Use this pattern for virtual terminals (where customer and refundEmail are both required), or for a physical terminal flow that specifically requires customer details.

Example request body: with cart items

Use cartItems when you want to pass line-item order context with the payment.

Example request body: tender type selection

Use tenderTypes when you want to limit the hosted payment experience to a specific tender or tender group.

Only pass tender types that are already enabled and available for the merchant, location, and terminal.

Example request body: BTC (on-chain) tender selection

Use bitcoin when you want to limit the hosted payment experience to BTC (on-chain) / Bitcoin on-chain.

BTC (on-chain) payments can remain in processing for several minutes or longer. Do not fulfill the order based on processing. Wait until the payment reaches completed or overpaid.

Example request body: split funding

Use the split funding block only for a merchant enrolled in the Split Funding Program.

Example request body: expanded

Notes:

  • cartItems can be omitted when you do not have item-level detail.

  • Do not send placeholder cart items with blank id, blank quantity, or blank price.

  • customer and refundEmail are both required for virtual terminals. For physical terminals, omit customer unless your selected tender, terminal configuration, or compliance flow requires it, and refundEmail is optional.

  • If you include customer, provide all required customer fields.

  • refundEmail is used to send reclaim instructions if the payment ends as overpaid, underpaid, expired, invalid, or cancelled. On physical terminals where it is omitted, customer.email is used instead if present.

  • In Sandbox, keep normal happy-path test amounts at or below 100.00.

Example response

Example response: a split funding payment with tenders left off

The rate values below are illustrative placeholders. Your own contracted rates are the ones returned.

Key fields

terminalId is the terminal identifier in Bead. It identifies the terminal used for the payment and determines terminal-level settings such as the default webhook, terminal type, and tender types available to the hosted payment experience.

merchantId is the merchant identifier. Used for reporting and settlement.

requestedAmount is the amount in the requested currency. For USDC on Base and USDC on Solana, use 1.00 or higher. In Sandbox, the test server may enforce a maximum transaction amount of 100.00.

cartItems is an optional array of order, invoice, or basket line items associated with the payment. Use this when you want to pass item-level context for reporting, receipts, or reconciliation. If you do not have item-level detail, omit the field.

tenderTypes is an optional array used to limit or direct the payment to specific tender types. The selected tender types must already be enabled for the merchant, location, and terminal. Passing tenderTypes does not enroll the merchant into a new tender type. Use bitcoin for BTC (on-chain) / Bitcoin on-chain payments. Use bitcoin_Lightning for Bitcoin Lightning. Do not treat these as the same customer experience. When you limit a payment to BTC (on-chain), design the checkout flow for asynchronous completion: acknowledge processing, keep the order or invoice pending, and fulfill only after completed or overpaid. When you limit a payment to USDC on Base or USDC on Solana, the requestedAmount must be at least 1.00.

reference is a merchant-side reference such as an order or invoice number.

description is a description that may be shown to the customer and in reporting.

customer is required for virtual terminals. It is optional for physical terminals unless your selected tender, terminal configuration, compliance flow, or reporting process requires customer details. If included, provide the full required customer fields.

redirectUrl is an optional URL Bead redirects to after checkout completes or is cancelled.

emailReceipt and smsReceipt are optional receipt delivery settings.

refundEmail is required for virtual terminals. It is optional for physical terminals, where customer.email is used automatically if refundEmail is omitted. It is used for reclaim instructions when crypto must be returned to the payer.

webhookUrls is an optional array of additional webhook endpoints for this payment.

splitFunding is an optional split funding object. It is only accepted for merchants enrolled in the Split Funding Program and carries total, merchantPortion, and partnerPortion. Omit entirely for a standard payment. Bead's fee is calculated on total, the full amount the consumer paid, and taken from the partner portion. The earlier name rebate is no longer accepted. Sending it is not rejected: it is silently dropped, the request still returns 200 OK, and the payment is created as an ordinary payment with nothing withheld for the partner. There is no way to detect this from the response. Confirm your integration sends splitFunding before relying on partner withholding.

paymentPageId is returned on every payment. It identifies the hosted payment page and is the trailing segment of the URL in paymentUrls.

unavailableTenders is returned on every payment. It lists the tenders that were excluded from the hosted page, each with tenderType, reason, fee, transactionRate, and perItemFee. On a standard payment it is normally empty. On a split funding payment, check it before you present the hosted page.

Overpayments and underpayments

In wallet-based crypto payments, the customer typically scans a QR code to set the destination and then manually enters the amount in their wallet app. If they mistype the amount, the payment can end in one of these outcomes:

overpaid, the customer sent more than the requested amount.

underpaid, the customer sent less than the requested amount.

Both are final statuses. Recommended handling:

  • Overpaid: treat as paid and fulfill the order. The requested amount settles to the merchant. The excess is returned to the payer through the reclaim flow. statusCode stays overpaid, and reclaim progress is reported in refundLifecycleStatus.

  • Underpaid: treat as declined. Do not fulfill. The crypto sent by the customer is returned through the reclaim flow. statusCode stays underpaid, and reclaim progress is reported in refundLifecycleStatus. If the customer still wants to pay, create a new payment and start a new hosted checkout.

See Under and Over Payment Handling.

Email behavior for reclaim

refundEmail is required on virtual terminals, so an email is always on file for reclaim on those payments.

On physical terminals, if you provide refundEmail, Bead emails reclaim instructions when reclaim is required. If you omit it but include a customer object with email, Bead uses customer.email instead. If neither is available, the hosted payment page prompts the payer to enter an email address when an overpaid or underpaid outcome occurs, then Bead emails reclaim instructions.

See Reclaiming Unconverted Crypto for full details.

Webhooks

If you include webhookUrls, Bead sends payment lifecycle events to both:

  • the terminal's default webhook

  • each URL in the webhookUrls array

Configure at least one webhook endpoint before you depend on webhooks in production. See Payment Webhooks for payload and retry details.

Webhooks are strongly recommended for BTC (on-chain) / Bitcoin on-chain payments. In those flows, the customer may leave the hosted payment page after the payment reaches processing, while the merchant still needs to know the outcome.

Use webhooks to update the merchant order, invoice, or fulfillment workflow when the outcome is available. Do not rely on the customer keeping a browser tab open until BTC (on-chain) completion.

Split funding payments do not change webhook behavior. Payloads are unchanged, and no event is emitted for a partner distribution.

Step 3: Present the hosted page

Use the first URL in paymentUrls to start checkout.

Common patterns:

  • Web or SPA: embed the URL in an iframe or open a new tab or window

  • Native app: load the URL in an in-app browser or webview

Building an Android app? See Android App Integration.

Redirect behavior:

  • If redirectUrl is provided, Bead redirects the browser to redirectUrl after success or cancel and includes context in the query string.

  • If redirectUrl is not provided, Bead displays a hosted confirmation page that indicates success or cancellation.

Regardless of redirect choice, always confirm the outcome via webhooks or status polling before shipping goods or granting access.

For BTC (on-chain) / Bitcoin on-chain payments, the customer experience should not depend on the customer waiting on the hosted page until final completion. Once the payment is detected and the status reaches processing, show the customer that the transaction is underway and allow them to move to an order, invoice, receipt, or payment-status screen.

Continue to treat the payment as pending until it reaches an outcome.

Step 4: Confirm payment status

You can confirm payment status using webhooks or polling.

Option A: Webhooks

  • Configure a terminal-level webhook and optionally supply webhookUrls per payment

  • Your server receives JSON payloads whenever statusCode changes, and whenever a reclaim return to the payer progresses

  • Respond with 200 OK as soon as you have persisted or queued the event

Option B: Polling

Endpoint:

Headers:

Example curl:

Use the paymentId returned from the Create Payment response.

Typical statuses:

  • created, the payment has been created and Bead is waiting for customer payment

  • processing, funds have been detected and the payment is underway, but the outcome is not known yet

  • completed, the payment is paid. Use this as a fulfillment trigger

  • overpaid, the payment is paid and the excess is being returned to the payer. Use this as a fulfillment trigger

  • underpaid, expired, invalid, or cancelled, the payment is not paid and should not be fulfilled

Every status after created and processing is final. Reclaim progress is reported in refundLifecycleStatus and does not change statusCode.

For BTC (on-chain) / Bitcoin on-chain payments, processing can last several minutes or longer. In those flows, tell the customer the BTC payment has been detected, let them move on from the hosted payment experience, and rely on webhooks or polling to detect the outcome.

Do not ship goods, release physical items, grant digital access, or mark an invoice as paid until the status is completed or overpaid.

Note for split funding payments: the amounts you sent are not returned on this tracking response. See What is not returned.

For full status details, see Payment Statuses.

Troubleshooting

401 Unauthorized

  • Confirm the API key is present.

  • Confirm the header name is exactly X-Api-Key.

  • Confirm you are using the correct terminal API key for the environment.

  • Do not use the masked API key value for authentication.

Hosted page will not load

  • Confirm you are using a URL from the paymentUrls array returned by the create payment response.

  • Confirm the terminal has at least one active tender type in the environment you are testing.

  • Use GET /Terminals/{terminalId} to verify the terminal's current tenderTypes array.

Validation error on payment creation

  • Confirm the request body matches the tender and terminal requirements for the flow you are testing.

  • If your terminal type is virtual, confirm you are sending both a complete customer object and refundEmail. Both are required. A missing refundEmail returns 400 Bad Request on virtual terminals even if customer is complete.

  • If testing USDC on Base or USDC on Solana, confirm requestedAmount is at least 1.00.

  • If using tenderTypes, confirm the selected tenders are already approved and active for the merchant, location, and terminal.

  • Use GET /Terminals/{terminalId} to verify the terminal's current tenderTypes array.

  • If the tender is missing, it may require onboarding, pricing, provider enrollment, or operational support before it can be used.

  • If using customer, confirm all required customer fields are present.

  • If your flow does not require customer on a physical terminal, omit the object instead of sending a partial object.

  • If using refundEmail, confirm it is a valid email address, not an empty string.

  • If sending a split funding block, confirm the merchant is enrolled in the Split Funding Program, confirm you are sending splitFunding and not the retired rebate field, and confirm merchantPortion + partnerPortion exactly equals total. See Why a split funding payment is rejected.

Payment succeeds but the partner portion was not withheld

  • This is not a rejection, so it will not surface as an error. The most common cause is an integration still sending rebate instead of splitFunding; that field is silently dropped rather than rejected.

  • Confirm the request body uses splitFunding, not rebate.

  • Confirm against a Split Funding Reports transaction row for the payment: a genuine split funding payment shows a partnerPortion greater than zero. A 0 or missing partnerPortion confirms the field was not recognized.

Tenders are missing from the hosted page on a split funding payment

  • Read unavailableTenders on the create payment response. Each entry names the tender and the reason it was excluded.

  • feeNotCovered means the partner portion did not cover Bead's fee for that tender. Bead's fee is the contracted tender rate on total plus the per-item fee, so a partner portion sized against the merchant portion can fall short. Increase the partner portion, or narrow tenderTypes to the tenders your fee covers.

  • noContractedRate means your partner fee schedule has no rate for that tender. That is a configuration gap, not a sizing problem. Raise it with your Bead contact rather than adjusting the amounts.

Invalid cart item values

  • If you include cartItems, confirm each item has complete values for id, quantity, and price.

  • Do not send blank placeholder values.

  • If you do not have line-item detail, omit cartItems from the request.

Payment amount exceeds terminal maximum limit

  • Confirm requestedAmount does not exceed the terminal's configured maximum transaction amount.

  • In Sandbox, the test server may enforce a $100 maximum transaction amount.

  • A Sandbox request greater than 100.00 may return 400 Bad Request with a message similar to The requested payment amount exceeds the terminal's maximum limit.

  • This is expected Sandbox behavior and is a good scenario to test for graceful error handling.

  • In Production, maximum transaction limits can vary by merchant and terminal configuration.

No status change

  • Confirm you are polling the correct paymentId.

  • If using webhooks, confirm your endpoint is reachable.

  • Confirm your webhook endpoint returns HTTP 200 quickly after receiving an event.

  • If the payment uses BTC (on-chain) / Bitcoin on-chain and the status is processing, the payment may still be waiting for Bitcoin network confirmation. This can take several minutes or longer. Do not create a duplicate payment unless the original payment reaches a not paid outcome or the customer intentionally starts over.

Suggested checkout error handling

If the API returns a terminal maximum transaction error, show a clear message to the merchant or operator.

Example message:

In Sandbox, this can happen when testing amounts above 100.00.

Next steps

After you can create and complete a payment in Sandbox:

Last updated