Create account
Creates a production or sandbox account. For sandbox (`sandbox_mode=true`), `prod_account_id` is required so the sandbox is linked to a live account. The handler may return **200** or **201** with the same success envelope.
Authorization
bearerAuth Use Authorization: Bearer <token>. The same header supports: (1) JWT access token from the configured auth provider; (2) secret API key whose value contains sk_ within the first 32 characters (e.g. sk_live_…, sk_test_…); (3) publishable key containing pk_. Sandbox keys typically include _test_ in the string; the server resolves repositories from that.
In: header
Query Parameters
Sandbox hesabı oluşturmak istersen bunu göndermek zorundasın. Aksi takdirde sandbox hesabı oluşturamazsın.
Sandbox account oluştururken, bu alanı doldurursan yeni açılan sandbox hesabı hangi prod hesabına bağlı olacak onu belirtmiş oluyorsun. Yani accounts.1234 dersen, sandbox_accounts tablosunda prod_account_id olarak accounts.1234 atanır.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.hsrcpay.com/v1/accounts/" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "country": "US", "currency": "USD", "timezone": "Europe/Istanbul" }'{
"message": "success",
"success": true,
"data": {
"object": "account",
"id": "string",
"user_id": "string",
"workspace_id": "string",
"name": "string",
"country": "US",
"prod_account_id": "string",
"timezone": "Europe/Istanbul",
"settings": [
{
"object": "account_setting",
"id": "string",
"key": "string",
"value": "string",
"created_at": null,
"updated_at": null,
"property1": null,
"property2": null
}
],
"currency": "USD",
"deleted": true,
"created_at": null,
"updated_at": null,
"metadata": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"message": "success",
"success": true,
"data": {
"object": "account",
"id": "string",
"user_id": "string",
"workspace_id": "string",
"name": "string",
"country": "US",
"prod_account_id": "string",
"timezone": "Europe/Istanbul",
"settings": [
{
"object": "account_setting",
"id": "string",
"key": "string",
"value": "string",
"created_at": null,
"updated_at": null,
"property1": null,
"property2": null
}
],
"currency": "USD",
"deleted": true,
"created_at": null,
"updated_at": null,
"metadata": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"message": "string",
"success": false,
"error": {
"code": 0,
"message": "string",
"details": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"message": "string",
"success": false,
"error": {
"code": 0,
"message": "string",
"details": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"message": "string",
"success": false,
"error": {
"code": 0,
"message": "string",
"details": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"message": "string",
"success": false,
"error": {
"code": 0,
"message": "string",
"details": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"message": "string",
"success": false,
"error": {
"code": 0,
"message": "string",
"details": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"message": "string",
"success": false,
"error": {
"code": 0,
"message": "string",
"details": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"message": "string",
"success": false,
"error": {
"code": 0,
"message": "string",
"details": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"message": "string",
"success": false,
"error": {
"code": 0,
"message": "string",
"details": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}