> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Manage payment methods with the API

> Learn how to create, read, update, and deactivate payment methods with the Payabli API

> **Note**
>
> Intelligent boarding is in beta. To opt in, reach out to your Payabli contact.

A payment method is a bank account attached to a person or business, used to move money. Each payment method has an owner, a type, and a status. Use the payment methods API to add and manage them as you board and operate a paypoint. For how payment methods fit into the wider model, see the [boarding overview](/guides/pay-ops-boarding-object-model-overview).

## Considerations

* The API uses OAuth2. Send a Bearer token on every request. See [OAuth2 authentication](/developers/oauth-authentication).
* A payment method belongs to a person or a business. Set `accountOwner` to that entity's reference and `ownerType` to `person` or `business`.
* Reads mask sensitive fields: the account and routing numbers show only the last four digits.

## Create payment methods

Send a `POST` request to `/v2/payment-methods` with a `data` array of one or more payment methods. Set each one's `accountOwner` and `ownerType`. See the [API reference](/developers/api-reference/payment-methods/create-payment-methods) for this endpoint for full documentation.

### Request

POST [https://api-sandbox.payabli.com/api/v2/payment-methods](https://api-sandbox.payabli.com/api/v2/payment-methods)

```curl
curl -X POST https://api-sandbox.payabli.com/api/v2/payment-methods \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "data": [
    {
      "type": "bank_account",
      "accountOwner": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
      "ownerType": "business",
      "accountType": "checking",
      "accountNumber": "123456789",
      "routingNumber": "021000021",
      "usage": [
        "deposits",
        "billing"
      ],
      "nickname": "Operating account",
      "financialInstitution": "Bank of Example"
    }
  ]
}'
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.paymentMethods.createPaymentMethods({
        data: [
            {
                type: "bank_account",
                accountOwner: "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
                ownerType: "business",
                nickname: "Operating account",
                financialInstitution: "Bank of Example",
                accountType: "checking",
                accountNumber: "123456789",
                routingNumber: "021000021",
                usage: [
                    "deposits",
                    "billing",
                ],
            },
        ],
    });
}
main();

```

```python
from payabli import payabli, CreatePaymentMethodRequest

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.payment_methods.create_payment_methods(
    data=[
        CreatePaymentMethodRequest(
            type="bank_account",
            account_owner="019fed1a-3d6e-75d3-a81e-cba3874b0a55",
            owner_type="business",
            nickname="Operating account",
            financial_institution="Bank of Example",
            account_type="checking",
            account_number="123456789",
            routing_number="021000021",
            usage=[
                "deposits",
                "billing"
            ],
        )
    ],
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.paymentmethods.requests.CreatePaymentMethodsRequest;
import io.github.payabli.api.types.CreatePaymentMethodRequest;
import io.github.payabli.api.types.CreatePaymentMethodRequestType;
import io.github.payabli.api.types.PaymentMethodOwnerType;
import io.github.payabli.api.types.PaymentMethodUsage;
import java.util.Arrays;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.paymentMethods().createPaymentMethods(
            CreatePaymentMethodsRequest
                .builder()
                .data(
                    Arrays.asList(
                        CreatePaymentMethodRequest
                            .builder()
                            .type(CreatePaymentMethodRequestType.BANK_ACCOUNT)
                            .accountOwner("019fed1a-3d6e-75d3-a81e-cba3874b0a55")
                            .ownerType(PaymentMethodOwnerType.BUSINESS)
                            .accountType("checking")
                            .accountNumber("123456789")
                            .routingNumber("021000021")
                            .nickname("Operating account")
                            .financialInstitution("Bank of Example")
                            .usage(
                                Arrays.asList(PaymentMethodUsage.DEPOSITS, PaymentMethodUsage.BILLING)
                            )
                            .build()
                    )
                )
                .build()
        );
    }
}
```

```csharp
using PayabliApi;
using System.Threading.Tasks;
using System.Collections.Generic;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.PaymentMethods.CreatePaymentMethodsAsync(
            new CreatePaymentMethodsRequest {
                Data = new List<CreatePaymentMethodRequest>(){
                    new CreatePaymentMethodRequest {
                        Type = CreatePaymentMethodRequestType.BankAccount,
                        AccountOwner = "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
                        OwnerType = PaymentMethodOwnerType.Business,
                        Nickname = "Operating account",
                        FinancialInstitution = "Bank of Example",
                        AccountType = "checking",
                        AccountNumber = "123456789",
                        RoutingNumber = "021000021",
                        Usage = new List<PaymentMethodUsage>(){
                            PaymentMethodUsage.Deposits,
                            PaymentMethodUsage.Billing,
                        }

                    },
                }

            }
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.CreatePaymentMethodsRequest{
        Data: []*payabli.CreatePaymentMethodRequest{
            &payabli.CreatePaymentMethodRequest{
                Type: payabli.CreatePaymentMethodRequestTypeBankAccount,
                AccountOwner: "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
                OwnerType: payabli.PaymentMethodOwnerTypeBusiness,
                AccountType: "checking",
                AccountNumber: "123456789",
                RoutingNumber: "021000021",
                Usage: []payabli.PaymentMethodUsage{
                    payabli.PaymentMethodUsageDeposits,
                    payabli.PaymentMethodUsageBilling,
                },
                Nickname: payabli.String(
                    "Operating account",
                ),
                FinancialInstitution: payabli.String(
                    "Bank of Example",
                ),
            },
        },
    }
    client.PaymentMethods.CreatePaymentMethods(
        context.TODO(),
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\PaymentMethods\Requests\CreatePaymentMethodsRequest;
use Payabli\Types\CreatePaymentMethodRequest;
use Payabli\Types\CreatePaymentMethodRequestType;
use Payabli\Types\PaymentMethodOwnerType;
use Payabli\Types\PaymentMethodUsage;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->paymentMethods->createPaymentMethods(
    new CreatePaymentMethodsRequest([
        'data' => [
            new CreatePaymentMethodRequest([
                'type' => CreatePaymentMethodRequestType::BankAccount->value,
                'accountOwner' => '019fed1a-3d6e-75d3-a81e-cba3874b0a55',
                'ownerType' => PaymentMethodOwnerType::Business->value,
                'nickname' => 'Operating account',
                'financialInstitution' => 'Bank of Example',
                'accountType' => 'checking',
                'accountNumber' => '123456789',
                'routingNumber' => '021000021',
                'usage' => [
                    PaymentMethodUsage::Deposits->value,
                    PaymentMethodUsage::Billing->value,
                ],
            ]),
        ],
    ]),
);

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/payment-methods")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": [\n    {\n      \"type\": \"bank_account\",\n      \"accountOwner\": \"019fed1a-3d6e-75d3-a81e-cba3874b0a55\",\n      \"ownerType\": \"business\",\n      \"accountType\": \"checking\",\n      \"accountNumber\": \"123456789\",\n      \"routingNumber\": \"021000021\",\n      \"usage\": [\n        \"deposits\",\n        \"billing\"\n      ],\n      \"nickname\": \"Operating account\",\n      \"financialInstitution\": \"Bank of Example\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": [
    [
      "type": "bank_account",
      "accountOwner": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
      "ownerType": "business",
      "accountType": "checking",
      "accountNumber": "123456789",
      "routingNumber": "021000021",
      "usage": ["deposits", "billing"],
      "nickname": "Operating account",
      "financialInstitution": "Bank of Example"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/payment-methods")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response returns the created payment methods, each with its reference and token:

### Response (201)

```json
{
  "success": true,
  "message": "Payment method created successfully",
  "traceId": "0HNNN6HH5NE18:00000010",
  "data": [
    {
      "paymentMethodReference": "019ff142-454b-7721-96a3-c8628b9d568f",
      "type": "bank_account",
      "accountOwner": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
      "ownerType": "business",
      "status": "PENDING",
      "createdAt": "2026-08-11T14:38:00.0117762Z",
      "lastUpdated": "2026-08-11T14:38:00.0117763Z",
      "_links": {
        "self": "/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f",
        "owner": "/api/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55"
      },
      "fingerprint": "2a0c2a64d03492ba45af4d01f329f22b41513411cab7658072739d17ed570675",
      "tokenReference": "deacc32d-81eb-470b-9cff-0ad2fab87096",
      "nickname": "Operating account",
      "financialInstitution": "Bank of Example",
      "accountType": "Checking",
      "accountNumber": "****6789",
      "routingNumber": "*****0021",
      "usage": [
        "deposits",
        "billing"
      ]
    }
  ]
}
```

The `paymentMethodReference` in each result is the reference you use to read and manage that payment method.

> **Tip**
>
> You can also attach payment methods to a business when you create it, by including them in the business's `paymentMethods`. See [Manage business entities](/guides/pay-ops-developer-businesses-manage).

## Get a payment method

Send a `GET` request to `/v2/payment-methods/{paymentMethodReference}`. Sensitive fields are masked. See the [API reference](/developers/api-reference/payment-methods/get-a-payment-method) for this endpoint for full documentation.

### Request

GET [https://api-sandbox.payabli.com/api/v2/payment-methods/\{paymentMethodReference}](https://api-sandbox.payabli.com/api/v2/payment-methods/\{paymentMethodReference})

```curl
curl https://api-sandbox.payabli.com/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f \
     -H "Authorization: Bearer <token>"
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.paymentMethods.getPaymentMethod("019ff142-454b-7721-96a3-c8628b9d568f");
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.payment_methods.get_payment_method(
    payment_method_reference="019ff142-454b-7721-96a3-c8628b9d568f",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.paymentMethods().getPaymentMethod("019ff142-454b-7721-96a3-c8628b9d568f");
    }
}
```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.PaymentMethods.GetPaymentMethodAsync(
            "019ff142-454b-7721-96a3-c8628b9d568f"
        );
    }

}

```

