Comments (10)
Hello Olalekan,
Thanks for contacting Flutterwave!
My name is Chijioke, and I will be helping you today. To use subaccounts, you need to specify a subaccounts
property in the payload and assign it to an array of objects. Here is an example payload:
{
tx_ref: (this as any).generateReference(),
amount: "1000",
currency:"NGN",
redirect_url: "https://my-site.com",// your redirect destination for successful/cancelled transaction
subaccounts: [
{
id: "RS_971XXXXXXXXXXXXXXXXXXXXXXXXXX323",// the subaccount id for splitting payments
}
],
customer: {
name: "John Doe",
email: "[email protected]",
phone_number: "080******44",
},
customizations: {
title: "Modal Title",
description: "Customization Description",
logo: "https://flutterwave.com/images/logo-colored.svg",
},
callback: (this as any).makePaymentCallback,
onclose: (this as any).closeModalCallback,
}
Please click here to learn more about subaccounts on Flutterwave.
I hope this resolves your issue. If you have any further concerns, please reach out to us. We'll be happy to help.
from vue-v3.
Please take a look at the code. Maybe you can spot anything out of place. I can test payments with the property as subaccount
once I use subaccounts
it crashes.
paymentData: {
tx_ref: this.transaction_ref,
amount: this.payment_info.amount,
currency: 'NGN',
payment_options: 'banktransfer,card,ussd,account',
redirect_url: '',
meta: {
'service_name': this.payment_info.name + " fee payment",
'service_description': this.payment_info.name + " payment description",
},
customer: {
name: this.$attrs.auth.user.name,
email: this.$attrs.auth.user.email,
phone_number: '081845***044'
},
customizations: {
title: 'Application Payment for ' + this.$attrs.auth.user.name,
description: "",
logo: ''
},
subaccounts: [
{
id: "RS_66D3BXXXXXXX3FDE035"
},
{
id: "RS_DEC08XXXXXXX66D8B15"
}
],
callback: this.makePaymentCallback,
onclose: this.closedPaymentModal
}
from vue-v3.
from vue-v3.
from vue-v3.
Thanks @ChijiokeOkorji This resolved the part of submitting the jobs using the subaccounts
property. However, I still cannot see the split in my account.
from vue-v3.
Log into your Flutterwave Dashboard and click on Subaccounts. Next, select a Subaccount to view more details. Let me know what you see there (if the transaction you performed is among the transactions listed).
from vue-v3.
Unfortunately, I cannot see the transactions under the subaccounts.
Transactions list.
Subaccounts list
from vue-v3.
Hello Olalekan. I'm sorry that you are experiencing this problem. I noticed that you passed two id
objects for the subaccount array in the payload when generating a checkout link. Neither of them match the Account ID of the subaccount you shared above. To test that it is working properly, try passing only one id
(the Account ID for this particular subaccount) when generating the checkout link.
from vue-v3.
Neither of them match the Account ID of the subaccount you shared above.
Thats very strange. I copied from the portal while in test environment. Everything I am doing is in test mode. I have double checked and they are the same ids. If you are referring to the above code snippet, the ids have been redacted with XXXX in between the id displayed above.
Secondly, while this (JSON.parse(JSON.stringify(this.paymentData));
) works to enable successful submission,
It creates a secondary issue where callback: this.makePaymentCallback,
cannot be called after payment is done. This is the error thrown when using the code suggestion above.
flutterwave-vue-v3.esm.js:280 Uncaught (in promise) TypeError: paymentParams.callback is not a function at Object.callback (flutterwave-vue-v3.esm.js:280:27) at v3.js:1:30788
from vue-v3.
Hello @olalekan-agbaje @ChijiokeOkorji
I will be closing this now because we have resolved the issue on the Slack channel.
The issue is majorly not from the SDK but from the split config and account resolve API.
Best regards.
from vue-v3.
Related Issues (17)
- On test mode, OTP is not sent to customer's phone HOT 2
- Whatsapp number not mobile money number HOT 1
- Customer details not binding to input fields HOT 4
- redirect_url returning ‘server not found’ HOT 5
- build failure HOT 5
- Can't close Modal with method HOT 4
- Test mode no longer accepts different currencies HOT 1
- Nuxt Error this.payWithFlutterwave is not a function
- Flutter wave
- CORS error with Flutterwave inline implementation HOT 2
- Does this work with nuxt 3 HOT 1
- CORS HOT 1
- redirect in callback HOT 2
- Dealing with timeouts and prolonged payment procesing HOT 2
- update for vue 3? HOT 5
- Typescript compatibility issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-v3.