Skip to main content

getAccountById

Get one payment account object by its identifier. 🔐 This method requires authorization?.

Payments?.getAccountById( id? );

Minimal example

const value = await Payments.getAccountById(1764)
Schema

id(required): number
Identifier of the retrieved payment account object
example: 12345

settings(required): any
Settings object
example: !!!

This method get a single payment account object by its identifier. It returns a Promise that resolves to a payment account object.

Example response

{
"id": 1,
"localizeInfos": {
"en_US": {
"title": "Cash"
}
},
"identifier": "cash",
"type": "custom",
"isVisible": true,
"isUsed": true
}
Schema

id: number
Object identifier.
example: 12345

localizeInfos: ILocalizeInfo
Json description of the payment account object.

identifier: string
Text identifier for the recording field.
example: "payment_12345"

type: 'stripe' | 'custom'
Type may be 'stripe' or 'custom'.
example: 'stripe'

isVisible: boolean
Visibility indicator of the payment account.
example: true

isUsed: boolean
Usage indicator of the payment account.
example: false