@cosmosapp/pay_sdkDefiniçõesServidor

Receiver

A verified identity — the thing both ramps hang off. Everything a receiver owns is reachable from the instance (receiver.addBankAccount(…), receiver.wallets())…

A verified identity — the thing both ramps hang off. Everything a receiver owns is reachable from the instance (receiver.addBankAccount(…), receiver.wallets()), because the alternative is carrying a receiver id and a manager reference side by side through a KYC flow that already has enough moving parts.

Constructor

Receiver

constructor(client: Client, data: ReceiverData)

Parameters

  • client: Client
  • data: ReceiverData

Properties

blindpayId

blindpayId: string

type

individual or business.

type: string

kycType

kycType: string | null

kycStatus

Verification state, refreshed from upstream on every read.

kycStatus: string | null

email

email: string | null

name

name: string | null

country

country: string | null

externalId

Your own id for this receiver, if you set one.

externalId: string | null

disabled

True when the receiver is cut off from both ramps.

disabled: boolean

dossierVersion

How many times the submitted KYC data has been written.

dossierVersion: number

reviewedVersion

The version a reviewer approved, or null while unapproved.

reviewedVersion: number | null

createdAt

createdAt: Date

updatedAt

updatedAt: Date

protected

protected _patch(data: ReceiverData): this

get

True once verification has passed and the ramps will act on this receiver.

get isApproved(): boolean

Methods

fetch()

Re-read this receiver, refreshing kycStatus, and patch it in place.

fetch(): Promise<this>

Returns Promise<this>

update()

Update and patch in place.

update(options: UpdateReceiverOptions): Promise<this>

Parameters

  • options: UpdateReceiverOptions

Returns Promise<this>

delete()

Delete this receiver.

delete(): Promise<void>

Returns Promise<void>

approve()

Approve it out of review (admin-only). Pinned to the dossier THIS instance holds: expected_version defaults to {@link Receiver.dossierVersion}, so approving a receiver that was edited since you read it is a 409 kyc_state_invalid rather than a silent approval of data you never saw. Call {@link Receiver.fetch} and review again, or pass expected_version yourself — including undefined, which approves whatever is stored now.

approve(options?: ApproveReceiverOptions): Promise<ReceiverData>

Parameters

  • options (optional): ApproveReceiverOptions

Returns Promise<ReceiverData>

requestTos()

Ask for a terms-of-service link for this receiver.

requestTos(options: RequestTosOptions): Promise<TermsOfServiceData>

Parameters

  • options: RequestTosOptions

Returns Promise<TermsOfServiceData>

enable()

Enable it with an accepted terms-of-service id, and patch in place.

enable(options: EnableReceiverOptions): Promise<this>

Parameters

  • options: EnableReceiverOptions

Returns Promise<this>

setAccess()

Cut this receiver off from both ramps, or let it back in.

setAccess(disabled: boolean): Promise<this>

Parameters

  • disabled: boolean

Returns Promise<this>

addWallet()

Register a blockchain wallet for this receiver.

addWallet(options: CreateReceiverWalletOptions): Promise<ReceiverWalletData>

Parameters

  • options: CreateReceiverWalletOptions

Returns Promise<ReceiverWalletData>

wallets()

This receiver's wallets.

wallets(options?: ListKycOptions): Promise<ReceiverWalletPage>

Parameters

  • options (optional): ListKycOptions

Returns Promise<ReceiverWalletPage>

addBankAccount()

Add a fiat bank account — where an off-ramp pays out.

addBankAccount(options: CreateBankAccountOptions): Promise<BankAccountData>

Parameters

  • options: CreateBankAccountOptions

Returns Promise<BankAccountData>

bankAccounts()

This receiver's bank accounts.

bankAccounts(options?: ListKycOptions): Promise<BankAccountPage>

Parameters

  • options (optional): ListKycOptions

Returns Promise<BankAccountPage>

toJSON()

toJSON(): ReceiverData

Returns ReceiverData

Nesta página