curl --request POST \
--url https://app.flowglad.com/api/v1/customers \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"customer": {
"email": "<string>",
"name": "<string>",
"externalId": "<string>",
"archived": true,
"logoURL": "<string>",
"iconURL": "<string>",
"domain": "<string>",
"userId": "<string>",
"pricingModelId": "<string>"
}
}
'{
"data": {
"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>"
}
},
"subscription": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"startDate": 0,
"customerId": "<string>",
"organizationId": "<string>",
"status": "trialing",
"defaultPaymentMethodId": "<string>",
"backupPaymentMethodId": "<string>",
"cancellationReason": "<string>",
"replacedBySubscriptionId": "<string>",
"isFreePlan": true,
"priceId": "<string>",
"runBillingAtPeriodStart": true,
"interval": "day",
"intervalCount": 123,
"name": "<string>",
"renews": true,
"current": true,
"trialEnd": 0,
"currentBillingPeriodStart": 0,
"currentBillingPeriodEnd": 0,
"metadata": {},
"canceledAt": 0,
"cancelScheduledAt": 0,
"billingCycleAnchorDate": 0
},
"subscriptionItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionId": "<string>",
"name": "<string>",
"addedDate": 0,
"priceId": "<string>",
"unitPrice": 4503599627370495,
"quantity": 123,
"type": "<string>",
"externalId": "<string>",
"metadata": {},
"expiredAt": 0
}
]
}
}curl --request POST \
--url https://app.flowglad.com/api/v1/customers \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"customer": {
"email": "<string>",
"name": "<string>",
"externalId": "<string>",
"archived": true,
"logoURL": "<string>",
"iconURL": "<string>",
"domain": "<string>",
"userId": "<string>",
"pricingModelId": "<string>"
}
}
'{
"data": {
"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>"
}
},
"subscription": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"startDate": 0,
"customerId": "<string>",
"organizationId": "<string>",
"status": "trialing",
"defaultPaymentMethodId": "<string>",
"backupPaymentMethodId": "<string>",
"cancellationReason": "<string>",
"replacedBySubscriptionId": "<string>",
"isFreePlan": true,
"priceId": "<string>",
"runBillingAtPeriodStart": true,
"interval": "day",
"intervalCount": 123,
"name": "<string>",
"renews": true,
"current": true,
"trialEnd": 0,
"currentBillingPeriodStart": 0,
"currentBillingPeriodEnd": 0,
"metadata": {},
"canceledAt": 0,
"cancelScheduledAt": 0,
"billingCycleAnchorDate": 0
},
"subscriptionItems": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"subscriptionId": "<string>",
"name": "<string>",
"addedDate": 0,
"priceId": "<string>",
"unitPrice": 4503599627370495,
"quantity": 123,
"type": "<string>",
"externalId": "<string>",
"metadata": {},
"expiredAt": 0
}
]
}
}Successful response
Show child attributes
Show child attributes
Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991Show child attributes
Show child attributes
Show child attributes
Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991trialing, active, past_due, unpaid, cancellation_scheduled, incomplete, incomplete_expired, canceled, paused day, week, month, year A positive integer
x <= 9007199254740991Whether the subscription is current (statuses "active", "trialing", "past_due", or "cancellation_scheduled")
Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991Show child attributes
Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991A positive integer
0 < x <= 9007199254740991A positive integer
x <= 9007199254740991"static"Used as a flag to soft delete a subscription item without losing its history for auditability. If set, it will be removed from the subscription items list and will not be included in the billing period item list. Epoch milliseconds.
-9007199254740991 <= x <= 9007199254740991Was this page helpful?