I am creating a project where i am creating an recycler application, in react and python django rest framework and i am creating a wallet where all the sold items amount will be credited in users wallet and the user can transfer the wallet amount to his bank account.
the problem which i am getting in googlepay API is i am getting an option to transfer money from users account to merchant account and i want to transfer money from merchant account to users account.
the code is there in python django rest framework.
I tried to use the refund api but the api needs the transaction id which was initiated at the payment time, but it is not possible.
And now i am thinking a new approach to make user as a receiver and merchant as a payer using a post api of googlepay, and the json provided be as follows
{
"merchantId": "MERCHANTUAT",
"merchantTransactionId": "MT7850590068188104",
"merchantUserId": "MU933037302229373",
"amount": 10000,
"callbackUrl": "https://webhook.site/callback-url",
"mobileNumber": "9999999999",
"deviceContext": {
"deviceOS": "ANDROID"
},
"paymentInstrument": {
"type": "UPI_INTENT",
"targetApp": "com.googlepay.app",
"accountConstraints": [
{
"accountNumber": "420200001892", // Optional. Required only for TPV Flow.
"ifsc": "ICIC0000041" // this should fixed as of merchant details
}
]
}
}
this should fixed as of merchant details "accountNumber": "420200001892", "ifsc": "ICIC0000041"
and in the merchant id should be upi id of user
Can anyone please help me with this issue