curl --request GET \
--url https://app.flowglad.com/api/v1/customers/{externalId}/billing \
--header 'Authorization: <api-key>'{
"customer": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"email": "<string>",
"name": "<string>",
"invoiceNumberBase": "<string>",
"archived": true,
"logoURL": "<string>",
"iconURL": "<string>",
"domain": "<string>",
"externalId": "<string>",
"userId": "<string>",
"pricingModelId": "<string>",
"billingAddress": {
"address": {
"country": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>"
},
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "[email protected]",
"phone": "<string>"
}
},
"subscriptions": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"startDate": 0,
"customerId": "<string>",
"organizationId": "<string>",
"status": "active",
"defaultPaymentMethodId": "<string>",
"backupPaymentMethodId": "<string>",
"trialEnd": "<unknown>",
"currentBillingPeriodStart": "<unknown>",
"currentBillingPeriodEnd": "<unknown>",
"cancellationReason": "<string>",
"replacedBySubscriptionId": "<string>",
"isFreePlan": true,
"doNotCharge": true,
"priceId": "<string>",
"runBillingAtPeriodStart": true,
"interval": "<unknown>",
"intervalCount": "<unknown>",
"billingCycleAnchorDate": "<unknown>",
"name": "<string>",
"renews": true,
"pricingModelId": "<string>",
"current": true,
"subscriptionItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionId": "<string>",
"name": "<string>",
"addedDate": 0,
"priceId": "<string>",
"unitPrice": 4503599627370495,
"quantity": 4503599627370495,
"type": "<string>",
"externalId": "<string>",
"manuallyCreated": true,
"price": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"metadata": {},
"expiredAt": 0
}
],
"metadata": {},
"canceledAt": 0,
"cancelScheduledAt": 0,
"experimental": {
"featureItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionItemId": "<string>",
"featureId": "<string>",
"type": "<string>",
"manuallyCreated": true,
"name": "<string>",
"slug": "<string>",
"productFeatureId": "<string>",
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>",
"expiredAt": 0,
"detachedAt": 0,
"detachedReason": "<string>"
}
],
"usageMeterBalances": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"name": "<string>",
"pricingModelId": "<string>",
"slug": "<string>",
"aggregationType": "sum",
"availableBalance": 123,
"subscriptionId": "<string>"
}
]
}
}
],
"invoices": [
{
"invoice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"purchaseId": "<string>",
"invoiceNumber": "<string>",
"invoiceDate": 0,
"customerId": "<string>",
"organizationId": "<string>",
"status": "draft",
"billingRunId": "<string>",
"ownerMembershipId": "<string>",
"memo": "<string>",
"bankPaymentOnly": true,
"type": "<string>",
"currency": "USD",
"taxAmount": -1,
"subtotal": -1,
"taxState": "<string>",
"taxRatePercentage": "<string>",
"applicationFee": -1,
"billingPeriodId": "<unknown>",
"dueDate": 0,
"subscriptionId": "<unknown>",
"billingPeriodStartDate": "<unknown>",
"billingPeriodEndDate": "<unknown>",
"pdfURL": "<string>",
"receiptPdfURL": "<string>",
"taxType": "amusement_tax",
"taxCountry": "AD"
},
"invoiceLineItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"invoiceId": "<string>",
"quantity": -1,
"priceId": "<string>",
"description": "<string>",
"price": -1,
"type": "<string>",
"ledgerAccountId": "<unknown>",
"ledgerAccountCredit": "<unknown>"
}
]
}
],
"paymentMethods": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"customerId": "<string>",
"billingDetails": {
"address": {
"country": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"address": {
"country": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>"
}
},
"name": "<string>",
"email": "<string>"
},
"type": "card",
"default": true,
"paymentMethodData": {},
"metadata": {}
}
],
"purchases": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"status": "open",
"customerId": "<string>",
"organizationId": "<string>",
"priceId": "<string>",
"quantity": 123,
"priceType": "<string>",
"trialPeriodDays": 4503599627370495,
"pricePerBillingCycle": 123,
"intervalUnit": "day",
"intervalCount": 123,
"firstInvoiceValue": 4503599627370495,
"totalPurchaseValue": "<unknown>",
"bankPaymentOnly": true,
"proposal": "<string>",
"archived": true,
"pricingModelId": "<string>",
"position": 123,
"billingCycleAnchor": 0,
"purchaseDate": 0,
"endDate": 0,
"billingAddress": {
"address": {
"country": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>"
},
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "[email protected]",
"phone": "<string>"
},
"metadata": {}
}
],
"catalog": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"isDefault": true,
"name": "<string>",
"products": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"description": "<string>",
"imageURL": "<string>",
"organizationId": "<string>",
"active": true,
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"pricingModelId": "<string>",
"default": true,
"slug": "<string>",
"prices": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
}
],
"defaultPrice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"features": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"pricingModelId": "<string>",
"active": true,
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>"
}
]
}
],
"usageMeters": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"name": "<string>",
"pricingModelId": "<string>",
"slug": "<string>",
"aggregationType": "sum"
}
],
"defaultProduct": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"description": "<string>",
"imageURL": "<string>",
"organizationId": "<string>",
"active": true,
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"pricingModelId": "<string>",
"default": true,
"slug": "<string>",
"prices": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
}
],
"defaultPrice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"features": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"pricingModelId": "<string>",
"active": true,
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>"
}
]
}
},
"pricingModel": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"isDefault": true,
"name": "<string>",
"products": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"description": "<string>",
"imageURL": "<string>",
"organizationId": "<string>",
"active": true,
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"pricingModelId": "<string>",
"default": true,
"slug": "<string>",
"prices": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
}
],
"defaultPrice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"features": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"pricingModelId": "<string>",
"active": true,
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>"
}
]
}
],
"usageMeters": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"name": "<string>",
"pricingModelId": "<string>",
"slug": "<string>",
"aggregationType": "sum"
}
],
"defaultProduct": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"description": "<string>",
"imageURL": "<string>",
"organizationId": "<string>",
"active": true,
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"pricingModelId": "<string>",
"default": true,
"slug": "<string>",
"prices": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
}
],
"defaultPrice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"features": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"pricingModelId": "<string>",
"active": true,
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>"
}
]
}
},
"billingPortalUrl": "<string>",
"currentSubscriptions": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"startDate": 0,
"customerId": "<string>",
"organizationId": "<string>",
"status": "active",
"defaultPaymentMethodId": "<string>",
"backupPaymentMethodId": "<string>",
"trialEnd": "<unknown>",
"currentBillingPeriodStart": "<unknown>",
"currentBillingPeriodEnd": "<unknown>",
"cancellationReason": "<string>",
"replacedBySubscriptionId": "<string>",
"isFreePlan": true,
"doNotCharge": true,
"priceId": "<string>",
"runBillingAtPeriodStart": true,
"interval": "<unknown>",
"intervalCount": "<unknown>",
"billingCycleAnchorDate": "<unknown>",
"name": "<string>",
"renews": true,
"pricingModelId": "<string>",
"current": true,
"subscriptionItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionId": "<string>",
"name": "<string>",
"addedDate": 0,
"priceId": "<string>",
"unitPrice": 4503599627370495,
"quantity": 4503599627370495,
"type": "<string>",
"externalId": "<string>",
"manuallyCreated": true,
"price": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"metadata": {},
"expiredAt": 0
}
],
"metadata": {},
"canceledAt": 0,
"cancelScheduledAt": 0,
"experimental": {
"featureItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionItemId": "<string>",
"featureId": "<string>",
"type": "<string>",
"manuallyCreated": true,
"name": "<string>",
"slug": "<string>",
"productFeatureId": "<string>",
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>",
"expiredAt": 0,
"detachedAt": 0,
"detachedReason": "<string>"
}
],
"usageMeterBalances": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"name": "<string>",
"pricingModelId": "<string>",
"slug": "<string>",
"aggregationType": "sum",
"availableBalance": 123,
"subscriptionId": "<string>"
}
]
}
}
],
"currentSubscription": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"startDate": 0,
"customerId": "<string>",
"organizationId": "<string>",
"status": "active",
"defaultPaymentMethodId": "<string>",
"backupPaymentMethodId": "<string>",
"trialEnd": "<unknown>",
"currentBillingPeriodStart": "<unknown>",
"currentBillingPeriodEnd": "<unknown>",
"cancellationReason": "<string>",
"replacedBySubscriptionId": "<string>",
"isFreePlan": true,
"doNotCharge": true,
"priceId": "<string>",
"runBillingAtPeriodStart": true,
"interval": "<unknown>",
"intervalCount": "<unknown>",
"billingCycleAnchorDate": "<unknown>",
"name": "<string>",
"renews": true,
"pricingModelId": "<string>",
"current": true,
"subscriptionItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionId": "<string>",
"name": "<string>",
"addedDate": 0,
"priceId": "<string>",
"unitPrice": 4503599627370495,
"quantity": 4503599627370495,
"type": "<string>",
"externalId": "<string>",
"manuallyCreated": true,
"price": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"metadata": {},
"expiredAt": 0
}
],
"metadata": {},
"canceledAt": 0,
"cancelScheduledAt": 0,
"experimental": {
"featureItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionItemId": "<string>",
"featureId": "<string>",
"type": "<string>",
"manuallyCreated": true,
"name": "<string>",
"slug": "<string>",
"productFeatureId": "<string>",
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>",
"expiredAt": 0,
"detachedAt": 0,
"detachedReason": "<string>"
}
],
"usageMeterBalances": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"name": "<string>",
"pricingModelId": "<string>",
"slug": "<string>",
"aggregationType": "sum",
"availableBalance": 123,
"subscriptionId": "<string>"
}
]
}
}
}curl --request GET \
--url https://app.flowglad.com/api/v1/customers/{externalId}/billing \
--header 'Authorization: <api-key>'{
"customer": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"email": "<string>",
"name": "<string>",
"invoiceNumberBase": "<string>",
"archived": true,
"logoURL": "<string>",
"iconURL": "<string>",
"domain": "<string>",
"externalId": "<string>",
"userId": "<string>",
"pricingModelId": "<string>",
"billingAddress": {
"address": {
"country": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>"
},
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "[email protected]",
"phone": "<string>"
}
},
"subscriptions": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"startDate": 0,
"customerId": "<string>",
"organizationId": "<string>",
"status": "active",
"defaultPaymentMethodId": "<string>",
"backupPaymentMethodId": "<string>",
"trialEnd": "<unknown>",
"currentBillingPeriodStart": "<unknown>",
"currentBillingPeriodEnd": "<unknown>",
"cancellationReason": "<string>",
"replacedBySubscriptionId": "<string>",
"isFreePlan": true,
"doNotCharge": true,
"priceId": "<string>",
"runBillingAtPeriodStart": true,
"interval": "<unknown>",
"intervalCount": "<unknown>",
"billingCycleAnchorDate": "<unknown>",
"name": "<string>",
"renews": true,
"pricingModelId": "<string>",
"current": true,
"subscriptionItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionId": "<string>",
"name": "<string>",
"addedDate": 0,
"priceId": "<string>",
"unitPrice": 4503599627370495,
"quantity": 4503599627370495,
"type": "<string>",
"externalId": "<string>",
"manuallyCreated": true,
"price": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"metadata": {},
"expiredAt": 0
}
],
"metadata": {},
"canceledAt": 0,
"cancelScheduledAt": 0,
"experimental": {
"featureItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionItemId": "<string>",
"featureId": "<string>",
"type": "<string>",
"manuallyCreated": true,
"name": "<string>",
"slug": "<string>",
"productFeatureId": "<string>",
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>",
"expiredAt": 0,
"detachedAt": 0,
"detachedReason": "<string>"
}
],
"usageMeterBalances": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"name": "<string>",
"pricingModelId": "<string>",
"slug": "<string>",
"aggregationType": "sum",
"availableBalance": 123,
"subscriptionId": "<string>"
}
]
}
}
],
"invoices": [
{
"invoice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"purchaseId": "<string>",
"invoiceNumber": "<string>",
"invoiceDate": 0,
"customerId": "<string>",
"organizationId": "<string>",
"status": "draft",
"billingRunId": "<string>",
"ownerMembershipId": "<string>",
"memo": "<string>",
"bankPaymentOnly": true,
"type": "<string>",
"currency": "USD",
"taxAmount": -1,
"subtotal": -1,
"taxState": "<string>",
"taxRatePercentage": "<string>",
"applicationFee": -1,
"billingPeriodId": "<unknown>",
"dueDate": 0,
"subscriptionId": "<unknown>",
"billingPeriodStartDate": "<unknown>",
"billingPeriodEndDate": "<unknown>",
"pdfURL": "<string>",
"receiptPdfURL": "<string>",
"taxType": "amusement_tax",
"taxCountry": "AD"
},
"invoiceLineItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"invoiceId": "<string>",
"quantity": -1,
"priceId": "<string>",
"description": "<string>",
"price": -1,
"type": "<string>",
"ledgerAccountId": "<unknown>",
"ledgerAccountCredit": "<unknown>"
}
]
}
],
"paymentMethods": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"customerId": "<string>",
"billingDetails": {
"address": {
"country": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"address": {
"country": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>"
}
},
"name": "<string>",
"email": "<string>"
},
"type": "card",
"default": true,
"paymentMethodData": {},
"metadata": {}
}
],
"purchases": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"status": "open",
"customerId": "<string>",
"organizationId": "<string>",
"priceId": "<string>",
"quantity": 123,
"priceType": "<string>",
"trialPeriodDays": 4503599627370495,
"pricePerBillingCycle": 123,
"intervalUnit": "day",
"intervalCount": 123,
"firstInvoiceValue": 4503599627370495,
"totalPurchaseValue": "<unknown>",
"bankPaymentOnly": true,
"proposal": "<string>",
"archived": true,
"pricingModelId": "<string>",
"position": 123,
"billingCycleAnchor": 0,
"purchaseDate": 0,
"endDate": 0,
"billingAddress": {
"address": {
"country": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>"
},
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "[email protected]",
"phone": "<string>"
},
"metadata": {}
}
],
"catalog": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"isDefault": true,
"name": "<string>",
"products": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"description": "<string>",
"imageURL": "<string>",
"organizationId": "<string>",
"active": true,
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"pricingModelId": "<string>",
"default": true,
"slug": "<string>",
"prices": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
}
],
"defaultPrice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"features": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"pricingModelId": "<string>",
"active": true,
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>"
}
]
}
],
"usageMeters": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"name": "<string>",
"pricingModelId": "<string>",
"slug": "<string>",
"aggregationType": "sum"
}
],
"defaultProduct": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"description": "<string>",
"imageURL": "<string>",
"organizationId": "<string>",
"active": true,
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"pricingModelId": "<string>",
"default": true,
"slug": "<string>",
"prices": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
}
],
"defaultPrice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"features": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"pricingModelId": "<string>",
"active": true,
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>"
}
]
}
},
"pricingModel": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"isDefault": true,
"name": "<string>",
"products": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"description": "<string>",
"imageURL": "<string>",
"organizationId": "<string>",
"active": true,
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"pricingModelId": "<string>",
"default": true,
"slug": "<string>",
"prices": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
}
],
"defaultPrice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"features": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"pricingModelId": "<string>",
"active": true,
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>"
}
]
}
],
"usageMeters": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"name": "<string>",
"pricingModelId": "<string>",
"slug": "<string>",
"aggregationType": "sum"
}
],
"defaultProduct": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"description": "<string>",
"imageURL": "<string>",
"organizationId": "<string>",
"active": true,
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"pricingModelId": "<string>",
"default": true,
"slug": "<string>",
"prices": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
}
],
"defaultPrice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"features": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"pricingModelId": "<string>",
"active": true,
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>"
}
]
}
},
"billingPortalUrl": "<string>",
"currentSubscriptions": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"startDate": 0,
"customerId": "<string>",
"organizationId": "<string>",
"status": "active",
"defaultPaymentMethodId": "<string>",
"backupPaymentMethodId": "<string>",
"trialEnd": "<unknown>",
"currentBillingPeriodStart": "<unknown>",
"currentBillingPeriodEnd": "<unknown>",
"cancellationReason": "<string>",
"replacedBySubscriptionId": "<string>",
"isFreePlan": true,
"doNotCharge": true,
"priceId": "<string>",
"runBillingAtPeriodStart": true,
"interval": "<unknown>",
"intervalCount": "<unknown>",
"billingCycleAnchorDate": "<unknown>",
"name": "<string>",
"renews": true,
"pricingModelId": "<string>",
"current": true,
"subscriptionItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionId": "<string>",
"name": "<string>",
"addedDate": 0,
"priceId": "<string>",
"unitPrice": 4503599627370495,
"quantity": 4503599627370495,
"type": "<string>",
"externalId": "<string>",
"manuallyCreated": true,
"price": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"metadata": {},
"expiredAt": 0
}
],
"metadata": {},
"canceledAt": 0,
"cancelScheduledAt": 0,
"experimental": {
"featureItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionItemId": "<string>",
"featureId": "<string>",
"type": "<string>",
"manuallyCreated": true,
"name": "<string>",
"slug": "<string>",
"productFeatureId": "<string>",
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>",
"expiredAt": 0,
"detachedAt": 0,
"detachedReason": "<string>"
}
],
"usageMeterBalances": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"name": "<string>",
"pricingModelId": "<string>",
"slug": "<string>",
"aggregationType": "sum",
"availableBalance": 123,
"subscriptionId": "<string>"
}
]
}
}
],
"currentSubscription": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"startDate": 0,
"customerId": "<string>",
"organizationId": "<string>",
"status": "active",
"defaultPaymentMethodId": "<string>",
"backupPaymentMethodId": "<string>",
"trialEnd": "<unknown>",
"currentBillingPeriodStart": "<unknown>",
"currentBillingPeriodEnd": "<unknown>",
"cancellationReason": "<string>",
"replacedBySubscriptionId": "<string>",
"isFreePlan": true,
"doNotCharge": true,
"priceId": "<string>",
"runBillingAtPeriodStart": true,
"interval": "<unknown>",
"intervalCount": "<unknown>",
"billingCycleAnchorDate": "<unknown>",
"name": "<string>",
"renews": true,
"pricingModelId": "<string>",
"current": true,
"subscriptionItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionId": "<string>",
"name": "<string>",
"addedDate": 0,
"priceId": "<string>",
"unitPrice": 4503599627370495,
"quantity": 4503599627370495,
"type": "<string>",
"externalId": "<string>",
"manuallyCreated": true,
"price": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"metadata": {},
"expiredAt": 0
}
],
"metadata": {},
"canceledAt": 0,
"cancelScheduledAt": 0,
"experimental": {
"featureItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionItemId": "<string>",
"featureId": "<string>",
"type": "<string>",
"manuallyCreated": true,
"name": "<string>",
"slug": "<string>",
"productFeatureId": "<string>",
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>",
"expiredAt": 0,
"detachedAt": 0,
"detachedReason": "<string>"
}
],
"usageMeterBalances": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"name": "<string>",
"pricingModelId": "<string>",
"slug": "<string>",
"aggregationType": "sum",
"availableBalance": 123,
"subscriptionId": "<string>"
}
]
}
}
}The ID of the customer, as defined in your application
Successful response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A purchase record, which describes a transaction that can be associated with either a subscription or single payment price. Each purchase has a specific type that determines its behavior and required fields.
Show child attributes
Show child attributes
Show child attributes
The billing portal URL for the customer
The current subscriptions for the customer. By default, customers can only have one active subscription at a time. This will only return multiple subscriptions if you have enabled multiple subscriptions per customer.
Show child attributes
The most recently created current subscription for the customer. If createdAt timestamps tie, the most recently updated subscription will be returned. If updatedAt also ties, subscription id is used as the final tiebreaker.
Show child attributes
Was this page helpful?