Update payment link | Moov Documentation

Update payment link

Update a payment link.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/transfers.write scope.

PATCH

/accounts/{accountID}/payment-links/{paymentLinkCode}

Ask

curl -X PATCH "https://api.moov.io/accounts/{accountID}/payment-links/{paymentLinkCode}" \
  -H "Authorization: Bearer {token}" \
  -H "X-Moov-Version: v2026.07.00" \
  -d '{
  "amount": {
    "currency": "USD",
    "value": 12099
  },
  "amountDetails": {
    "tax": {
      "currency": "USD",
      "valueDecimal": "9.25"
    }
  },
  "customer": {
    "requirePhone": true,
    "requireAddress": true
  }
}'

Ask

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.paymentLinks.update({
    accountID: "ddad6613-2350-446a-883b-f76abb2cd4ea",
    paymentLinkCode: "uc7ZYKrMhi",
    updatePaymentLink: {
      amount: {
        currency: "USD",
        value: 12099,
      },
      customer: {
        requireAddress: true,
        requirePhone: true,
      },
      amountDetails: {
        tax: {
          currency: "USD",
          valueDecimal: "9.25",
        },
      },
    },
  });

console.log(result);
}

run();

Ask

declare(strict_types=1);

require 'vendor/autoload.php';

use Moov\MoovPhp;
use Moov\MoovPhp\Models\Components;

$sdk = MoovPhp\Moov::builder()
    ->setSecurity(
        new Components\Security(
            username: '',
            password: '',
        )
    )
    ->build();

$updatePaymentLink = new Components\UpdatePaymentLink(
    amount: new Components\AmountUpdate(
        currency: 'USD',
        value: 12099,
    ),
    customer: new Components\PaymentLinkCustomerOptions(
        requireAddress: true,
        requirePhone: true,
    ),
    amountDetails: new Components\UpdatePaymentLinkAmountDetails(
        tax: new Components\Tax(
            currency: 'USD',
            valueDecimal: '9.25',
        ),
    ),
);

$response = $sdk->paymentLinks->update(
    accountID: 'ddad6613-2350-446a-883b-f76abb2cd4ea',
    paymentLinkCode: 'uc7ZYKrMhi',
    updatePaymentLink: $updatePaymentLink
);

if ($response->paymentLink !== null) {
    // handle response
}

Ask

package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.*;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.errors.UpdatePaymentLinkError;
import io.moov.sdk.models.operations.UpdatePaymentLinkResponse;
import java.lang.Exception;

public class Application {

public static void main(String[] args) throws GenericError, UpdatePaymentLinkError, Exception {

Moov sdk = Moov.builder()
                .security(Security.builder()
                    .username("")
                    .password("")
                    .build())
            .build();

UpdatePaymentLinkResponse res = sdk.paymentLinks().update()
                .accountID("ddad6613-2350-446a-883b-f76abb2cd4ea")
                .paymentLinkCode("uc7ZYKrMhi")
                .updatePaymentLink(UpdatePaymentLink.builder()
                    .amount(AmountUpdate.builder()
                        .currency("USD")
                        .value(12099L)
                        .build())
                    .customer(PaymentLinkCustomerOptions.builder()
                        .requireAddress(true)
                        .requirePhone(true)
                        .build())
                    .amountDetails(UpdatePaymentLinkAmountDetails.builder()
                        .tax(Tax.builder()
                            .currency("USD")
                            .valueDecimal("9.25")
                            .build())
                        .build())
                    .build())
                .call();

if (res.paymentLink().isPresent()) {
            System.out.println(res.paymentLink().get());
        }
    }
}

Ask

from moovio_sdk import Moov
from moovio_sdk.models import components

with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

res = moov.payment_links.update(account_id="ddad6613-2350-446a-883b-f76abb2cd4ea", payment_link_code="uc7ZYKrMhi", amount={
        "currency": "USD",
        "value": 12099,
    }, customer={
        "require_address": True,
        "require_phone": True,
    }, payment={
        "card_details": {
            "dynamic_descriptor": "WhlBdy *Yoga 11-12",
        },
        "ach_details": {
            "company_entry_description": "Gym dues",
            "originating_company_name": "Whole Body Fit",
        },
    }, payout={
        "recipient": {
            "email": "jordan.lee@classbooker.dev",
            "phone": {
                "number": "8185551212",
                "country_code": "1",
            },
        },
    }, custom_amount_payment=components.PaymentLinkCustomAmountPaymentDetailsUpdate(
        card_details=components.CardPaymentDetails(
            dynamic_descriptor="WhlBdy *Yoga 11-12",
        ),
        ach_details=components.ACHPaymentDetails(
            company_entry_description="Gym dues",
            originating_company_name="Whole Body Fit",
        ),
        amount_range=components.AmountDecimalRangeUpdate(
            minimum=components.AmountDecimalUpdate(
                currency="USD",
                value_decimal="12.987654321",
            ),
            maximum=components.AmountDecimalUpdate(
                currency="USD",
                value_decimal="12.987654321",
            ),
        ),
        suggested_amounts=[\
            components.AmountDecimal(\
                currency="USD",\
                value_decimal="12.987654321",\
            ),\
        ],
    ), line_items={
        "items": [\
            {\
                "name": "<value>",\
                "base_price": {\
                    "currency": "USD",\
                    "value_decimal": "12.987654321",\
                },\
                "quantity": 833079,\
                "options": [\
                    {\
                        "name": "<value>",\
                        "quantity": 819603,\
                        "price_modifier": {\
                            "currency": "USD",\
                            "value_decimal": "12.987654321",\
                        },\
                    },\
                ],\
            },\
        ],
    }, amount_details={
        "tax": {
            "currency": "USD",
            "value_decimal": "9.25",
        },
    })

# Handle response
    print(res)

Ask

require 'moov_ruby'

Models = ::Moov::Models
s = ::Moov::Client.new(
  security: Models::Components::Security.new(
    username: '',
    password: ''
  )
)
res = s.payment_links.update(account_id: 'ddad6613-2350-446a-883b-f76abb2cd4ea', payment_link_code: 'uc7ZYKrMhi', update_payment_link: Models::Components::UpdatePaymentLink.new(
  amount: Models::Components::AmountUpdate.new(
    currency: 'USD',
    value: 12_099
  ),
  customer: Models::Components::PaymentLinkCustomerOptions.new(
    require_address: true,
    require_phone: true
  ),
  amount_details: Models::Components::UpdatePaymentLinkAmountDetails.new(
    tax: Models::Components::Tax.new(
      currency: 'USD',
      value_decimal: '9.25'
    )
  )
))

unless res.payment_link.nil?
  # handle response
end

Ask

using Moov.Sdk;
using Moov.Sdk.Models.Components;

var sdk = new MoovClient(security: new Security() {
    Username = "",
    Password = "",
});

var res = await sdk.PaymentLinks.UpdateAsync(
    accountID: "ddad6613-2350-446a-883b-f76abb2cd4ea",
    paymentLinkCode: "uc7ZYKrMhi",
    body: new UpdatePaymentLink() {
        Amount = new AmountUpdate() {
            Currency = "USD",
            Value = 12099,
        },
        Customer = new PaymentLinkCustomerOptions() {
            RequireAddress = true,
            RequirePhone = true,
        },
        AmountDetails = new UpdatePaymentLinkAmountDetails() {
            Tax = new Tax() {
                Currency = "USD",
                ValueDecimal = "9.25",
            },
        },
    }
);

// handle response

The request completed successfully.