---
updatedAt: 2026-06-06T07:52:57.000Z
agentTools:
  projectIndex: https://developers.paygreen.fr/llms.txt
---

# Cancel Payment Order

This route allows you to cancel a pending Payment Order. If you need to cancel a Payment Order that contains payment authorizations, use Refund route instead.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Payment API",
    "description": "This API processes PayGreen V3 payment",
    "version": "1.46.3"
  },
  "servers": [
    {
      "url": "https://api.paygreen.fr",
      "description": "Production environment"
    },
    {
      "url": "https://sb-api.paygreen.fr",
      "description": "Sandbox environment"
    }
  ],
  "paths": {
    "/payment/payment-orders/{id}/cancel": {
      "post": {
        "tags": [
          "Payment Orders"
        ],
        "summary": "Cancel Payment Order",
        "description": "This route allows you to cancel a pending Payment Order. If you need to cancel a Payment Order that contains payment authorizations, use Refund route instead.",
        "operationId": "post_cancel_payment_order",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PaymentOrder/properties/id"
            },
            "example": "po_4d83fc465b944b5ca78d01093896f5b4"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the cancelled Payment Order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentOrder"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Payment Order not found"
          },
          "409": {
            "description": "Conflict the payment order is locked for another operation"
          },
          "422": {
            "description": "Unprocessable request"
          },
          "503": {
            "description": "Service unavailable"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Address": {
        "required": [
          "city",
          "country",
          "line1",
          "postal_code"
        ],
        "properties": {
          "city": {
            "description": "The city of the address",
            "type": "string",
            "minimum": 1,
            "maxLength": 255,
            "minLength": 1,
            "example": "Rouen"
          },
          "country": {
            "description": "The country code of the address, it must be an ISO 3166-1 alpha-2",
            "type": "string",
            "maxLength": 2,
            "minLength": 2,
            "example": "FR"
          },
          "line1": {
            "description": "The first line of the address",
            "type": "string",
            "minimum": 1,
            "maxLength": 255,
            "minLength": 1,
            "example": "107 Allée Francois Mitterand"
          },
          "line2": {
            "description": "The second line of the address",
            "type": "string",
            "minimum": 1,
            "maxLength": 255,
            "minLength": 1,
            "example": "Line 2",
            "nullable": true
          },
          "postal_code": {
            "description": "The postal code of the address",
            "type": "string",
            "minimum": 1,
            "maxLength": 10,
            "minLength": 1,
            "example": "76100"
          },
          "state": {
            "description": "The state of the address",
            "type": "string",
            "minimum": 1,
            "maxLength": 255,
            "minLength": 1,
            "example": "Normandie",
            "nullable": true
          },
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "nullable": true
          }
        },
        "type": "object"
      },
      "UuidInterface": {
        "type": "object"
      },
      "Buyer": {
        "required": [
          "id",
          "first_name",
          "last_name",
          "email",
          "created_at"
        ],
        "properties": {
          "id": {
            "description": "The unique identifier of this Buyer",
            "type": "string",
            "pattern": "buy_[0-9a-f]{32}"
          },
          "object": {
            "description": "Object type",
            "type": "string",
            "default": "buyer"
          },
          "billing_address": {
            "description": "The billing address of the Buyer",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ]
          },
          "reference": {
            "description": "A reference you can use to identify this Buyer",
            "type": "string",
            "maximum": 50,
            "minimum": 1,
            "maxLength": 50,
            "minLength": 1,
            "nullable": true
          },
          "first_name": {
            "description": "The first name of the Buyer",
            "type": "string",
            "maximum": 50,
            "minimum": 1,
            "maxLength": 50,
            "minLength": 1
          },
          "last_name": {
            "description": "The last name of the Buyer",
            "type": "string",
            "maximum": 50,
            "minimum": 1,
            "maxLength": 50,
            "minLength": 1
          },
          "email": {
            "description": "The e-mail address of the Buyer",
            "type": "string",
            "format": "email"
          },
          "phone_number": {
            "description": "The phone number of the Buyer",
            "type": "string",
            "maximum": 20,
            "maxLength": 20,
            "nullable": true
          },
          "donor_id": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/UuidInterface"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "Instrument": {
        "required": [
          "id",
          "platform",
          "billing_typology",
          "created_at"
        ],
        "properties": {
          "id": {
            "description": "The unique identifier of this Instrument",
            "type": "string",
            "pattern": "ins_[0-9a-f]{32}"
          },
          "buyer": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Buyer"
              }
            ]
          },
          "platform": {
            "description": "The platform on which this Instrument can be used",
            "type": "string",
            "enum": [
              "bank_card",
              "amex",
              "ancv",
              "swile",
              "mcv",
              "restoflash",
              "conecs",
              "apple_pay",
              "edenred",
              "google_pay",
              "bancontact",
              "klarna"
            ]
          },
          "reuse_allowed": {
            "type": "boolean",
            "default": true,
            "nullable": true
          },
          "expired": {
            "type": "boolean",
            "default": false,
            "nullable": true
          },
          "paygreen_expiration": {
            "type": "boolean",
            "default": false,
            "nullable": true
          },
          "last_used_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expiry_month": {
            "type": "integer",
            "nullable": true
          },
          "expiry_year": {
            "type": "integer",
            "nullable": true
          },
          "scheme": {
            "type": "string",
            "nullable": true
          },
          "last4": {
            "type": "string",
            "nullable": true
          },
          "bin": {
            "type": "string",
            "nullable": true
          },
          "issuer": {
            "description": "The entity that issued this payment method when available.",
            "type": "string",
            "example": "pluxee",
            "nullable": true
          },
          "issuer_country": {
            "type": "string",
            "nullable": true
          },
          "daily_balance": {
            "type": "integer",
            "nullable": true
          },
          "authorized": {
            "type": "boolean",
            "default": false
          },
          "billing_typology": {
            "description": "The typology of this Instrument",
            "type": "string",
            "enum": [
              "euro_zone",
              "outside_euro_zone",
              "business_card"
            ]
          },
          "detached_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "Currency": {
        "type": "object"
      },
      "SellingContract": {
        "required": [
          "id",
          "shop_id",
          "number",
          "mcc",
          "max_amount",
          "status",
          "type",
          "created_at"
        ],
        "properties": {
          "id": {
            "description": "The unique identifier of this Selling Contract",
            "type": "string",
            "pattern": "sc_[0-9a-f]{32}"
          },
          "object": {
            "type": "string",
            "default": "selling_contract"
          },
          "shop_id": {
            "type": "string",
            "pattern": "sh_[0-9a-f]{32}"
          },
          "number": {
            "description": "The number, or identifier, of the selling contract you have with your bank - check with your bank for more informations",
            "type": "string"
          },
          "mcc": {
            "description": "Merchant Category Code (ISO-18245)",
            "type": "integer"
          },
          "max_amount": {
            "description": "The maximum amount allowed by your selling contract",
            "type": "integer"
          },
          "status": {
            "description": "The status of the selling contract",
            "type": "string",
            "enum": [
              "created",
              "processing",
              "validated",
              "disabled"
            ]
          },
          "type": {
            "description": "The type of the selling contract",
            "type": "string",
            "enum": [
              "vads",
              "moto"
            ]
          },
          "iban": {
            "description": "The IBAN of the selling contract",
            "type": "string",
            "pattern": "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$",
            "nullable": true
          },
          "bic": {
            "description": "The BIC of the selling contract",
            "type": "string",
            "pattern": "^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "PaymentConfig": {
        "required": [
          "id",
          "shop_id",
          "platform",
          "status",
          "created_at"
        ],
        "properties": {
          "id": {
            "description": "The unique identifier of this Payment Config",
            "type": "string",
            "pattern": "pc_[0-9a-f]{32}"
          },
          "object": {
            "type": "string",
            "default": "payment_config"
          },
          "shop_id": {
            "type": "string",
            "pattern": "sh_[0-9a-f]{32}"
          },
          "platform": {
            "type": "string",
            "enum": [
              "bank_card",
              "amex",
              "ancv",
              "swile",
              "mcv",
              "restoflash",
              "conecs",
              "apple_pay",
              "edenred",
              "google_pay",
              "bancontact",
              "klarna"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "created",
              "pending",
              "validated",
              "enabled",
              "disabled",
              "deleted",
              "invalid"
            ]
          },
          "currency": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Currency"
              }
            ]
          },
          "selling_contract": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/SellingContract"
              }
            ]
          },
          "platform_options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "Status": {
        "type": "object"
      },
      "Code": {
        "type": "object"
      },
      "Operation": {
        "required": [
          "id",
          "status",
          "type",
          "created_at"
        ],
        "properties": {
          "id": {
            "description": "The unique identifier of this Operation",
            "type": "string",
            "pattern": "op_[0-9a-f]{32}"
          },
          "object": {
            "type": "string",
            "default": "operation"
          },
          "payment_config": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentConfig"
              }
            ]
          },
          "instrument": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Instrument"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "code": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Code"
              }
            ]
          },
          "platform_code": {
            "type": "integer",
            "nullable": true
          },
          "type": {
            "description": "Type of operation",
            "type": "string",
            "enum": [
              "payment",
              "refund",
              "verification"
            ]
          },
          "amount": {
            "description": "Amount of operation in centime",
            "type": "integer",
            "default": 0,
            "example": 1000
          },
          "authorized_amount": {
            "type": "integer",
            "nullable": true
          },
          "donations_amount": {
            "type": "integer",
            "nullable": true
          },
          "authorization_code": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "captured_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "fees": {
            "description": "The percentage part of PayGreen fees, processed when operation is captured. Minor currency unit.",
            "type": "integer",
            "nullable": true
          },
          "cost": {
            "description": "The fixed part of PayGreen fees. Minor currency unit.",
            "type": "integer",
            "nullable": true
          },
          "authorized_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "type": "object"
      },
      "Mode": {
        "type": "object"
      },
      "Transaction": {
        "required": [
          "id",
          "operations",
          "status",
          "created_at",
          "original_amount",
          "mode",
          "currency"
        ],
        "properties": {
          "id": {
            "description": "The unique identifier of this Transaction",
            "type": "string",
            "pattern": "tr_[0-9a-f]{32}"
          },
          "object": {
            "type": "string",
            "default": "transaction"
          },
          "amount": {
            "type": "integer",
            "default": 0
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Operation"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "expired",
              "canceled",
              "authorized",
              "partly_captured",
              "captured",
              "error",
              "refused",
              "refunded",
              "partly_refunded"
            ]
          },
          "merchant_initiated": {
            "type": "boolean",
            "default": false,
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "original_amount": {
            "description": "The original amount of this Transaction",
            "type": "integer"
          },
          "has_dispute": {
            "type": "boolean",
            "default": false
          },
          "payment_order_id": {
            "type": "string",
            "nullable": true
          },
          "mode": {
            "$ref": "#/components/schemas/Mode"
          },
          "buyer": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Buyer"
              }
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "reference": {
            "type": "string",
            "nullable": true
          },
          "shop_name": {
            "type": "string",
            "nullable": true
          }
        },
        "type": "object"
      },
      "Donation": {
        "required": [
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      },
      "PaymentOrder": {
        "required": [
          "id",
          "buyer",
          "code",
          "currency",
          "eligible_amounts",
          "metadata",
          "details",
          "original_amount",
          "max_operations",
          "platforms",
          "requester_shop_id",
          "shop_id",
          "status",
          "transactions",
          "donations",
          "platform_options",
          "created_at"
        ],
        "properties": {
          "id": {
            "description": "The unique identifier of this Payment Order",
            "type": "string",
            "pattern": "po_[0-9a-f]{32}"
          },
          "object": {
            "type": "string",
            "default": "payment_order"
          },
          "amount": {
            "description": "The amount of the Payment Order in cents",
            "type": "integer",
            "default": 0,
            "maximum": 2000000001,
            "exclusiveMaximum": true,
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "auto_capture": {
            "type": "boolean",
            "default": true
          },
          "capture_on": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "buyer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Buyer"
              }
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              ""
            ]
          },
          "currency": {
            "type": "string",
            "enum": [
              "eur"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 255,
            "nullable": true
          },
          "eligible_amounts": {
            "type": "object"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "metadata": {
            "type": "string"
          },
          "details": {
            "type": "object"
          },
          "object_secret": {
            "description": "Used to fetch payment order while authenticated with public key",
            "type": "string",
            "nullable": true
          },
          "original_amount": {
            "description": "The original amount of the Payment Order",
            "type": "integer"
          },
          "partial_allowed": {
            "type": "boolean",
            "default": false,
            "nullable": true
          },
          "max_operations": {
            "type": "integer",
            "maximum": 255,
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "bank_card",
                "amex",
                "ancv",
                "swile",
                "mcv",
                "restoflash",
                "conecs",
                "apple_pay",
                "edenred",
                "google_pay",
                "bancontact",
                "klarna"
              ]
            }
          },
          "reference": {
            "type": "string",
            "nullable": true
          },
          "requester_shop_id": {
            "type": "string",
            "pattern": "sh_[0-9a-f]{32}"
          },
          "shipping_address": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ]
          },
          "shop_id": {
            "type": "string",
            "pattern": "sh_[0-9a-f]{32}"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "authorized",
              "successed",
              "ongoing",
              "interrupted",
              "expired",
              "completed",
              "canceled",
              "refused",
              "error",
              "refunded"
            ]
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            }
          },
          "donations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Donation"
            }
          },
          "platform_options": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fees": {
            "description": "The optional marketplace fees (does not include PayGreen fees). Minor currency unit.",
            "type": "integer",
            "nullable": true
          },
          "plbs": {
            "description": "Only for bank_card platforms. Set to true to extend the authorisation period to 30 days, if your business is in an eligible category (eg. hotel, rental...).",
            "type": "boolean",
            "default": false
          },
          "block_redirection": {
            "type": "boolean",
            "default": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "bearerFormat": "JWT",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "tags": [
    {
      "name": "Payment Orders"
    }
  ]
}
```