Skip to main content

Webhook payloads

Account​

Represents an Abowire account. More in Abowire Accounts.

{
name: string;
billing?: {
companyName?: string;
address: string;
address2?: string;
postalCode: string;
city: string;
countryCode: 'AF' | 'AX' | ...;
taxIds?: {
type: 'EU_VAT_ID' |'UK_VAT_ID' |'NO_VAT' |'CH_UID' |'LI_UID' | 'AR_CUIT' |'CO_NIT' |'MX_RFC' |'US_EIN';
countryCode?: 'AF' | 'AX' | ...;
value: string;
}[];
metadata?: {
[index: string]: string;
};
};
isProduction: boolean;
settings: {
domain: {
name: string;
config?: {
id: string;
hostname: string;
isVerified: boolean;
verificationRecord: {
type: string;
name: string;
value: string;
}
};
};
analytics?: {
dashboardId?: string;
isAvailableInGlobalDashboard?: boolean;
};
theme?: {
light: {
logoUrl: string;
};
dark: {
logoUrl: string;
};
};
billing: {
taxSchemes: { 'EU_VAT' | 'EU_VAT_OSS' | 'CUSTOM_TAX' }[];
customTaxRate?: {
code: 'NONE' | 'CUSTOM_RATE' | 'EU_VAT_REVERSE_CHARGE' | 'EU_VAT_EXEMPT' | 'EU_VAT_STANDARD' | 'EU_VAT_EPUB' | 'EU_VAT_EBOOK' | 'EU_VAT_ENEWS';
description?: string;
rate: number;
};
logoUrl?: string;
footerText?: string;
numberingFormat: string;
};
metadata?: {
customer?: {
{
name: string;
type: 'string' | 'number' | 'boolean' | 'enum' | 'date' | 'datetime';
description: string;
required: boolean;
format?: 'any' | 'email' | 'url';
isPersonalInformation?: boolean;
options?: {
label: string;
value: string;
}[];
default?: string;
}
}[];
person?: ...;
billingProfile?: ...;
invoice?: ...;
creditNote?: ...;
license?: ...;
licenseUser?: ...;
subscription?: ...;
product?: ...;
discount?: ...;
transaction?: ...;
};
payments?: {
paymentMethods?: {
type: 'CASH' | 'CARD' | 'SEPA_MANDATE' | 'WIRE_TRANSFER';
providerName: string;
isActive?: boolean;
}[];
providers: {
name: string;
config: {
[index: string]: string;
};
metadata?: {
[index: string]: string;
};
}[];
};
capabilities?: {
name: string;
type: 'boolean' | 'number';
description: string;
}[];
};
capabilities: {
canManageLicenses: boolean;
canBill: boolean;
canCreateApps: boolean;
hasCustomerPortal: boolean;
hasCheckout: boolean;
canCreateCustomDomains: boolean;
canInviteMembers: boolean;
canCustomizeFields: boolean;
hasAnalytics: boolean;
};
}

App​

Represents an external application that connects with Abowire. An App can be installed in multiple Accounts.

{
name: string;
description?: string;
pageContent?: string;
logoUrl?: string;
privacyUrl?: string;
tosUrl?: string;
isPublic?: boolean;
apiClients: {
id: string;
type: 'PUBLIC' | 'PRIVATE';
secret?: string;
redirectUrls: string[];
scopes: string[];
}[];
webhooks: {
events: string[];
endpoint?: string;
headers?: any;
isActive?: boolean;
};
accountIds: string[];
categories?: string[];
}

App instance​

Represents an external application installed in an Abowire Account.

{
appId: string;
scopes: string[];
}

Customer​

{
name: string;
billing?: {
companyName?: string;
address: string;
address2?: string;
postalCode: string;
city: string;
countryCode: 'AF' | 'AX' | ...;
taxIds?: {
type: 'EU_VAT_ID' |'UK_VAT_ID' |'NO_VAT' |'CH_UID' |'LI_UID' | 'AR_CUIT' |'CO_NIT' |'MX_RFC' |'US_EIN',
countryCode?: 'AF' | 'AX' | ...;
value: string;
}[];
metadata?: {
[index: string]: string;
};
};
locale?: string;
people?: {
firstName: string;
lastName: string;
email: string;
metadata?: {
[index: string]: string;
};
settings?: {
customerPortal?: {
isActive?: boolean;
};
email?: {
payments?: boolean;
invoices?: boolean;
};
};
}[];
paymentMethod?: {
type: 'CASH' | 'CARD' | 'SEPA_MANDATE' | 'WIRE_TRANSFER';
providerName: string;
externalId?: string;
lastDigits?: string;
metadata?: {
[index: string]: string;
};
};
externalId?: string;
currency?: 'EUR' | 'USD' | ...;
metadata?: {
[index: string]: string;
};
}

Customer session​

Represents a checkout session.

{
customerId?: string;
productId?: string;
usage?: {
amount: number;
unit: string;
}[];
expiresAt?: number;
payment?: {
stripe?: {
publishableKey?: string;
clientSecret?: string;
stripeAccountId?: string;
};
};
}

Invoice​

Represents an invoice to a customer.

