> ## Documentation Index
> Fetch the complete documentation index at: https://docs.singapay.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Update v1 (Legacy)

> Updates an existing payment link within the specified account. Only mutable fields are accepted in the request body.



## OpenAPI

````yaml https://payment-b2b.singapay.id/api/docs/merchant-api.json put /api/v1.0/payment-link-manage/{account_id}/{payment_link_id}
openapi: 3.1.0
info:
  title: Singa Merchant API
  description: >-
    OpenAPI specification for the merchant/partner HTTP API. All routes below
    are additionally protected by `ip.whitelisted.merchant` — the caller IP must
    be registered for the credential or merchant. Obtain a JWT using `POST
    /api/v1.0/access-token/b2b` (Basic auth) or `POST
    /api/v1.1/access-token/b2b` (X-Signature) before calling secured endpoints.
  version: 1.0.0
servers:
  - url: https://sandbox-payment-b2b.singapay.id
    description: >-
      API host. Paths include `/api` prefix (see `RouteServiceProvider`).
      Replace scheme/host with your environment.
security: []
tags:
  - name: Security
    description: >-
      Merchant authentication (`OauthMerchantTokenController`). **v1.1** B2B
      token uses `X-CLIENT-ID`, `X-PARTNER-ID`, and `X-Signature` (no Basic
      auth). Secured routes also require the issued Bearer JWT plus
      `X-PARTNER-ID`.
  - name: Accounts
    description: >-
      Account management (`routes/merchantApiRoute.php`, `v1.0`). Path parameter
      `{id}` is always the account ULID.
  - name: Balance Inquiry
    description: >-
      Merchant and per-account balance inquiry (`BalanceController`, `v1.0`).
      Path `account_id` is the account ULID.
  - name: Statements
    description: >-
      Per-account statement list and detail
      (`AccountController::accountStatements`, `accountStatementDetail`, prefix
      `v1.0/statements`). Flugger responses; detail path param `{statement_id}`
      maps to `statements.transaction_id`.
  - name: Payment Link
    description: >-
      Payment link CRUD and payment-method catalog (`PaymentLinkApiController`,
      prefix `v1.0/payment-link-manage`). `account_id` is ULID;
      `payment_link_id` is numeric `payment_links.id`.
  - name: Payment Link History
    description: >-
      Payment link transaction/history listing and detail
      (`PaymentLinkApiController`, prefix `v1.0/payment-link-histories`).
      `history_id` is numeric `payment_link_histories.id`.
  - name: Virtual Account
    description: >-
      Native VA CRUD (`VirtualAccountController`, prefix
      `v1.0/virtual-accounts`). `account_id` and `virtual_account_id` are ULIDs.
  - name: VA Transaction
    description: >-
      VA money-in transaction listing and detail (`VirtualAccountController`,
      prefix `v1.0/va-transactions`).
  - name: QRIS (Money In)
    description: >-
      MPM dynamic QRIS list, show, and generate (`QrisMpmDynamicApiController`,
      prefix `v1.0/qris-dynamic`).
  - name: QRIS (Money Out)
    description: >-
      Issuer MPM decode/inquiry, payment credit (money out), and transaction
      status (`QrisIssuerMpmController`, `QrisApiV2Controller::checkStatus`,
      prefix `v2.0/qris`). Related list/detail: `GET
      /api/v2.0/qris/transaction/...`.
  - name: E-Wallet (Money In)
    description: >-
      E-Wallet Native checkout and transactions (`EwalletNativeApiController`,
      `EwalletNativeTransactionApiController`, `EwalletNativeV2ApiController`).
      Paths include `v1.0/ewallet-native`, `v1.0/ewallet-native-transactions`,
      and `v2.0/ewallet-native`.
  - name: E-Wallet (Money Out)
    description: >-
      E-wallet disbursement / top-up to beneficiary wallets
      (`EWalletTopUpController`, prefix `v2.0/ewallet`). Responses use the
      custom **`MerchantV2ApiEnvelope`** with **`MerchantV2ResponseCode`**
      (SP000–SP020).
  - name: Card (Money In)
    description: >-
      One-time card payment, cancel, and inquiry
      (`CardPaymentMerchantApiController`, prefix `v2.0/card`).
  - name: Subscription (Recurring)
    description: >-
      Credit-card recurring subscription plans (`SubscriptionPlanApiController`,
      prefix `v2.0/recurring`). Plan `{id}` is UUID (`sub_plans.id`).
  - name: Direct Debit
    description: >-
      Direct Debit — bind a customer bank account once via hosted webview, then
      charge it host-to-host (`DirectDebitMerchantController`, prefix
      `v2.0/direct-debit`). Binding `{binding_id}` and transaction
      `{transaction_id}` are UUIDs. Responses use the
      **`MerchantV2ApiEnvelope`** with standard Singapay SP000–SP020 dictionary
      codes and messages. Field-level validation detail is returned in
      `data.errors` for **SP018**. The `/charge` endpoint is additionally
      protected by **`X-Signature`** + **`X-Timestamp`**
      (`verify.signature-internal`); see operation parameters for the signing
      scheme. Asynchronous outcomes (bind / unbind / charge) are HTTP POST
      callbacks to `callback_urls.direct_debit_notif_url` — see the Direct Debit
      **webhooks** (`directDebitBindingNotification`,
      `directDebitUnbindingNotification`, `directDebitTransactionNotification`).
      All three share that single URL; discriminate on `event`.
  - name: Account Transfer
    description: >-
      Move funds between sub-accounts within the same merchant
      (`AnotherAccountApiController`, prefix `v1.0/account-transfer`). The
      transfer endpoint requires request signature headers
      (`verify.signature-internal`). Both accounts must belong to the
      authenticated merchant and be accessible to the credential.
  - name: Disbursement (Money Out)
    description: >-
      Bank disbursement (`DisbursementController` **v1.0**,
      `DisbursementV2Controller` **v2.0**). **v1.0**
      list/show/fee/beneficiary/transfer use Flugg envelopes; v1 inquiry-status
      uses the **custom v2 envelope** (`MerchantV2ApiEnvelope`, codes
      **SP000–SP020**). **v2.0** check-beneficiary, transfer, and inquiry-status
      use the same custom envelope — see component schema
      **`MerchantV2ResponseCode`** for the full response code table.
  - name: Cardless Withdrawal
    description: >-
      Cardless withdrawal API for initiating ATM cash withdrawals without a
      physical card. Supports creating withdrawals with OTP generation, listing
      transaction history, viewing transaction details, canceling pending
      withdrawals, and deleting canceled records. All endpoints use the
      `v1.0/cardless-withdrawals` route prefix and the standard success/error
      response envelope. Path parameter `{id}` refers to the `transaction_id`
      (platform-assigned business identifier).
