Reference

Payment Form

HTML form-based integration for creating secure checkout sessions without JavaScript. Supports order management, customer creation, payment customization, and redirect handling with simple form submissions.

Form basic example

<form action="https://kwik.co.za/checkout/form" method="post">
  <input type="hidden" name="public_key" value="q9ZfVf7dT9g1uEJpXj7lZ0n2W8kYz4aLJc3p5Qw7s2A">
  <input type="hidden" name="mode" value="one-off"> <!-- recurring or save -->
  <input type="hidden" name="amount" value="100.00">
  <input type="hidden" name="currency" value="ZAR">

  <input type="submit">
</form>

Form advanced example

<form action="https://kwik.co.za/checkout/form" method="post">
  <input type="hidden" name="public_key" value="q9ZfVf7dT9g1uEJpXj7lZ0n2W8kYz4aLJc3p5Qw7s2A">
  <input type="hidden" name="mode" value="one-off"> <!-- recurring or save -->
  <input type="hidden" name="amount" value="100.00">
  <input type="hidden" name="currency" value="ZAR">
  <input type="hidden" name="item_name" value="Test Product">

  <!-- [optional: redirects] -->
  <input type="hidden" name="return_url" value="https://www.example.com/success">
  <input type="hidden" name="cancel_url" value="https://www.example.com/cancel">
  <input type="hidden" name="notify_url" value="https://www.example.com/notify">

  <!-- [optional: order details] -->
  <!-- either pass the order_id or the order object -->
  <input type="hidden" name="order_id" value="ord_12345">
  <!-- create a new order -->
  <input type="hidden" name="order_reference" value="ORD0045">
  <input type="hidden" name="order_description" value="Monthly plan + setup">
  <input type="hidden" name="order_items_0_sku" value="plan_pro_monthly">
  <input type="hidden" name="order_items_0_name" value="Pro Plan (Monthly)">
  <input type="hidden" name="order_items_0_quantity" value="1">
  <input type="hidden" name="order_items_0_unit_amount" value="1200.00">
  <input type="hidden" name="order_items_0_tax_amount" value="0">
  <input type="hidden" name="order_items_0_metadata_custom_field_1" value="custom data 1">
  <input type="hidden" name="order_items_0_metadata_custom_field_2" value="custom data 2">

  <!-- [optional: customer details] -->
  <!-- either pass the customer_id or the customer object -->
  <input type="hidden" name="customer_id" value="cus_abc123...">
  <!-- create a new customer -->
  <input type="hidden" name="customer_reference" value="CLN240919000001">
  <input type="hidden" name="customer_company_name" value="">
  <input type="hidden" name="customer_person_name" value="John">
  <input type="hidden" name="customer_person_surname" value="Doe">
  <input type="hidden" name="customer_client_type_lookups_id" value="loo_abc123...">
  <input type="hidden" name="customer_id_type_lookups_id" value="loo_abc123...">
  <input type="hidden" name="customer_id_number" value="900112....">
  <input type="hidden" name="customer_email" value="johndoe@mail.com">
  <input type="hidden" name="customer_contact_number" value="+27831234567">
  <input type="hidden" name="customer_billing_address_line1" value="1 Loop Street">
  <input type="hidden" name="customer_billing_address_line2" value="Floor 5">
  <input type="hidden" name="customer_billing_address_city_or_town" value="Cape Town">
  <input type="hidden" name="customer_billing_address_province_or_state" value="Western Cape">
  <input type="hidden" name="customer_billing_address_postal_or_zip_code" value="8001">
  <input type="hidden" name="customer_billing_address_country_lookups_id" value="loo_abc123...">
  <input type="hidden" name="customer_shipping_contact_name" value="Jane Doe">
  <input type="hidden" name="customer_shipping_contact_number" value="+27820000000">
  <input type="hidden" name="customer_shipping_address_line1" value="1 Loop Street">
  <input type="hidden" name="customer_shipping_address_line2" value="Floor 5">
  <input type="hidden" name="customer_shipping_address_city_or_town" value="Cape Town">
  <input type="hidden" name="customer_shipping_address_province_or_state" value="Western Cape">
  <input type="hidden" name="customer_shipping_address_postal_or_zip_code" value="8001">
  <input type="hidden" name="customer_shipping_address_country_lookups_id" value="loo_abc123...">
  <input type="hidden" name="customer_metadata_custom_field_1" value="custom data 1">
  <input type="hidden" name="customer_metadata_custom_field_2" value="custom data 2"> 

  <!-- [optional: payment settings] -->
  <input type="hidden" name="payment_payment_methods_ids_0" value="pam_abc123">
  <input type="hidden" name="payment_metadata_custom_field_1" value="custom data 1">
  <input type="hidden" name="payment_metadata_custom_field_2" value="custom data 2">

  <!-- [optional: card settings] -->
  <input type="hidden" name="card_request_3ds" value="automatic">
  <input type="hidden" name="card_save_card" value="true">
  <input type="hidden" name="card_payment_type" value="DB">

  <!-- [optional: notifications] -->
  <input type="hidden" name="notifications_send_invoice" value="true">
  <input type="hidden" name="notifications_send_confirmation_email" value="true">
  <input type="hidden" name="notifications_confirmation_email_override" value="accounts@example.com">

  <!-- [optional: customization] -->
  <input type="hidden" name="customization_locale" value="en-ZA">
  <input type="hidden" name="customization_theme" value="light">
  <input type="hidden" name="customization_type" value="page">
  <input type="hidden" name="customization_display_cancel_button" value="true">
  <input type="hidden" name="customization_display_total" value="true">
  <input type="hidden" name="customization_display_cart" value="true">
  <input type="hidden" name="customization_brand_primary" value="#00DC82">

  <input type="submit">
