For the complete documentation index, see llms.txt. This page is also available as Markdown.

Tags

Tag a customer

post

Apply a custom tag to a customer. Applying a tag the customer already has is a no-op. System tags cannot be applied manually.

Required scopes
This endpoint requires the following scopes:
  • : Create, update and delete customer tags, and add or remove them on customers
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
customer_idstringRequired

Customer ID

Body
tag_idstringOptionalExample: 0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b
Responses
204

No Content

No content

post/customers/{customer_id}/tags
POST /customers/{customer_id}/tags HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 49

{
  "tag_id": "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b"
}

No content

Remove a tag from a customer

delete

Remove a custom tag from a customer. Removing a tag the customer does not have is a no-op. System tags cannot be removed manually.

Required scopes
This endpoint requires the following scopes:
  • : Create, update and delete customer tags, and add or remove them on customers
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
customer_idstringRequired

Customer ID

tag_idstringRequired

Tag ID

Responses
204

No Content

No content

delete/customers/{customer_id}/tags/{tag_id}
DELETE /customers/{customer_id}/tags/{tag_id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Add or remove a tag on many customers

post

Add (operation=add) or remove (operation=remove) a custom tag across up to 200 distinct customers (duplicate IDs are ignored). Returns 200 with per-customer results; only whole-batch validation errors return 4xx.

Required scopes
This endpoint requires the following scopes:
  • : Create, update and delete customer tags, and add or remove them on customers
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Body
customer_idsstring[] · min: 1Required

Customer IDs to update. At most 200 distinct IDs after canonicalisation; duplicates are ignored.

Example: ["9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f"]
operationstring · enumOptionalPossible values:
tag_idstringOptionalExample: 0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b
Responses
200

OK

application/json
appliedstring[]Optional
post/customers/tags/batch
POST /customers/tags/batch HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 123

{
  "customer_ids": [
    "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f"
  ],
  "operation": "add",
  "tag_id": "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b"
}
{
  "applied": [
    "text"
  ],
  "failed": [
    {
      "customer_id": "text",
      "reason": "text"
    }
  ],
  "skipped": [
    {
      "customer_id": "text",
      "reason": "text"
    }
  ]
}

List tags

get

List all tags owned by the partner, including system tags. Use the returned IDs to tag customers.

Required scopes
This endpoint requires the following scopes:
  • : Read customer tags
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Query parameters
namestringOptional

Case-insensitive substring match on tag name

customer_idstringOptional

Only return tags applied to this customer

limitinteger · min: 1 · max: 100Optional

Page size

Default: 100
afterstringOptional

Return tags after this cursor (end_cursor of the previous page)

beforestringOptional

Return tags before this cursor (start_cursor of the next page)

Responses
200

OK

application/json
end_cursorstringOptionalExample: gaFpxBACEaXBVABEYbHG+X9LyLnH
has_next_pagebooleanOptionalExample: true
has_previous_pagebooleanOptional
start_cursorstringOptionalExample: gaFpxBACEaXBVABEYbHG+X9LyLnH
get/tags
GET /tags HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "data": [
    {
      "color": "text",
      "customer_count": 1,
      "description": "text",
      "id": "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b",
      "name": "text",
      "partner_id": "5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6e",
      "type": "text"
    }
  ],
  "end_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH",
  "has_next_page": true,
  "has_previous_page": false,
  "start_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
}

Create a tag

post

Create a custom tag that can be applied to customers.

Required scopes
This endpoint requires the following scopes:
  • : Create, update and delete customer tags, and add or remove them on customers
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Body
colorstring · enumOptionalPossible values:
descriptionstring · max: 500Optional
namestring · max: 100Optional
Responses
201

Created

application/json
colorstringOptional
customer_countintegerOptional
descriptionstringOptional
idstringOptionalExample: 0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b
namestringOptional
partner_idstringOptionalExample: 5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6e
typestringOptional
post/tags
POST /tags HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 56

{
  "color": "aqua_blue",
  "description": "text",
  "name": "text"
}
{
  "color": "text",
  "customer_count": 1,
  "description": "text",
  "id": "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b",
  "name": "text",
  "partner_id": "5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6e",
  "type": "text"
}

Get a tag

get

Get a tag by ID, including the number of non-archived customers it is applied to.

Required scopes
This endpoint requires the following scopes:
  • : Read customer tags
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
idstringRequired

Tag ID

Responses
200

OK

application/json
colorstringOptional
customer_countintegerOptional
descriptionstringOptional
idstringOptionalExample: 0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b
namestringOptional
partner_idstringOptionalExample: 5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6e
typestringOptional
get/tags/{id}
GET /tags/{id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "color": "text",
  "customer_count": 1,
  "description": "text",
  "id": "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b",
  "name": "text",
  "partner_id": "5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6e",
  "type": "text"
}

Update a tag

put

Replace a custom tag's name, description and color. All fields are required; send an empty description to clear it. System tags cannot be modified.

Required scopes
This endpoint requires the following scopes:
  • : Create, update and delete customer tags, and add or remove them on customers
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
idstringRequired

Tag ID

Header parameters
Idempotency-KeystringOptional

Optional client-generated UUID, logged for tracing only. Not stored: a retry re-applies the request.

Body
colorstring · enumRequiredPossible values:
descriptionstring · max: 500Required
namestring · max: 100Required
Responses
200

OK

application/json
colorstringOptional
customer_countintegerOptional
descriptionstringOptional
idstringOptionalExample: 0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b
namestringOptional
partner_idstringOptionalExample: 5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6e
typestringOptional
put/tags/{id}
PUT /tags/{id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 56

{
  "color": "aqua_blue",
  "description": "text",
  "name": "text"
}
{
  "color": "text",
  "customer_count": 1,
  "description": "text",
  "id": "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b",
  "name": "text",
  "partner_id": "5f2b7c1d-8e3a-4b6c-9d0e-1f2a3b4c5d6e",
  "type": "text"
}

Delete a tag

delete

Delete a custom tag and remove it from every customer. System tags cannot be deleted.

Required scopes
This endpoint requires the following scopes:
  • : Create, update and delete customer tags, and add or remove them on customers
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
idstringRequired

Tag ID

Header parameters
Idempotency-KeystringOptional

Optional client-generated UUID, logged for tracing only. Not stored: a retry re-applies the request.

Responses
204

No Content

No content

delete/tags/{id}
DELETE /tags/{id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Last updated

Was this helpful?