You need to have a Merchant Center Account to use the Merchant API. You can use the Merchant Center UI to create it.
If you need to manage multiple accounts, you can create sub-accounts using Merchant API.
You can configure your account in the Merchant Center UI or through the API as described later.
Accept the Merchant Center Terms of Service
All merchants must accept the Merchant Center Terms of Service. Here's how to accept the Terms of Service for your own merchant account:
Call
accounts.termsOfServiceAgreementStates.retrieveForApplication
to find out which Terms of Service are required for your account.Here's a sample request:
GET https://merchantapi.googleapis.com/accounts/v1beta/accounts/{ACCOUNT_ID}/termsOfServiceAgreementStates:retrieveForApplication
Here's a sample response from a successful call:
{ "name": "accounts/{ACCOUNT_ID}/termsOfServiceAgreementStates/MERCHANT_CENTER-{COUNTRY}", "regionCode": {COUNTRY}, "termsOfServiceKind": "MERCHANT_CENTER", "accepted": { "termsOfService": "termsOfService/{VERSION}", "acceptedBy": "accounts/{ACCOUNT_ID}" } }
Call
termsOfService.accept
to accept the Terms of Service.Here's a sample request:
GET https://merchantapi.googleapis.com/accounts/v1beta/{name=termsOfService/{VERSION}}:accept
If successful, the response body will be empty.
We recommend building a UI where you display the TOS to the merchant, and ask them to accept.
Find the TOS the merchant needs to accept using
termsOfService.retrieveLatest
with theregionCode
of the business.Here's a sample request:
GET https://merchantapi.googleapis.com/accounts/v1beta/termsOfService:retrieveLatest
Here's a sample response from a successful call:
{ "name": "termsOfService/{VERSION}", "regionCode": "{COUNTRY}", "kind": "MERCHANT_CENTER", "fileUri": "{URI}" }
Display the TOS from the
fileUri
to the merchant.When the merchant accepts the TOS in your UI, call
termsOfService.accept
with thename
of the TOS to accept.
After the merchant accepts the TOS, you can use Merchant API to set up the
rest of their account information. For details about what account information
you can manage with the Merchant Accounts API, see the
Account
resource.
Claim your website
You can use the Merchant Accounts API to add and claim your business's
Homepage
.
- To add a homepage to your account, call
accounts.updateHomepage
with aHomepage
resource containing your homepage URL. - To claim ownership of the homepage, call
accounts.homepage.claim
with thename
from yourHompeage
resource.
You can't use Merchant API to verify your homepage. For more information, see Verify and claim your store's website.
Update your business details
You can use the Merchant Accounts API to edit your business
PostalAddress
,
CusomerService
,
and
BusinessIdentity
.
Business identity:
- To view your business identity, call
accounts.businessIdentity.getBusinessIdentity
. - To edit your business identity, call
accounts.businessIdentity.updateBusinessIdentity
.
What's next
- Learn how you can create and manage sub-accounts.
- To understand how relationships between merchant accounts work, see Relationships between accounts.