Skip to content

Collect payments

A form can take a payment as part of submitting: registration fees, application fees, orders, donations or deposits. Money goes straight to your own payment gateway account. KyraForm never holds it.

Available on Pro and above.

GatewayBest forWhat you need from the gateway
RazorpayIndiaKey ID (rzp_live_…), Secret Key, optional Webhook Secret
PaytmIndiaMID, Merchant Key, Website (usually DEFAULT), Industry Type ID (such as Retail)
PayUIndiaKey, Salt
StripeInternational cardsSecret Key (sk_live_… or sk_test_…), optional Webhook Signing Secret (whsec_…)
PayPalInternational payers with a PayPal account or cardClient ID and Client Secret of a REST app (Apps & Credentials in the PayPal Developer dashboard), optional Webhook ID
BillDeskIndian banks and institutionsMerchant ID, Client ID and secret

Find these in your gateway’s dashboard, usually under Settings → API keys. Use test keys first, make a test payment, then switch to live keys. For PayPal, sandbox app credentials are test keys.

Pick the Currency under the gateway. The list only shows currencies that gateway accepts:

GatewayCurrencies
StripeINR, USD, EUR, GBP, AUD, CAD, SGD, AED, CHF, NZD, HKD, SEK, NOK, DKK, MYR, ZAR, SAR, MXN, BRL, PLN, THB, PHP, JPY
RazorpayAll of Stripe’s except BRL, PLN and JPY. Anything other than INR needs International Payments switched on in your Razorpay account.
PayPalAll of Stripe’s except INR, AED, ZAR and SAR. PayPal doesn’t take INR.
PayU, Paytm, BillDeskINR only

Existing forms keep charging in INR. If you switch to a gateway that doesn’t accept the current currency, the currency changes to one it does accept, so check it before you publish.

Yen (JPY) has no decimal places, so amounts must be whole numbers. Every other currency allows two.

  1. Open the form, then Settings → Payment, and turn on Enable Payment Collection (“Take a payment as part of this form.”).

  2. Choose When to collect:

    OptionHow it works
    After filling the form“The response is saved, then payment is taken. Amount can depend on the answers.”
    Before filling the form“Payment unlocks the form. Fixed amount only, since there are no answers yet.”
  3. Pick the Payment Gateway, choose the currency and enter its keys.

  4. Fill in the registration details: a Tenant Name (for example MyOrg_FormName), the Redirect URL (on success) and the Cancel URL (on failure). Then register. Once it’s done you see Registered with a Tenant ID. Use Re-register if you change gateways or keys.

  5. Set the amount.

  6. Map the customer details.

  7. Publish the form. The publish check blocks publishing if no amount is set.

Secret keys stay on the server and are removed from the form before it’s sent to respondents’ browsers.

Choose the Amount Type:

TypeUse forExample
Static AmountOne fixed priceRegistration fee Amount (USD) 25.00
From a FieldThe respondent enters or picks the amountA Number question Donation amount
Calculated VariableThe price depends on answerstickets * 750 or a value-mapping variable for plan prices

With Before filling the form, only Static Amount is allowed: “Fixed only — the amount has to be known before anyone answers anything.”

The amount is always recalculated on the server from the submitted answers, so it can’t be changed in the browser. Link parameters and hidden fields can never set it.

“Map form fields to pass customer details to the payment gateway.” Pick the Email Field and Mobile Field so the gateway can pre-fill its checkout and send receipts.

  1. They fill in the form and submit (or, with Before filling the form, pay first).
  2. The gateway’s checkout opens: cards, UPI, net banking or wallets, depending on your gateway. With PayPal they go to PayPal, approve the payment there, and the payment is taken when they come back.
  3. After paying they come back to a payment status page, then your thank-you page.
  4. If they cancel or the payment fails, they see that on the status page and can try again.

In an embedded form, checkout opens in a new tab because payment pages can’t load inside other websites.

The form’s responses page gets a Payments tab showing each response’s payment status. It’s visible to people with full access to the form’s responses. Payment events can also go to your systems through webhooks (payment.succeeded, payment.failed).

Refunds are made in your gateway’s dashboard.

PayPal works without webhooks. The payment is captured when the respondent comes back from PayPal. Adding a webhook covers people who approve the payment on PayPal and then close the tab before they’re redirected back:

  1. In the PayPal Developer dashboard, open your REST app and add a webhook pointing at your payments service URL followed by /api/webhook/paypal.
  2. Subscribe it to Checkout order approved, Payment capture completed and Payment capture denied.
  3. Copy the Webhook ID, paste it into the form’s PayPal settings, and Re-register.