Skip to content
Cipay
Esc
navigateopen⌘Jpreview
On this page

API SDK type reference

Generated reference for the public server SDK configuration and request types.

Generated from the published @cipay/client-sdk/api declaration during this build.

Import these types from @cipay/client-sdk/api. The API Reference contains the current public transport schemas.

Client configuration

PropType
apiKeystring

Secret merchant credential. Use this entry point only on a trusted server.

Typestring
mode?CipayMode
TypeCipayMode
baseUrl?string
Typestring
fetch?typeof globalThis.fetch
Typetypeof globalThis.fetch
timeoutMs?number
Typenumber
onResponse?(metadata: ResponseMetadata) => void
Type(metadata: ResponseMetadata) => void

Request controls

PropType
requestId?string
Typestring
idempotencyKey?string
Typestring
revision?number

Current resource revision. Sent as a quoted If-Match value.

Typenumber
signal?AbortSignal
TypeAbortSignal

Pagination

PropType
pageSize?number
Typenumber
cursor?string
Typestring

Buyer handler

PropType
clientimport("./client").CipayClient
Typeimport("./client").CipayClient
storefrontReadonly<{ locator: string }>
TypeReadonly<{ locator: string }>
resolveCustomer(request: Request) => BuyerIdentity | null | Promise<BuyerIdentity | null>
Type(request: Request) => BuyerIdentity | null | Promise<BuyerIdentity | null>
maxBodyBytes?number
Typenumber

Webhook verification

PropType
secretstring
Typestring
rawBodystring | Uint8Array
Typestring | Uint8Array
headersHeaders | WebhookHeaders
TypeHeaders | WebhookHeaders
now?Date
TypeDate
toleranceSeconds?number
Typenumber

Customer input

PropType
billingAddress
Type
Defaultnull
email

Format: email

Type
externalId
Type
Defaultnull
locale
Type
Defaulten
metadata
Type
Default{}
mobile
Type
name
Type

Checkout input

PropType
locatorstring
Typestring
originstring
Typestring
buyer
Type
customAmountHalalas?
Type
discountCode?
Type
formId?

Format: uuid

Type
offerId

Format: uuid

Type
policyFingerprint?
Type
recurringConsentAccepted?
Type

Webhook endpoint input

PropType
name
Type
scope
Type
selectedEventTypes
Type
url

Format: uri

Type