List the Invoices assoicated with the Hub.
Requires the billing-invoices-view
capability.
Returns a list of Invoices.
General error response from the platform
{- "data": [
- {
- "id": "651586fca6078e98982dbd90",
- "hub_id": "651586fca6078e98982dbd90",
- "approved": true,
- "services": [
- {
- "service_id": "string",
- "title": "string",
- "type": "tier",
- "term": {
- "start": "2021-01-30T08:30:00Z",
- "end": "2021-01-30T08:30:00Z",
- "renew": "once"
}, - "price": 0,
- "discount": 0
}
], - "payments": [
- {
- "id": "651586fca6078e98982dbd90",
- "time": "2021-01-30T08:30:00Z",
- "description": "string",
- "amount": 0,
- "amount_refunded": 0,
- "refunds": [
- {
- "id": "651586fca6078e98982dbd90",
- "time": "2021-01-30T08:30:00Z",
- "description": "string",
- "amount": 0,
- "gateway": "stripe"
}
], - "method_id": "string",
- "result": {
- "status": "success",
- "error": "string"
}, - "gateway": "stripe"
}
], - "credits": [
- {
- "id": "651586fca6078e98982dbd90",
- "associated_credit": {
- "id": "651586fca6078e98982dbd90",
- "amount": 0
}, - "time": "2021-01-30T08:30:00Z",
- "description": "string",
- "amount": 0
}
], - "late_fees": [
- {
- "id": "651586fca6078e98982dbd90",
- "time": "2021-01-30T08:30:00Z",
- "description": "string",
- "amount": 0
}
], - "charges": 0,
- "due": "2021-01-30T08:30:00Z",
- "overdue": "2021-01-30T08:30:00Z",
- "failed_payment_attempts": 0,
- "events": {
- "created": "2021-01-30T08:30:00Z",
- "updated": "2021-01-30T08:30:00Z",
- "deleted": "2021-01-30T08:30:00Z",
- "billed": "2021-01-30T08:30:00Z",
- "paid": "2021-01-30T08:30:00Z",
- "payment_attempt": "2021-01-30T08:30:00Z",
- "credited": "2021-01-30T08:30:00Z",
- "voided": "2021-01-30T08:30:00Z"
}, - "state": {
- "changed": "2021-01-30T08:30:00Z",
- "error": {
- "message": "string",
- "time": "2021-01-30T08:30:00Z"
}
}, - "meta": {
- "due": 0
}
}
]
}
Requires the billing-invoices-view
capability.
Returns an invoice resource.
General error response from the platform
{- "data": {
- "id": "651586fca6078e98982dbd90",
- "hub_id": "651586fca6078e98982dbd90",
- "approved": true,
- "services": [
- {
- "service_id": "string",
- "title": "string",
- "type": "tier",
- "term": {
- "start": "2021-01-30T08:30:00Z",
- "end": "2021-01-30T08:30:00Z",
- "renew": "once"
}, - "price": 0,
- "discount": 0
}
], - "payments": [
- {
- "id": "651586fca6078e98982dbd90",
- "time": "2021-01-30T08:30:00Z",
- "description": "string",
- "amount": 0,
- "amount_refunded": 0,
- "refunds": [
- {
- "id": "651586fca6078e98982dbd90",
- "time": "2021-01-30T08:30:00Z",
- "description": "string",
- "amount": 0,
- "gateway": "stripe"
}
], - "method_id": "string",
- "result": {
- "status": "success",
- "error": "string"
}, - "gateway": "stripe"
}
], - "credits": [
- {
- "id": "651586fca6078e98982dbd90",
- "associated_credit": {
- "id": "651586fca6078e98982dbd90",
- "amount": 0
}, - "time": "2021-01-30T08:30:00Z",
- "description": "string",
- "amount": 0
}
], - "late_fees": [
- {
- "id": "651586fca6078e98982dbd90",
- "time": "2021-01-30T08:30:00Z",
- "description": "string",
- "amount": 0
}
], - "charges": 0,
- "due": "2021-01-30T08:30:00Z",
- "overdue": "2021-01-30T08:30:00Z",
- "failed_payment_attempts": 0,
- "events": {
- "created": "2021-01-30T08:30:00Z",
- "updated": "2021-01-30T08:30:00Z",
- "deleted": "2021-01-30T08:30:00Z",
- "billed": "2021-01-30T08:30:00Z",
- "paid": "2021-01-30T08:30:00Z",
- "payment_attempt": "2021-01-30T08:30:00Z",
- "credited": "2021-01-30T08:30:00Z",
- "voided": "2021-01-30T08:30:00Z"
}, - "state": {
- "changed": "2021-01-30T08:30:00Z",
- "error": {
- "message": "string",
- "time": "2021-01-30T08:30:00Z"
}
}, - "meta": {
- "due": 0
}
}
}
Creates a new job for an Invoice. Generally used to make a payment on an invoice.
Requires the billing-invoices-pay
capability.
Returns a Job Descriptor.
General error response from the platform
{- "action": "pay"
}
{- "data": {
- "action": "string",
- "job": {
- "id": "string",
- "accepted": true,
- "queue": "string",
- "schedule": "2021-01-30T08:30:00Z",
- "parallel": {
- "sub_queue": "string",
- "tasks": true
}, - "tasks": [
- {
- "caption": "string",
- "header": "string",
- "steps": [
- {
- "caption": "string",
- "description": "string",
- "started": "2021-01-30T08:30:00Z",
- "completed": "2021-01-30T08:30:00Z"
}
], - "input": {
- "property1": null,
- "property2": null
}
}
]
}
}
}