I am using the flutterwave-react-native package to make payments from a mobile app. It works alright but in the webhook I set up, the payload I receive does not have the meta object I passed.
Do you know why this is?
Here is how the implementation is in react native
<PayWithFlutterwave
onRedirect={handleOnRedirect}
options={{
tx_ref: generateTransactionRef('online'),
authorization: 'PUBLIC-KEY',
customer: {
email,
name: fullname,
},
amount: 5000,
currency: 'NGN',
meta: {
ownerId: id,
isUser: true,
productName: safespace.name,
paymentType: 'transaction',
},
}}
customButton={(props) => (
<Pressable
onPress={props.onPress}
isBusy={props.isInitializing}
disabled={props.disabled}
>
<HStack py="8px" px="32px" space="16px">
<OnlineIcon />
<Text color="primary.700" fontWeight={500} fontSize="16px">
Pay Online
</Text>
</HStack>
</Pressable>
)}
/>
And here is the payload that is returned on the webhook endpoint
{
event: 'charge.completed',
data: {
id: 4604664,
tx_ref: 'OLN_PAY_1695038391550',
flw_ref: 'FLW-M03K-2273da3ff574bd960afa134660ffeb46',
device_fingerprint: '*******',
amount: 5000,
currency: 'NGN',
charged_amount: 5000,
app_fee: 70,
merchant_fee: 0,
processor_response: 'Approved',
auth_model: 'noauth-saved-card',
ip: 'ip',
narration: 'narration',
status: 'successful',
payment_type: 'card',
created_at: '2023-09-18T12:00:41.000Z',
account_id: 2231215,
customer: {
id: 2209698,
name: 'victor mario',
phone_number: '081****291',
email: 'email@gmail.com',
created_at: '2023-09-15T14:47:55.000Z'
},
card: {
first_6digits: '553188',
last_4digits: '2950',
issuer: 'MASTERCARD CREDIT',
country: 'NG',
type: 'MASTERCARD',
expiry: '09/32'
}
},
'event.type': 'CARD_TRANSACTION'
}