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

# Cancel Payment Link

This route allows you to cancel a pending Payment Link.

# 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-links/{id}/cancel": {
      "post": {
        "tags": [
          "Payment Links"
        ],
        "summary": "Cancel Payment Link",
        "description": "This route allows you to cancel a pending Payment Link.",
        "operationId": "post_cancel_payment_link",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PaymentLink/properties/id"
            },
            "example": "pl_4d83fc465b944b5ca78d01093896f5b4"
          }
        ],
        "responses": {
          "200": {
            "description": "Payment Link successfully cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLink"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Unprocessable request"
          }
        },
        "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"
      },
      "PaymentLink": {
        "required": [
          "id",
          "reference",
          "buyer",
          "currency",
          "expires_at",
          "platforms",
          "shop_id",
          "requester_shop_id",
          "status"
        ],
        "properties": {
          "id": {
            "description": "The unique identifier of this Payment Link",
            "type": "string",
            "pattern": "pl_[0-9a-f]{32}"
          },
          "object": {
            "type": "string",
            "default": "payment_link"
          },
          "reference": {
            "type": "string"
          },
          "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
          },
          "plbs": {
            "type": "boolean",
            "default": false
          },
          "buyer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Buyer"
              }
            ]
          },
          "currency": {
            "type": "string",
            "enum": [
              "eur"
            ]
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "enum": [
              "bank_card",
              "amex",
              "ancv",
              "swile",
              "mcv",
              "restoflash",
              "conecs",
              "apple_pay",
              "edenred",
              "google_pay",
              "bancontact",
              "klarna"
            ]
          },
          "shop_id": {
            "type": "string",
            "pattern": "sh_[0-9a-f]{32}"
          },
          "requester_shop_id": {
            "$ref": "#/components/schemas/UuidInterface"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "used",
              "canceled"
            ]
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "bearerFormat": "JWT",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "tags": [
    {
      "name": "Payment Links"
    }
  ]
}
```