Skip to main content
POST
/
card
cURL
curl --request POST \
  --url https://secure.development.knotapi.com/card \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user": {
    "name": {
      "first_name": "Ada",
      "last_name": "Lovelace"
    },
    "phone_number": "+11234567890",
    "address": {
      "street": "100 Main Street",
      "city": "New York",
      "region": "NY",
      "postal_code": "12345",
      "country": "US",
      "street2": "#100"
    }
  },
  "card": {
    "number": "4242424242424242",
    "expiration": "08/2025",
    "cvv": "123"
  },
  "task_id": "123456",
  "external_user_id": "abc123",
  "merchant_id": 46,
  "card_name": "My Credit Card",
  "customer_name": "John Doe"
}
'
{
"message": "Success"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

The input parameters required for switching a card.

user
object
required
card
object
required
task_id
string

The task_id value provided in the AUTHENTICATED webhook. Required if you received the AUTHENTICATED webhook.

Example:

"123456"

external_user_id
string

Your unique identifier for the user. Only necessary if you are provisioning a card to an already connected merchant account all server-side

Example:

"abc123"

merchant_id
integer

Unique identifier for the merchant. Only necessary if you are provisioning a card to an already connected merchant account all server-side.

Example:

46

card_name
string

Name of the card. Recommended only if you are provisioning a card to an already connected merchant account all server-side. Learn more here.

Example:

"My Credit Card"

customer_name
string

Name of the customer. Recommended only if you are provisioning a card to an already connected merchant account all server-side. Learn more here.

Example:

"John Doe"

Response

Successful request.

message
string

Success message.

Example:

"Success"