Skip to content

Instantly share code, notes, and snippets.

@pdrolima
Created February 18, 2026 20:09
Show Gist options
  • Select an option

  • Save pdrolima/388ea2f9eeb851e3580879ebade64174 to your computer and use it in GitHub Desktop.

Select an option

Save pdrolima/388ea2f9eeb851e3580879ebade64174 to your computer and use it in GitHub Desktop.
const response = await this.wooviRequest('POST', '/subscriptions', {
name: `finl ${plan.name} — ${params.billingCycle === 'yearly' ? 'Anual' : 'Mensal'}`,
value: amount,
correlationID,
type: 'PIX_RECURRING',
dayGenerateCharge: dayOfMonth,
dayDue: 7,
comment: `finl ${plan.name} — ${params.billingCycle === 'yearly' ? 'Anual' : 'Mensal'}`,
frequency: params.billingCycle === 'yearly' ? 'ANNUALLY' : 'MONTHLY',
customer: {
name: customerName,
email: params.userEmail,
taxID: cpfDigits,
address: params.address ?? {
zipcode: '09531150',
street: 'Alameda Porcelana',
number: '185',
complement: 'Apt 134 E',
neighborhood: 'Ceramica',
city: 'Sao Caetano do Sul',
state: 'SP',
},
},
pixRecurringOptions: {
journey: 'PAYMENT_ON_APPROVAL',
retryPolicy: 'NON_PERMITED',
},
additionalInfo: [
{ key: 'userId', value: params.userId },
{ key: 'planId', value: params.planId },
{ key: 'billingCycle', value: params.billingCycle },
],
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment