Created
February 18, 2026 20:09
-
-
Save pdrolima/388ea2f9eeb851e3580879ebade64174 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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