production

Quick start

1. Get your credentials

Your LintasPay account manager opens your account and gives you the initial password. Sign in to the merchant portal (/portal, email + password), then change the password and bind Google Authenticator and/or your email in Security. There you find:

ItemWhat it is
app_id64-character lowercase hex, derived from your upstream binding (portal Settings). It goes in every request's Authorization header. Do not send the upstream id.
merchantIdYour merchant number. It appears in responses and callbacks.
Your key pairSandbox: we generate an RSA-2048 pair for you — download the private key once from portal Key management (we delete our encrypted copy right after). Production: you generate the pair and submit only the public key in portal Key management.
LintasPay public keyUsed to verify our responses and callbacks. You can also download it.

Generate your key pair with OpenSSL. PKCS8 is required for the Java sample and for in-browser signing in Swagger:

openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out merchant_private_key.pem
openssl pkey -in merchant_private_key.pem -pubout -out merchant_public_key.pem

For production, paste merchant_public_key.pem into portal Key management (RSA ≥ 2048 bits, BEGIN PUBLIC KEY or BEGIN RSA PUBLIC KEY). Never send the private key. Until a public key is registered, API calls fail with 10011432 (merchant_key_missing). Swagger does not upload keys: the Sign requests panel signs in your browser, and the private key never leaves the page.

The app_id you send is not the upstream application id. Your account manager gives you the downstream value derived from your upstream binding.

In portal Settings, add the server IPs you call from (IP whitelist) and your pay-in / pay-out callback URLs (https in production). Every change is confirmed with an emailed code. Orders without their own notifyUrl use these callback URLs.

2. Make your first call

The bank list call has no side effects, so it's a good first test:

APP_ID=your_app_id
URL_PATH=/data/bank-list
BODY='{"type":1}'
AUTH="app_id=$APP_ID,nonce=$(openssl rand -hex 16),timestamp=$(date +%s)000"
SIGN=$(printf '%s\nPOST\n%s\n%s\n' "$AUTH" "$URL_PATH" "$BODY" \
  | openssl dgst -sha256 -sign merchant_private_key.pem | base64 | tr -d '\n')

curl -sS -X POST "https://test.lintaspay.xyz$URL_PATH" \
  -H 'Content-Type: application/json' \
  -H "Authorization: LINTASPAY-SHA256withRSA $AUTH,sign=$SIGN" \
  -H "lintaspay-request-id: $(openssl rand -hex 16)" \
  -d "$BODY"

A response with "code":0 means your signing works. Full helpers for Node.js, Python, PHP and Java are on Signing requests.

3. Collect a payment

  1. Call Create pay-in order with productCode 11 (BNI VA) and amount "10000".
  2. Show the returned payCode (VA number) to your customer. Or send the customer to cashierUrl, our hosted checkout page. It shows the order total, order number and a countdown, plus the same code: a QRIS code as a scannable QR, a DANA link as a QR and a button, a VA or store code as text to copy. The customer can tap "I have paid" to re-check, and the page switches to "paid", "failed" or "expired" by itself. It is in English, needs no login, and can be embedded in your own page.
  3. When the customer pays, LintasPay posts a pay-in notification to your notifyUrl. Reply {"status":"SUCCESS"}.
  4. If you haven't received it, call Query pay-in order.

4. Send a payout

  1. Get a bankId from Bank list. Optionally, check the account with Verify bank account.
  2. Call Create payout.
  3. Wait for the payout notification, or poll Query payout, until orderStatus is 4 (success) or 5 (failed). Create and query also return receiptUrl, a public receipt page for the payout. It shows a screenshot-ready "Payout sent" receipt once orderStatus is 4, and an in-progress or failed page before that.
  4. Read the payout final-state rule before you go live.

5. Go live

When the sandbox flow works end to end, switch the base URL to production and use your production app_id and keys. Production accounts are separate. See Environments.