On this page

Domain

A Domain in the Paylias network represents a logical collection of payment addresses issued by an organization. Domains help identify organizations, country of issuance, and specific configurations around branding and rewards.

Overview

Each Domain:

  • Belongs to a single Organization
  • Has a unique domain identifier
  • Manages its own payment addresses
  • Contains specific configurations and settings

API Resource

Property Type Description Notes
token string Unique identifier for the domain Auto-generated upon creation
org_id string Organization ID that owns the domain Auto-assigned during creation
domain string Unique domain identifier Must match regex pattern
name string Display name for the domain 2-100 characters
enabled boolean Indicates if domain is active Defaults to true
created_at timestamp Time when domain was created Auto-generated, Unix timestamp in seconds
updated_at timestamp Time of last domain update Auto-generated, Unix timestamp in seconds

Authentication

All Domain-related operations require JWT token authentication. These tokens must be included in the Authorization header for API requests.

API Endpoints

Create Domain

Creates a new domain for an organization.

Required Parameters

Parameter Type Required Description
domain string Yes Domain identifier (regex: ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+$)
name string Yes Display name (2-100 characters)

POST /api/v1/csp/partner

curl --location 'https://production.oysterapi.net/csp/api/v1/csp/partner' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <jwt_token>' \
--data '{
    "domain": "safepay",
    "name": "Safepay Core Domain"
}'

Example Response

{
    "ok": true,
    "data": {
        "token": "part_cjes76vsemvj3obsnc30",
        "org_id": "org_79580427-c976-40fc-ac02-43e314870e8f",
        "domain": "safepay",
        "name": "Safepay Core Domain",
        "created_at": {
            "seconds": 1692255131
        },
        "updated_at": {
            "seconds": 1692255131
        }
    }
}

Possible Error Codes

Error Code Description
error.bad_request Invalid or missing required parameters
error.resource_conflict Domain with similar details already exists
error.unauthorized_access Invalid or missing JWT token
500, 502, 503, 504 Server-side errors

Find Domain

Retrieves details of a specific domain.

Path Parameters

Parameter Type Required Description
partnerToken string Yes Domain token to retrieve

GET /api/v1/csp/partner/{partnerToken}

curl --location 'https://production.oysterapi.net/csp/api/v1/csp/partner/part_ct23b6420or249k5boag' \
--header 'Authorization: Bearer <jwt_token>'

Example Response

{
    "ok": true,
    "data": {
        "token": "part_cjes76vsemvj3obsnc30",
        "org_id": "org_79580427-c976-40fc-ac02-43e314870e8f",
        "domain": "safepay",
        "name": "Safepay Core Domain",
        "created_at": {
            "seconds": 1692255131
        },
        "updated_at": {
            "seconds": 1692255131
        }
    }
}

Search Domains

Retrieves a list of domains with pagination support.

Query Parameters

Parameter Type Required Description
limit integer Yes Number of results per page
page integer Yes Page number for pagination

GET /api/v1/csp/partner

curl --location 'https://production.oysterapi.net/csp/api/v1/csp/partner?limit=10&page=1' \
--header 'Authorization: Bearer <jwt_token>'

Example Response

{
    "ok": true,
    "data": {
        "count": 1,
        "partners": [{
            "token": "part_ct23b6420or249k5boag",
            "org_id": "org_ct239n420or249k5bo90",
            "domain": "safepay-platinum",
            "name": "Safepay Platinum Tier",
            "enabled": true,
            "created_at": {
                "seconds": 1732523416
            },
            "updated_at": {
                "seconds": 1732526353
            }
        }]
    }
}

Possible Error Codes

Error Code Description
error.resource_not_found Domain not found
error.unauthorized_access Invalid or missing JWT token
500, 502, 503, 504 Server-side errors
Docs and examples licensed under MIT