# How to create wallets in php

**URL:** <https://community.rapyd.net/t/how-to-create-wallets-in-php/477>\
**Category:** ⚙️ API\
**Created:** [June 17, 2021, 3:37pm UTC](https://community.rapyd.net/t/how-to-create-wallets-in-php/477 "2021-06-17T15:37:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fredjinbility](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@fredjinbility](https://community.rapyd.net/u/fredjinbility)\
**Post date:** [June 17, 2021, 3:37pm UTC](https://community.rapyd.net/t/how-to-create-wallets-in-php/477/1 "2021-06-17T15:37:51Z")

</div>

Good day everyone. I want to create a payment method via RAPYD Collect. it seems the API needs wallets Id. Now I want to create wallets.

Am trying to create a wallet so that I can start making payments via Collects. Am using php. here is my question:

1.) please where can I get **utilities.php** files as requested in create wallets codes here.

2.) Where can I set my secret and access key because its not specified in the code sample below.

[Wallet Object](https://docs.rapyd.net/build-with-rapyd/reference/wallet-object#create-wallet)

```auto
<?php
$path = $_SERVER['DOCUMENT_ROOT'];
$path .= "/<path-to-your-utility-file>/utilities.php";
include($path);
$body = [
    'first_name' => 'John',
    'last_name' => 'Doe',
    'email' => '',
    'ewallet_reference_id' => 'John-Doe-02152020',
    'metadata' => [
        'merchant_defined' => true
    ],
    'phone_number' => '',
    'type' => 'person',
    'contact' => [
        'phone_number' => '+14155551234',
        'email' => 'johndoe@rapyd.net',
        'first_name' => 'John',
        'last_name' => 'Doe',
        'mothers_name' => 'Jane Smith',
        'contact_type' => 'personal',
        'address' => [
            'name' => 'John Doe',
            'line_1' => '123 Main Street',
            'line_2' => '',
            'line_3' => '',
            'city' => 'Anytown',
            'state' => 'NY',
            'country' => 'US',
            'zip' => '12345',
            'phone_number' => '+14155551234',
            'metadata' => [],
            'canton' => '',
            'district' => '',
        ],
        'identification_type' => 'PA',
        'identification_number' => '1234567890',
        'date_of_birth' => '11/22/2000',
        'country' => 'US',
        'metadata' => [
                'merchant_defined' => true
        ],
      ],
    ];

try {
    $object = make_request('post', '/v1/user', $body);
    var_dump($object);
} catch(Exception $e) {
    echo "Error: $e";
}
?>

```

---

<div class="post-metadata">

**Author:** ![Legato](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/legato/32/41_2.png) [@Legato](https://community.rapyd.net/u/Legato)\
**Post date:** [June 18, 2021, 6:30am UTC](https://community.rapyd.net/t/how-to-create-wallets-in-php/477/2 "2021-06-18T06:30:41Z")

</div>

Hi,

1. & 2. Please refer to the PHP tab in the following [link](https://docs.rapyd.net/build-with-rapyd/reference/code-samples#utilities).

.

Thanks

---

<div class="post-metadata">

**Author:** ![fredjinbility](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@fredjinbility](https://community.rapyd.net/u/fredjinbility)\
**Post date:** [June 18, 2021, 9:01am UTC](https://community.rapyd.net/t/how-to-create-wallets-in-php/477/3 "2021-06-18T09:01:16Z")

</div>

Thanks i will check that

---

<div class="post-metadata">

**Author:** ![CharlesDorsett](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/charlesdorsett/32/47_2.png) [@CharlesDorsett](https://community.rapyd.net/u/CharlesDorsett)\
**Post date:** [June 20, 2021, 8:52am UTC](https://community.rapyd.net/t/how-to-create-wallets-in-php/477/4 "2021-06-20T08:52:57Z")

</div>

You can get your access keys in the Client Portal. See [Welcome to Rapyd’s Client Portal](https://docs.rapyd.net/client-portal/docs/home-page)