paths:
  /api/v1.0/payment-link-manage/{account_id}/{payment_link_id}:
    put:
      tags:
        - Payment Link
      summary: Update v1 (Legacy)
      description: >-
        Updates an existing payment link within the specified account. Only
        mutable fields are accepted in the request body.
      operationId: paymentLinkManageUpdate
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            description: Account identifier in ULID format.
            type: string
        - name: payment_link_id
          in: path
          required: true
          schema:
            description: Payment link identifier (`payment_links.id`).
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePaymentLinkRequest'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponderSuccessPaymentLink'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponderErrorEnvelope401'
        '404':
          description: Payment link not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponderErrorEnvelope404'
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponderErrorEnvelope405'
        '422':
          description: Validation error (including `max_usage` less than current usage)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponderErrorEnvelope422'
      security:
        - BearerAuth: []
          PartnerId: []
components:
  schemas:
    UpdatePaymentLinkRequest:
      required:
        - max_usage
        - status
      properties:
        required_customer_detail:
          description: >-
            Whether customer details are required at checkout. If omitted,
            defaults to false.
          type: boolean
          example: true
        customer_pays_fee:
          description: >-
            When true, payment method fees are added to the amount charged to
            the payer. Omit to keep the current value.
          type:
            - boolean
            - 'null'
          example: false
        max_usage:
          description: >-
            Maximum number of times this link may be used for payment. Must be
            greater than or equal to the current usage count.
          type: integer
          maximum: 1000000
          minimum: 1
          example: 1
        expired_at:
          description: >-
            Optional expiration time as a Unix timestamp in milliseconds (13
            digits).
          type:
            - string
            - 'null'
          pattern: ^\d{13}$
          example: '1705305600000'
        status:
          description: Payment link lifecycle status.
          type: string
          enum:
            - open
            - closed
            - expired
          example: open
        whitelisted_payment_method:
          description: >-
            Restricts accepted payment methods for this link. Send an empty
            array to allow all active payment-link methods. Each entry must be a
            valid payment method code from the payment methods catalog.
          type:
            - array
            - 'null'
          items:
            type: string
        redirect_url:
          description: Optional URL to redirect the payer after payment flow completion.
          type:
            - string
            - 'null'
          format: uri
          maxLength: 2048
          example: https://example.com/payment-link
        success_redirect_url:
          description: >-
            URL to redirect the payer after successful payment. Must start with
            http:// or https://.
          type:
            - string
            - 'null'
          format: uri
          maxLength: 2048
          example: https://merchant.example.com/payment/success
        expired_redirect_url:
          description: >-
            URL to redirect the payer after payment expiry. Must start with
            http:// or https://.
          type:
            - string
            - 'null'
          format: uri
          maxLength: 2048
          example: https://merchant.example.com/payment/expired
        optional_metadata:
          description: Optional merchant-defined metadata for this payment link.
          type:
            - object
            - 'null'
          example:
            invoice_number: INV20240513001
          additionalProperties: true
      type: object
    ResponderSuccessPaymentLink:
      required:
        - status
        - success
      properties:
        status:
          description: HTTP status code.
          type: integer
          example: 200
        success:
          description: Indicates whether the request was successful.
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/PaymentLinkResource'
          description: Payment link resource payload.
      type: object
    ResponderErrorEnvelope401:
      required:
        - status
        - success
        - error
      properties:
        status:
          type: integer
          example: 401
        success:
          type: boolean
          example: false
        error:
          $ref: '#/components/schemas/ResponderErrorBody401'
      type: object
    ResponderErrorEnvelope404:
      required:
        - status
        - success
        - error
      properties:
        status:
          type: integer
          example: 404
        success:
          type: boolean
          example: false
        error:
          $ref: '#/components/schemas/ResponderErrorBody404'
      type: object
    ResponderErrorEnvelope405:
      required:
        - status
        - success
        - error
      properties:
        status:
          type: integer
          example: 405
        success:
          type: boolean
          example: false
        error:
          $ref: '#/components/schemas/ResponderErrorBody405'
      type: object
    ResponderErrorEnvelope422:
      required:
        - status
        - success
        - error
      properties:
        status:
          type: integer
          example: 422
        success:
          type: boolean
          example: false
        error:
          $ref: '#/components/schemas/ResponderErrorBody422'
        data:
          type: object
          example:
            errors:
              field:
                - error message
          additionalProperties: true
      type: object
    PaymentLinkResource:
      description: >-
        Payment link resource returned by the API. Includes nested account
        details when available.
      properties:
        id:
          description: >-
            Payment link identifier. Use this value as `{payment_link_id}` (v1)
            or `{link_id}` (v2) in path parameters.
          type: integer
          example: 103
        reff_no:
          description: Merchant reference number assigned to the payment link.
          type: string
          example: INV20240513001
        title:
          description: >-
            Payment link title. On v1, this is the merchant-supplied `title`. On
            v2, `title` is not accepted as input — it is auto-set to `reff_no`.
          type: string
          example: Invoice Payment
        description:
          description: >-
            Free-text description for the payment link. v2 only (not accepted by
            v1 create/update).
          type:
            - string
            - 'null'
          example: 'Invoice #INV20240513001'
        source:
          description: >-
            How the payment link was created: `api v1`, `api v2`, or
            `dashboard`.
          type:
            - string
            - 'null'
          example: api v2
        payment_url:
          description: Hosted payment page URL for this payment link.
          type: string
          example: https://example.com/payment-link
        status:
          description: Configured payment link status.
          type: string
          example: open
        status_computed:
          description: >-
            System-computed status based on link configuration and expiration.
            Differs from `status` when the link is still stored as `open` but
            `expired_at` has already passed — no background job flips `status`
            itself, so `status_computed` is the field to trust for "is this
            actually payable right now".
          type: string
          example: open
        is_expired:
          description: Whether the payment link is currently expired.
          type: boolean
          example: false
        required_customer_detail:
          description: >-
            Whether the payer must fill in a customer-detail form at checkout
            (used for multi-use links, where the payer is not known in advance).
          type: boolean
          example: true
        is_multiple_payment:
          description: >-
            Whether this link accepts more than one successful payment
            (`max_usage` > 1 or unlimited).
          type: boolean
          example: false
        is_unlimited_usage:
          description: Whether this link has no usage cap (`max_usage` = 0).
          type: boolean
          example: false
        required_customer_fields:
          description: >-
            Which customer-detail fields are required from the payer at checkout
            when `required_customer_detail` is true.
          properties:
            name:
              type: boolean
              example: true
            phone:
              type: boolean
              example: false
            email:
              type: boolean
              example: false
          type: object
        customer_pays_fee:
          description: >-
            Whether payment method fees are charged to the payer. Always `false`
            for links created via v2 (not configurable in v2).
          type: boolean
          example: false
        max_usage:
          description: >-
            Maximum number of successful payments permitted. `0` means
            unlimited.
          type: integer
          example: 1
        current_usage:
          description: Current number of successful payments recorded for the link.
          type: integer
          example: 0
        expired_at:
          description: Expiration datetime in ISO 8601 format.
          type:
            - string
            - 'null'
          example: '2024-05-13T00:00:00Z'
        total_amount:
          description: Total payment amount for the payment link.
          type: number
          example: 150000
        items:
          description: >-
            Line items stored for the payment link. `null` when the link was
            created with `payment_link_type: "total"` (v2) or without item
            details.
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/PaymentLinkLineItemStored'
        whitelisted_payment_method:
          description: >-
            List of allowed payment method codes for this link. On v2, when the
            create/update request omits this field, it is auto-populated with
            whichever payment methods are actually eligible for `total_amount`
            at that time — never left empty.
          type: array
          items:
            type: string
        redirect_url:
          description: Redirect URL configured for post-payment flow.
          type:
            - string
            - 'null'
          example: https://example.com/payment-link
        success_redirect_url:
          description: Redirect URL for successful payment.
          type:
            - string
            - 'null'
          example: https://merchant.example.com/payment/success
        expired_redirect_url:
          description: Redirect URL for expired payment.
          type:
            - string
            - 'null'
          example: https://merchant.example.com/payment/expired
        customer_name:
          description: >-
            Pre-filled/known customer name. Only set on single-use (`max_usage`
            = 1) links where the merchant knows the payer in advance.
          type:
            - string
            - 'null'
          example: Jane Doe
        customer_email:
          description: Pre-filled/known customer email. Only set on single-use links.
          type:
            - string
            - 'null'
          example: jane@example.com
        customer_phone:
          description: >-
            Pre-filled/known customer phone number. Only set on single-use
            links.
          type:
            - string
            - 'null'
          example: '081234567890'
        optional_metadata:
          description: Merchant-defined metadata attached to the payment link.
          type:
            - object
            - 'null'
          additionalProperties: true
        payment_date:
          description: Last successful payment datetime in ISO 8601 format.
          type:
            - string
            - 'null'
          example: '2024-05-13T00:00:00Z'
        created_at:
          description: Resource creation datetime in ISO 8601 format.
          type:
            - string
            - 'null'
          example: '2024-05-13T00:00:00Z'
        updated_at:
          description: Last update datetime in ISO 8601 format.
          type:
            - string
            - 'null'
          example: '2024-05-13T00:00:00Z'
        account:
          oneOf:
            - $ref: '#/components/schemas/Account'
              description: Related account resource when available.
            - type: 'null'
          description: Related account resource when available.
          example:
            id: 1
            name: Account 1
      type: object
    ResponderErrorBody401:
      properties:
        code:
          type: integer
          example: 401
        message:
          type: string
          example: Unauthorized merchant, please sign in
      type: object
    ResponderErrorBody404:
      properties:
        code:
          type: integer
          example: 404
        message:
          type: string
          example: Account not found.
      type: object
    ResponderErrorBody405:
      properties:
        code:
          type: integer
          example: 4059901
        message:
          type: string
          example: >-
            The PATCH method is not supported for this route. Supported methods:
            GET, HEAD, POST.
      type: object
    ResponderErrorBody422:
      properties:
        code:
          type: integer
          example: 422
        message:
          type: string
          example: Validation error.
        errors:
          type: object
          example:
            field:
              - error message
      type: object
    PaymentLinkLineItemStored:
      properties:
        name:
          description: Line item name stored on the payment link.
          type: string
          example: Product A
        quantity:
          description: Stored quantity for the line item.
          type: integer
          example: 1
        unit_price:
          description: Stored unit price for the line item.
          type: number
          example: 150000
        subtotal:
          description: Calculated line item subtotal (`quantity x unit_price`).
          type: number
          example: 150000
      type: object
    Account:
      required:
        - id
        - name
        - status
      properties:
        id:
          description: Account ULID
          type: string
          example: 01K946KF851RK7FX075GJHBVKF
        account_number:
          type:
            - string
            - 'null'
          example: '000000000123'
        name:
          type: string
          example: John Doe
        status:
          description: >-
            Account status. `active` accounts can transact. `owned` accounts are
            created `active`; `managed` accounts are created `inactive` and only
            become `active` after BOSS KYB approval.
          type: string
          example: active
        account_type:
          description: >-
            Sub account type. `owned` = fully owned by the parent merchant (no
            KYB, active immediately). `partner` behaves the same as `owned` (no
            KYB, active immediately). `personal_managed`/`business_managed` =
            third-party business managed by the parent merchant (requires BOSS
            KYB approval before it can transact). `null` for legacy accounts
            created before this field existed.
          type:
            - string
            - 'null'
          enum:
            - owned
            - partner
            - personal_managed
            - business_managed
          example: owned
        kyb_status:
          description: >-
            KYB status for managed sub accounts only. `kyb_in_review` = pending
            or revision needed. `kyb_verified` = approved, account can transact.
            `null` for owned/legacy accounts.
          type:
            - string
            - 'null'
          enum:
            - kyb_in_review
            - kyb_verified
          example: kyb_in_review
        legal_name:
          description: >-
            Legal name for a managed sub account, populated only once its KYB is
            `kyb_verified`. For `business_managed` with `business_type`
            `company`, this is the legal company name. For `personal_managed`,
            or `business_managed` with `business_type` `individual`, this is the
            primary owner's full name. `null` for owned accounts, or managed
            accounts not yet verified.
          type:
            - string
            - 'null'
          example: PT Asia Kreatif Studio
        business_type:
          description: >-
            For `business_managed` accounts only: whether the sub-merchant
            self-onboarded as an individual/sole proprietorship or a registered
            company — chosen during KYB self-onboarding. `null` until the
            sub-merchant makes this choice, and always `null` for
            `owned`/`partner`/`personal_managed` accounts.
          type:
            - string
            - 'null'
          enum:
            - individual
            - company
          example: company
        brand_name:
          description: >-
            Brand name for a managed sub account, populated only once its KYB is
            `kyb_verified`. `null` for owned accounts, managed accounts not yet
            verified, or when no brand name was provided during KYB.
          type:
            - string
            - 'null'
          example: Asia Kreatif
        kyb_onboarding_url:
          description: >-
            KYB self-onboarding link for a managed sub account
            (`personal_managed`/`business_managed`) — a public, token-gated,
            single active link per account. The same URL stays valid across
            submit/reject/resubmit cycles until KYB is fully verified. On
            create, this is a freshly generated link; on `GET /accounts/{id}`
            and `GET /accounts`, it re-surfaces the account's current active
            link. `null` for `owned` accounts, or once KYB is fully verified
            (the link is revoked at that point).
          type:
            - string
            - 'null'
          format: uri
          example: >-
            https://sandbox-payment-b2b.singapay.id/kyb/0b0e5ad5957a7c2de066c2cde97e91089b605aae9afeba3398ff871cd1e99d54
        invite_members:
          description: >-
            List of email addresses of dashboard members who have access to this
            account.
          type: array
          items:
            type: string
            format: email
            example: john@example.com
          example:
            - john@example.com
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      description: >-
        JWT issued by `POST /api/v1.1/access-token/b2b`. Send `Authorization:
        Bearer <token>`.
      bearerFormat: JWT
      scheme: bearer
    PartnerId:
      type: apiKey
      description: Merchant API key (`Credential.api_key`). Required on every request.
      name: X-PARTNER-ID
      in: header

````