Skip to Content
API ReferenceIn-personSemi-integrationIncremental auth

Incremental Auth

ENDPOINT
POST
https://open.sunbay.us/v1/semi-integration/transaction/incremental-auth

The Incremental Authorization API is used to increase the authorization amount based on an existing pre-authorization. After calling this API, the incremental authorization request will be pushed to the specified payment terminal, and the API returns immediately, indicating that the request has been successfully dispatched (does not mean the transaction is complete). Terminal processing (usually no customer action required). Transaction results are obtained through asynchronous notification or active query.

Parameters

Header parameters

NameTypeRequiredDescription
Authorization
stringY
Bearer Token authentication, format: Bearer {your_api_key}
Example: "Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"
Content-Type
stringY
Request content type, fixed value: application/json
X-Client-Request-Id
string(64)Y
Request unique identifier, used to prevent duplicate requests and issue tracking. UUID format is recommended, each request must use a unique Request ID
Example: "550e8400-e29b-41d4-a716-446655440000"
X-Timestamp
stringY
Request timestamp, Unix timestamp (milliseconds), 13 digits. The deviation between the request timestamp and server time cannot exceed ±10 minutes
Pattern: ^[0-9]{13}$
Example: "1701234567890"

Body parameters

NameTypeRequiredDescription
appId
string(32)Y
Application ID
Example: "app_123456"
merchantId
string(32)Y
Merchant ID
Example: "mch_789012"
originalTransactionId
string(64)N
SUNBAY Nexus transaction ID of the original pre-authorization transaction that needs to have its authorization amount increased, choose one between this and originalTransactionRequestId. When both exist, originalTransactionId takes priority
Example: "TXN20231119001"
originalTransactionRequestId
string(32)N
Transaction request ID of the original pre-authorization transaction that needs to have its authorization amount increased, choose one between this and originalTransactionId. When both exist, originalTransactionId takes priority
Example: "PAY_REQ_20231119002"
transactionRequestId
string(32)Y
Request unique identifier for this incremental authorization transaction. Used to identify the unique ID of this incremental authorization request, serves as an API idempotency control field. Can only contain letters, numbers, underscores and hyphens, maximum length 32 characters. Must not be repeated for each request
Pattern: ^[A-Za-z0-9_\-]+$
Example: "PAY_REQ_20231119004"
amount
objectY
description
string(128)Y
Product description, need to pass a description that truly represents the product information, may be displayed on the bill page of some payment apps
Example: "Increase authorization amount"
terminalSn
string(32)Y
Payment terminal serial number. SUNBAY provided payment terminal device serial number, this device is used for reading bank cards, processing PIN and other security operations
Example: "T1234567890"
attach
string(128)N
Additional data, returned as is, JSON format recommended
Example: "{\"reason\":\"additional_charge\"}"
notifyUrl
string(200)N
Asynchronous notification URL
Format: uri
Example: "https://merchant.com/notify"
printReceipt
stringN
Receipt printing option
Possible values:
  • NONE- Do not print receipt
  • MERCHANT- Print merchant copy only
  • CUSTOMER- Print customer copy only
  • BOTH- Print both merchant and customer copies
Default: "NONE"
Example: "MERCHANT"
pushToTerminal
booleanN
Whether to push the transaction request to the payment terminal for processing. When true, the transaction request is pushed to the specified terminal device; when false, the transaction is processed directly in the cloud
Default: true
Example: true

Request Example

{
  "appId": "app_123456",
  "merchantId": "mch_789012",
  "originalTransactionId": "TXN20231119001",
  "originalTransactionRequestId": "PAY_REQ_20231119002",
  "transactionRequestId": "PAY_REQ_20231119004",
  "amount": {
    "orderAmount": 2000,
    "priceCurrency": "USD"
  },
  "description": "Increase authorization amount",
  "terminalSn": "T1234567890"
}

Code Examples

cURLbash

Response parameters

NameTypeRequiredDescription
code
string(16)Y
Response code, 0 indicates request has been successfully dispatched to terminal
Example: "0"
msg
string(128)N
Response description
Example: "Incremental authorization request sent"
traceId
string(64)Y
Trace ID for troubleshooting
Example: "TRACE123456789"
data
objectY
Last updated on