Skip to content
Docs
Reference

BackstageClient.paymentMethods

BackstageClient.paymentMethods in @ticketlayer/backstage.

@ticketlayer/backstage


@ticketlayer/backstage / BackstageClient / paymentMethods

paymentMethods: {
  getPolicy: (scopeType: string, scopeId: string, requestOptions?: RequestOptions) => Promise<{
     allowedMethods:   | (
        | "card"
        | "other"
        | "bank_transfer"
        | "cheque"
        | "manual_card"
        | "invoice"
        | "voucher"
        | "paypal"
        | "terminal_card"
        | "cash"
        | "stored_value")[]
        | null;
     pendingClosesDaysBefore: number | null;
     pendingExpiryAction: "cancel" | "task" | null;
     scopeId: string;
     scopeType: "account" | "organisation" | "channel" | "event";
     updatedAt: string | null;
  }>;
  list: (requestOptions?: RequestOptions) => Promise<{
     comingIn: string | null;
     key:   | "card"
        | "other"
        | "bank_transfer"
        | "cheque"
        | "manual_card"
        | "invoice"
        | "voucher"
        | "paypal"
        | "terminal_card"
        | "cash"
        | "stored_value";
     kind: "processed" | "stored_value" | "recorded";
     label: string;
     pending: boolean;
     staffOnly: boolean;
     surfaces: ("box_office" | "online")[];
  }[]>;
  setPolicy: (scopeType: string, scopeId: string, request: {
     allowedMethods?:   | (
        | "card"
        | "other"
        | "bank_transfer"
        | "cheque"
        | "manual_card"
        | "invoice"
        | "voucher"
        | "paypal"
        | "terminal_card"
        | "cash"
        | "stored_value")[]
        | null;
     pendingClosesDaysBefore?: number | null;
     pendingExpiryAction?: "cancel" | "task" | null;
   }, requestOptions?: RequestOptions) => Promise<{
     allowedMethods:   | (
        | "card"
        | "other"
        | "bank_transfer"
        | "cheque"
        | "manual_card"
        | "invoice"
        | "voucher"
        | "paypal"
        | "terminal_card"
        | "cash"
        | "stored_value")[]
        | null;
     pendingClosesDaysBefore: number | null;
     pendingExpiryAction: "cancel" | "task" | null;
     scopeId: string;
     scopeType: "account" | "organisation" | "channel" | "event";
     updatedAt: string | null;
  }>;
};

Defined in: client.ts:6433

Payment methods methods

getPolicy()#

getPolicy: (scopeType: string, scopeId: string, requestOptions?: RequestOptions) => Promise<{
  allowedMethods:   | (
     | "card"
     | "other"
     | "bank_transfer"
     | "cheque"
     | "manual_card"
     | "invoice"
     | "voucher"
     | "paypal"
     | "terminal_card"
     | "cash"
     | "stored_value")[]
     | null;
  pendingClosesDaysBefore: number | null;
  pendingExpiryAction: "cancel" | "task" | null;
  scopeId: string;
  scopeType: "account" | "organisation" | "channel" | "event";
  updatedAt: string | null;
}>;

Get the payment methods one level offers One level's payment method policy: the organisation, an account, a sales channel or an event. A level never set inherits everything (updatedAt is null). Needs paymentproviders.read for the organisation (on every account) or an account, saleschannels.read for a channel, events.read for an event.

Parameters#

ParameterType
scopeTypestring
scopeIdstring
requestOptions?RequestOptions

Returns#

Promise<{ allowedMethods: | ( | "card" | "other" | "bank_transfer" | "cheque" | "manual_card" | "invoice" | "voucher" | "paypal" | "terminal_card" | "cash" | "stored_value")[] | null; pendingClosesDaysBefore: number | null; pendingExpiryAction: "cancel" | "task" | null; scopeId: string; scopeType: "account" | "organisation" | "channel" | "event"; updatedAt: string | null; }>

Operation Id#

getPaymentMethodPolicy

list()#

list: (requestOptions?: RequestOptions) => Promise<{
  comingIn: string | null;
  key:   | "card"
     | "other"
     | "bank_transfer"
     | "cheque"
     | "manual_card"
     | "invoice"
     | "voucher"
     | "paypal"
     | "terminal_card"
     | "cash"
     | "stored_value";
  kind: "processed" | "stored_value" | "recorded";
  label: string;
  pending: boolean;
  staffOnly: boolean;
  surfaces: ("box_office" | "online")[];
}[]>;

