---
agentTools:
  projectIndex: https://docs.bictorys.com/llms.txt
---

# Update payment link details

Use this endpoint to update payment link details

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "PaymentLink",
    "description": "This API manage payment links. Merchants can create payment link and share to their customs for payment",
    "contact": {
      "email": "support@bictorys.com"
    },
    "version": "1.0.0",
    "x-bictory-api-paymentlink": "paymentlink-management",
    "x-bictorys-api-type": "public"
  },
  "servers": [
    {
      "url": "https://api.test.bictorys.com/paymentlink-management/v1",
      "description": "Test Environment"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "PaymentLinks",
      "description": "API endpoints to manage payment Links"
    }
  ],
  "paths": {
    "/paymentlinks/{paymentLinkId}": {
      "put": {
        "tags": [
          "PaymentLinks"
        ],
        "summary": "Update payment link details",
        "description": "Use this endpoint to update payment link details\n",
        "operationId": "updatePaymentLink",
        "parameters": [
          {
            "name": "paymentLinkId",
            "in": "path",
            "description": "Unique identifier of the payment link.\n",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "example": "638d4133957e3caf63e6b79c"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentLinkObject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "the payment link is updated successfully\n"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "The caller is not authenticated"
          },
          "403": {
            "description": "Access rights not sufficient"
          },
          "404": {
            "description": "Cannot not found payment link. Check paymentLinkId"
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PaymentLinkObject": {
        "type": "object",
        "properties": {
          "id": {
            "description": "unique uuid of the payment link",
            "readOnly": true,
            "type": "string",
            "format": "uuid",
            "example": "fbd2053b-638d-4133-957e-3caf63e6b79c"
          },
          "reference": {
            "description": "payment link reference",
            "type": "string",
            "example": "3245GOF456"
          },
          "description": {
            "description": "short description intended to the customer",
            "type": "string",
            "example": "Kindly process to the payment of the october bill"
          },
          "amount": {
            "description": "Required. Amount to collect from customer",
            "type": "number",
            "format": "double",
            "example": 5000
          },
          "currency": {
            "description": "The currency in which the customer will be charged.\n\nSupported values:\n- XOF\n- EUR, USD (customer pay in EUR, USD, Merchant will be settled in XOF)\n",
            "type": "string",
            "example": "XOF"
          },
          "dueDate": {
            "description": "paymentlink due date",
            "type": "string",
            "format": "date",
            "example": "2024-04-24"
          },
          "status": {
            "description": "status of the payment link",
            "$ref": "#/components/schemas/PaymentLinkStatus"
          },
          "paymentUrl": {
            "description": "payment url. This url link is sent to the customer to allow him to pay the payment link.",
            "type": "string",
            "readOnly": true,
            "example": "https://api.bictorys.com/invoice-management/pay/437bbc50a7a58e5660ad?op_token=167bbc50a7a58e5660ad"
          },
          "redirectUrlAfterPayment": {
            "description": "Optional. Provide an url if you want to redirect customer after successful payment is done.",
            "type": "string",
            "example": "https://merchant-online-store"
          },
          "enableMultiplePayment": {
            "description": "By default, only one payment is authorized on each payment link. In case you want to allow multiple payment ( recurrent payment) on this link, set the value to true",
            "type": "boolean",
            "example": true,
            "default": false
          },
          "nbrPayments": {
            "description": "If enableMultiplePayment is set true, the syteme will count the number of success payments performed on this link. This field is ignored if enableMultiplePayment is set to false",
            "type": "integer",
            "readOnly": true,
            "example": 5
          },
          "deviceId": {
            "description": "Id of the device that has created the request.",
            "type": "string",
            "example": "ftui-mmmst"
          },
          "cashier": {
            "description": "Optional. Identifier of the cashier (e.g. email, name, or sessionId). If not provided, the cashier email will be used by default.\n",
            "type": "string",
            "example": "cashier1@company.com"
          },
          "enableCardPaymentOnly": {
            "description": "If you want allow the customer to pay only with bank card",
            "type": "boolean",
            "example": true,
            "default": false
          },
          "createdAt": {
            "description": "The date time that record was created in our system.",
            "type": "string",
            "readOnly": true,
            "example": "2022-06-20T17:17:11Z"
          },
          "updatedAt": {
            "description": "The date time that record was updated in our system.",
            "type": "string",
            "readOnly": true,
            "example": "2022-06-20T17:17:11Z"
          }
        },
        "anyOf": [
          {
            "properties": {
              "customerName": {
                "description": "Optional. Name of the customer. is ignored.",
                "type": "string",
                "example": "Fatou Diop"
              },
              "customerPhone": {
                "description": "Customer phone number. This field must be used if you are making batch and want to notify customer by sms or whatsApp.",
                "type": "string",
                "example": 227723456789
              },
              "customerEmail": {
                "description": "Customer email. This field must be used if you are making a batch and want to notify customer by Email.",
                "type": "string",
                "example": "fatou.diop@example.com"
              },
              "customerLocale": {
                "description": "User locale, language is lower case. Country in upper case",
                "type": "string",
                "default": "fr-FR",
                "example": "fr-SN"
              }
            }
          },
          {
            "properties": {
              "customerId": {
                "description": "unique identifier of the customer, recipient of the payment link",
                "type": "string",
                "format": "uuid",
                "example": "d2d2053b-638d-4133-957e-3caf63e6b79c"
              }
            }
          }
        ],
        "required": [
          "amount",
          "currency"
        ]
      },
      "PaymentLinkStatus": {
        "description": "Payment link status",
        "type": "string",
        "enum": [
          "opened",
          "paid",
          "paid_in_cash",
          "expired"
        ],
        "example": "paid"
      },
      "BadRequestError": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Bad request.",
            "default": "Bad request."
          },
          "details": {
            "description": "error details",
            "type": "string",
            "example": "E400-0 card info is missing",
            "enum": [
              "E400-21: representative object is missing",
              "E400-1: merchant name is missing",
              "E400-4: merchant country is missing",
              "E400-2: representative email is missing",
              "E400-1: representative name is missing",
              "E400-0: representative address is missing",
              "E400-0: Unexpected Error",
              "E400-6: Amount is missing",
              "E400-10: Invalid Country format",
              "E400-12: Currency is missing",
              "E400-13: PaymentType is missing",
              "E400-0: NotificationDict is missing",
              "E400-0: Notification value is missing",
              "E400-0: SettingDict is missing",
              "E400-0: Setting value is missing or not allowed",
              "E400-18: IBAN is missing",
              "E400-19: beneficiaryName is missing",
              "E400-0: Header media-type is missing",
              "E400-0: Header Content-Type is missing",
              "E400-22: Unsupported media type. Supported type are pdf, jpeg and png",
              "E400-23: Unsupported media type. use png",
              "E400-16: File size must not exceed 4ko",
              "E400-17: File size must not exceed 1Mo",
              "E400-0: password is missing",
              "E401-1: bearer token or apikey is missing",
              "E401-2: bearer token is missing",
              "E401-4: Cannot delete public key",
              "E400-0: apikey is missing",
              "E403-1: Access right not sufficient",
              "E400-0: Bad id is passed",
              "E400-7: Invalid Name Format",
              "E400-8: Invalid Email Format",
              "E400-9: Invalid phone number Format",
              "E400-3: phone number is required",
              "E400-20: Expired Or Bad OTP or Bad PhoneNumberId",
              "E400-20: Expired Or Bad OTP or Bad MerchantId",
              "E400-20: Expired Or Bad OTP",
              "E403-2: 2FA authentication is required",
              "E409-1 Merchant Representation has already an account",
              "E400-24: Selected Currency is not yet supported for this country",
              "E400-20: Resource is no longer available",
              "E400-25: Payment type is disabled by merchant",
              "E400-0: Bad transactionId is passed",
              "E400-0: Bad transaction type is passed",
              "E400-26: Invoice or Order is paid or expired",
              "E400-27: payment link is paid or expired",
              "E400-0: Missing or Bad search key",
              "E400-28: Money transfer is not authorized for this merchant",
              "E400-0 offline checkout write is missing",
              "E401-1: Invalid Token",
              "E401-3: Invalid apikey",
              "E400-0: type is missing in request body",
              "E400-0: bad or missing scope in request body",
              "E400-0: unknown apikeyId",
              "E400-0: account status is missing",
              "E400-0: merchantId is missing",
              "E400-0: callbackUrl is missing",
              "E400-0: bad type is passed",
              "E400-0: bad cardId is passed",
              "E400-0: bad merchant id is passed",
              "E400-0: unknown or unauthorized permission is passed",
              "E400-0 card info is missing",
              "E400-01: Order name is missing",
              "E400-0: Order id must be in UUID format",
              "E400-0: Same Idempotency is passed",
              "E400-29: product price is missing in a Item line Object",
              "E400-30: product quantity is missing in a Item line Object",
              "E400-31: Due date is required",
              "E400-1: Name is missing",
              "E400-32: Already expired",
              "E404-1: Cannot find resource",
              "E400-33: Wrong payment type or disabled",
              "E400-34: User does not have a secret Code",
              "E400-35: SecretCode is locked, you must reset it",
              "E400-36: Wrong secret code is passed",
              "E400-37: Secret code is missing",
              "E400-38: Insufficient balance",
              "E400-00: country is missing",
              "E400-39: Wrong country is passed",
              "E400-40: Invoice is expired",
              "E400-41: Wrong date format is used",
              "E400-42: Invalid Category format",
              "E400-43: Invalid City format",
              "E400-44:Merchant does not exist",
              "E400-45: Invalid Reference format",
              "E400-46: Invalid paymentReference format",
              "E400-47: Invoice is already paid",
              "E400-48: Payment link already paid",
              "E400-49: Error from PSP, Check your account",
              "E400-50: Amount exceed available capture",
              "E400-51: Wrong secret code is passed",
              "E400-52: You must register you phone number first",
              "E400-53: You don't have a secret code",
              "E400-54: You secret code is locked, do reset",
              "E400-0: Payment failed",
              "E401-5: Your Account is restricted",
              "E401-6: Your Account is not activated"
            ]
          }
        }
      },
      "InternalServerError": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "An error has occurred.",
            "default": "An error has occurred."
          },
          "details": {
            "type": "string",
            "example": "An error has occurred.",
            "default": "An error has occurred."
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 102,
      "1": 30,
      "2": 138,
      "3": 60,
      "4": 78,
      "5": 246,
      "6": 236,
      "7": 0,
      "8": 16,
      "9": 32,
      "10": 141,
      "11": 242
    }
  }
}
```