Hi !
I would like to know how I can access to all parameters received on my endpoint through manual definition. Here is my case :
- I want to be able, with the same endpoint URL, to receive a querystring and all parameters from my chargebee account through their webhook. The Chargebee webhook send nested parameters so I need to be able to identify them manually in Bubble.
- I don’t want to use detect request data, because it doesn’t allow me to read querystring, it only analyzes body parameters.
Here is the request sent by Chargebee (fake data):
Headers
POST HTTP/1.1
Host:xxx
Authorization: Basic dGVzdDp0ZXN0
Content-Type: application/json; charset=utf-8
User-Agent: ChargeBee
Body
{
"id": "ev_3Nl7oGgQqGFsCUj",
"occurred_at": 1344368426,
"source": "scheduled_job",
"object": "event",
"api_version": "v2",
"content": {"invoice": {
"id": "1",
"customer_id": "3Nl7oGgQqGFprj9",
"subscription_id": "3Nl7oGgQqGFprj9",
"recurring": true,
"status": "paid",
"price_type": "tax_exclusive",
"date": 1344368424,
"due_date": 1344368424,
"net_term_days": 0,
"exchange_rate": 1.0,
"total": 995,
"amount_paid": 995,
"amount_adjusted": 0,
"write_off_amount": 0,
"credits_applied": 0,
"amount_due": 0,
"paid_at": 1344368425,
"updated_at": 1344368425,
"resource_version": 1344368425000,
"deleted": false,
"object": "invoice",
"first_invoice": true,
"amount_to_collect": 0,
"round_off_amount": 0,
"new_sales_amount": 995,
"has_advance_charges": false,
"currency_code": "USD",
"base_currency_code": "USD",
"tax": 0,
"line_items": [
{
"id": "li_3Nl7oGgQqGFrxEd",
"date_from": 1344368424,
"date_to": 1347046824,
"unit_amount": 900,
"quantity": 1,
"is_taxed": false,
"tax_amount": 0,
"object": "line_item",
"subscription_id": "3Nl7oGgQqGFprj9",
"amount": 900,
"description": "Basic",
"entity_type": "plan",
"entity_id": "basic",
"tax_exempt_reason": "tax_not_configured",
"discount_amount": 0,
"item_level_discount_amount": 0
},
{
"id": "li_3Nl7oGgQqGFrxve",
"date_from": 1344368424,
"date_to": 1347046824,
"unit_amount": 95,
"quantity": 1,
"is_taxed": false,
"tax_amount": 0,
"object": "line_item",
"subscription_id": "3Nl7oGgQqGFprj9",
"amount": 95,
"description": "Data Usage",
"entity_type": "addon",
"entity_id": "data_usage",
"tax_exempt_reason": "tax_not_configured",
"discount_amount": 0,
"item_level_discount_amount": 0
}
],
"sub_total": 995,
"linked_payments": [{
"txn_id": "txn_3Nl7oGgQqGFs2lf",
"applied_amount": 995,
"applied_at": 1344368425,
"txn_status": "success",
"txn_date": 1344368425,
"txn_amount": 995
}],
"applied_credits": [],
"adjustment_credit_notes": [],
"issued_credit_notes": [],
"linked_orders": [],
"billing_address": {
"first_name": "Benjamin",
"last_name": "Ross",
"validation_status": "not_validated",
"object": "billing_address"
}
}},
"event_type": "invoice_generated",
"webhook_status": "not_configured"
}
To receive “id” or “object” it’s pretty simple, I just have to enter these name in a key parameter on my API workflow.
But to read parameters like “total” which are nested in Content / invoice / and then total, I don’t know what to enter in “Key”.
I’ve tried : “content invoice total” and “content.invoice.total”, none of these works.
With manual definition, what should I type to access the total parameter ?
Thank you