Testing and going live

Build and test without a bank facility, then switch to real payments.

Test mode

Every workspace starts in test mode. Test payments go to Kina Bank's test gateway using Kina Bank's shared test merchant, so you need nothing from the bank to begin. Test keys start with cpk_test_ and see only test data.

Test cardNumberExpiryCVV
Visa4012 0000 0000 3010Any future date123
Kina debit card5076 4802 0002 1147As listed in Kina Bank's guide—

These are Kina Bank's published test cards. If one stops working, check Kina Bank's current integration guide.

Never ship goods or services against a test-mode payment. Kina Bank's test secret key is published in its integration guide, so a test "approved" result can be produced by anyone. Test mode proves your integration works; it does not prove anyone paid.

Your server must be reachable

Webhooks are sent from CSHPay to your server over the internet. While developing on your own computer, use a tunnel so your webhook URL is reachable, and register the tunnel's address as a test endpoint.

Going live

  1. Get your own Kina Bank Internet Payment Gateway facility. Kina Bank gives you a Merchant ID, a Terminal ID and a secret key.
  2. Enter them in the dashboard under Kina Bank. The secret key is stored encrypted and is never shown again; afterwards you see only its fingerprint.
  3. Make the check payment. Pay PGK 1.00 with your own card through your new credentials. It proves the three values work together. The money goes to your own Kina Bank account and you can refund it afterwards.
  4. Choose a paid plan under Billing.
  5. Create a live API key and a live webhook endpoint. Live endpoints must use https, and so must your returnUrl.
  6. Swap the key and secret on your server. Nothing else in your code changes.
Replacing your Kina Bank credentials later turns live mode off until a new check payment succeeds.

Before you take real payments

  • Orders are marked paid only from the webhook or the API, never from the customer returning to your site.
  • Your webhook handler verifies the signature against the raw body and rejects old timestamps.
  • Your webhook handler is safe to run twice for the same event.
  • Every create-payment request sends an Idempotency-Key.
  • Your API key is on your server only, and not in your source repository.
  • You have tried a declined card and an abandoned checkout, and your site handles both.

How you are billed

CSHPay is billed monthly in arrears: a plan fee plus any live payments above the plan's allowance. Kina Bank cannot charge a card automatically, so each invoice is taken from prepaid credit if you have enough, or paid by card from the dashboard. An invoice unpaid after 7 days pauses live API requests until it is paid. Test mode is never paused. Money your customers pay you is never touched.