Skip to navigation

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

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

1

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

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

2

Send a payment

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

Sending "18Auth" in Postman

3

Check the response

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

The response in Postman

4

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.

APIOperationPurpose
Payment: 18Auth18AuthStart a payment (one-time billing)
Recurring contract: 18RecStart18RecStartRegister a recurring billing contract
Recurring payment: 18RecAuth18RecAuthExecute a payment under a registered contract

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

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.

ItemCheckboxRole
MerchantId, OperateIdONSent as they are
EncryptValueONThe value generated by the Pre-request Script is sent
MerchantPass, Amount, etc.OFFInput values before encryption. They are not sent; they are the source data from which EncryptValue is generated

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

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.

APIOperationPurpose
Capture: 18Capture18CaptureCapture an authorized transaction
Cancel authorization: 18Cancel18CancelCancel an authorized transaction
Refund: 18Refund18RefundRefund a paid transaction
Change amount: 18Change18ChangeChange the amount of a transaction
Sync: 18Search18SearchCheck the current status of a transaction
Recurring sync: 18RecSearch18RecSearchCheck the status of a recurring contract
Recurring cancel: 18RecCancel18RecCancelCancel a recurring contract

For the items in each message, see 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

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.

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.

See “Code definitions” in Interface Details.