Overview
The Pre-Authorization API lets your systems create, capture, void and read card pre-authorizations in Paystand. All responses are synchronous, and Paystand never retries a failed capture or void on its own.
A pre-authorization can be created in any of these ways:
- Customer checkout on a NetSuite Sales Order or Quote
- Authorize only in Virtual Terminal or Pay with Paystand
- AutoPay running against a Sales Order
- The API, with
POST /preAuths
It can be captured in two ways:
- Automatically, when the linked Sales Order converts to an Invoice or Cash Sale in NetSuite (see Automatic capture below)
- Manually, with
POST /preAuths/:id/captureor from the Paystand Dashboard
While a pre-auth is active (pending, authorized or partially_captured), Paystand blocks every other payment attempt against the linked ERP documents. Only captures from that pre-auth are allowed until it is fully captured, voided or expired.
Pre-authorization is available for card payments only.
Authentication and base URLs
Every request needs an OAuth2 Bearer token and your Paystand customer ID in the X-CUSTOMER-ID header.
Authorization: Bearer <access_token> X-CUSTOMER-ID: <paystand_customer_id>
- Access token: your implementation manager can share your API credentials.
- Customer ID: in the Paystand Dashboard, under Integrations > API Configuration Values.
| Environment | Base URL |
|---|---|
| Production | https://api.paystand.com/v3 |
| Sandbox | https://api.paystand.co/v3 |
X-CUSTOMER-ID is required on every request; without it the API returns 400 validationError: Customer context is required. Records are scoped to that customer, so a pre-auth that belongs to another customer returns 404, the same as one that doesn't exist.
Create a pre-authorization
POST /preAuths places a hold on a card your customer has already saved in Paystand. Authorize the amount you expect to capture: a pre-auth should never be larger than what you will capture.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Amount to authorize. Must be greater than 0. |
currency | string | Yes | Currency code, for example USD. |
cardId | string | Yes | Paystand saved card ID. Raw Stripe or Vantiv tokens are not accepted. |
expiresAt | string | No | ISO 8601 expiry date. Defaults to 7 days after creation. |
receivables | array | No | Paystand receivable or invoice IDs to link to this pre-auth. |
idempotencyKey | string | No | Your own reference. A retry with the same key won't create a second pre-auth. Applies to this endpoint only. |
{
"amount": 1000.00,
"currency": "USD",
"cardId": "crd_abc123",
"idempotencyKey": "my-system-ref-7890",
"expiresAt": "2027-01-10T00:00:00Z"
}Response: 200
{
"id": "pa_987654",
"amount": 1000.00,
"currency": "USD",
"status": "authorized",
"amountCaptured": 0,
"expiresAt": "2027-01-10T00:00:00Z",
"authorizedAt": "2027-01-03T10:00:00Z",
"receivables": "[{\"id\":\"inv_001\",\"amountToPay\":\"600.00\"},{\"id\":\"inv_002\",\"amountToPay\":\"400.00\"}]"
}In this response, receivables is a JSON-encoded string, not an array. Call GET /preAuths/:id afterwards to get the full receivables array, with the amounts and invoice keys you need for captures.
Error: 409 duplicate pre-auth
Only one active pre-auth is allowed per receivable.
{
"error": {
"code": "validationError",
"explanation": "A pre-authorization already exists for one or more of the selected receivables. Only one active pre-authorization is allowed per receivable."
}
}Capture a pre-authorization
POST /preAuths/:id/capture settles held funds. You can capture in full, or in several partial captures while the pre-auth is open and unexpired. The request body depends on whether the pre-auth is linked to receivables.
Option A: capture by receivable
Use this when the pre-auth is linked to Paystand receivables. Pass the receivable IDs; Paystand derives the amount from each receivable's amountToPay, as stored when the pre-auth was created, and recalculates fee splits proportionally. You can't pass an amount in this mode.
| Field | Type | Required | Description |
|---|---|---|---|
receivables | array | Yes | Receivable IDs to capture, as plain strings or { "id": "..." } objects. |
Capture all linked invoices:
{ "receivables": ["inv_001", "inv_002"] }Capture one of two linked invoices:
{ "receivables": ["inv_001"] }Option B: capture by amount
Use this when the pre-auth has no linked receivables, or to capture a specific amount.
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | No | Amount to capture. Must be greater than 0 and no more than the remaining balance. Omit it to capture the full remaining balance. |
Partial capture:
{ "amount": 500.00 }Full capture of the remaining balance:
{}Response: 200
{
"preAuth": {
"id": "pa_987654",
"status": "partially_captured",
"amount": 1000.00,
"amountCaptured": 500.00,
"currency": "USD",
"expiresAt": "2027-01-10T00:00:00Z"
},
"payment": {
"id": "pay_11223344"
}
}After a capture, status is partially_captured if less than the authorized amount has been captured in total, and captured once it all has. A capture always uses the pre-auth's own currency.
Errors
| Status | Condition | Message |
|---|---|---|
| 400 | amount is 0 or less, or above the remaining balance | capture_amount must be > 0 and ≤ remaining balance |
| 400 | Status is not pending, authorized or partially_captured | PreAuth can only be captured when status is authorized, pending, or partially captured |
| 400 | expiresAt has passed. The status also changes to expired. | PreAuth has expired |
| 400 | Nothing left to capture | PreAuth has no remaining amount to capture |
| 400 | X-CUSTOMER-ID header missing | validationError: Customer context is required |
| 404 | Pre-auth not found, or belongs to another customer | NOT_FOUND |
Processor errors (400)
| Processor | Situation | What happens |
|---|---|---|
| Stripe | Hold already released at Stripe, or amount mismatch | Pre-auth is marked expired. Message: Capture failed: the authorized amount at the payment provider does not match the expected capture amount. |
| Stripe | Any other failure | Generic providerFailureError. The processor's message is not shown. |
| Vantiv | Any failure | The processor's error is returned as is. |
When a capture fails at the processor, the pre-auth's status and amountCaptured don't change, no payment record is created and nothing posts to your ERP.
Retries and duplicate captures
The capture endpoint has no idempotency key. If you send the same partial capture twice while the pre-auth is partially_captured, both are processed. A repeated full capture is rejected because the status is already captured. Before retrying a capture that timed out, call GET /preAuths/:id and check amountCaptured. If you capture from NetSuite, use automatic capture instead of your own script: it is safe to retry.
Automatic capture on Sales Order conversion
For NetSuite merchants, Paystand captures a pre-auth automatically when its Sales Order converts to an Invoice or Cash Sale. You don't need to call the API.
| Situation | What Paystand captures |
|---|---|
| Invoice matches the remaining hold | The full Invoice amount |
| Invoice is more than the remaining hold | What is left on the hold. The difference stays open on the Invoice. |
| Several Cash Sales from one Sales Order | Each Cash Sale is captured as it's created, until the hold is used up |
Automatic capture supports customer-paid processing fees and Sales Orders linked to more than one receivable. It doesn't support credit memos: capture those orders manually. Automatic capture is on by default; your Paystand team can turn it off if you prefer to capture every pre-auth yourself.
Void a pre-authorization
POST /preAuths/:id/void cancels the authorization at the processor and releases whatever is still held on the card. No payment record is created and nothing hits your GL. Voiding costs less than refunding a captured payment.
No request body is needed.
Response: 200
{
"id": "pa_987654",
"status": "voided",
"amount": 1000.00,
"amountCaptured": 0,
"currency": "USD"
}Behavior by current status
| Current status | What a void does |
|---|---|
pending or authorized | Cancels at the processor and sets status to voided |
partially_captured | Releases the uncaptured remainder at the processor and sets status to voided. Amounts already captured stay captured. |
voided or expired | Nothing. Returns the record unchanged, so repeating a void is safe. |
captured | Rejected with 400: Cannot void an already fully captured pre-auth |
A void returns 404 if the pre-auth doesn't exist or belongs to another customer.
List and get pre-authorizations
List
GET /preAuths returns an array of pre-auths for the customer in X-CUSTOMER-ID. Pass a LoopBack filter object in ?f= to use where, limit, offset and order.
Get one
GET /preAuths/:id returns the full pre-auth: linked receivables with their amounts and invoice keys, payer details, and every capture made so far. Use it after creating a pre-auth, and before retrying a capture.
{
"id": "pa_987654",
"amount": 1000.00,
"currency": "USD",
"status": "partially_captured",
"amountCaptured": 600.00,
"expiresAt": "2027-01-10T00:00:00Z",
"authorizedAt": "2027-01-03T10:00:00Z",
"hasLinkedReceivables": true,
"payerId": "pyr_abc",
"payerDisplayName": "Acme Corp",
"payerEmail": "billing@acme.com",
"receivables": [
{
"id": "inv_001",
"amountToPay": "600.00",
"amountRemaining": 0.00,
"amountCaptured": 600.00,
"invoiceKey": "INV-2027-001",
"hasReceivableRecord": true,
"status": "captured"
},
{
"id": "inv_002",
"amountToPay": "400.00",
"amountRemaining": 400.00,
"amountCaptured": 0,
"invoiceKey": "INV-2027-002",
"hasReceivableRecord": true,
"status": "open"
}
],
"capturedPayments": [
{
"id": "pay_11223344",
"amount": 600.00,
"status": "posted",
"datePaid": "2027-01-03T12:00:00Z",
"currency": "USD"
}
]
}In receivables, amountToPay is a string and the other amounts are numbers.
Receivable status | Meaning |
|---|---|
captured | Fully captured: amountCaptured is at least amountToPay |
released | The pre-auth was voided before this receivable was captured |
| Any other value | The receivable's own Paystand status, for example open or paid |
Returns 404 if the pre-auth doesn't exist or belongs to another customer.
PreAuth object
| Field | Type | Description |
|---|---|---|
id | string | Pre-auth ID |
amount | number | Amount originally authorized |
currency | string | Currency code |
status | string | See status values below |
amountCaptured | number | Total captured so far, across all partial captures |
expiresAt | string (ISO 8601) | When the authorization expires. Also shown in the Paystand Dashboard. |
authorizedAt | string (ISO 8601) | When the processor confirmed the hold |
paymentId | string | ID of the most recent capture payment |
capturedPaymentIds | string | JSON-encoded array of every capture payment ID |
cardId | string | Paystand saved card ID used for the hold |
provider | string | Processor: stripe or vantiv |
receivables | array | Linked receivables, each with id, amountToPay, currency and invoiceKey. amountToPay is fixed at creation and sets the amount for captures by receivable. |
hasLinkedReceivables | boolean | Whether any receivables are linked (returned by GET /preAuths/:id) |
payerId, payerDisplayName, payerEmail | string | Payer details (returned by GET /preAuths/:id) |
capturedPayments | array | Every capture payment with its amount, status and date (returned by GET /preAuths/:id) |
idempotencyKey | string | The key sent when the pre-auth was created |
metadata | object | Any extra data stored with the pre-auth |
Status values
| Status | Meaning |
|---|---|
pending | Created; the processor authorization is in progress |
authorized | Hold is active and nothing has been captured yet |
partially_captured | Part of the hold has been captured; the rest is still available |
captured | Fully captured; the pre-auth is closed |
voided | Cancelled at the processor; the hold is released and no money moved |
expired | The expiry date passed or the processor released the hold. Create a new pre-auth to collect. |
GL and ERP behavior
Only captures create payments and post to your ERP and GL.
| Event | Payment record | ERP update | GL impact |
|---|---|---|---|
| Pre-auth created | No | No | No |
| Partial capture | Yes | Yes (Partially Paid) | Yes |
| Full capture | Yes | Yes (Paid) | Yes |
| Void | No | No | No |
| Expiry | No | No | No |