GuidesAPI ReferenceChangelog
API Reference

Auto-Conversion Webhooks

Webhook events for automatic conversion rule creation and execution status changes.

Events

Rule Creation Events

Event NameStatusDescription
auto_conversion_rule.createSUCCESSRule created successfully
auto_conversion_rule.createFAILEDRule creation failed

Rule Execution Events

Event NameStatusDescription
auto_conversion_rule_order.completedCOMPLETEDFull conversion flow completed
auto_conversion_rule_order.deposit_failedFAILEDFailed at deposit stage
auto_conversion_rule_order.conversion_failedFAILEDFailed at conversion stage
auto_conversion_rule_order.withdrawal_failedFAILEDFailed at withdrawal stage

auto_conversion_rule.create (Success)

Triggered when an auto-conversion rule is successfully created and activated.

Payload

{
  "event_name": "auto_conversion_rule.create",
  "resource": {
    "type": "auto_conversion_rule",
    "id": "acr_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "idempotency_key": "678160c6-ca41-40ee-bfe7-35057ade157d"
  },
  "data": {
    "status": "SUCCESS",
    "customer_id": "cus_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "account_id": "BZ-ABCD-1234",
    "auto_conversion_rule_id": "acr_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "idempotency_key": "my-unique-key-123",
    "created_at": "2024-01-22T12:00:00.000Z",
    "modified_at": "2024-01-22T12:00:00.000Z"
  }
}

auto_conversion_rule.create (Failed)

Triggered when an auto-conversion rule creation fails.

Payload

{
  "event_name": "auto_conversion_rule.create",
  "resource": {
    "type": "auto_conversion_rule",
    "id": "acr_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "idempotency_key": "678160c6-ca41-40ee-bfe7-35057ade157d"
  },
  "data": {
    "status": "FAILED",
    "customer_id": "cus_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "account_id": "BZ-ABCD-1234",
    "auto_conversion_rule_id": "acr_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "idempotency_key": "my-unique-key-123",
    "created_at": "2024-01-22T12:00:00.000Z",
    "modified_at": "2024-01-22T12:00:00.000Z",
    "failure_reason": "Invalid source currency"
  }
}

Fields (Creation Events)

FieldTypeDescription
statusstringSUCCESS or FAILED
customer_idstringThe customer ID who created the rule
account_idstringAccount ID of the customer
auto_conversion_rule_idstringUnique identifier for the rule
idempotency_keystringThe idempotency key provided during creation
created_atstringISO 8601 timestamp
modified_atstringISO 8601 timestamp
failure_reasonstringOnly present when status is FAILED

auto_conversion_rule_order.completed

Triggered when an auto-conversion rule execution completes successfully. This means all stages (deposit → conversion → withdrawal) completed.

Payload

{
  "event_name": "auto_conversion_rule_order.completed",
  "resource": {
    "type": "auto_conversion_rule_order",
    "id": "acro_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "idempotency_key": "678160c6-ca41-40ee-bfe7-35057ade157d"
  },
  "data": {
    "event_name": "AUTO_CONVERSION_RULE",
    "status": "COMPLETED",
    "customer_id": "cus_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "account_id": "BZ-ABCD-1234",
    "auto_conversion_rule_id": "acr_xyz789",
    "order_id": "acro_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "idempotency_key": "my-unique-key-123",
    "created_at": "2024-01-22T12:00:00.000Z",
    "modified_at": "2024-01-22T12:05:00.000Z"
  }
}

auto_conversion_rule_order.deposit_failed

Triggered when an auto-conversion rule execution fails at the deposit stage.

Payload

{
  "event_name": "auto_conversion_rule_order.deposit_failed",
  "resource": {
    "type": "auto_conversion_rule_order",
    "id": "acro_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "idempotency_key": "678160c6-ca41-40ee-bfe7-35057ade157d"
  },
  "data": {
    "event_name": "AUTO_CONVERSION_RULE",
    "status": "FAILED",
    "customer_id": "cus_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "account_id": "BZ-ABCD-1234",
    "auto_conversion_rule_id": "acr_xyz789",
    "order_id": "acro_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "idempotency_key": "my-unique-key-123",
    "created_at": "2024-01-22T12:00:00.000Z",
    "modified_at": "2024-01-22T12:01:00.000Z"
  }
}

auto_conversion_rule_order.conversion_failed

Triggered when an auto-conversion rule execution fails at the conversion stage.

Payload

{
  "event_name": "auto_conversion_rule_order.conversion_failed",
  "resource": {
    "type": "auto_conversion_rule_order",
    "id": "acro_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "idempotency_key": "678160c6-ca41-40ee-bfe7-35057ade157d"
  },
  "data": {
    "event_name": "AUTO_CONVERSION_RULE",
    "status": "FAILED",
    "customer_id": "cus_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "account_id": "BZ-ABCD-1234",
    "auto_conversion_rule_id": "acr_xyz789",
    "order_id": "acro_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "idempotency_key": "my-unique-key-123",
    "created_at": "2024-01-22T12:00:00.000Z",
    "modified_at": "2024-01-22T12:02:00.000Z"
  }
}

auto_conversion_rule_order.withdrawal_failed

Triggered when an auto-conversion rule execution fails at the withdrawal stage.

Payload

{
  "event_name": "auto_conversion_rule_order.withdrawal_failed",
  "resource": {
    "type": "auto_conversion_rule_order",
    "id": "acro_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "idempotency_key": "678160c6-ca41-40ee-bfe7-35057ade157d"
  },
  "data": {
    "event_name": "AUTO_CONVERSION_RULE",
    "status": "FAILED",
    "customer_id": "cus_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "account_id": "BZ-ABCD-1234",
    "auto_conversion_rule_id": "acr_xyz789",
    "order_id": "acro_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "idempotency_key": "my-unique-key-123",
    "created_at": "2024-01-22T12:00:00.000Z",
    "modified_at": "2024-01-22T12:03:00.000Z"
  }
}

Fields (Execution Events)

FieldTypeDescription
event_namestringAlways AUTO_CONVERSION_RULE
statusstringCOMPLETED or FAILED
customer_idstringThe customer ID who owns the rule
account_idstringAccount ID of the customer
auto_conversion_rule_idstringThe rule that triggered this execution
order_idstringUnique identifier for this execution
idempotency_keystringThe idempotency key from rule creation
created_atstringISO 8601 timestamp when execution started
modified_atstringISO 8601 timestamp when execution ended