---
updatedAt: 2026-09-11T03:26:28.000Z
agentTools:
  projectIndex: https://developer.azupay.com.au/llms.txt
---

# Create or amend a Payment Campaign

Creates the campaign for the calling client, or amends it. A client holds a single campaign and it is identified by the calling credentials, so no campaign identifier appears in the request. Omit version to create; supply the current version to amend. Maps to POST /v1/paymentCampaign on the internal Apps API.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "API Reference",
    "description": "API Reference",
    "version": "v1",
    "contact": {
      "email": "contactus@azupay.com.au"
    }
  },
  "servers": [
    {
      "url": "https://api-uat.azupay.com.au/v1",
      "description": "UAT environment"
    },
    {
      "url": "https://api.azupay.com.au/v1",
      "description": "Production environment"
    }
  ],
  "x-tagGroups": [
    {
      "name": "Receive payments - AzupayId",
      "tags": [
        "Payment Request"
      ]
    },
    {
      "name": "Make payments - AzupayOut",
      "tags": [
        "Accounts",
        "Payment"
      ]
    },
    {
      "name": "Payment Agreements - AzupayTo",
      "tags": [
        "Payment Agreement",
        "Payment Initiation",
        "Payment Agreement Request"
      ]
    },
    {
      "name": "Accounts",
      "tags": [
        "Check Accounts"
      ]
    },
    {
      "name": "Reports",
      "tags": [
        "Billing and Transaction Reports",
        "Current Balances"
      ]
    },
    {
      "name": "Configuration",
      "tags": [
        "Clients",
        "PayID Domains",
        "API Keys"
      ]
    }
  ],
  "components": {
    "securitySchemes": {
      "SecretKey": {
        "description": "The secret key is used to access restricted functions and should be stored\nsecurely in your system. It is required for operations which may result in\nadditional charges to you as a merchant. Please protect the key by storing\nit encrypted granting access only to a limited set of users and applications\nrequiring its use.\n",
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    },
    "schemas": {
      "CashbackConfig": {
        "additionalProperties": false,
        "type": "object",
        "description": "Cashback terms. Applies uniformly to every method named in paymentMethods, drawing on one shared budget.",
        "properties": {
          "cashbackPerTransaction": {
            "type": "string",
            "description": "The award. Every qualifying transaction earns exactly this amount in AUD. There is no rate and no proportional calculation. Capped at 9999.99.",
            "pattern": "^\\d+\\.\\d{2}$",
            "maxLength": 7,
            "example": "5.00"
          },
          "minTransactionAmount": {
            "type": "string",
            "description": "Transactions below this amount do not qualify. Qualifying transactions themselves have no upper bound. Capped at 999999.99.",
            "pattern": "^\\d+\\.\\d{2}$",
            "maxLength": 9,
            "example": "20.00"
          },
          "payoutDelayHours": {
            "type": "integer",
            "description": "Whole hours between a qualifying transaction completing and the cashback being issued. 0 means as soon as the runtime can; 720 is 30 days. Defaults to 0 when omitted.",
            "minimum": 0,
            "maximum": 720,
            "default": 0,
            "example": 24
          }
        },
        "required": [
          "cashbackPerTransaction",
          "minTransactionAmount"
        ]
      },
      "PaymentCampaign": {
        "additionalProperties": false,
        "type": "object",
        "description": "The campaign's configuration. Sent on create/amend and returned on every response. A client holds a single campaign, identified by the calling credentials, so the object carries no campaign identifier.",
        "properties": {
          "campaignType": {
            "type": "string",
            "description": "Discriminator. CASHBACK is the only value in v1.",
            "enum": [
              "CASHBACK"
            ],
            "example": "CASHBACK"
          },
          "status": {
            "type": "string",
            "description": "Whether the campaign is awarding. Set only by the caller; the service never changes it.",
            "enum": [
              "ACTIVE",
              "INACTIVE"
            ],
            "example": "ACTIVE"
          },
          "paymentMethods": {
            "type": "array",
            "description": "The payment methods the campaign applies to. A transaction qualifies only if it was taken on a listed method.",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "PAYTO",
                "PAYID"
              ]
            },
            "example": [
              "PAYTO",
              "PAYID"
            ]
          },
          "campaignBudget": {
            "type": "string",
            "description": "Total cashback the campaign may award, as an absolute figure in AUD. May be revised up or down on any amend, but never below the amount already awarded. Capped at 999999.99.",
            "pattern": "^\\d+\\.\\d{2}$",
            "maxLength": 9,
            "example": "25000.00"
          },
          "version": {
            "type": "integer",
            "description": "The revision being amended. Required on an amend, omitted on a create, and never returned - the response carries it on PaymentCampaignStatus instead.",
            "minimum": 1,
            "example": 2
          },
          "cashbackConfig": {
            "$ref": "#/components/schemas/CashbackConfig"
          }
        },
        "required": [
          "campaignType",
          "status",
          "paymentMethods",
          "campaignBudget",
          "cashbackConfig"
        ]
      },
      "PaymentCampaignStatus": {
        "additionalProperties": false,
        "type": "object",
        "description": "Server-managed state. Returned on every response and never supplied by the caller.",
        "properties": {
          "version": {
            "type": "integer",
            "description": "The campaign's current revision, incremented on every accepted write. This is the only place version is returned; supply it back on PaymentCampaign when amending.",
            "minimum": 1,
            "example": 1
          },
          "campaignBudgetBalance": {
            "type": "string",
            "description": "Unspent portion of campaignBudget in AUD. Subtracting it from campaignBudget gives the amount already awarded, which is the floor for any future reduction.",
            "pattern": "^\\d+\\.\\d{2}$",
            "maxLength": 9,
            "example": "18420.55"
          },
          "createdDatetime": {
            "type": "string",
            "format": "date-time",
            "description": "Campaign creation timestamp (ISO 8601 UTC, millisecond precision)."
          },
          "updatedDatetime": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the most recent accepted amendment. Absent on a campaign that has never been amended."
          }
        },
        "required": [
          "version",
          "createdDatetime"
        ]
      },
      "PaymentCampaignRequest": {
        "additionalProperties": false,
        "type": "object",
        "description": "Create/amend request envelope. Carries PaymentCampaign only - PaymentCampaignStatus is never accepted on a request.",
        "properties": {
          "PaymentCampaign": {
            "$ref": "#/components/schemas/PaymentCampaign"
          }
        },
        "required": [
          "PaymentCampaign"
        ]
      },
      "PaymentCampaignResponse": {
        "additionalProperties": false,
        "type": "object",
        "description": "Standard campaign response: the resource plus its server-managed state.",
        "properties": {
          "PaymentCampaign": {
            "$ref": "#/components/schemas/PaymentCampaign"
          },
          "PaymentCampaignStatus": {
            "$ref": "#/components/schemas/PaymentCampaignStatus"
          }
        },
        "required": [
          "PaymentCampaign",
          "PaymentCampaignStatus"
        ]
      }
    }
  },
  "paths": {
    "/paymentCampaign": {
      "post": {
        "tags": [
          "Payment Campaign"
        ],
        "summary": "Create or amend a Payment Campaign",
        "description": "Creates the campaign for the calling client, or amends it. A client holds a single campaign and it is identified by the calling credentials, so no campaign identifier appears in the request. Omit version to create; supply the current version to amend. Maps to POST /v1/paymentCampaign on the internal Apps API.",
        "operationId": "createOrUpdatePaymentCampaign",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentCampaignRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Campaign amended.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentCampaignResponse"
                }
              }
            }
          },
          "201": {
            "description": "Campaign created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentCampaignResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed (ERR0.03), the client already holds a campaign (AZP6.1), or campaignBudget is below the amount already awarded (AZP6.2)."
          },
          "401": {
            "description": "Invalid Authorization header."
          },
          "403": {
            "description": "Caller not authorised."
          },
          "409": {
            "description": "AZP6.3 - version is missing, incorrect or stale on an amend."
          }
        },
        "security": [
          {
            "SecretKey": []
          }
        ]
      }
    }
  }
}
```