Mandates

A mandate is a customer’s authorization to debit their saved US bank account: the exact text they accepted, when, and how. Nacha requires one for recurring debits, so a saved bank account can be debited only while it has an active mandate. One mandate covers every payment from the bank account, including all of its subscriptions. The bank payments guide covers the authorization customers accept at checkout.

The Mandate object

Name
object
Type
"mandate",
Description
The object's type.
Name
id
Type
string,
Description
Unique identifier for the object.
Name
live
Type
boolean,
Description
true if the object is live, or false if it's in a sandbox.
Name
created_at
Type
integer,
Description
When the object was created, in milliseconds since the Unix epoch.
Name
authorization_text
Type
string,
Description
The authorization the customer agreed to.
Name
customer
Type
string or null,
Description
The customer the bank account belongs to.
Name
customer_acceptance
Type
object,
Description
Proof that the customer authorized the debits.
Properties
Name
payment_method
Type
string,
Description
The bank account the customer authorized debits from.
Name
replaced_by
Type
string or null,
Description
For a replaced mandate, the mandate that replaced it.
Name
status
Type
enum,
Description
Whether debits can be made under the mandate.
Properties
Name
type
Type
enum,
Description
Always multi_use: the mandate covers later debits, such as subscription renewals.
Properties

The Mandate object

{
  "object": "mandate",
  "live": false,
  "id": "mandate_TXU8BmK9zxBhcmjjUdbyM5",
  "created_at": 1750000000000,
  "payment_method": "pm_VQ9SaYquIZTG2l0uRsmUr4",
  "customer": "cus_aB4DEXqbFGOlpEOxwp0Fx1",
  "status": "active",
  "type": "multi_use",
  "customer_acceptance": {
    "type": "online",
    "accepted_at": 1750000000000,
    "ip_address": "203.0.113.7",
    "user_agent": "Mozilla/5.0"
  },
  "authorization_text": "By providing your bank account details, you authorize Acme to debit that account by ACH for payments you agree to, including subscription renewals, in the amounts and on the dates of your agreement. You can revoke this at any time by contacting Acme at billing@acme.com, allowing reasonable time before the next debit.",
  "replaced_by": null
}

Create a mandate

Creating a mandate records an authorization you collected yourself for a saved bank account. Bias records mandates on its own when checkout saves a bank account, or when a payment saves one with mandate_data.

A new mandate replaces the bank account’s earlier one, and Bias emails the customer a copy. Invoices that couldn’t debit the account without a mandate are charged right away.

Required parameters

Name
payment_method
Type
string,
Description
The saved bank account the customer authorized debits from.
Name
customer_acceptance
Type
object or object,
Description
Proof that the customer authorized the debits.
Properties
Name
authorization_text
Type
string,
Description
The authorization the customer agreed to, exactly as they saw it. It should state that debits can recur, how amounts and dates are set, and how to revoke it.

Returns

Returns the mandate object.

Create a mandate

const mandate = await bias.mandates.create({
  payment_method: "pm_VQ9SaYquIZTG2l0uRsmUr4",
  customer_acceptance: {
    type: "online",
    ip_address: "203.0.113.7",
    user_agent: "Mozilla/5.0"
  },
  authorization_text: "I authorize Acme to debit my bank account each month for my membership."
});

Response example

{
  "object": "mandate",
  "live": false,
  "id": "mandate_TXU8BmK9zxBhcmjjUdbyM5",
  "created_at": 1750000000000,
  "payment_method": "pm_VQ9SaYquIZTG2l0uRsmUr4",
  "customer": "cus_aB4DEXqbFGOlpEOxwp0Fx1",
  "status": "active",
  "type": "multi_use",
  "customer_acceptance": {
    "type": "online",
    "accepted_at": 1750000000000,
    "ip_address": "203.0.113.7",
    "user_agent": "Mozilla/5.0"
  },
  "authorization_text": "By providing your bank account details, you authorize Acme to debit that account by ACH for payments you agree to, including subscription renewals, in the amounts and on the dates of your agreement. You can revoke this at any time by contacting Acme at billing@acme.com, allowing reasonable time before the next debit.",
  "replaced_by": null
}

