Workflows
Add a workflow
Add a new workflow
post/workflows
Request
- Base URLhttps://{prefix}.api.sandbox.checkout.com
- Auth
- OAuth 2Client credentialsToken URLstringScopesflow, flow:workflows
- or API key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"name": "Webhooks workflow",
"active": true,
"conditions": [
{
"type": "event",
"events": {
"gateway": [
"payment_approved",
"payment_declined",
"card_verification_declined",
"card_verified",
"payment_authorization_incremented",
"payment_authorization_increment_declined",
"payment_capture_declined",
"payment_captured",
"payment_refund_declined",
"payment_refunded",
"payment_void_declined",
"payment_voided"
],
"dispute": [
"dispute_canceled",
"dispute_evidence_required",
"dispute_expired",
"dispute_lost",
"dispute_resolved",
"dispute_won"
]
}
},
{
"type": "entity",
"entities": [
"ent_xyfdshfudosfdshfdiosfds",
"ent_fidjosfjdisofdjsifdosfu"
]
},
{
"type": "processing_channel",
"processing_channels": [
"pc_axclravnqf5u5ejkweijnp5zc4"
]
}
],
"actions": [
{
"type": "webhook",
"url": "https://example.com/webhooks",
"headers": {
"Authorization": "<AUTHORIZATION_UUID>"
},
"signature": {
"method": "HMACSHA256",
"key": "8V8x0dLK%AyD*DNS8JJr"
}
}
]
}Response
Workflow added successfully
Example response
{
"id": "wf_wlu3wxc26jounofs5iez75qaqa",
"_links": {
"self": {
"href": "https://{prefix}.api.checkout.com/workflows/wf_wlu3wxc26jounofs5iez75qaqa"
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.