Skip to main content

๐Ÿงพ Invoice

User may access their invoices with the Invoice endpoint.

Get Invoiceโ€‹

info

This endpoint allows authenticated users to get an invoice with the given invoice ID.

Endpointโ€‹

GET
https://api.greencloud.dev/v1/invoice/[invoiceId]
https://api.greencloud.dev/v1/invoice/[invoiceId]

Request Headersโ€‹

KeyValueRequired
AuthorizationValid Access Tokentrue

Request Parametersโ€‹

ValueExampleRequired
invoice id63f47d24dab5eb85451f3b61true

Example Requestโ€‹

Empty body

Example Response:โ€‹

Status: 200 OK
{
"amount": 9.99,
"description": "DEVELOPER (100000 invocations)",
"status": "succeeded",
"paidDay": 1678355135,
"payment": {
"card": {
"brand": "visa",
"last4": "4242"
},
"receiptUrl": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xSlRucGVFdDQ4TWpsMDc1KL_VpqAGMgY1jX-yu2Y6LBZhIpcJ9WrHhXSButwDFOSQDIhzVKNF3ljmIi6leN3Y3tVhMuWz1ohezyA4"
}
}

List Invoicesโ€‹

info

This endpoint allows authenticated users to get a list of all invoices.

Endpointโ€‹

GET
https://api.greencloud.dev/v1/invoice/list
https://api.greencloud.dev/v1/invoice/list

Request Headersโ€‹

KeyValueRequired
AuthorizationValid Access Tokentrue

Example Requestโ€‹

Empty body

Example Response:โ€‹

Status: 200 OK
[
{
id: "6409aabfe3c1e9ef53c1ddd7",
amount: 9.99,
status: "succeeded",
paidDay: "1678355135",
},
{
id: "6409aabfe3c1e9ef53c1ddd8",
amount: 9.99,
status: "succeeded",
paidDay: "1678395135",
},
]