curl --request POST \
--url https://api.spacebring.com/billing/invoices/v1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice": {
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dueDate": "2023-11-07T05:31:56Z",
"dueDays": 1,
"dueType": "date",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"memo": "<string>",
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"items": [
{
"quantity": 2,
"unitAmount": 1,
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"discounts": [
{
"couponRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"invoiceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product": {
"optionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax": {
"rate": 1
},
"type": "custom"
}
],
"includeUpcomingItems": true
}
'{
"invoice": {
"amountPaid": 123,
"amountRemaining": 123,
"autoCreateDate": "2023-11-07T05:31:56Z",
"baseAmounts": {
"amountDue": 123,
"appliedBalance": 123,
"currencyCode": "<string>",
"postPaymentCreditNotesAmount": 123,
"prePaymentCreditNotesAmount": 123,
"subtotalAmount": 123,
"subtotalExcludingTaxAmount": 123,
"taxes": [
{
"amount": 123,
"inclusive": true,
"rate": 123,
"taxableAmount": 123
}
],
"totalAmount": 123,
"totalExcludingTaxAmount": 123
},
"amountDue": 123,
"appliedBalance": 123,
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createDate": "2023-11-07T05:31:56Z",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "company",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
}
},
"customerAddress": {
"city": "<string>",
"countryCode": "<string>",
"line1": "<string>",
"line2": "<string>",
"postalCode": "<string>",
"state": "<string>"
},
"customerName": "<string>",
"customerTaxId": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"dueDays": 123,
"dueType": "date",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issueDate": "2023-11-07T05:31:56Z",
"itemsCount": 123,
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"memo": "<string>",
"payments": [
{
"createDate": "2023-11-07T05:31:56Z",
"method": {
"paymentGateway": {
"gateway": "<string>",
"label": "<string>"
},
"type": "<string>"
},
"price": {
"money": {
"currencyCode": "<string>",
"grossAmount": 123
},
"type": "<string>"
},
"refundable": true,
"refunds": {
"money": [
{
"createDate": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"grossAmount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"type": "<string>"
},
"status": "canceled",
"transactionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"pdfUrl": "<string>",
"receiptPdfUrl": "<string>",
"startingBalance": 123,
"status": "draft",
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timezoneId": "<string>",
"title": "<string>",
"voidDate": "2023-11-07T05:31:56Z",
"postPaymentCreditNotesAmount": 123,
"prePaymentCreditNotesAmount": 123,
"subtotalAmount": 123,
"subtotalExcludingTaxAmount": 123,
"taxes": [
{
"amount": 123,
"inclusive": true,
"rate": 123,
"taxableAmount": 123
}
],
"totalAmount": 123,
"totalExcludingTaxAmount": 123,
"amount": 123,
"company": {
"billingAddress": "<string>",
"businessAddress": {
"city": "<string>",
"countryCode": "<string>",
"line1": "<string>",
"line2": "<string>",
"postalCode": "<string>",
"state": "<string>"
},
"createDate": "2023-11-07T05:31:56Z",
"credits": {
"expiring": 123,
"permanent": 123
},
"dayPasses": {
"expiring": 123
},
"deleteDate": "2023-11-07T05:31:56Z",
"id": "<string>",
"legalName": "<string>",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"notes": "<string>",
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxId": "<string>",
"title": "<string>"
},
"currencyCode": "<string>",
"items": [
{
"baseAmounts": {
"currencyCode": "<string>",
"discountedAmount": 123,
"tax": {
"amount": 123,
"inclusive": true,
"rate": 123,
"taxableAmount": 123
},
"totalAmount": 123,
"totalExcludingTaxAmount": 123,
"unitAmount": 123,
"unitExcludingTaxAmount": 123
},
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createDate": "2023-11-07T05:31:56Z",
"deleteDate": "2023-11-07T05:31:56Z",
"discounts": [
{
"coupon": {
"amountOff": 123,
"currencyCode": "<string>",
"duration": "<string>",
"durationInMonths": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percentOff": 123,
"type": "<string>"
},
"promocode": {
"code": "<string>",
"expiration": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"limitByFirstPurchase": true
},
"subscriptionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRefCreatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"period": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z"
},
"product": {
"bookingRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventTicketRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"optionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "booking"
},
"quantity": 123,
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userCreatedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"surname": "<string>"
},
"discountedAmount": 123,
"tax": {
"amount": 123,
"inclusive": true,
"rate": 123,
"taxableAmount": 123
},
"totalAmount": 123,
"totalExcludingTaxAmount": 123,
"unitExcludingTaxAmount": 123,
"amount": 123,
"booking": {
"endDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "dedicatedDesk"
},
"startDate": "2023-11-07T05:31:56Z"
},
"creditPackage": {
"amount": 123
},
"currencyCode": "<string>",
"description": "<string>",
"netUnitAmount": 123,
"order": {
"createDate": "2023-11-07T05:31:56Z",
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"productOption": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"quantity": 123
},
"plan": {
"endDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"title": "<string>"
},
"ticket": {
"createDate": "2023-11-07T05:31:56Z",
"event": {
"endDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"title": "<string>"
}
},
"type": "booking",
"unitAmount": 123
}
],
"number": "<string>",
"postPaymentCreditAmount": 123,
"prePaymentCreditAmount": 123,
"transaction": {
"amount": 123,
"createDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentMethod": {
"label": "<string>",
"type": "<string>"
},
"status": "canceled",
"refund": {
"amount": 123,
"createDate": "2023-11-07T05:31:56Z"
},
"refunds": [
{
"amount": 123,
"createDate": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
},
"user": {
"about": "<string>",
"email": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
}
}
}Create an invoice for a member or a company.
curl --request POST \
--url https://api.spacebring.com/billing/invoices/v1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice": {
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dueDate": "2023-11-07T05:31:56Z",
"dueDays": 1,
"dueType": "date",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"memo": "<string>",
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"items": [
{
"quantity": 2,
"unitAmount": 1,
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"discounts": [
{
"couponRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"invoiceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product": {
"optionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax": {
"rate": 1
},
"type": "custom"
}
],
"includeUpcomingItems": true
}
'{
"invoice": {
"amountPaid": 123,
"amountRemaining": 123,
"autoCreateDate": "2023-11-07T05:31:56Z",
"baseAmounts": {
"amountDue": 123,
"appliedBalance": 123,
"currencyCode": "<string>",
"postPaymentCreditNotesAmount": 123,
"prePaymentCreditNotesAmount": 123,
"subtotalAmount": 123,
"subtotalExcludingTaxAmount": 123,
"taxes": [
{
"amount": 123,
"inclusive": true,
"rate": 123,
"taxableAmount": 123
}
],
"totalAmount": 123,
"totalExcludingTaxAmount": 123
},
"amountDue": 123,
"appliedBalance": 123,
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createDate": "2023-11-07T05:31:56Z",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "company",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
}
},
"customerAddress": {
"city": "<string>",
"countryCode": "<string>",
"line1": "<string>",
"line2": "<string>",
"postalCode": "<string>",
"state": "<string>"
},
"customerName": "<string>",
"customerTaxId": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"dueDays": 123,
"dueType": "date",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issueDate": "2023-11-07T05:31:56Z",
"itemsCount": 123,
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"memo": "<string>",
"payments": [
{
"createDate": "2023-11-07T05:31:56Z",
"method": {
"paymentGateway": {
"gateway": "<string>",
"label": "<string>"
},
"type": "<string>"
},
"price": {
"money": {
"currencyCode": "<string>",
"grossAmount": 123
},
"type": "<string>"
},
"refundable": true,
"refunds": {
"money": [
{
"createDate": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"grossAmount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"type": "<string>"
},
"status": "canceled",
"transactionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"pdfUrl": "<string>",
"receiptPdfUrl": "<string>",
"startingBalance": 123,
"status": "draft",
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timezoneId": "<string>",
"title": "<string>",
"voidDate": "2023-11-07T05:31:56Z",
"postPaymentCreditNotesAmount": 123,
"prePaymentCreditNotesAmount": 123,
"subtotalAmount": 123,
"subtotalExcludingTaxAmount": 123,
"taxes": [
{
"amount": 123,
"inclusive": true,
"rate": 123,
"taxableAmount": 123
}
],
"totalAmount": 123,
"totalExcludingTaxAmount": 123,
"amount": 123,
"company": {
"billingAddress": "<string>",
"businessAddress": {
"city": "<string>",
"countryCode": "<string>",
"line1": "<string>",
"line2": "<string>",
"postalCode": "<string>",
"state": "<string>"
},
"createDate": "2023-11-07T05:31:56Z",
"credits": {
"expiring": 123,
"permanent": 123
},
"dayPasses": {
"expiring": 123
},
"deleteDate": "2023-11-07T05:31:56Z",
"id": "<string>",
"legalName": "<string>",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"notes": "<string>",
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxId": "<string>",
"title": "<string>"
},
"currencyCode": "<string>",
"items": [
{
"baseAmounts": {
"currencyCode": "<string>",
"discountedAmount": 123,
"tax": {
"amount": 123,
"inclusive": true,
"rate": 123,
"taxableAmount": 123
},
"totalAmount": 123,
"totalExcludingTaxAmount": 123,
"unitAmount": 123,
"unitExcludingTaxAmount": 123
},
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createDate": "2023-11-07T05:31:56Z",
"deleteDate": "2023-11-07T05:31:56Z",
"discounts": [
{
"coupon": {
"amountOff": 123,
"currencyCode": "<string>",
"duration": "<string>",
"durationInMonths": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percentOff": 123,
"type": "<string>"
},
"promocode": {
"code": "<string>",
"expiration": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"limitByFirstPurchase": true
},
"subscriptionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRefCreatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"period": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z"
},
"product": {
"bookingRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventTicketRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"optionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "booking"
},
"quantity": 123,
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userCreatedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"surname": "<string>"
},
"discountedAmount": 123,
"tax": {
"amount": 123,
"inclusive": true,
"rate": 123,
"taxableAmount": 123
},
"totalAmount": 123,
"totalExcludingTaxAmount": 123,
"unitExcludingTaxAmount": 123,
"amount": 123,
"booking": {
"endDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "dedicatedDesk"
},
"startDate": "2023-11-07T05:31:56Z"
},
"creditPackage": {
"amount": 123
},
"currencyCode": "<string>",
"description": "<string>",
"netUnitAmount": 123,
"order": {
"createDate": "2023-11-07T05:31:56Z",
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"productOption": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"quantity": 123
},
"plan": {
"endDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"title": "<string>"
},
"ticket": {
"createDate": "2023-11-07T05:31:56Z",
"event": {
"endDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"title": "<string>"
}
},
"type": "booking",
"unitAmount": 123
}
],
"number": "<string>",
"postPaymentCreditAmount": 123,
"prePaymentCreditAmount": 123,
"transaction": {
"amount": 123,
"createDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentMethod": {
"label": "<string>",
"type": "<string>"
},
"status": "canceled",
"refund": {
"amount": 123,
"createDate": "2023-11-07T05:31:56Z"
},
"refunds": [
{
"amount": 123,
"createDate": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
},
"user": {
"about": "<string>",
"email": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
}
}
}See our authentication documentation for how to authorize your requests
The id of the network. Required when using bearer token authentication
Created
Show child attributes