</form>

Request Parameters

Field
RequiredType
Description
Example
public_keyYStringPublic API key for authenticationq9ZfVf7dT9g1uEJpXj7lZ0n2W8kYz4aLJc3p5Qw7s2A
modeYStringPayment mode - one-off, recurring, or saveone-off
amountYStringPayment amount100.00
currencyYStringCurrency codeZAR
item_nameYStringName/description of the item being purchasedTest Product
return_urlNStringURL to redirect on successful paymenthttps://www.example.com/success
cancel_urlNStringURL to redirect on cancelled paymenthttps://www.example.com/cancel
notify_urlNStringWebhook URL for payment notificationshttps://www.example.com/notify
order_idCString(32)Either pass order_id OR order object. ID of existing orderord_12345
order_referenceCString(35)Order reference identifierORD0045
order_descriptionCStringDescription of the orderMonthly plan + setup
order_items_0_skuCStringProduct SKU for first itemplan_pro_monthly
order_items_0_nameCStringProduct name for first itemPro Plan (Monthly)
order_items_0_quantityCIntegerItem quantity for first item1
order_items_0_unit_amountCStringUnit price for first item1200.00
order_items_0_tax_amountNNumberTax amount for first item0
order_items_0_metadata_custom_field_1NStringCustom metadata for first itemcustom data 1
order_items_0_metadata_custom_field_2NStringCustom metadata for first itemcustom data 2
customer_idCString(32)Either pass customer_id OR customer object. ID of existing customercus_abc123...
customer_referenceCString(35)Reference to identify a specific customerCLN240919000001
customer_company_nameNString(64)Company name if applicablenull
customer_person_nameNString(32)Customer's first nameJohn
customer_person_surnameNString(32)Customer's surnameDoe
customer_client_type_lookups_idNString(32)Client type lookup IDloo_abc123...
customer_id_type_lookups_idNString(32)ID type lookup (e.g. South African ID, passport)loo_abc123...
customer_id_numberNString(13)ID number900112...
customer_emailNString(128)Customer email addressjohndoe@mail.com
customer_contact_numberNString(16)Customer contact number+27831234567
customer_billing_address_line1NStringBilling address line 11 Loop Street
customer_billing_address_line2NStringBilling address line 2Floor 5
customer_billing_address_city_or_townNStringBilling cityCape Town
customer_billing_address_province_or_stateNStringBilling province/stateWestern Cape
customer_billing_address_postal_or_zip_codeNStringBilling postal code8001
customer_billing_address_country_lookups_idNString(32)Billing country lookup IDloo_abc123...
customer_shipping_contact_nameNStringShipping contact nameJane Doe
customer_shipping_contact_numberNString(16)Shipping contact number+27820000000
customer_shipping_address_line1NStringShipping address line 11 Loop Street
customer_shipping_address_line2NStringShipping address line 2Floor 5
customer_shipping_address_city_or_townNStringShipping cityCape Town
customer_shipping_address_province_or_stateNStringShipping province/stateWestern Cape
customer_shipping_address_postal_or_zip_codeNStringShipping postal code8001
customer_shipping_address_country_lookups_idNString(32)Shipping country lookup IDloo_abc123...
customer_status_lookups_idNString(32)Customer status lookup IDloo_abc123...
customer_metadata_custom_field_1NStringCustom metadata field 1custom data 1
customer_metadata_custom_field_2NStringCustom metadata field 2custom data 2
payment_payment_methods_ids_0NString(32)Payment method ID for first optionpam_abc123
payment_metadata_custom_field_1NStringPayment metadata field 1custom data 1
payment_metadata_custom_field_2NStringPayment metadata field 2custom data 2
card_request_3dsNString3D Secure request mode - automatic, alwaysautomatic
card_save_cardNBooleanWhether to save card for future usetrue
card_payment_typeNStringPayment type - DB (debit) or PA (preauth)DB
notifications_send_invoiceNBooleanSend invoice to customertrue
notifications_send_confirmation_emailNBooleanSend confirmation emailtrue
notifications_confirmation_email_overrideNStringOverride email for confirmationsaccounts@example.com
customization_localeNStringCheckout page localeen-ZA
customization_themeNStringCheckout page theme - light or darklight
customization_typeNStringDisplay type - page or embedpage
customization_display_cancel_buttonNBooleanShow cancel button on checkouttrue
customization_display_totalNBooleanDisplay total amounttrue
customization_display_cartNBooleanDisplay cart detailstrue
customization_brand_primaryNStringPrimary brand color hex code#00DC82

Copyright © 2024 Kwik