πŸ”—Payment links

Low-code solution to accept payments

Introducing Payment Links – Seamlessly integrate into Hyperswitch without writing much code. This feature allows you to generate secure and personalised payment links, enabling swift and hassle-free transactions for your customers. Elevate your payment experience with the efficiency and flexibility of Payment Links, streamlining the way you conduct business transactions.

  • Email/SMS marketing or selling online with a website.

  • Having multiple customer segments - to create tailored payment pages that are optimized for each bucket of customers.

  • Fundraising or collecting donations.

  • Accepting payments in person but don’t have the hardware.

  • Social Media Commerce

  • Cross-channel customer reactivation

  • Automated Payment Reminders to automate collections

  • A substitute for Cash-on-delivery and point-of-sale

  • Streamlining over-the-phone transactions

Prerequisites

  • Create a Hyperswitch account via the dashboard and create a profile (read more)

  • Add a payment processor to you account

β€œpayment_link_config” : {
   β€œtheme”: Option<String> // Custom theme color for your payment link, Can be any html color hex code Eg. #143F1E
   β€œlogo”: Option<String> // Custom logo for your company; Can be any hosted image url Eg. β€œhttps://i.pinimg.com/736x/4d/83/5c/4d835ca8aafbbb15f84d07d926fda473.jpg”,
   β€œseller_name”: Option<String> // Name of your company;Eg: Shoekraft 
   β€œsdk_layout”: Option<String> // Custom sdk layout for your payment links: 'accordion', 'spaced_accordion', 'tabs'; 'tabs' is default
   β€œdomain_name”: Option<String> // custom domain name of the merchant; Eg: pay.shoekraft.com     
}

- Set "payment_link" = "true" to create a payment link with default payment_link_configs configs set in business profile update mentioned in Step 1

- You can also pass the "session_expiry" field in seconds to indicate the expiry of the payment link. By default it is 900 seconds (15 minutes)

curl --location 'https://sandbox.hyperswitch.io/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '{
    "amount": 1130,
    "currency": "USD",
    "confirm": false,
    "customer_id": "cus_123",
    "return_url": "https://hyperswitch.io",
    "description": "For selling Tshirt",
    "payment_link": true,
    "session_expiry": 2592000
}'

You can also customize a specific payment link by including the payment_link_config object while creating a link during payments/create call as well. Except for domain_name field from the same object in business_profile/update, you could customize the remaining fields.

curl --location 'https://sandbox.hyperswitch.io/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '{
    "amount": 1130,
    "currency": "USD",
    "confirm": false,
    "customer_id": "cus_123",
    "return_url": "https://hyperswitch.io",
    "description": "For selling Tshirt",
    "payment_link": true,
    "session_expiry": 2592000,
    "payment_link_config": {
      "theme":"#014E28",
      "logo":"https://i.pinimg.com/736x/4d/83/5c/4d835ca8aafbbb15f84d07d926fda473.jpg",
      "seller_name":"teeskraft”,
      "sdk_layout":"tabs"
}
}'

FAQ

Last updated