Search code examples
payment-gatewaybalanced-payments

Add Merchant Details to "Buyer" Account


I am using the REST API with C# so I'm not sure how much it will help if I share my code.

I have an account whose only role is buyer and only has 1 credit card linked.

I would like to add the merchant role to this account by linking a bank account and the necessary merchant information.

If I have the following account:

{
"holds_uri": "/v1/marketplaces/MyMarket/accounts/MyAccount/holds",
"name": "John Smith",
"roles": [
    "buyer"
],
"created_at": "2012-11-06T02:54:03.300028Z",
"uri": "/v1/marketplaces/MyMarket/accounts/MyAccount",
"bank_accounts_uri": "/v1/marketplaces/MyMarket/accounts/MyAccount/bank_accounts",
"refunds_uri": "/v1/marketplaces/MyMarket/accounts/MyAccount/refunds",
"meta": {},
"debits_uri": "/v1/marketplaces/MyMarket/accounts/MyAccount/debits",
"transactions_uri": "/v1/marketplaces/MyMarket/accounts/MyAccount/transactions",
"email_address": "[email protected]",
"id": "MyAccount",
"credits_uri": "/v1/marketplaces/MyMarket/accounts/MyAccount/credits",
"cards_uri": "/v1/marketplaces/MyMarket/accounts/MyAccount/cards"
}

I understand I can POST the following bank account information to the account's bank_account_uri to link the bank account to the account:

{
"name": "WHC III Checking",
"account_number": "12341234",
"bank_code": "321174851"
}

The account still only shows a single buyer role after POSTing the new bank account information to the account's bank_account_uri.

How do I add the merchant role to an existing buyer account using the Balanced Payments REST API?


Solution

  • I found some help on the BalancedPayments IRC channel.

    This article shows how: Promote a Buyer Account to a Merchant

    You need to submit a PUT request with the merchant details in the body to the account_uri

    PUT /v1/marketplaces/MyMarket/accounts/MyAccount
    
    {
    "merchant": {
        "phone_number": "+19046281796",
        "city": "San Francisco",
        "name": "jo",
        "dob": "1984-01",
        "state": "CA",
        "postal_code": "94110",
        "type": "person",
        "street_address": "Somewhere over the rainbow",
        "tax_id": "013825400"
    }
    }