BIO.RE
Creator

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.

HeaderRequiredNotes
Authorization: Bearer <accessToken>JWT from POST /auth/login

Response

200 OKApiResponseOf<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

FieldTypeNotes
bankDetailsobjectAll bank-related fields plus verified flag and verifiedAt timestamp
bankDetails.iban / .bankName / .accountHolderName / .swiftCode / .bankCountrystring | nullMirror of CreatorProfile columns
bankDetails.verifiedbooleanTrue when admin has verified the bank record. Resets to false on any bank field change (see PATCH /creators/bank-details)
bankDetails.verifiedAtstring (ISO 8601) | nullWhen admin verified
stripeConnectobjectSnapshot of stored Stripe Connect state (live state from the payment provider is on /creators/stripe-connect/status)
stripeConnect.connectedbooleantrue when CreatorProfile.stripeAccountId is non-null
stripeConnect.payoutsEnabledbooleanMirror of CreatorProfile.stripePayoutsEnabled
preferredPayoutMethodenum | nullSTRIPE_CONNECT / BANK_TRANSFER, or null
availableMethods.STRIPE_CONNECTbooleanComputed: stripeAccountId != null && stripePayoutsEnabled
availableMethods.BANK_TRANSFERbooleanComputed: bankAccountVerified === true

Errors

HTTPcode / i18nKeyReason
401(guard)Missing / invalid bearer token
404creator.payout.not_foundNo CreatorProfile for this user — call POST /creators/upgrade first

Side effects

  1. prisma.creatorProfile.findUnique({ where: { userId }, select: { iban, bankName, accountHolderName, swiftCode, bankCountry, bankAccountVerified, bankVerifiedAt, preferredPayoutMethod, stripeAccountId, stripePayoutsEnabled } }).
  2. Throw not_found if missing.
  3. Compute availableMethods bitmap from the loaded fields.
  4. 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

GET
/api/v1/creators/payout-settings
AuthorizationBearer <token>

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

SourcePathLines
Controllerapps/api-core/src/modules/creator/creator.controller.ts255–262 (getPayoutSettings)
DTO (response)apps/api-core/src/modules/creator/dto/creator-client-response.dto.ts529–541 (PayoutSettingsResponseDto), 490–527 (nested DTOs)
Serviceapps/api-core/src/modules/creator/creator.service.ts864–902 (getPayoutSettings)
Prisma modelpackages/prisma/prisma/schema.prismaCreatorProfile (bank fields + Stripe fields + preferredPayoutMethod)

On this page