Get a mandate

Retrieve a mandate by its ID.

Required parameters

Name
id
Type
string,
Description
The ID of the mandate to retrieve.

Returns

Returns the mandate object.

Retrieve a mandate

const mandate = await bias.mandates.get("id");

Response example

{
  "object": "mandate",
  "live": false,
  "id": "mandate_TXU8BmK9zxBhcmjjUdbyM5",
  "created_at": 1750000000000,
  "payment_method": "pm_VQ9SaYquIZTG2l0uRsmUr4",
  "customer": "cus_aB4DEXqbFGOlpEOxwp0Fx1",
  "status": "active",
  "type": "multi_use",
  "customer_acceptance": {
    "type": "online",
    "accepted_at": 1750000000000,
    "ip_address": "203.0.113.7",
    "user_agent": "Mozilla/5.0"
  },
  "authorization_text": "By providing your bank account details, you authorize Acme to debit that account by ACH for payments you agree to, including subscription renewals, in the amounts and on the dates of your agreement. You can revoke this at any time by contacting Acme at billing@acme.com, allowing reasonable time before the next debit.",
  "replaced_by": null
}

List all mandates

Retrieve a paginated list of mandates, filtered by payment method, customer or status.

Optional parameters

Name
ending_before
Type
string,
Description
The ID of the object to list before, for pagination.
Name
starting_after
Type
string,
Description
The ID of the object to list after, for pagination.
Name
limit
Type
integer, at least 1, at most 1000, default is 50
Description
The maximum number of objects to return, from 1 to 1000. Defaults to 50.
Name
filters
Type
object, object, or object,
Description
Filters for the list, combined with and and or.
Properties

Returns

Returns a list of mandate objects.

List all mandates

const mandate = await bias.mandates.list();

Response example

{
  "object": "list",
  "items": [
    {
      "object": "mandate",
      "live": false,
      "id": "mandate_TXU8BmK9zxBhcmjjUdbyM5",
      "created_at": 1750000000000,
      "payment_method": "pm_VQ9SaYquIZTG2l0uRsmUr4",
      "customer": "cus_aB4DEXqbFGOlpEOxwp0Fx1",
      "status": "active",
      "type": "multi_use",
      "customer_acceptance": {
        "type": "online",
        "accepted_at": 1750000000000,
        "ip_address": "203.0.113.7",
        "user_agent": "Mozilla/5.0"
      },
      "authorization_text": "By providing your bank account details, you authorize Acme to debit that account by ACH for payments you agree to, including subscription renewals, in the amounts and on the dates of your agreement. You can revoke this at any time by contacting Acme at billing@acme.com, allowing reasonable time before the next debit.",
      "replaced_by": null
    }
  ],
  "has_more": true
}

Revoke a mandate

Revoking a mandate records that the customer withdrew their authorization. Bias deactivates the bank account, so it can’t be debited again. Deactivating the bank account revokes its mandate too.

Required parameters

Name
id
Type
string,
Description
The ID of the mandate to revoke.

Returns

Returns the revoked mandate object.

Revoke a mandate

const mandate = await bias.mandates.revoke("id");

Response example

{
  "object": "mandate",
  "live": false,
  "id": "mandate_TXU8BmK9zxBhcmjjUdbyM5",
  "created_at": 1750000000000,
  "payment_method": "pm_VQ9SaYquIZTG2l0uRsmUr4",
  "customer": "cus_aB4DEXqbFGOlpEOxwp0Fx1",
  "status": "active",
  "type": "multi_use",
  "customer_acceptance": {
    "type": "online",
    "accepted_at": 1750000000000,
    "ip_address": "203.0.113.7",
    "user_agent": "Mozilla/5.0"
  },
  "authorization_text": "By providing your bank account details, you authorize Acme to debit that account by ACH for payments you agree to, including subscription renewals, in the amounts and on the dates of your agreement. You can revoke this at any time by contacting Acme at billing@acme.com, allowing reasonable time before the next debit.",
  "replaced_by": null
}