Customers

Manage Customer Restrictions

Manage payment restrictions for a Customer, such as blocking new or recurring subscription payments

post/customers/{id}/restrictions

Path parameters

idstring required

Request body

customerstring required

ID of the customer to manage restrictions for

restrictMitboolean

Whether to restrict the customer from making merchant-initiated payments, e.g recurring subscription payments.

restrictCitboolean

Whether to restrict the customer from making customer-initiated payments, e.g payments made through the Checkout SDK.

restrictReasonstring

Reason for restricting the customer.

Example request

{
  "customer": "cus_2R0uWz4tu9wxTMBXxj9CJfSE9vV",
  "restrictReason": "The customer is restricted due to compliance issues"
}

Response

OK

createdAtstring date-time required

The date and time when the entity was created.

updatedAtstring date-time nullable required

The date and time when the entity was last updated.

metadataobject nullable

Metadata used by merchants to store additional information about the entity.

idstring required

The ID of the customer

emailstring required

The email of the customer

namestring nullable required

The name of the customer

phoneNumberstring nullable required

The phone number of the customer

dateOfBirthstring date nullable required

The date of birth of the customer

gender'male' | 'female' | 'other' | 'null' nullable required

The gender of the customer

restrictMitboolean

Whether the customer is restricted from making merchant-initiated payments. Only available from the dashboard or the API using a secret key.

restrictCitboolean

Whether the customer is restricted from making customer-initiated payments. Only available from the dashboard or the API using a secret key.

restrictReasonstring nullable

Reason for restricting the customer. Only available from the dashboard or the API using a secret key.

isRestrictedboolean

Whether the customer has at least one restriction applied (either restrictMit or restrictCit). Only available from the dashboard or the API using a secret key.

Example response

{
  "createdAt": "2024-02-18T12:00:00Z",
  "updatedAt": "2024-02-21T12:15:00Z",
  "metadata": {
    "key1": "value1",
    "key2": "value2"
  },
  "id": "cus_2QC7PqoUeOxQEWscJJt6B3PkvyL",
  "email": "user@gmail.com",
  "name": "John Doe",
  "phoneNumber": "+1234567890",
  "dateOfBirth": "2020-01-01",
  "gender": "male",
  "restrictReason": "Customer restricted due to suspicious activity",
  "isRestricted": true,
  "paymentMethods": [
    {
      "createdAt": "2024-02-18T12:00:00Z",
      "updatedAt": "2024-02-21T12:15:00Z",
      "metadata": {
        "key1": "value1",
        "key2": "value2"
      },
      "id": "pm_2QC7PqoUeOxQEWscJJt6B3PkvyL",
      "type": "card",
      "customer": "cus_2QC7PqoUeOxQEWscJJt6B3PkvyL",
      "card": {
        "brand": "amex",
        "lastFour": "1234",
        "bin": "123456",
        "expMonth": "12",
        "expYear": "2025",
        "cardholderName": "John Doe"
      },
      "applePay": {
        "displayName": "MasterCard 1234"
      }
    }
  ],
  "subscriptions": [
    {
      "createdAt": "2024-02-18T12:00:00Z",
      "updatedAt": "2024-02-21T12:15:00Z",
      "metadata": {
        "key1": "value1",
        "key2": "value2"
      },
      "id": "sub_2QC7PqoUeOxQEWscJJt6B3PkvyL",
      "status": "active",
      "autoBillingEnabled": true,
      "autoBillingDisabledReason": "subscription_cancelled",
      "cancelAtPeriodEnd": true,
      "cancelAtCycle": 2,
      "currentCycle": 1,
      "billingSettings": {
        "captureDelay": 3
      },
      "upcomingInvoice": {
        "amount": 1500,
        "currency": "usd",
        "periodStart": "2023-01-01T00:00:00Z",
        "periodEnd": "2023-01-31T23:59:59Z",
        "statementDescriptor": "SUBSCRIPTION",
        "comment": "Invoice for subscription 123, period January 2023"
      },
      "price": {
        "createdAt": "2024-02-18T12:00:00Z",
        "updatedAt": "2024-02-21T12:15:00Z",
        "metadata": {
          "key1": "value1",
          "key2": "value2"
        },
        "id": "price_2R4e2xDqbww8ewmkIYWE1A6Zcfp",
        "type": "recurring",
        "active": true,
        "name": "My Digital Subscription",
        "amount": 1500,
        "quantity": 1,
        "currency": "usd",
        "product": {
          "createdAt": "2024-02-18T12:00:00Z",
          "updatedAt": "2024-02-21T12:15:00Z",
          "metadata": {
            "key1": "value1",
            "key2": "value2"
          },
          "id": "prod_2QC7PqoUeOxQEWscJJt6B3PkvyL",
          "active": true,
          "name": "My product",
          "description": "Best selling product",
          "statementDescriptor": "Face Yoga subscription",
          "category": "digital",
          "sku": "FY-YOGA-MAT-01"
        },
        "billingSchedule": {
          "createdAt": "2024-02-18T12:00:00Z",
          "updatedAt": "2024-02-21T12:15:00Z",
          "metadata": {
            "key1": "value1",
            "key2": "value2"
          },
          "id": "bsch_2QC7PqoUeOxQEWscJJt6B3PkvyL",
          "currency": "usd",
          "cycleDefinitions": [
            {
              "createdAt": "2024-02-18T12:00:00Z",
              "updatedAt": "2024-02-21T12:15:00Z",
              "metadata": {
                "key1": "value1",
                "key2": "value2"
              },
              "position": 1,
              "amount": 1500,
              "currency": "usd"
            }
          ]
        },
        "recurringSchedule": {
          "intervalUnit": "month",
          "intervalCount": 1,
          "trial": {
            "intervalUnit": "day",
            "intervalCount": 7,
            "amount": 199
          }
        }
      },
      "invoices": [
        {
          "createdAt": "2024-02-18T12:00:00Z",
          "updatedAt": "2024-02-21T12:15:00Z",
          "metadata": {
            "key1": "value1",
            "key2": "value2"
          },
          "status": "open",
          "voidedReason": "Grace period expired",
          "comment": "This is a comment for the invoice",
          "amount": 999,
          "currency": "usd",
          "type": "setup",
          "number": "2W12-1004",
          "customer": {
            "createdAt": "2024-02-18T12:00:00Z",
            "updatedAt": "2024-02-21T12:15:00Z",
            "metadata": {
              "key1": "value1",
              "key2": "value2"
            },
            "id": "cus_2QC7PqoUeOxQEWscJJt6B3PkvyL",
            "email": "user@gmail.com",
            "name": "John Doe",
            "phoneNumber": "+1234567890",
            "dateOfBirth": "2020-01-01",
            "gender": "male",
            "restrictReason": "Customer restricted due to suspicious activity",
            "isRestricted": true
          }
        }
      ]
    }
  ]
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.