{
customerId: string;
number: string;
pdfFile: string;
currency: 'EUR' | 'USD' | ...;
locale: 'EN' | 'DE' | 'ES' ...;
buyer: {
companyName?: string;
address: string;
address2?: string;
postalCode: string;
city: string;
countryCode: 'AF' | 'AX' | ...;
taxIds?: {
type: 'EU_VAT_ID' |'UK_VAT_ID' |'NO_VAT' |'CH_UID' |'LI_UID' | 'AR_CUIT' |'CO_NIT' |'MX_RFC' |'US_EIN',
countryCode?: 'AF' | 'AX' | ...;
value: string;
}[];
metadata?: {
[index: string]: string;
};
};
seller: {
companyName?: string;
address: string;
address2?: string;
postalCode: string;
city: string;
countryCode: 'AF' | 'AX' | ...;
taxIds?: {
type: 'EU_VAT_ID' |'UK_VAT_ID' |'NO_VAT' |'CH_UID' |'LI_UID' | 'AR_CUIT' |'CO_NIT' |'MX_RFC' |'US_EIN',
countryCode?: 'AF' | 'AX' | ...;
value: string;
}[];
metadata?: {
[index: string]: string;
};
};
paymentTermDays?: number;
billingPeriodStart: Date;
billingPeriodEnd: Date;
dueDate: Date;
paymentDate?: Date;
items: {
description: string;
quantity: number;
unitPrice: number;
price: number;
}[];
discount?: {
description: string;
amount: number;
};
taxes: {
description: string;
rate: number;
amount: number;
}[];
subtotal: number;
total: number;
metadata?: {
[index: string]: string;
};
}

Credit Note​

Represents a credit note to a customer.

{
customerId: string;
invoiceId: string;
number: string;
pdfFile: string;
items: {
description: string;
quantity: number;
unitPrice: number;
price: number;
}[];
taxes: {
description: string;
rate: number;
amount: number;
}[];
subtotal: number;
total: number;
metadata?: {
[index: string]: string;
};
}

License​

Represents an individual license of a subscription. A license can be assigned to only one License user.

{
status: 'ACTIVE' | 'INACTIVE' | 'PENDING_CODE' | 'UNASSIGNED' | 'COMPLETED'| 'EXPIRED';
subscriptionId: string;
licenseUserId?: string;
code?: string;
activations?: number;
activationsLeft?: number;
expirationDate?: Date;
units: string[];
metadata?: {
[index: string]: string;
};
}

License user​

Represents a user of a license. A license user can be associated to zero or more licenses.

{
name: string;
customerId: string;
metadata?: {
[index: string]: string;
};
}

Member​

Represents a member of an account.

{
name: string;
role: "ADMIN";
userId: string;
}

Member invite​

Represents a member invitation to an account.

{
email: string;
role: "ADMIN";
expiresAt: number;
}

Product​

{
name: string;
sku: string;
currency: 'EUR' | 'USD' | ...;
taxRateCode?: 'NONE' | 'CUSTOM_RATE' | 'EU_VAT_REVERSE_CHARGE' | 'EU_VAT_EXEMPT' | 'EU_VAT_STANDARD' | 'EU_VAT_EPUB' | 'EU_VAT_EBOOK' | 'EU_VAT_ENEWS';
pricing?: {
description?: string;
type: 'FIXED' | 'USAGE' | 'LICENSE';
price?: number;
unit?: string;
strategy?: 'SIMPLE' | 'VOLUME' | 'GRADUAL';
tiers?: {
from: number;
to?: number;
price: number;
}[];
chargeOnce?: boolean;
}[];
plan: {
recurrency: {
amount: number;
unit: 'ONCE' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
};
billingDay?: number;
billingTerms?: 'START_OF_PERIOD' | 'END_OF_PERIOD';
paymentTerms?: {
amount: number;
unit: 'ONCE' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
};
maxDuration?: {
amount: number;
unit: 'ONCE' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
};
cancellationNotice?: {
amount: number;
unit: 'ONCE' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
};
startDate?: Date;
endDate?: Date;
freeTrial?: {
amount: number;
unit: 'ONCE' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
};
freeTrialStartDate?: Date;
freeTrialEndDate?: Date;
renewalDate?: Date;
lastCancellationDate?: Date;
};
licensing?: {
isActive: boolean;
maxDuration?: {
amount: number;
unit: 'ONCE' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
};
maxActivations?: number;
expirationDate?: Date;
codeStrategy: 'NONE' | 'NUMERIC' | 'ALPHANUMERIC';
codeLength?: number;
};
addons?: string[];
canUpgradeTo?: string[];
canDowngradeTo?: string[];
nextProductId?: string;
capabilities?: {
name: string;
isActive: boolean;
usageLimit?: {
amount: number;
unit: string;
}[];
}[];
isActive?: boolean;
metadata?: {
[index: string]: string;
};
}

Subscription​

Represents a customer's subscription to a product. A customer can have many subscriptions.

{
customerId: string;
isActive?: boolean;
endReason?: 'UPGRADE' | 'DOWNGRADED' | 'CANCELLED';
changedTo?: string;
currentPeriod: number;
usage?: {
amount: number;
unit: string;
}[];
product: {
id: string;
name: string;
sku: string;
...
};
nextCharge?: number;
metadata?: {
[index: string]: string;
};
}

Transaction​

Represents a payment or refund transaction to a customer. A customer can have many transactions.

{
customerId: string;
type: 'PAYMENT' | 'REFUND';
paymentMethod: {
type: 'CASH' | 'CARD' | 'SEPA_MANDATE' | 'WIRE_TRANSFER';
providerName: string;
externalId?: string;
lastDigits?: string;
metadata?: {
[index: string]: string;
};
};
externalId?: string;
currency?: 'EUR' | 'USD' | ...;
metadata?: {
[index: string]: string;
};
amount: number;
reference?: string;
metadata?: {
[index: string]: string;
};
}