Download OpenAPI specification:Download
The Paystar Embedded API lets you create secure session URLs for payment processing and account management flows. Your backend calls these endpoints to generate sessions, then your frontend opens them using the Paystar JavaScript SDK.
All requests require an X-Paystar-Api-Key header. Contact your Paystar Account Manager to receive your API key.
AccountNumber / SubAccountNumber. Future requests update the record to reflect what you send (except Note and custom account fields). Payment sessions sync automatically; AutoPay and Paperless sessions sync when SyncAccount: true (must be true when introducing a new account). Wallet and Notification sessions don't use accounts.EmailAddress and associates it with accounts in the session. FirstName and LastName are immutable — set on the first request, not updated by future requests. This is always automatic when ClientUser is provided.Creates a session for one-time payments. Supports QuickPay (customer self-service) and POS (agent-initiated) channels.
Accounts in Charges[].ClientAccount are automatically synced to Paystar. Future requests with the same account update the record (except Note and custom fields).
Any ClientUser provided is automatically synced — FirstName/LastName are immutable after the first request.
| BusinessUnitSlug required | string Your business unit identifier (provided by Paystar) |
| PaymentDescriptor | string Custom descriptor that appears on the payment |
| Channel required | string Default: "QuickPay" Enum: "QuickPay" "POS" Payment channel — |
| ClientReference | string Your system's reference ID for tracking this payment. Must be unique if provided. |
required | Array of objects (EmbeddedCharges) Line items for the payment (max 25). Each charge can optionally include a ClientAccount. |
object Key-value pairs for pre-configured custom fields. Must be configured with your Account Manager before use. If a configured field is omitted from the payload, the user is prompted to provide it. If included, the value is used directly. | |
object Arbitrary key-value metadata recorded onto the session. No prior configuration needed. Returned to you via webhooks, Query API, and SDK events. | |
object (ClientUserDto) | |
| PosUser | string Agent's Paystar email address for POS channel payments. Cannot be set with ClientUser. The agent's account must have POS permission enabled. |
| ReturnUrl | string URL for the 'Go back' button after payment. Must be paired with SuccessUrl — provide both or neither. |
| SuccessUrl | string URL for the 'I'm done' button after payment. Must be paired with ReturnUrl — provide both or neither. |
{- "BusinessUnitSlug": "acme-utilities",
- "Channel": "QuickPay",
- "Charges": [
- {
- "Amount": 15000,
- "Description": "Invoice #1023"
}, - {
- "Amount": 7500,
- "Description": "Late fee"
}
]
}{- "hasErrors": false,
- "errors": null,
- "data": {
- "PaymentSessionIdentifier": "abc123-def456-ghi789",
- "Status": "RequiresPaymentSource"
}
}Creates a session for AutoPay enrollment or management.
When SyncAccount is true, the provided ClientAccount data is synchronized with Paystar. Must be true when introducing a new account. Future requests update the account record (except Note and custom fields).
ClientUser data is always automatically synced — FirstName/LastName are immutable after the first request.
| BusinessUnitSlug required | string Your business unit identifier (provided by Paystar) |
required | object (ClientAccountDto) |
required | object (ClientUserDto) |
| SyncAccount | boolean When true, synchronizes the provided ClientAccount data with Paystar. Must be true when introducing a new account. Future requests update the record (except Note and custom fields). |
{- "BusinessUnitSlug": "acme-utilities",
- "SyncAccount": true,
- "ClientAccount": {
- "AccountNumber": "ACC-12345",
- "Name": "John Doe"
},
}{- "hasErrors": false,
- "errors": null,
- "data": {
- "SessionStatus": "Created",
- "ValidUntil": "2025-03-01T12:00:00Z"
}
}Creates a session for paperless billing enrollment or management.
When SyncAccount is true, the provided ClientAccount data is synchronized with Paystar. Must be true when introducing a new account. Future requests update the account record (except Note and custom fields).
ClientUser data is always automatically synced — FirstName/LastName are immutable after the first request.
| BusinessUnitSlug required | string Your business unit identifier (provided by Paystar) |
required | object (ClientAccountDto) |
required | object (ClientUserDto) |
| SyncAccount | boolean When true, synchronizes the provided ClientAccount data with Paystar. Must be true when introducing a new account. Future requests update the record (except Note and custom fields). |
{- "BusinessUnitSlug": "acme-utilities",
- "SyncAccount": true,
- "ClientAccount": {
- "AccountNumber": "ACC-12345",
- "Name": "John Doe"
},
}{- "hasErrors": false,
- "errors": null,
- "data": {
- "SessionStatus": "Created",
- "ValidUntil": "2025-03-01T12:00:00Z"
}
}Creates a session for managing saved payment methods (add, view, delete).
Wallet sessions are per-customer — no ClientAccount is needed.
ClientUser data is always automatically synced — FirstName/LastName are immutable after the first request.
| BusinessUnitSlug required | string Your business unit identifier (provided by Paystar) |
required | object (ClientUserDto) |
{- "BusinessUnitSlug": "acme-utilities",
}{- "hasErrors": false,
- "errors": null,
- "data": {
- "SessionStatus": "Created",
- "ValidUntil": "2025-03-01T12:00:00Z"
}
}Creates a session for managing email and SMS notification preferences.
ClientUser data is always automatically synced — FirstName/LastName are immutable after the first request.
| BusinessUnitSlug required | string Your business unit identifier (provided by Paystar) |
required | object (ClientUserDto) |
{- "BusinessUnitSlug": "acme-utilities",
}{- "hasErrors": false,
- "errors": null,
- "data": {
- "SessionStatus": "Created",
- "ValidUntil": "2025-03-01T12:00:00Z"
}
}