> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://escott.hiito.work/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://escott.hiito.work/_mcp/server.

# Try the ID Payment API with Postman

Postman is a tool for developing APIs: you send a request and check the response. It is widely used by developers around the world. You can also send ID Payment API messages from Postman without writing any code.

* **Quick to start**: Fork the collection, check the connection settings, and you can send your first message right away.
* **Encryption is automatic**: The collection's script performs the AES encryption of Master messages for you.
* **Check results on the spot**: You can see the response on screen. Example responses for both success and error cases are also provided.

This is a handy way to see how the messages behave before you start building your integration.

Click the button below to copy the Postman collection into your own workspace (Fork). You can edit the copied collection freely, and the original collection is not affected. A Postman account is required.

[![Run In Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/54534106-c3514655-5853-47bf-b9d0-011b59ba0bf7?action=collection%2Ffork\&source=rip_markdown\&collection-url=entityId%3D54534106-c3514655-5853-47bf-b9d0-011b59ba0bf7%26entityType%3Dcollection%26workspaceId%3Daf68f4ec-423d-4a3b-b583-c73f3de4d8fa)

> **Note**
>
> The collection, its folders, and its requests are named in Japanese (for example, "Master電文" and "支払：18Auth"). Both the English and the Japanese names are shown below so that you can find them easily.

## 5.1. Steps after forking

#### Check the connection settings

Open the forked collection in Postman and check values such as `baseUrl` on the "Variables" tab.

![The Variables tab in Postman](/_fern-files/_img/f39f0bf9c56e2841b83934a5e23a3563ee408a5a2ebb2085301b2d89f3acaf42.webp)

> **Note**
>
> In this example, `baseUrl` is set to a Postman Mock Server. In a real environment, use the URL issued by SP.LINKS.

#### Send a payment

Open "Payment: 18Auth" (支払：18Auth) in the "Master messages" (Master電文) folder, and click "Send".

![Sending "18Auth" in Postman](/_fern-files/_img/fe0a8d9a58a55964f2af93f61b07e48fe6dcdf26f3e59a4916c045374dc96241.webp)

#### Check the response

Confirm that `ResponseCd` is `OK`, and make a note of `ProcessId` and `ProcessPass`.

![The response in Postman](/_fern-files/_img/dd6588a6b1da8c539548cc350de958ffc3c1d71fcf114215c820405e237be4dd.webp)

#### Send a follow-up message

Set the `ProcessId` and `ProcessPass` you noted in the Body of a request in the "Process messages" (Process電文) folder, and send it, for example to look up the status or to refund.

## 5.2. How to read the requests

The requests in the collection are divided into two folders: "Master messages" and "Process messages".

### Master messages (encrypted)

These APIs start a new transaction. Most of the request is sent as `EncryptValue`, which is encrypted with AES.

| API                            | Operation    | Purpose                                       |
| ------------------------------ | ------------ | --------------------------------------------- |
| Payment: 18Auth                | `18Auth`     | Start a payment (one-time billing)            |
| Recurring contract: 18RecStart | `18RecStart` | Register a recurring billing contract         |
| Recurring payment: 18RecAuth   | `18RecAuth`  | Execute a payment under a registered contract |

All items other than `MerchantId` and `OperateId` are encrypted as follows and sent as `EncryptValue`.

```text
1. URL-encode each parameter and join them with &
2. Encrypt the joined string with AES-CBC (PKCS5Padding)
3. Base64-encode the result to get EncryptValue
```

In Postman, the Pre-request Script performs this encryption automatically. Read the items on the Body tab as follows.

| Item                           | Checkbox | Role                                                                                                               |
| ------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------ |
| `MerchantId`, `OperateId`      | ON       | Sent as they are                                                                                                   |
| `EncryptValue`                 | ON       | The value generated by the Pre-request Script is sent                                                              |
| `MerchantPass`, `Amount`, etc. | OFF      | Input values before encryption. They are not sent; they are the source data from which `EncryptValue` is generated |

> **Tip**
>
> To change what gets encrypted, edit the values of the items whose checkbox is OFF.

> **Warning**
>
> If you turn an OFF item back ON, the Pre-request Script returns an error (this prevents sending unencrypted values by mistake).

### Process messages (not encrypted)

These APIs perform follow-up operations on an existing transaction. No encryption is needed. You identify the target transaction with the `ProcessId` and `ProcessPass` obtained from the response to a Master message.

| API                            | Operation     | Purpose                                   |
| ------------------------------ | ------------- | ----------------------------------------- |
| Capture: 18Capture             | `18Capture`   | Capture an authorized transaction         |
| Cancel authorization: 18Cancel | `18Cancel`    | Cancel an authorized transaction          |
| Refund: 18Refund               | `18Refund`    | Refund a paid transaction                 |
| Change amount: 18Change        | `18Change`    | Change the amount of a transaction        |
| Sync: 18Search                 | `18Search`    | Check the current status of a transaction |
| Recurring sync: 18RecSearch    | `18RecSearch` | Check the status of a recurring contract  |
| Recurring cancel: 18RecCancel  | `18RecCancel` | Cancel a recurring contract               |

For the items in each message, see [Interface Details](/multi-payment/id-payment/interface-details).

## 5.3. Usage scenarios

### One-time billing (immediate capture)

The payment is completed immediately at the time of purchase.

1. Start the payment with 18Auth. If `ResponseCd` is `OK`, you get `ProcessId` and `ProcessPass`.
2. Check the transaction status with 18Search.
3. If needed, refund with 18Refund.

### One-time billing (capture at shipment)

The sale is captured when the goods are shipped.

1. Obtain the authorization with 18Auth.
2. After shipment, capture the sale with 18Capture.
3. If the goods are not shipped, cancel the authorization with 18Cancel.
4. If a refund is needed after capture, use 18Refund.

### Recurring billing

A flow for periodic payments such as monthly billing.

1. Register the contract with 18RecStart.
2. Execute each payment with 18RecAuth.
3. Check the contract status with 18RecSearch.
4. Cancel the contract with 18RecCancel.

## 5.4. FAQ

#### Where do I get ProcessId and ProcessPass?

They are included in the success response of the Master messages (18Auth, 18RecStart, and 18RecAuth). Set these values in the Body when you send a Process message.

#### Do I need to generate EncryptValue myself?

No. In the collection, the Pre-request Script generates it automatically. Just edit the items whose checkbox is OFF on the Body tab, and they are encrypted when you send.

#### What do the PayType values mean?

See "Code definitions" in [Interface Details](/multi-payment/id-payment/interface-details).