Get Payout Settings
Consolidated read of bank details, Stripe Connect status, preferred method, and the available-methods bitmap. Owner-only.
GET /api/v1/creators/payout-settings — 🔑 Bearer
Returns the current creator's payout configuration in a single call: bank details (with verified flag), Stripe Connect snapshot, the preferred method enum, and a derived availableMethods bitmap (STRIPE_CONNECT true when Stripe is connected AND payoutsEnabled; BANK_TRANSFER true when the bank account is admin-verified).
The availableMethods bitmap is the source of truth for which payout buttons to render. preferredPayoutMethod is just the user's stated preference — render the actual options off availableMethods so disabled methods don't ghost the UI.
Request
No body, no params. Identity comes from the bearer token.
| Header | Required | Notes |
|---|---|---|
Authorization: Bearer <accessToken> | ✓ | JWT from POST /auth/login |
Response
200 OK — ApiResponseOf<PayoutSettingsResponseDto>
{
"success": true,
"data": {
"bankDetails": {
"iban": "TR000000000000000000000000",
"bankName": "Example Bank",
"accountHolderName": "John Doe",
"swiftCode": "EXAMPTRIS",
"bankCountry": "TR",
"verified": false,
"verifiedAt": null
},
"stripeConnect": {
"connected": true,
"payoutsEnabled": true
},
"preferredPayoutMethod": "STRIPE_CONNECT",
"availableMethods": {
"STRIPE_CONNECT": true,
"BANK_TRANSFER": false
}
}
}Top-level fields
| Field | Type | Notes |
|---|---|---|
bankDetails | object | All bank-related fields plus verified flag and verifiedAt timestamp |
bankDetails.iban / .bankName / .accountHolderName / .swiftCode / .bankCountry | string | null | Mirror of CreatorProfile columns |
bankDetails.verified | boolean | True when admin has verified the bank record. Resets to false on any bank field change (see PATCH /creators/bank-details) |
bankDetails.verifiedAt | string (ISO 8601) | null | When admin verified |
stripeConnect | object | Snapshot of stored Stripe Connect state (live state from the payment provider is on /creators/stripe-connect/status) |
stripeConnect.connected | boolean | true when CreatorProfile.stripeAccountId is non-null |
stripeConnect.payoutsEnabled | boolean | Mirror of CreatorProfile.stripePayoutsEnabled |
preferredPayoutMethod | enum | null | STRIPE_CONNECT / BANK_TRANSFER, or null |
availableMethods.STRIPE_CONNECT | boolean | Computed: stripeAccountId != null && stripePayoutsEnabled |
availableMethods.BANK_TRANSFER | boolean | Computed: bankAccountVerified === true |
Errors
| HTTP | code / i18nKey | Reason |
|---|---|---|
401 | (guard) | Missing / invalid bearer token |
404 | creator.payout.not_found | No CreatorProfile for this user — call POST /creators/upgrade first |
Side effects
prisma.creatorProfile.findUnique({ where: { userId }, select: { iban, bankName, accountHolderName, swiftCode, bankCountry, bankAccountVerified, bankVerifiedAt, preferredPayoutMethod, stripeAccountId, stripePayoutsEnabled } }).- Throw
not_foundif missing. - Compute
availableMethodsbitmap from the loaded fields. - Return assembled object. No mutations.
Code samples
curl https://api.bio.re/api/v1/creators/payout-settings \
-H "Authorization: Bearer $ACCESS_TOKEN"type PayoutMethod = 'STRIPE_CONNECT' | 'BANK_TRANSFER';
type PayoutSettings = {
bankDetails: {
iban: string | null;
bankName: string | null;
accountHolderName: string | null;
swiftCode: string | null;
bankCountry: string | null;
verified: boolean;
verifiedAt: string | null;
};
stripeConnect: {
connected: boolean;
payoutsEnabled: boolean;
};
preferredPayoutMethod: PayoutMethod | null;
availableMethods: {
STRIPE_CONNECT: boolean;
BANK_TRANSFER: boolean;
};
};
async function getPayoutSettings(accessToken: string): Promise<PayoutSettings> {
const res = await fetch('https://api.bio.re/api/v1/creators/payout-settings', {
headers: { Authorization: `Bearer ${accessToken}` },
});
const json = await res.json();
if (!res.ok || !json.success) {
throw Object.assign(new Error(json?.error?.message ?? 'Payout settings fetch failed'), {
code: json?.error?.code,
});
}
return json.data;
}import { useQuery } from '@tanstack/react-query';
export const creatorKeys = {
payoutSettings: () => ['creators', 'payout-settings'] as const,
};
export function usePayoutSettings() {
return useQuery({
queryKey: creatorKeys.payoutSettings(),
queryFn: async () => {
const res = await fetch('/api/v1/creators/payout-settings');
const json = await res.json();
if (!res.ok || !json.success) {
throw Object.assign(new Error(json?.error?.message ?? 'Payout settings fetch failed'), {
code: json?.error?.code,
i18nKey: json?.error?.i18nKey,
});
}
return json.data as PayoutSettings;
},
staleTime: 30_000,
});
}Try it
Authorization
bearer In: header
Response Body
application/json
application/json
application/json
curl -X GET "https://loading/api/v1/creators/payout-settings"{
"success": true,
"data": {
"bankDetails": {
"iban": "string",
"bankName": "string",
"accountHolderName": "string",
"swiftCode": "string",
"bankCountry": "string",
"verified": true,
"verifiedAt": "2019-08-24T14:15:22Z"
},
"stripeConnect": {
"connected": true,
"payoutsEnabled": true
},
"preferredPayoutMethod": "STRIPE_CONNECT",
"availableMethods": {
"STRIPE_CONNECT": true,
"BANK_TRANSFER": true
}
}
}{
"success": false,
"error": {
"code": "AUTH_UNAUTHORIZED",
"message": "Invalid credentials",
"i18nKey": "auth.login.invalid_credentials",
"i18nVars": {
"field": "email"
},
"details": [
{
"message": "email must be an email"
}
],
"correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}{
"success": false,
"error": {
"code": "AUTH_UNAUTHORIZED",
"message": "Invalid credentials",
"i18nKey": "auth.login.invalid_credentials",
"i18nVars": {
"field": "email"
},
"details": [
{
"message": "email must be an email"
}
],
"correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Source
| Source | Path | Lines |
|---|---|---|
| Controller | apps/api-core/src/modules/creator/creator.controller.ts | 255–262 (getPayoutSettings) |
| DTO (response) | apps/api-core/src/modules/creator/dto/creator-client-response.dto.ts | 529–541 (PayoutSettingsResponseDto), 490–527 (nested DTOs) |
| Service | apps/api-core/src/modules/creator/creator.service.ts | 864–902 (getPayoutSettings) |
| Prisma model | packages/prisma/prisma/schema.prisma | CreatorProfile (bank fields + Stripe fields + preferredPayoutMethod) |
Set Vacation Mode
Toggle vacation mode with optional start/end window. Status flips ACTIVE↔VACATION only — SUSPENDED/BANNED/DEACTIVATED accounts are protected from this transition.
Update Bank Details
Sparse update of bank fields (IBAN/SWIFT/holder/country/name) plus optional preferred-method choice. ANY bank field change resets the verified flag — admin must re-verify before BANK_TRANSFER becomes available again.