Workflows

Use Workflows to start receiving webhook notifications for your payments, disputes, and sub-entities.

Get all workflows

Get all workflows

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Responses
200

Workflows retrieved successfully

401

Unauthorized

500

Internal Error

get/workflows
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Workflows;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Flow)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    GetWorkflowsResponse response = await api.WorkflowsClient().GetWorkflows();
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}
Response samples
application/json
{}

Add a workflow

Add a new workflow

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
Request Body schema: application/json
required
name
string

A name you can use to describe your workflow

active
boolean
Default: true

Indicates whether the workflow is currently active

Array of objects (workflow-condition) non-empty

Only one condition of the same type is permitted

Array of objects (workflow-action) non-empty

One or more workflow actions

Responses
201

Workflow added successfully

401

Unauthorized

422

Invalid data was sent

500

Internal Error

post/workflows
Request samples
application/json
{
  • "name": "Webhooks workflow",
  • "active": true,
  • "conditions": [
    ],
  • "actions": [
    ]
}
Response samples
application/json
{}

Get a workflow

Get the details of a workflow

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
workflowId
required
string^wf_[a-z0-9]{26}$

The workflow identifier

Example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
Responses
200

Workflow retrieved successfully

401

Unauthorized

404

Workflow not found

500

Internal Error

get/workflows/{workflowId}
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Workflows;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Flow)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    GetWorkflowResponse response = await api.WorkflowsClient().GetWorkflow("workflow_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}
Response samples
application/json
{}

Remove a workflow

Removes a workflow so it is no longer being executed. Actions of already executed workflows will be still processed.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
workflowId
required
string^wf_[a-z0-9]{26}$

The workflow identifier

Example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
Responses
204

Workflow removed successfully

401

Unauthorized

404

Workflow not found

500

Internal Error

delete/workflows/{workflowId}
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Flow)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    EmptyResponse response = await api.WorkflowsClient().RemoveWorkflow("workflow_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}

Patch a workflow

Update a workflow.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
workflowId
required
string^wf_[a-z0-9]{26}$

The workflow identifier

Example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
Request Body schema: application/json
required
name
string

A name to describe the workflow

active
boolean

Indicates whether the workflow is currently active

Array of objects (workflow-condition) non-empty

One or more workflow conditions

Array of objects (patch-workflow-action) non-empty

One or more workflow actions

Responses
200

Workflow updated successfully

401

Unauthorized

404

Workflow not found

422

Invalid data was sent

500

Internal Error

patch/workflows/{workflowId}
Request samples
application/json
{
  • "name": "Webhooks workflow",
  • "active": true,
  • "conditions": [
    ],
  • "actions": [
    ]
}
Response samples
application/json
{
  • "id": "wf_c7svxlvo2bbuva4f6s3xu4f7wm",
  • "name": "Webhooks workflow",
  • "active": true,
  • "conditions": [
    ],
  • "actions": [
    ],
}

Add a workflow action

Adds a workflow action. Actions determine what the workflow will do when it is triggered.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
workflowId
required
string^wf_[a-z2-7]{26}$

The workflow identifier

Example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
Request Body schema: application/json
required
url
required
string <uri>

Your webhook endpoint URL

type
required
string

The type of workflow action

object

Optional HTTP headers added to the request

object

Used to produce a signature of the webhook contents that will be included in the Cko-Signature header. This value can be computed by you on receipt of a webhook to validate its authenticity.

Responses
201

Workflow action added successfully

401

Unauthorized

404

Workflow not found

422

Invalid data was sent

500

Internal Error

post/workflows/{workflowId}/actions
Request samples
application/json
{}
Response samples
application/json

Update a workflow action

Update a workflow action.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
workflowId
required
string^wf_[a-z0-9]{26}$

The workflow identifier

Example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
workflowActionId
required
string^wfa_[a-z0-9]{26}$

The workflow action identifier

Example: wfa_d5estuyxzshubhly2wu3hloehi
Request Body schema: application/json
required
url
required
string <uri>

Your webhook endpoint URL

type
required
string

The type of workflow action

object

Optional HTTP headers added to the request

object

Used to produce a signature of the webhook contents that will be included in the Cko-Signature header. This value can be computed by you on receipt of a webhook to validate its authenticity.

Responses
200

Workflow action updated successfully

401

Unauthorized

404

Workflow or workflow action not found

422

Invalid data was sent

500

Internal Error

put/workflows/{workflowId}/actions/{workflowActionId}
Request samples
application/json
{}
Response samples
application/json
{
  • "request_id": "0HL80RJLS76I7",
  • "error_type": "request_invalid",
  • "error_codes": [
    ]
}

Remove a workflow action

Removes a workflow action. Actions determine what the workflow will do when it is triggered.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
workflowId
required
string^wf_[a-z2-7]{26}$

The workflow identifier

Example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
workflowActionId
required
string^wfa_[a-z2-7]{26}$

The workflow action identifier

Example: wfa_c7svxlvo2bbuva4f6s3xu4f7wm
Responses
204

Workflow action removed successfully

401

Unauthorized

404

Workflow or workflow action not found

422

Invalid data was sent

500

Internal Error

delete/workflows/{workflowId}/actions/{workflowActionId}
Request samples
Response samples
application/json
{
  • "request_id": "0HL80RJLS76I7",
  • "error_type": "request_invalid",
  • "error_codes": [
    ]
}

Add a workflow condition

Adds a workflow condition. Conditions determine when the workflow will trigger.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
workflowId
required
string^wf_[a-z2-7]{26}$

The workflow identifier

Example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
Request Body schema: application/json
required
required
object (source-events-hashmap)
type
required
string

The type of the workflow condition

Responses
201

Workflow condition added successfully

401

Unauthorized

404

Workflow not found

422

Invalid data was sent

500

Internal Error

post/workflows/{workflowId}/conditions
Request samples
application/json
{
  • "type": "event",
  • "events": {
    }
}
Response samples
application/json

Update a workflow condition

Update a workflow condition.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
workflowId
required
string^wf_[a-z0-9]{26}$

The workflow identifier

Example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
workflowConditionId
required
string^wfc_[a-z0-9]{26}$

The workflow condition identifier

Example: wfc_d5estuyxzshubhly2wu3hloehi
Request Body schema: application/json
required
required
object (source-events-hashmap)
type
required
string

The type of the workflow condition

Responses
200

Workflow condition updated successfully

401

Unauthorized

404

Workflow or workflow condition not found

422

Invalid data was sent

500

Internal Error

put/workflows/{workflowId}/conditions/{workflowConditionId}
Request samples
application/json
{
  • "type": "event",
  • "events": {
    }
}
Response samples
application/json
{
  • "request_id": "0HL80RJLS76I7",
  • "error_type": "request_invalid",
  • "error_codes": [
    ]
}

Remove a workflow condition

Removes a workflow condition. Conditions determine when the workflow will trigger.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
workflowId
required
string^wf_[a-z2-7]{26}$

The workflow identifier

Example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
workflowConditionId
required
string^wfc_[a-z2-7]{26}$

The workflow condition identifier

Example: wfc_c7svxlvo2bbuva4f6s3xu4f7wm
Responses
204

Workflow condition removed successfully

401

Unauthorized

404

Workflow or workflow condition not found

500

Internal Error

delete/workflows/{workflowId}/conditions/{workflowConditionId}
Request samples

Test a workflow

Validate a workflow in our Sandbox environment.

SecurityOAuth2: OAuth
Request
path Parameters
workflowId
required
string^wf_[a-z2-7]{26}$

The workflow identifier

Example: wf_c7svxlvo2bbuva4f6s3xu4f7wm
Request Body schema: application/json
required
object (Event Types by Source)

Map of source names to their corresponding event types (e.g., gateway, issuing, authentication, etc.)

Responses
204

Workflow test initiated

401

Unauthorized

404

Workflow not found

422

Invalid data was sent

500

Internal Error

post/workflows/{workflowId}/test
Request samples
application/json
{
  • "event_types": {
    }
}
Response samples
application/json
{
  • "request_id": "0HLHPN8802NUF:00000003",
  • "error_type": "request_invalid",
  • "error_codes": [
    ]
}

Get event types

Get a list of sources and their events for building new workflows

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Responses
200

Event types retrieved successfully

401

Unauthorized

500

Internal Error

get/workflows/event-types
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Workflows.Events;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Flow)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    ItemsResponse<EventTypesResponse> response = await api.WorkflowsClient().GetEventTypes();
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}
Response samples
application/json
[
  • {
    }
]

