Service Account
POST
/service_accountsCreate
Body — CreateServiceAccountDTO: name, allowed_origins? ([]string). Origins are scheme://host[:port] (no path; trailing '/' tolerated); wildcard subdomains like https://*.example.com; http allowed for localhost. Empty list = allow all.
Request
Example
curl -X POST 'https://api.paycose.com/api/v1/app1/platform/wallet/service_accounts/' \
-H 'X-Session-Token: {{session_token}}' \
-H 'X-Country: {{country}}' \
-H 'X-Test-Mode: {{x_test_mode}}' \
-d '{
"name": "Test",
"allowed_origins": [
"https://shop.example.com"
]
}'Headers
| Name | Value | Description |
|---|---|---|
| X-Session-Token | {{session_token}} | |
| X-Country | {{country}} | |
| X-Test-Mode | {{x_test_mode}} | true=wallet_test, false=wallet_live (default). Toggle the x_test_mode collection variable to flip every applicable request. |
Body
| Name | Type | Value |
|---|---|---|
| name | string | Test |
| allowed_origins | array | [1] |
{
"name": "Test",
"allowed_origins": [
"https://shop.example.com"
]
}Responses
400400 Bad Request
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"object": "error",
"code": "<string>",
"key": "<string>",
"i18n_key": "<string>",
"message": "<string>",
"request_id": "<string>"
}500500 Internal Server Error
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"object": "error",
"code": "<string>",
"key": "<string>",
"i18n_key": "<string>",
"message": "<string>",
"request_id": "<string>"
}