Update a virtual account

Update virtual details like name and email

PATCH
https://api.tryduplo.com/v1/virtual-accounts:account_ref
Parameter
Field
Type
Description
account_name
(optional)
String
user account_name with the bank
curl --location --request PATCH 'https://api.duplo.com/virtual-accounts/dp_act_2rNR8EyioMDwEcHCeXh2wXi' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer dp_test_P2tH90snfuQB0qlPopnhdgkOpbs' \
--data-raw '{
   "email": "victor@duplo.com",
   "phonenumber": "09029308134",
   "first_name": "Victor",
   "last_name": "Alade",
   "account_name" :"Victor Alade"
}'
const duplo = require('duplo')('dp_test_P2tH90snfuQB0qlPopnhdgkOpbs');
const virtualAccount = await duplo.virtualAccount.update('dp_act_2rNR8EyioMDwEcHCeXh2wXi',{
 email: 'victor@duplo.com',
 phonenumber: '09029308134',
 first_name: 'Victor',
 last_name: 'Alade',
 "account_name" :"Victor Alade"
});
$duplo = new \Duplo\DuploClient(
 'dp_test_P2tH90snfuQB0qlPopnhdgkOpbs'
);
$duplo->virtualAccount->update('dp_act_2rNR8EyioMDwEcHCeXh2wXi',
 [
   'email'=> 'victor@duplo.com',
   'phonenumber' => '09029308134',
   'first_name' => 'Victor',
   'last_name' => 'Alade',
   "account_name" :"Victor Alade"
 ]
);
200 OK
{
   "data": {
       "provider": {
           "bank_code": "053",
           "bank_name": "Providus",
           "id": "providus",
           "default": true
       },
       "email": "victor@gmail.com",
       "phone_number": "08085279945",
       "account_ref": "dp_act_d9e4a2a9070662bc592f44291352dfaa",
       "status": "active",
       "account_name": "Victor Alade",
       "account_number": "9977632335",
       "bvn": "93727462837646542",
       "created_at": "2021-08-09T10:40:20.225Z"
   },
   "errors": {},
   "message": "Request successful"
}
Need Support?

Helpful resources while you’re building or for that tricky problem you might be having.

Go to Help Center
Did this page help you?
Yes
No