1.5 KiB
1.5 KiB
Variables d'environnement nécessaires pour la fonctionnalité "Lancer facture"
GoCardless API
# URL de l'API GoCardless (sandbox ou live)
GOCARDLESS_ENVIRONMENT=sandbox # ou "live" pour la production
GOCARDLESS_ACCESS_TOKEN=your_gocardless_access_token_here
AWS SES (déjà configuré)
AWS_SES_FROM="Odentas <paie@odentas.fr>"
AWS_REGION="eu-west-3"
URL du site (déjà configuré)
NEXT_PUBLIC_SITE_URL="https://your-domain.com"
Instructions pour obtenir les tokens GoCardless
-
Sandbox (développement) :
- Aller sur https://developer.gocardless.com/
- Créer un compte développeur
- Générer un access token sandbox
-
Live (production) :
- Créer un compte GoCardless business
- Aller dans les paramètres API
- Générer un access token live
Colonnes Supabase nécessaires
Assurez-vous que la table invoices contient les colonnes suivantes :
payment_method(text)due_date(date)sepa_day(date)invoice_type(text)site_name(text)notified(boolean)gocardless_payment_id(text)org_id(uuid) - relation vers organizations
Et que la table organization_details contient :
email_notifs(text) - email principal pour les notificationsemail_notifs_cc(text) - email en copie (optionnel)id_mandat_sepa(text) - ID du mandat SEPA dans GoCardlessorg_id(uuid) - relation vers organizations
Structure des relations :
invoices.org_id→organizations.idorganization_details.org_id→organizations.id