> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bouquet-inc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect with Checkout Address Validator JP

> Validate the shipping addresses customers add or edit in the allocation screen with the same rules and error messages as checkout.

When you connect [Checkout Address Validator JP](https://apps.shopify.com/checkout-address-validator) by Flatto Inc., MultiGifts validates the address with the same rules and error messages as checkout whenever a customer adds or edits a recipient in the allocation screen and presses **登録する** (Save). Customers fix mistakes such as a prefecture that doesn't match the postal code or a missing street number before they order.

> [!NOTE]
>
> Installing Checkout Address Validator JP alone doesn't validate each recipient's address. Checkout validates only the parent order's single shipping address. To validate each recipient's address (the shipping address of the child order), you need this integration.

The integration is available on every plan.

## When addresses are validated

| Situation | Validated? |
| - | - |
| A customer enters an address with **配送先を追加する** (Add a destination) and presses **登録する** (Save) | Yes |
| A customer edits an address in the address book with **編集** (Edit) and presses **登録する** (Save) | Yes |
| A customer selects an existing address in the address book as it is | No |
| Phone number | No (MultiGifts checks only the number of digits) |

## Set it up

**1. Install Checkout Address Validator JP and set up its rules**

Install it from the [Shopify App Store](https://apps.shopify.com/checkout-address-validator) and set up the validation rules and error messages. The rules and messages you use at checkout are used for recipients' addresses as well.

**2. Issue an API key**

In Checkout Address Validator JP, open **設定** (Settings) → **API連携** (API integration) and press **APIキーを発行** (Issue API key). Copy the **API key** (starts with `pk_`) and the **secret** (starts with `sk_`). The secret is shown only when it's issued.

![The API integration section in the settings of Checkout Address Validator JP, with the API key and secret fields and the reissue and revoke buttons (after a key has been issued)](https://mintcdn.com/bouquet-inc/dFtGjgK3bRjAr3qh/images/multigifts/address-validator-api-key.jpg?fit=max\&auto=format\&n=dFtGjgK3bRjAr3qh\&q=85\&s=5e877ed4da7a810dff12b1223ecc7d2f)

**3. Register the API key and secret in MultiGifts**

Open **連携アプリ** (Integrations) in the MultiGifts menu, enter the **API キー** (API key) and **シークレット** (secret), and press **保存** (Save). MultiGifts validates a sample address once when saving, and **連携の状態** (Status) becomes **連携中** (Connected).

![The Integrations page of MultiGifts. The status is Connected, with the API key and secret fields](https://mintcdn.com/bouquet-inc/dFtGjgK3bRjAr3qh/images/multigifts/address-validator-admin.jpg?fit=max\&auto=format\&n=dFtGjgK3bRjAr3qh\&q=85\&s=2a724f4bdfd5e2c35a8c1cf421dc9b0f)

If the API key or secret is wrong, nothing is saved and the message "API キーかシークレットが正しくありません" (The API key or secret is incorrect) appears. Enter the values you issued.

**4. Check it on your storefront**

In the cart, open **複数のお届け先に送る** (Ship to multiple addresses) → **配送先を追加する** (Add a destination), enter an address with a deliberate mistake (for example, a prefecture that doesn't match the postal code), and press **登録する** (Save). If the error message from Checkout Address Validator JP appears below the field and the form stays open, the setup is complete. It can take a little while after saving for the change to reach the storefront.

![The "新しいお届け先を追加" (Add a new recipient) form in the allocation screen. Below the prefecture field: "郵便番号100-0001は東京都の住所です。都道府県を「東京都」に修正してください。"](https://mintcdn.com/bouquet-inc/rvTriPsVTyWOQlee/images/multigifts/address-validator-storefront-error.jpg?fit=max\&auto=format\&n=rvTriPsVTyWOQlee\&q=85\&s=5319ce94b3ec815278b5b187b980a8c1)

## What customers see

* After pressing **登録する** (Save), "住所を確認しています…" (Checking the address…) appears and the button is disabled until the check finishes (this can take a few seconds)
* If there's a mistake, the error message appears below the field and the form stays open. When the customer fixes it and presses **登録する** (Save) again, the address is registered
* A message that doesn't belong to a specific field appears above the **登録する** (Save) button
* The messages are the ones set in Checkout Address Validator JP. They stay in Japanese on English storefronts

## When the address can't be validated, it's registered as it is

When Checkout Address Validator JP can't be reached or the API key no longer works, MultiGifts doesn't stop the customer: the address is registered without validation. The issue is shown with its date and time on the **連携アプリ** (Integrations) page of MultiGifts.

| Message on the Integrations page | What happened | What to do |
| - | - | - |
| API キーかシークレットが使えなくなっています (The API key or secret no longer works) | The API key was reissued or revoked in Checkout Address Validator JP | Register the new API key and secret |
| 届きませんでした (Couldn't be reached) | No response because of an outage or a timeout | Wait a while, then check on your storefront |
| 月間の上限に達したため、一部の確認を飛ばしました (The monthly limit was reached, so some checks were skipped) | The monthly limit of your Checkout Address Validator JP plan was reached | To raise the limit, change your Checkout Address Validator JP plan |
| 保存済みのシークレットを読めません (The saved secret can't be read) | The saved secret can no longer be read | Enter the secret again and save |

## Data sent and usage

For each check, MultiGifts sends the **last name, first name, postal code, prefecture, city, street address, and building** the customer entered to Checkout Address Validator JP. The phone number isn't sent. MultiGifts doesn't store the result, and the address is saved to the customer's Shopify account (see [Where are recipients' addresses saved?](https://docs.bouquet-inc.com/en/apps/multigifts/faq/addresses.md)).

A check runs each time a customer presses **登録する** (Save), and once with a sample address when you save on the Integrations page. These checks may count toward the usage of Checkout Address Validator JP.

## Change the API key or disconnect

* If you **reissue** the API key in Checkout Address Validator JP, the previous key stops working. Register the new API key and secret on the **連携アプリ** (Integrations) page. Until then, addresses are registered without validation
* If you leave a field empty when saving on the Integrations page, the registered value for that field is kept
* Press **連携を解除する** (Disconnect) to delete the registered API key and secret and stop validating. To connect again, enter the API key and secret again
* Uninstalling MultiGifts also deletes the registered API key and secret

## Related pages

* [Where are recipients' addresses saved?](https://docs.bouquet-inc.com/en/apps/multigifts/faq/addresses.md)
* [From order to child orders](https://docs.bouquet-inc.com/en/apps/multigifts/orders/how-it-works.md)
* [MultiGifts FAQ](https://docs.bouquet-inc.com/en/apps/multigifts/faq.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.