Use Workflows to start receiving webhook notifications for your payments, disputes, and sub-entities.
Get all workflows
Workflows retrieved successfully
Unauthorized
Internal Error
// 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 }
{- "data": [
- {
- "id": "wf_wlu3wxc26jounofs5iez75qaqa",
- "name": "Webhooks workflow",
- "active": true,
- "_links": {
}
}
]
}Add a new workflow
Workflow added successfully
Unauthorized
Invalid data was sent
Internal Error
{- "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",
- "headers": {
- "Authorization": "<AUTHORIZATION_UUID>"
}, - "signature": {
- "method": "HMACSHA256",
- "key": "8V8x0dLK%AyD*DNS8JJr"
}
}
]
}{- "id": "wf_wlu3wxc26jounofs5iez75qaqa",
- "_links": {
}
}Get the details of a workflow
Workflow retrieved successfully
Unauthorized
Workflow not found
Internal Error
// 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 }
{- "id": "wf_34pacj7ae6wexju4avpecxvp6e",
- "name": "Webhooks workflow",
- "active": true,
- "conditions": [
- {
- "id": "wfc_tisekcawefze3l27uaai6hz74e",
- "type": "event",
- "events": {
- "gateway": [
- "payment_approved",
- "payment_pending",
- "payment_declined"
]
}, - "_links": {
}
}, - {
- "id": "wfc_tisekcawefze3l27uaai6hz74y",
- "type": "entity",
- "entities": [
- "ent_xyfdshfudosfdshfdiosfds",
- "ent_fidjosfjdisofdjsifdosfu"
], - "_links": {
}
}, - {
- "id": "wfc_tisekcawefze3l27uaai6hz26y",
- "type": "processing_channel",
- "processing_channels": [
- "pc_axclravnqf5u5ejkweijnp5zc4"
], - "_links": {
}
}
], - "actions": [
- {
- "id": "wfa_itja4x7zgzye3andzqq62u4hvq",
- "type": "webhook",
- "headers": {
- "Authorization": "<AUTHORIZATION_UUID>"
}, - "signature": {
- "method": "HMACSHA256",
- "key": "8V8x0dLK%AyD*DNS8JJr"
}, - "_links": {
}
}
], - "_links": {
}
}Removes a workflow so it is no longer being executed. Actions of already executed workflows will be still processed.
Workflow removed successfully
Unauthorized
Workflow not found
Internal Error
// 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 }
Update a workflow.
Workflow updated successfully
Unauthorized
Workflow not found
Invalid data was sent
Internal Error
{- "name": "Webhooks workflow",
- "active": true,
- "conditions": [
- {
- "type": "event",
- "events": {
- "gateway": [
- "payment_approved",
- "payment_pending",
- "payment_declined"
]
}
}, - {
- "type": "entity",
- "entities": [
- "ent_xyfdshfudosfdshfdiosfds",
- "ent_fidjosfjdisofdjsifdosfu"
]
}, - {
- "type": "processing_channel",
- "processing_channels": [
- "pc_axclravnqf5u5ejkweijnp5zc4"
]
}
], - "actions": [
- {
- "workflow_action_id": "wfa_itja4x7zgzye3andzqq62u4hvq",
- "type": "webhook",
- "headers": {
- "Authorization": "<AUTHORIZATION_UUID>"
}, - "signature": {
- "method": "HMACSHA256",
- "key": "8V8x0dLK%AyD*DNS8JJr"
}
}
]
}{- "id": "wf_c7svxlvo2bbuva4f6s3xu4f7wm",
- "name": "Webhooks workflow",
- "active": true,
- "conditions": [
- {
- "id": "wfc_tisekcawefze3l27uaai6hz74e",
- "type": "event",
- "events": {
- "gateway": [
- "payment_approved",
- "payment_pending",
- "payment_declined"
]
}
}, - {
- "id": "wfc_tisekcawefze3l27uaai6hz74y",
- "type": "entity",
- "entities": [
- "ent_xyfdshfudosfdshfdiosfds",
- "ent_fidjosfjdisofdjsifdosfu"
]
}, - {
- "id": "wfc_tisekcawefze3l27uaai6hz26y",
- "type": "processing_channel",
- "processing_channels": [
- "pc_axclravnqf5u5ejkweijnp5zc4"
]
}
], - "actions": [
- {
- "id": "wfa_itja4x7zgzye3andzqq62u4hvq",
- "type": "webhook",
- "headers": {
- "Authorization": "<AUTHORIZATION_UUID>"
}, - "signature": {
- "method": "HMACSHA256",
- "key": "8V8x0dLK%AyD*DNS8JJr"
}
}
],
}Adds a workflow action. Actions determine what the workflow will do when it is triggered.
| 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 |
Workflow action added successfully
Unauthorized
Workflow not found
Invalid data was sent
Internal Error
{- "type": "webhook",
- "headers": {
- "Authorization": "<AUTHORIZATION_UUID>"
}, - "signature": {
- "method": "HMACSHA256",
- "key": "public-signing-key"
}
}{- "id": "wfa_wlu3wxc26jounofs5iez75qaqa",
- "_links": {
}
}Update a workflow action.
| 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 |
Workflow action updated successfully
Unauthorized
Workflow or workflow action not found
Invalid data was sent
Internal Error
{- "type": "webhook",
- "headers": {
- "Authorization": "<AUTHORIZATION_UUID>"
}, - "signature": {
- "method": "HMACSHA256",
- "key": "public-signing-key"
}
}{- "request_id": "0HL80RJLS76I7",
- "error_type": "request_invalid",
- "error_codes": [
- "payment_source_required"
]
}Removes a workflow action. Actions determine what the workflow will do when it is triggered.
Workflow action removed successfully
Unauthorized
Workflow or workflow action not found
Invalid data was sent
Internal Error
{- "request_id": "0HL80RJLS76I7",
- "error_type": "request_invalid",
- "error_codes": [
- "payment_source_required"
]
}Adds a workflow condition. Conditions determine when the workflow will trigger.
Workflow condition added successfully
Unauthorized
Workflow not found
Invalid data was sent
Internal Error
{- "type": "event",
- "events": {
- "gateway": [
- "card_verified",
- "card_verification_declined",
- "payment_approved",
- "payment_pending",
- "payment_declined",
- "payment_voided",
- "payment_captured",
- "payment_refunded"
], - "disputes": [
- "dispute_canceled",
- "dispute_evidence_required",
- "dispute_expired",
- "dispute_lost",
- "dispute_resolved",
- "dispute_won"
]
}
}{- "id": "wfc_wlu3wxc26jounofs5iez75qaqa",
- "_links": {
}
}Update a workflow condition.
Workflow condition updated successfully
Unauthorized
Workflow or workflow condition not found
Invalid data was sent
Internal Error
{- "type": "event",
- "events": {
- "gateway": [
- "card_verified",
- "card_verification_declined",
- "payment_approved",
- "payment_pending",
- "payment_declined",
- "payment_voided",
- "payment_captured",
- "payment_refunded"
], - "disputes": [
- "dispute_canceled",
- "dispute_evidence_required",
- "dispute_expired",
- "dispute_lost",
- "dispute_resolved",
- "dispute_won"
]
}
}{- "request_id": "0HL80RJLS76I7",
- "error_type": "request_invalid",
- "error_codes": [
- "payment_source_required"
]
}Removes a workflow condition. Conditions determine when the workflow will trigger.
Workflow condition removed successfully
Unauthorized
Workflow or workflow condition not found
Internal Error
Validate a workflow in our Sandbox environment.
Workflow test initiated
Unauthorized
Workflow not found
Invalid data was sent
Internal Error
{- "event_types": {
- "gateway": [
- "payment_approved",
- "payment_captured"
], - "issuing": [
- "3ds_card_enrolled",
- "3ds_card_information_changed"
]
}
}{- "request_id": "0HLHPN8802NUF:00000003",
- "error_type": "request_invalid",
- "error_codes": [
- "event_types_invalid"
]
}Get a list of sources and their events for building new workflows
Event types retrieved successfully
Unauthorized
Internal Error
// 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 }
[- {
- "id": "gateway",
- "display_name": "Gateway",
- "description": "Events from the Checkout.com payment gateway",
- "events": [
- {
- "id": "payment_approved",
- "display_name": "Payment Authorized",
- "description": "Occurs when a payment is successfully authorized by the Checkout.com payment gateway"
}
]
}
]Get the details of an event
Event retrieved successfully
Unauthorized
Event not found
Internal Error
// 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 }
{- "id": "evt_az5sblvku4ge3dwpztvyizgcau",
- "source": "gateway",
- "type": "payment_approved",
- "timestamp": "2019-08-24T14:15:22Z",
- "version": "1.0.0",
- "data": {
- "id": "pay_mbabizu24mvu3mela5njyhpit4",
- "action_id": "act_y3oqhf46pyzuxjbcn2giaqnb44",
- "amount": 6540,
- "currency": "USD",
- "approved": true,
- "status": "Authorized",
- "auth_code": "643381",
- "payment_type": "Regular",
- "response_code": "10000",
- "response_summary": "Approved",
- "scheme_id": "745664329470123",
- "3ds": {
- "downgraded": true,
- "enrolled": "N"
}, - "flagged": true,
- "source": {
- "type": "card",
- "id": "src_nwd3m4in3hkuddfpjsaevunhdy",
- "billing_address": {
- "line1": "123 High St",
- "line2": "Flat 456",
- "town_city": "London",
- "state": "GB",
- "zip": "SW1A 1AA",
- "country": "GB"
}, - "phone": {
- "country_code": "+1",
- "number": "415 555 2671"
}, - "expiry_month": 12,
- "expiry_year": 2025,
- "scheme": "VISA'",
- "last_4": "4242",
- "fingerprint": "54710B428R6H190D29087FF265D8F48DF1AD34EDE41C27CBFF9D23C1A14D9876",
- "bin": "424242",
- "card_type": "CREDIT",
- "card_category": "CONSUMER",
- "issuer": "MERCHANT UK",
- "issuer_country": "GB",
- "product_id": "F",
- "product_type": "Visa Classic",
- "avs_check": "G",
- "cvv_check": "Y"
}, - "processing": {
- "acquirer_transaction_id": "501979547418712947435",
- "retrieval_reference_number": "682643929865"
}, - "balances": {
- "total_authorized": 6540,
- "total_voided": 0,
- "available_to_void": 6540,
- "total_captured": 0,
- "available_to_capture": 6540,
- "total_refunded": 0,
- "available_to_refund": 0
}, - "event_links": {
}, - "customer": {
- "id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
- "email": "brucewayne@gmail.com",
- "name": "Bruce Wayne"
}, - "processed_on": "2020-02-27T11:26:59Z",
- "reference": "ORD-5023-4E89",
- "metadata": {
- "coupon_code": "NY2018",
- "partner_id": 123989
}
}, - "action_invocations": [
- {
- "workflow_id": "wf_c7svxlvo2bbuva4f6s3xu4f7wm",
- "workflow_action_id": "wfa_uzkxpffkvpiu5fe3h5ira7sqpa",
- "status": "pending",
- "_links": {
}
}
], - "_links": {
- "self": {
},
}
}Get the details of a workflow action executed for the specified event.
Workflow action retrieved successfully
Unauthorized
Event not found
Internal Error
// 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 }
{- "workflow_id": "wf_c7svxlvo2bbuva4f6s3xu4f7wm",
- "event_id": "evt_az5sblvku4ge3dwpztvyizgcau",
- "workflow_action_id": "wfa_uzkxpffkvpiu5fe3h5ira7sqpa",
- "action_type": "webhook",
- "status": "successful",
- "action_invocations": [
- {
- "invocation_id": "ivc_az5sblvku4ge3dwpztvyizgcau",
- "timestamp": "2019-05-23T08:26:59Z",
- "retry": false,
- "succeeded": true,
- "final": true,
- "result_details": {
- "status_code": 200,
- "headers": {
- "Authorization": "<AUTHORIZATION_UUID>"
}, - "response_received_timestamp": "2019-05-23T08:27:01Z"
}
}, - {
- "invocation_id": "ivc_az5sblvku4ge3dwpztvyizgcau",
- "timestamp": "2019-05-23T08:27:01Z",
- "retry": true,
- "succeeded": false,
- "final": false,
- "result_details": {
- "status_code": 500,
- "headers": {
- "Authorization": "<AUTHORIZATION_UUID>"
}, - "response_received_timestamp": "2019-05-23T08:27:01Z"
}
}
], - "_links": {
}
}Reflows a past event denoted by the event ID and triggers the actions of any workflows with matching conditions.
Event reflow initiated successfully
Unauthorized
Events for reflow not found
Internal Error
// 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 }
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.
Event reflow initiated successfully
Unauthorized
Events for reflow not found
Internal Error
// 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 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.
Event reflow initiated successfully
Unauthorized
Events for reflow not found
Invalid data was sent
Internal Error
{- "events": [
- "evt_lzmo6p0i3612judj754w1ngtil",
- "evt_05z6xuagtti48ajyfbuekg6a0a"
], - "workflows": [
- "wf_sq8jnqi9i749hhb470bu308uk2",
- "wf_bz91q7i4ks4sr0kasmas2xhp56"
]
}{- "request_id": "0HL80RJLS76I7",
- "error_type": "request_invalid",
- "error_codes": [
- "event_ids_invalid",
- "workflow_ids_invalid"
]
}Get all events that relate to a specific subject
Events retrieved successfully
Unauthorized
Subject not found
Internal Error
// 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 }
{- "data": [
- {
- "id": "evt_zrrgsvsr47ou7fng4shy4mtf64",
- "type": "payment_approved",
- "timestamp": "2019-05-23T08:25:53Z",
- "_links": {
}
}, - {
- "id": "evt_wgwdfyem4ode5furs5swyy6b2u",
- "type": "payment_captured",
- "timestamp": "2019-05-24T07:00:53Z",
- "_links": {
}
}
]
}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.
Event reflow initiated successfully
Unauthorized
Events for reflow not found
Internal Error
// 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 }
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.
Event reflow initiated successfully
Unauthorized
Events for reflow not found
Internal Error
// 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 }