Step 1: Create a Payment Link
Payment links are the easiest way to start accepting payments. They can be created through the Paycrypt Dashboard or programmatically using our API..png)
- Log in to your Paycrypt Dashboard
- Navigate to “Payment” > “Create Payment Link” on the left sidebar.
- Fill in the payment details as shown in the image:
- Title: Enter a descriptive name for your payment link, e.g., “Demo store”.
- Amount Settings: Select the currency (e.g., USD) and enter the amount (e.g., 100).
- Link Settings: Configure how long the payment link remains active (e.g., PERMANENT).
- Description (Optional): Add a description visible to your customers, e.g., “This is a demo store”.
- Redirect URL (Optional): Specify a URL where customers will be redirected after payment, e.g.,
https://example.com
. - Collect customer info: Choose what information to collect from your customers. In the example, “Collect email” is checked.
- Click “Create Payment Link”.
- Copy the generated payment link. This link can be shared with customers or used in your website’s payment button.
Step 2: Set Up Webhooks
Webhooks allow you to receive real-time notifications about payment events. Here’s how to set them up:
- Go to your Paycrypt Dashboard
- Navigate to “Settings” > “Webhooks” on the left sidebar
- Click “Add Endpoint” button
- Enter your webhook URL in the provided field
- Create webhook secret (this will be used to verify the webhook signature)
- Make sure to store this secret securely, as it will be used in your server code to verify incoming webhook requests
- Click “Add Endpoint” to complete the setup
Step 3: Verify Webhook Signatures
To ensure the security of your webhook events, you need to verify the signature of incoming webhook requests. Here’s how to do it:- Verify the webhook signature using the
X-Webhook-Signature
header - Process the webhook payload
- Update user status in your database
- Return appropriate responses
Step 4: Add Payment Button to Your Website
You can add a payment button to your website in two ways:Option 1: Using the Checkout Link
- Copy your payment link from Step 1: Create a Payment Link
- Add the link to your website:
Option 2: Using the Paycrypt Button Component (coming soon)
- Install the Paycrypt SDK using pnpm:
- Add the button to your React component: