curl --request POST \
--url https://api.spacebring.com/invoices/v1/{id}/pay \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"paymentMethod": {
"type": "external"
}
}
'{
"transaction": {
"prePaymentCreditAmount": 123,
"postPaymentCreditAmount": 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>"
},
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createDate": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issueDate": "2023-11-07T05:31:56Z",
"items": [
{
"amount": 123,
"booking": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "dedicatedDesk"
}
},
"createDate": "2023-11-07T05:31:56Z",
"creditPackage": {
"amount": 123
},
"currencyCode": "<string>",
"description": "<string>",
"discountedAmount": 123,
"discounts": [
{
"coupon": {
"amountOff": 123,
"currencyCode": "<string>",
"percentOff": 123
}
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"netDiscountedAmount": 123,
"netUnitAmount": 123,
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"option": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
},
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"quantity": 123,
"tax": {
"inclusive": true,
"rate": 123
},
"ticket": {
"createDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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
}
],
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "<string>",
"pdfUrl": "<string>",
"status": "canceled",
"timezoneId": "<string>",
"transaction": {
"amount": 123,
"createDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentMethod": {
"id": "<string>",
"label": "American Express",
"type": "external"
},
"status": "canceled",
"refund": {
"amount": 123,
"createDate": "2023-11-07T05:31:56Z",
"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>"
},
"voidDate": "2023-11-07T05:31:56Z"
}
}Mark an invoice as paid by External Payment.
invoicescurl --request POST \
--url https://api.spacebring.com/invoices/v1/{id}/pay \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"paymentMethod": {
"type": "external"
}
}
'{
"transaction": {
"prePaymentCreditAmount": 123,
"postPaymentCreditAmount": 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>"
},
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createDate": "2023-11-07T05:31:56Z",
"currencyCode": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issueDate": "2023-11-07T05:31:56Z",
"items": [
{
"amount": 123,
"booking": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "dedicatedDesk"
}
},
"createDate": "2023-11-07T05:31:56Z",
"creditPackage": {
"amount": 123
},
"currencyCode": "<string>",
"description": "<string>",
"discountedAmount": 123,
"discounts": [
{
"coupon": {
"amountOff": 123,
"currencyCode": "<string>",
"percentOff": 123
}
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"netDiscountedAmount": 123,
"netUnitAmount": 123,
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"option": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
},
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"quantity": 123,
"tax": {
"inclusive": true,
"rate": 123
},
"ticket": {
"createDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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
}
],
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"membershipRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "<string>",
"pdfUrl": "<string>",
"status": "canceled",
"timezoneId": "<string>",
"transaction": {
"amount": 123,
"createDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentMethod": {
"id": "<string>",
"label": "American Express",
"type": "external"
},
"status": "canceled",
"refund": {
"amount": 123,
"createDate": "2023-11-07T05:31:56Z",
"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>"
},
"voidDate": "2023-11-07T05:31:56Z"
}
}See our authentication documentation for how to authorize your requests
The id of the network. Required when using bearer token authentication
The id of an invoice
OK
Show child attributes
Show child attributes
Show child attributes
The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
Use to attach key-value data to the object. Available only for admins.
The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
Datetime when invoice was made ready for payment.
Show child attributes
Show child attributes
The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
Show child attributes
The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
booking, creditPackage, custom, eventTicket, order, subscriptionItem canceled, draft, failed, issued, paid, pending, processing, succeeded, voided Timezone identifier for the location (e.g. 'Europe/Kyiv')
Show child attributes
The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
Show child attributes
American Express, China UnionPay, Diners Club, Discover, Japan Credit Bureau, Mastercard, Unknown, Visa external, flow, fondy, freedompay, kakaopay, mercadopago, paypal, paystack, plata, stripe, tap, wayforpay canceled, failed, pending, processing, succeeded The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z