---
updatedAt: 2026-04-21T09:29:18.000Z
agentTools:
  projectIndex: https://partner.getpliant.com/llms.txt
---

# Callback: Add/Update

Subscribe to callbacks for this entity or change an existing callback.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "contact": {
      "name": "API Support",
      "email": "support@getpliant.com",
      "url": "https://www.getpliant.com"
    },
    "title": "Pliant Partner API",
    "description": "Pliant Partner API",
    "version": "2.1.0",
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/license/MIT"
    }
  },
  "servers": [
    {
      "url": "https://partner-api.getpliant.com/api",
      "description": "Pliant Production Server"
    },
    {
      "url": "https://sandbox.partner-api.getpliant.com/api",
      "description": "Pliant Sandbox Server"
    },
    {
      "url": "https://pci-api.getpliant.com",
      "description": "PCI Vault Production Server"
    },
    {
      "url": "https://pci-sandbox.partner-api.getpliant.com",
      "description": "PCI Vault Sandbox Server"
    }
  ],
  "x-readme": {
    "explorer-enabled": false,
    "samples-languages": [
      "curl",
      "java",
      "kotlin"
    ],
    "headers": [
      {
        "key": "Pliant-API-Version",
        "value": "2.1.0"
      }
    ]
  },
  "tags": [
    {
      "name": "Accounting Transactions",
      "description": "This tag is for operations related to accounting transactions"
    }
  ],
  "paths": {
    "/accounting/transactions/subscription": {
      "post": {
        "summary": "Callback: Add/Update",
        "description": "Subscribe to callbacks for this entity or change an existing callback.",
        "tags": [
          "Accounting Transactions"
        ],
        "operationId": "create-accounting-transaction-subscription",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "callbackUrl": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://myserver.com/send/callback/here",
                    "description": "The URL to send the callback to. Must be a valid and reachable URL. We do some basic validation to ensure the URL is syntactically correct and reachable for Pliant. Only HTTPS URLs are supported."
                  },
                  "eventTypes": {
                    "type": "array",
                    "description": "The event types to subscribe to.",
                    "items": {
                      "type": "string",
                      "enum": [
                        "ACCOUNTING_TRANSACTION_CREATED",
                        "ACCOUNTING_TRANSACTION_UPDATED",
                        "ACCOUNTING_TRANSACTION_STATUS_CHANGED"
                      ]
                    }
                  }
                },
                "required": [
                  "callbackUrl",
                  "eventTypes"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "callbacks": {
          "accountingTransactionUpdated": {
            "{$request.body#/callbackUrl}": {
              "post": {
                "parameters": [
                  {
                    "in": "header",
                    "name": "X-Organization-Id",
                    "schema": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Referencing the organization this callback was sent for. See [guides](/docs/callbacks) for more details. Example value: `54e6e7e7-0c23-4a54-bccb-2d3ff2fd02df`."
                    }
                  },
                  {
                    "in": "header",
                    "name": "X-Partner-Organization-Id",
                    "schema": {
                      "type": "string",
                      "description": "Filled, if the value `partnerOrganizationId` is [set](/reference/update-organization) by the partner on the organization itself. Referencing the organization identifier of the partner. Example value: `abc123`."
                    }
                  },
                  {
                    "in": "header",
                    "name": "X-Payment-Program-Id",
                    "schema": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Referencing the payment program this callback was sent for. See [guides](/docs/callbacks) for more details. Example value: `54e6e7e7-0c23-4a54-bccb-2d3ff2fd02df`."
                    }
                  },
                  {
                    "in": "header",
                    "name": "X-Callback-Id",
                    "schema": {
                      "type": "string",
                      "format": "uuid",
                      "description": "A unique identifier for this callback. Can be used to deduplicate callbacks to achieve idempotent behavior. See [guides](/docs/callbacks) for more details. Example value: `12a03093-eaad-4ae5-9d8d-42e7f6f8b7c6`."
                    }
                  },
                  {
                    "in": "header",
                    "name": "X-Callback-Created-At",
                    "schema": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The date and time when the callback was created. Can be used to reorder callbacks. See [guides](/docs/callbacks) for more details. Example value: `2024-03-15T15:55:58.623375258Z`."
                    }
                  }
                ],
                "requestBody": {
                  "$ref": "#/components/requestBodies/AccountingTransactionUpdatedCallback"
                },
                "responses": {
                  "200": {
                    "description": "We expect the partner to return a HTTP 200 status code if the callback was successfully received. On 4xx and 5xx status codes, we will [retry](/docs/callbacks#retries) the callback."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "This API uses oAuth2 with client credentials flow to [obtain the Bearer Token](/docs/authenticated-api-usage).",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "AccountingTransactionCallback": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "format": "uuid"
          },
          "cardAccountId": {
            "type": "string",
            "format": "uuid",
            "description": "The card account to which the transactions belong."
          },
          "billingAmount": {
            "type": "object",
            "description": "The amount that was billed to the cardholder, in the currency of the card account.",
            "properties": {
              "value": {
                "type": "number",
                "description": "The value of the monetary amount, converted to minor units of the currency. For instance 1.00 EUR is 100 cents, thus the value here is `100`. See our [guides](/docs/monetary-values) for more details about how to handle monetary amounts."
              },
              "currency": {
                "type": "string",
                "description": "The currency of the monetary amount in ISO 4217 format, for example `EUR` for Euro or `USD` for US Dollar."
              }
            }
          },
          "transactionAmount": {
            "type": "object",
            "properties": {
              "value": {
                "type": "number",
                "description": "The value of the monetary amount, converted to minor units of the currency. For instance 1.00 EUR is 100 cents, thus the value here is `100`. See our [guides](/docs/monetary-values) for more details about how to handle monetary amounts."
              },
              "currency": {
                "type": "string",
                "description": "The currency of the monetary amount in ISO 4217 format, for example `EUR` for Euro or `USD` for US Dollar."
              }
            }
          },
          "supplier": {
            "type": "object",
            "nullable": true,
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "accountNumber": {
                "type": "string",
                "nullable": true
              },
              "autoMatched": {
                "type": "boolean"
              }
            }
          },
          "exportStatus": {
            "type": "string",
            "description": "The export status of the transaction. It can be one of the following values: `NOT_EXPORTED`, `IN_EXPORT_QUEUE`, `EXPORTING`, `EXPORTED`. This defines whether the transaction is exported to an accounting system or not.",
            "enum": [
              "NOT_EXPORTED",
              "IN_EXPORT_QUEUE",
              "EXPORTING",
              "EXPORTED"
            ]
          },
          "statusBeforeChange": {
            "type": "string",
            "description": "The `exportStatus` of the transaction before the change.",
            "enum": [
              "NOT_EXPORTED",
              "IN_EXPORT_QUEUE",
              "EXPORTING",
              "EXPORTED"
            ]
          },
          "receiptNumber": {
            "type": "string",
            "description": "The receipt number of a transaction if it is available. Receipt numbers are typically used to identify a transaction in an accounting system hence we store it on transaction level. If not automatically extracted it can be provided by any user within Pliant. Can be overwritten even if automatically extracted."
          },
          "accountingTransactions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer"
                },
                "accountingTransactionId": {
                  "type": "string",
                  "format": "uuid"
                },
                "billingAmount": {
                  "description": "The amount that was billed to the cardholder, in the currency of the card account.",
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    }
                  }
                },
                "transactionAmount": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    }
                  }
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "ADVERTISING_AND_MARKETING",
                    "COMPUTING_AND_SOFTWARE",
                    "EDUCATION_AND_TRAINING",
                    "ELECTRONICS_AND_IT_EQUIPMENT",
                    "ENTERTAINMENT_AND_WELLNESS",
                    "FOOD_AND_DRINKS",
                    "GIFTS_AND_VOUCHERS",
                    "MATERIALS_AND_PACKAGING",
                    "OFFICE_SUPPLIES_AND_EQUIPMENT",
                    "SERVICES",
                    "TRAVEL_AND_ACCOMMODATION",
                    "HEALTHCARE",
                    "OTHER"
                  ]
                },
                "subcategory": {
                  "type": "object",
                  "nullable": true,
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "accountNumber": {
                      "type": "string",
                      "nullable": true
                    },
                    "autoMatched": {
                      "type": "boolean"
                    }
                  }
                },
                "vatRate": {
                  "type": "object",
                  "nullable": true,
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "rate": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "nullable": true
                    },
                    "autoMatched": {
                      "type": "boolean"
                    }
                  }
                },
                "project": {
                  "type": "object",
                  "nullable": true,
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "costUnit": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                "team": {
                  "type": "object",
                  "nullable": true,
                  "description": "null if Team is not assigned",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "costCenter": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Event": {
        "type": "object",
        "properties": {
          "eventType": {
            "type": "string",
            "description": "The type of event."
          }
        }
      }
    },
    "requestBodies": {
      "AccountingTransactionUpdatedCallback": {
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Event"
                },
                {
                  "$ref": "#/components/schemas/AccountingTransactionCallback"
                }
              ]
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
```