```go
package example

import (
    context "context"

    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    client.PaymentMethods.GetPaymentMethod(
        context.TODO(),
        "019ff142-454b-7721-96a3-c8628b9d568f",
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->paymentMethods->getPaymentMethod(
    '019ff142-454b-7721-96a3-c8628b9d568f',
);

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response returns the payment method's detail:

### Response (200)

```json
{
  "success": true,
  "message": "Payment method retrieved successfully",
  "traceId": "0HNNN6HH5NE0R:00000015",
  "data": {
    "paymentMethodReference": "019ff142-454b-7721-96a3-c8628b9d568f",
    "type": "bank_account",
    "accountOwner": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
    "ownerType": "business",
    "status": "PENDING",
    "createdAt": "2026-08-11T14:38:00.011776",
    "lastUpdated": "2026-08-11T14:38:00.011776",
    "_links": {
      "self": "/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f",
      "owner": "/api/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55"
    },
    "nickname": "Operating account",
    "financialInstitution": "Bank of Example",
    "accountType": "Checking",
    "accountNumber": "****6789",
    "routingNumber": "*****0021",
    "usage": [
      "deposits",
      "billing"
    ]
  }
}
```

## List payment methods

Send a `GET` request to `/v2/payment-methods`. Filter and page the results with the query parameters: `accountOwner`, `ownerType`, `status`, `type`, `limit`, `page`, `sortBy`, and `sortOrder`. See the [API reference](/developers/api-reference/payment-methods/list-payment-methods) for this endpoint for full documentation.

### Request

GET [https://api-sandbox.payabli.com/api/v2/payment-methods](https://api-sandbox.payabli.com/api/v2/payment-methods)

```curl
curl -G https://api-sandbox.payabli.com/api/v2/payment-methods \
     -H "Authorization: Bearer <token>" \
     -d limit=1 \
     -d page=1
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.paymentMethods.listPaymentMethods({
        limit: 1,
        page: 1,
    });
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.payment_methods.list_payment_methods(
    limit=1,
    page=1,
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.paymentmethods.requests.ListPaymentMethodsPaymentMethodsRequest;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.paymentMethods().listPaymentMethods(
            ListPaymentMethodsPaymentMethodsRequest
                .builder()
                .limit(1)
                .page(1)
                .build()
        );
    }
}
```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.PaymentMethods.ListPaymentMethodsAsync(
            new ListPaymentMethodsPaymentMethodsRequest {
                Limit = 1,
                Page = 1
            }
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.ListPaymentMethodsPaymentMethodsRequest{
        Limit: payabli.Int(
            1,
        ),
        Page: payabli.Int(
            1,
        ),
    }
    client.PaymentMethods.ListPaymentMethods(
        context.TODO(),
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\PaymentMethods\Requests\ListPaymentMethodsPaymentMethodsRequest;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->paymentMethods->listPaymentMethods(
    new ListPaymentMethodsPaymentMethodsRequest([
        'limit' => 1,
        'page' => 1,
    ]),
);

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/payment-methods?limit=1&page=1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/payment-methods?limit=1&page=1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response returns a page of payment methods with pagination metadata:

### Response (200)

```json
{
  "success": true,
  "message": "Payment methods retrieved successfully",
  "traceId": "0HNNN6HH5NE0R:00000014",
  "data": {
    "data": [
      {
        "paymentMethodReference": "019ff142-454b-7721-96a3-c8628b9d568f",
        "type": "bank_account",
        "accountOwner": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
        "ownerType": "business",
        "status": "PENDING",
        "createdAt": "2026-08-11T14:38:00.011776",
        "lastUpdated": "2026-08-11T14:38:00.011776",
        "_links": {
          "self": "/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f",
          "owner": "/api/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55"
        },
        "isDefault": false,
        "nickname": "Operating account",
        "financialInstitution": "Bank of Example",
        "accountType": "Checking",
        "accountNumber": "****6789",
        "routingNumber": "*****0021",
        "usage": [
          "deposits",
          "billing"
        ]
      }
    ],
    "pagination": {
      "page": 1,
      "totalPages": 1,
      "totalRecords": 1,
      "pageSize": 1,
      "hasNext": false,
      "hasPrevious": false
    }
  }
}
```

## Update a payment method

Send a `PATCH` request to `/v2/payment-methods/{paymentMethodReference}` with only the fields you want to change. Only payment methods in `PENDING` status can be updated. Once a payment method is active, change it through the [bank account change process](/guides/pay-ops-bank-account-changes-overview) instead. See the [API reference](/developers/api-reference/payment-methods/update-a-payment-method) for this endpoint for full documentation.

### Request

PATCH [https://api-sandbox.payabli.com/api/v2/payment-methods/\{paymentMethodReference}](https://api-sandbox.payabli.com/api/v2/payment-methods/\{paymentMethodReference})

```curl
curl -X PATCH https://api-sandbox.payabli.com/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "nickname": "Primary operating account",
  "usage": [
    "deposits",
    "billing"
  ]
}'
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.paymentMethods.updatePaymentMethod("019ff142-454b-7721-96a3-c8628b9d568f", {
        nickname: "Primary operating account",
        usage: [
            "deposits",
            "billing",
        ],
    });
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.payment_methods.update_payment_method(
    payment_method_reference="019ff142-454b-7721-96a3-c8628b9d568f",
    nickname="Primary operating account",
    usage=[
        "deposits",
        "billing"
    ],
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.paymentmethods.requests.UpdatePaymentMethodRequest;
import io.github.payabli.api.types.PaymentMethodUsage;
import java.util.Arrays;
import java.util.Optional;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.paymentMethods().updatePaymentMethod(
            "019ff142-454b-7721-96a3-c8628b9d568f",
            UpdatePaymentMethodRequest
                .builder()
                .nickname("Primary operating account")
                .usage(
                    Optional.of(
                        Arrays.asList(PaymentMethodUsage.DEPOSITS, PaymentMethodUsage.BILLING)
                    )
                )
                .build()
        );
    }
}
```

```csharp
using PayabliApi;
using System.Threading.Tasks;
using System.Collections.Generic;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.PaymentMethods.UpdatePaymentMethodAsync(
            paymentMethodReference: "019ff142-454b-7721-96a3-c8628b9d568f",
            request: new UpdatePaymentMethodRequest {
                Nickname = "Primary operating account",
                Usage = new List<PaymentMethodUsage>(){
                    PaymentMethodUsage.Deposits,
                    PaymentMethodUsage.Billing,
                }

            }
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.UpdatePaymentMethodRequest{
        Nickname: payabli.String(
            "Primary operating account",
        ),
        Usage: []payabli.PaymentMethodUsage{
            payabli.PaymentMethodUsageDeposits,
            payabli.PaymentMethodUsageBilling,
        },
    }
    client.PaymentMethods.UpdatePaymentMethod(
        context.TODO(),
        "019ff142-454b-7721-96a3-c8628b9d568f",
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\PaymentMethods\Requests\UpdatePaymentMethodRequest;
use Payabli\Types\PaymentMethodUsage;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->paymentMethods->updatePaymentMethod(
    '019ff142-454b-7721-96a3-c8628b9d568f',
    new UpdatePaymentMethodRequest([
        'nickname' => 'Primary operating account',
        'usage' => [
            PaymentMethodUsage::Deposits->value,
            PaymentMethodUsage::Billing->value,
        ],
    ]),
);

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"nickname\": \"Primary operating account\",\n  \"usage\": [\n    \"deposits\",\n    \"billing\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "nickname": "Primary operating account",
  "usage": ["deposits", "billing"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response confirms the update:

### Response (200)

```json
{
  "success": true,
  "message": "Payment method updated successfully",
  "traceId": "0HNNN6HH5NE2H:00000016",
  "data": {
    "paymentMethodReference": "019ff142-454b-7721-96a3-c8628b9d568f",
    "type": "bank_account",
    "accountOwner": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
    "ownerType": "business",
    "status": "PENDING",
    "createdAt": "2026-08-11T14:38:00.0117762Z",
    "lastUpdated": "2026-08-11T14:39:12.4471182Z",
    "_links": {
      "self": "/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f",
      "owner": "/api/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55"
    },
    "fingerprint": "2a0c2a64d03492ba45af4d01f329f22b41513411cab7658072739d17ed570675",
    "tokenReference": "deacc32d-81eb-470b-9cff-0ad2fab87096",
    "nickname": "Primary operating account",
    "financialInstitution": "Bank of Example",
    "accountType": "Checking",
    "accountNumber": "****6789",
    "routingNumber": "*****0021",
    "usage": [
      "deposits",
      "billing"
    ]
  }
}
```

## Deactivate a payment method

Send a `DELETE` request to `/v2/payment-methods/{paymentMethodReference}`. This is a soft delete: the payment method moves to `INACTIVE` and the record is kept. See the [API reference](/developers/api-reference/payment-methods/deactivate-a-payment-method) for this endpoint for full documentation.

### Request

DELETE [https://api-sandbox.payabli.com/api/v2/payment-methods/\{paymentMethodReference}](https://api-sandbox.payabli.com/api/v2/payment-methods/\{paymentMethodReference})

```curl
curl -X DELETE https://api-sandbox.payabli.com/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f \
     -H "Authorization: Bearer <token>"
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.paymentMethods.deactivatePaymentMethod("019ff142-454b-7721-96a3-c8628b9d568f");
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.payment_methods.deactivate_payment_method(
    payment_method_reference="019ff142-454b-7721-96a3-c8628b9d568f",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.paymentMethods().deactivatePaymentMethod("019ff142-454b-7721-96a3-c8628b9d568f");
    }
}
```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.PaymentMethods.DeactivatePaymentMethodAsync(
            "019ff142-454b-7721-96a3-c8628b9d568f"
        );
    }

}

```

```go
package example

import (
    context "context"

    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    client.PaymentMethods.DeactivatePaymentMethod(
        context.TODO(),
        "019ff142-454b-7721-96a3-c8628b9d568f",
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->paymentMethods->deactivatePaymentMethod(
    '019ff142-454b-7721-96a3-c8628b9d568f',
);

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

The response confirms the deactivation:

### Response (200)

```json
{
  "success": true,
  "message": "Payment method deactivated successfully",
  "traceId": "0HNNN6HH5NE2S:0000000A",
  "data": {
    "paymentMethodReference": "019ff142-454b-7721-96a3-c8628b9d568f",
    "type": "bank_account",
    "accountOwner": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
    "ownerType": "business",
    "status": "INACTIVE",
    "createdAt": "2026-08-11T14:38:00.0117762Z",
    "lastUpdated": "2026-08-11T14:40:03.1182233Z",
    "_links": {
      "self": "/api/v2/payment-methods/019ff142-454b-7721-96a3-c8628b9d568f",
      "owner": "/api/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55"
    },
    "fingerprint": "2a0c2a64d03492ba45af4d01f329f22b41513411cab7658072739d17ed570675",
    "tokenReference": "deacc32d-81eb-470b-9cff-0ad2fab87096",
    "nickname": "Primary operating account",
    "financialInstitution": "Bank of Example",
    "accountType": "Checking",
    "accountNumber": "****6789",
    "routingNumber": "*****0021",
    "usage": [
      "deposits",
      "billing"
    ]
  }
}
```

## Related resources

See these related resources to help you get the most out of Payabli.

#### References

* **[Required fields for boarding applications](/guides/pay-ops-boarding-kyc-fields-overview)** - Learn more about the Know Your Customer (KYC) and Know Your Business (KYB) fields required for merchant boarding

#### Related topics

* **[Intelligent boarding overview](/guides/pay-ops-boarding-object-model-overview)** - Understand the objects and application lifecycle behind intelligent boarding paypoints on Payabli
* **[Funding accounts](/guides/pay-ops-boarding-funding-accounts-overview)** - Understand who owns a paypoint's bank accounts and how usages decide which money each account handles