Get an event

Get the details of an event

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
eventId
required
string^evt_[a-z0-9]{26}$

The event identifier

Example: evt_x5zm2po6kimubhlfitgt2mfwgi
Responses
200

Event retrieved successfully

401

Unauthorized

404

Event not found

500

Internal Error

get/workflows/events/{eventId}
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Workflows.Events;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Flow)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    GetEventResponse response = await api.WorkflowsClient().GetEvent("event_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}
Response samples
application/json
{
  • "id": "evt_az5sblvku4ge3dwpztvyizgcau",
  • "source": "gateway",
  • "type": "payment_approved",
  • "timestamp": "2019-08-24T14:15:22Z",
  • "version": "1.0.0",
  • "data": {
    },
  • "action_invocations": [],
}

Get action invocations

Get the details of a workflow action executed for the specified event.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
eventId
required
string^evt_[a-z0-9]{26}$

The event identifier

Example: evt_x5zm2po6kimubhlfitgt2mfwgi
workflowActionId
required
string^wfa_[a-z0-9]{26}$

The workflow action identifier

Example: wfa_uzkxpffkvpiu5fe3h5ira7sqpa
Responses
200

Workflow action retrieved successfully

401

Unauthorized

404

Event not found

500

Internal Error

get/workflows/events/{eventId}/actions/{workflowActionId}
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Workflows.Actions.Response;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Flow)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    WorkflowActionInvocationsResponse response = await api.WorkflowsClient().GetActionInvocations("event_id", "action_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}
Response samples
application/json
{
  • "workflow_id": "wf_c7svxlvo2bbuva4f6s3xu4f7wm",
  • "event_id": "evt_az5sblvku4ge3dwpztvyizgcau",
  • "workflow_action_id": "wfa_uzkxpffkvpiu5fe3h5ira7sqpa",
  • "action_type": "webhook",
  • "status": "successful",
  • "action_invocations": [
    ],
}

Reflow by event

Reflows a past event denoted by the event ID and triggers the actions of any workflows with matching conditions.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
eventId
required
string^evt_[a-z0-9]{26}$

The unique identifier for the event to be reflowed.

Example: evt_x5zm2po6kimubhlfitgt2mfwgi
Responses
202

Event reflow initiated successfully

401

Unauthorized

404

Events for reflow not found

500

Internal Error

post/workflows/events/{eventId}/reflow
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Workflows.Reflows;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Flow)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    ReflowResponse response = await api.WorkflowsClient().ReflowByEvent("event_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}

Reflow by event and workflow

Reflows a past event by event ID and workflow ID. Triggers all the actions of a specific event and workflow combination if the event denoted by the event ID matches the workflow conditions.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
eventId
required
string^evt_[a-z0-9]{26}$

The unique identifier for the event to be reflowed.

Example: evt_x5zm2po6kimubhlfitgt2mfwgi
workflowId
required
string^wf_[a-z0-9]{26}$

The identifier of the workflow whose actions you want to trigger.

Example: wf_c8zm2po6kimubhlfitgt2mferf
Responses
202

Event reflow initiated successfully

401

Unauthorized

404

Events for reflow not found

500

Internal Error

post/workflows/events/{eventId}/workflow/{workflowId}/reflow
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Workflows.Reflows;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Flow)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    ReflowResponse response = await api.WorkflowsClient().ReflowByEventAndWorkflow("event_id", "workflow_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}

Reflow

Reflow past events attached to multiple event IDs and workflow IDs, or to multiple subject IDs and workflow IDs. If you don't specify any workflow IDs, all matching workflows will be retriggered.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
Request Body schema: application/json
required
One of:
events
required
Array of strings

A list of IDs for the events you want reflowed.

workflows
Array of strings

A list of IDs for the workflows whose actions you want to retrigger.

Responses
202

Event reflow initiated successfully

401

Unauthorized

404

Events for reflow not found

422

Invalid data was sent

500

Internal Error

post/workflows/events/reflow
Request samples
application/json
{
  • "events": [
    ],
  • "workflows": [
    ]
}
Response samples
application/json
{
  • "request_id": "0HL80RJLS76I7",
  • "error_type": "request_invalid",
  • "error_codes": [
    ]
}

Get subject events

Get all events that relate to a specific subject

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
subjectId
required
string

The event identifier

Example: pay_wlu3wxc26jounofs5iez75qaqa
Responses
200

Events retrieved successfully

401

Unauthorized

404

Subject not found

500

Internal Error

get/workflows/events/subject/{subjectId}
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Workflows.Events;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Flow)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    SubjectEventsResponse response = await api.WorkflowsClient().GetSubjectEvents("subject_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}
Response samples
application/json
{}

Reflow by subject

Reflows the events associated with a subject ID (for example, a payment ID or a dispute ID) and triggers the actions of any workflows with matching conditions.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
subjectId
required
string^[a-z]{3}_[a-z0-9]{26}$

The subject identifier (for example, a payment ID or a dispute ID). The events associated with these subjects will be reflowed.

Example: pay_x5zm2po6kimubhlfitgt2mfwgi
Responses
202

Event reflow initiated successfully

401

Unauthorized

404

Events for reflow not found

500

Internal Error

post/workflows/events/subject/{subjectId}/reflow
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Workflows.Reflows;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Flow)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    ReflowResponse response = await api.WorkflowsClient().ReflowBySubject("subject_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}

Reflow by subject and workflow

Reflows the events associated with a subject ID (for example, a payment ID or a dispute ID) and triggers the actions of the specified workflow if the conditions match.

SecurityOAuth2: OAuth or API Key: ApiSecretKey
Request
path Parameters
subjectId
required
string^[a-z]{3}_[a-z0-9]{26}$

The subject identifier (for example, a payment ID or a dispute ID). The events associated with these subjects will be reflowed.

Example: pay_x5zm2po6kimubhlfitgt2mfwgi
workflowId
required
string^wf_[a-z0-9]{26}$

The identifier of the workflow whose actions you want to trigger.

Example: wf_c8zm2po6kimubhlfitgt2mferf
Responses
202

Event reflow initiated successfully

401

Unauthorized

404

Events for reflow not found

500

Internal Error

post/workflows/events/subject/{subjectId}/workflow/{workflowId}/reflow
Request samples
// For more information please refer to https://github.com/checkout/checkout-sdk-net
using Checkout.Workflows.Reflows;

//API keys
ICheckoutApi api = CheckoutSdk.Builder().StaticKeys()
    .SecretKey("secret_key")
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

//OAuth
ICheckoutApi api = CheckoutSdk.Builder().OAuth()
    .ClientCredentials("client_id", "client_secret")
    .Scopes(OAuthScope.Flow)
    .Environment(Environment.Sandbox)
    .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints.
    .HttpClientFactory(new DefaultHttpClientFactory())
    .Build();

try
{
    ReflowResponse response = await api.WorkflowsClient().ReflowBySubjectAndWorkflow("subject_id", "workflow_id");
}
catch (CheckoutApiException e)
{
    // API error
    string requestId = e.RequestId;
    var statusCode = e.HttpStatusCode;
    IDictionary<string, object> errorDetails = e.ErrorDetails;
}
catch (CheckoutArgumentException e)
{
    // Bad arguments
}
catch (CheckoutAuthorizationException e)
{
    // Invalid authorization
}