List the payment method catalogue Every way money can arrive, with its kind (processed, recorded or stored value), where it can be offered, and whether it leaves an order awaiting payment. The catalogue is fixed in code; which methods are offered is set per level with PUT /payment-methods/policies/{scopeType}/{scopeId}.

Parameters#

ParameterType
requestOptions?RequestOptions

Returns#

Promise<{ comingIn: string | null; key: | "card" | "other" | "bank_transfer" | "cheque" | "manual_card" | "invoice" | "voucher" | "paypal" | "terminal_card" | "cash" | "stored_value"; kind: "processed" | "stored_value" | "recorded"; label: string; pending: boolean; staffOnly: boolean; surfaces: ("box_office" | "online")[]; }[]>

Operation Id#

listPaymentMethodCatalogue

setPolicy()#

setPolicy: (scopeType: string, scopeId: string, request: {
  allowedMethods?:   | (
     | "card"
     | "other"
     | "bank_transfer"
     | "cheque"
     | "manual_card"
     | "invoice"
     | "voucher"
     | "paypal"
     | "terminal_card"
     | "cash"
     | "stored_value")[]
     | null;
  pendingClosesDaysBefore?: number | null;
  pendingExpiryAction?: "cancel" | "task" | null;
}, requestOptions?: RequestOptions) => Promise<{
  allowedMethods:   | (
     | "card"
     | "other"
     | "bank_transfer"
     | "cheque"
     | "manual_card"
     | "invoice"
     | "voucher"
     | "paypal"
     | "terminal_card"
     | "cash"
     | "stored_value")[]
     | null;
  pendingClosesDaysBefore: number | null;
  pendingExpiryAction: "cancel" | "task" | null;
  scopeId: string;
  scopeType: "account" | "organisation" | "channel" | "event";
  updatedAt: string | null;
}>;

Set the payment methods one level offers Sets which payment methods a level offers, when bank transfer, cheque and invoice close before the event, and what happens to an order left unpaid at its due date. Fields left out keep their value; null inherits the level above. Levels only narrow: a method is offered only if every level that names methods names it. Needs paymentproviders.update for the organisation (on every account) or an account, saleschannels.update for a channel, events.update for an event.

Parameters#

ParameterTypeDescription
scopeTypestring-
scopeIdstring-
request{ allowedMethods?: | ( | "card" | "other" | "bank_transfer" | "cheque" | "manual_card" | "invoice" | "voucher" | "paypal" | "terminal_card" | "cash" | "stored_value")[] | null; pendingClosesDaysBefore?: number | null; pendingExpiryAction?: "cancel" | "task" | null; }-
request.allowedMethods?| ( | "card" | "other" | "bank_transfer" | "cheque" | "manual_card" | "invoice" | "voucher" | "paypal" | "terminal_card" | "cash" | "stored_value")[] | nullDescription The methods this level offers. Null inherits the level above; a list narrows it. Levels below can only narrow further, so a method survives only if every level that names methods names it. A channel that names none offers its type's defaults (box office: terminal card, cash, card machine; anything a buyer uses: card, PayPal). Example [ "card", "bank_transfer" ]
request.pendingClosesDaysBefore?number | nullDescription How many days before the event bank transfer, cheque and invoice stop being offered. Null inherits; the default is 7. Across an order's events the longest wins. Example 7
request.pendingExpiryAction?"cancel" | "task" | nullDescription What happens to an order still unpaid at its due date: cancel releases its tickets and cancels it (the default), task raises a task for staff to decide. Example `cancel @enum {string
requestOptions?RequestOptions-

Returns#

Promise<{ allowedMethods: | ( | "card" | "other" | "bank_transfer" | "cheque" | "manual_card" | "invoice" | "voucher" | "paypal" | "terminal_card" | "cash" | "stored_value")[] | null; pendingClosesDaysBefore: number | null; pendingExpiryAction: "cancel" | "task" | null; scopeId: string; scopeType: "account" | "organisation" | "channel" | "event"; updatedAt: string | null; }>

Operation Id#

putPaymentMethodPolicy