Setting up payments

Connect your own PortOne account and your app takes payments. Sales settle to your bank account on your payment company’s schedule, and DontCode takes no fee on them.

~15 minutes, plus the contract review
Setup guide
admin.portone.ioPortOne docs

What you need

  • Your business registration certificate (사업자등록증). PortOne asks for it when you apply for payments.
  • Your app, live at its address. The payment company looks at it before approving you.
  • Owner or admin access to your DontCode project.

Setup steps

  1. 1

    Make a PortOne account

    Sign up free at admin.portone.io with your email, then open the confirmation email PortOne sends. You can sign in once you confirm it.

  2. 2

    Apply for payments

    In the PortOne console, click 전자결제 신청 on 홈. Upload your business registration certificate, add your app’s address, then choose a payment company and the ways to pay. Toss Payments covers cards, bank transfer and wallets in one contract; the guides below cover each choice.

  3. 3

    Copy your Store ID

    Open 결제 연동 → 연동 관리. Your 상점 아이디 (Store ID) is there, starting with store-. Copy it.

  4. 4

    Issue the API secret

    Open 결제 연동 → 연동 관리 → 식별코드·API Keys and choose V2 API. Click 새로운 API Secret 발급, give it a name, pick when it expires, and click 생성. Copy it right away: PortOne shows it only once. Only an Owner or Admin of the PortOne account can issue one.

  5. 5

    Add a live channel

    Once your contract is approved, open 결제 연동 → 연동 관리 → 채널 관리. Switch the mode to 실연동, pick your payment company and its payment module, and click 다음. Name the channel, enter the merchant ID and keys from your contract, choose 과세구분, and save. The channel shows in the list with its channel key, starting with channel-key-. Copy it.

  6. 6

    Paste it into DontCode

    In your project, open Payments → Connect. Paste the three values into Store ID, API secret and Payment channel, and click Connect. DontCode checks them with PortOne, and your app takes payments once they pass. The API secret is encrypted when you save it and never shown again; only its last four characters stay visible.

Set the webhook

Optional. Without it checkout still works, but a refund you make in PortOne’s own dashboard won’t show in DontCode.

  1. In the PortOne console, open 결제 연동 → 연동 관리 → 결제알림(Webhook) 관리.
  2. Set 웹훅 버전 to 결제모듈 V2 and 설정 모드 to 실연동.
  3. On Payments → Connect, open Payment notices and copy the Webhook URL into Endpoint URL.
  4. Set Content Type to application/json and save.
  5. Click 웹훅 시크릿 발급, copy the secret, and paste it into Webhook secret on Payments → Connect.

Your webhook URL looks like this:

https://payments.dontcode.cafe/api/webhooks/portone/<project id>

Test first

You can connect before your contract is approved. In 채널 관리, switch the mode to 테스트 and add a channel; some payment companies offer a shared test ID to pick. Paste its channel key into Payment channel and pay in your app. Test payments show on Payments with a Test tag and never count toward your sales. When your live channel is ready, paste its key over the test one.

Troubleshooting

PortOne doesn’t accept the API secret

Issue a new one in PortOne and paste the whole value. A secret also stops working on the expiry date you picked; issue a new one then too, and paste it with Replace on Connect.

The API secret can’t open the store

The Store ID and the API secret come from different PortOne accounts. Copy both again from the same account.

A channel key is refused

A channel key starts with channel-key-. Copy it from the channel list in 채널 관리, not the channel’s name or your merchant ID.

You lost the API secret

PortOne shows it only once and DontCode never shows it back. Issue a new one and paste it.