Two top level objects, or sub object

How can I use a data action where it needs to have sub-objects passed through, or where I need to have two top level objects?

eg

{
"type": "purchase",
"amount": "12345.00",
"currency": "AUD",
"merchantReference": "1234ABC",
"card": {
"cardHolderName": "JOHN T DOE",
"cardNumber": "4111111111111111",
"dateExpiryMonth": "01",
"dateExpiryYear": "18",
"cvc2": "111"
},
"customer": {
"firstName": "John",
"lastName": "Doe"
}
}

I can't see any way of adding two objects at the same top level, and it also won't let me use sub-objects.

Hi Vaun,

Is this the payload you need to get out to the external endpoint? If so the way to go about this is to create a "request body template" that has the "shape" you need, and then pass in all the values in the input contract and set them in the template. We currently do not allow the input contract to be "complex", it can only be key value pairs.

--Jason

Thanks Jason, so is the idea then to just have a single level of all the input contract variables regardless of which object/level they're for in the body?

That is exactly right.

--Jason

Thanks Jason, that makes perfect sense.