{
"name": "Create Payment",
"trigger": {
"type": "http",
"config": {
"method": "POST",
"path": "/payments"
}
},
"nodes": [
{
"id": "validate",
"type": "request",
"config": {
"source": "request.body",
"schema": {
"amount": "required|numeric|min:1",
"email": "required|email"
}
}
},
{
"id": "process",
"type": "http",
"config": {
"method": "POST",
"url": "https://api.stripe.com/charges",
"body": {
"amount": "{{request.body.amount}}",
"email": "{{request.body.email}}"
}
}
},
{
"id": "respond",
"type": "response",
"config": {
"status": 200,
"body": {
"success": true,
"charge_id": "{{process.output.body.id}}"
}
}
}
]
}