Skip to content
Proud to collaborate with Microsoft for Startups

abacatepay.coupon.create ​

Create a discount coupon.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-abacatepay
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Authenticated organization UUID
cloud_connection_uuiduuidYes—Organization-scoped AbacatePay connection UUID
workflow_run_idstringNo—Engine-stamped parent DAG run id
codestringYes—Coupon code
notesstringNo—Internal notes
discount_kindstringNo—PERCENTAGE (default) or FIXED
discountintegerYes—PERCENTAGE 0-100 or FIXED amount in centavos
max_redeemsintegerNo—Max redemptions; -1 unlimited (provider default)
metadatajsonNo—Caller metadata bag

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Authenticated organization UUID
cloud_connection_uuiduuidYes—Organization-scoped AbacatePay connection UUID
workflow_run_idstringNo—Engine-stamped parent DAG run id
coupon_refstringYes—Provider coupon id
codestringYes—Coupon code
couponjsonYes—Normalized coupon payload
created_atstringYes—ISO-8601 create timestamp
failure_reasonstringNo—Safe terminal failure reason
failure_typestringNo—Stable failure classification
failed_actionstringNo—Action that failed
failed_stepjsonNo—Failed DAG step envelope
failed_layerintegerNo—One-based failed DAG layer
failed_at_statestringNo—State where failure occurred
errorstringNo—Safe unexpected error
error_typestringNo—Unexpected exception class
failed_atstringNo—ISO-8601 failure timestamp
provider_request_refstringNo—Safe provider request reference
retryablebooleanNo—Whether the failure is retryable
notesstringNo—Internal notes
discount_kindstringNo—PERCENTAGE (default) or FIXED
discountintegerYes—PERCENTAGE 0-100 or FIXED amount in centavos
max_redeemsintegerNo—Max redemptions; -1 unlimited (provider default)
metadatajsonNo—Caller metadata bag

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "abacatepay.coupon.create",
  "initial_data": {
    "organization_uuid": "value",
    "cloud_connection_uuid": "value",
    "code": "value",
    "discount": 123
  }
}