What is Sepay?

Sepay is an automated payment solution that tracks balance changes and sends APIs to your service. For example:

  1. Users can purchase items on your website or application.
  2. They choose the payment method of bank transfer to your account.
  3. After the user transfers the money, Sepay calls an API to your service to notify balance changes.
  4. Based on the transfer content, you can identify which orders have been paid and automatically update the order status.

For more details, you can refer to the Sepay homepage.

Installing Sepay

  1. You will need to deploy ezyplatform on a server with a domain and use HTTPS.
  2. In the admin interface, navigate to the 'E-Commerce > Payment Services' menu, select Sepay, and fill in the information as follows:
  3. Name: Sepay.
  4. Version: 1.0.0.
  5. Bank: Choose one of the banks linked with Sepay.
  6. Currency: Choose VND.
  7. Service URL: Fill in: https://sepay.vn/
  8. Service API URL: Fill in https://sepay.vn/
  9. Callback URL: Leave it default.
  10. Client key: Generate randomly.
  11. Secret key: Generate randomly and temporarily copy it to fill in the webhook creation step.
  12. Status: Choose Archived.

Sandbox Integration

  1. First, register for a dev account here then contact Sepay at the phone number at the bottom of the page here to request activation.
  2. After your account is activated, you can access the dev interface.
  3. Go to the Company Configuration > General Configuration menu, then fill in the prefix of the payment code structure as PAY as shown below:
Screenshot 2024-03-08 at 13.10.36.png
  1. Next, you'll need to fill in information about the webhook. Navigate to the Webhook Integration menu, select 'Add Webhook', and fill in the necessary information.
  • Assuming your website is example.com, you can fill in the (3) Call to the url as: https://example.com/payment/verify/SEPAY.
  • Use the API Key as the value of the Secret key you just copied.
  1. The Sepay sandbox setup is now complete. Now create an invoice and select bank transfer as the payment method.
  2. Now go back to Sepay and simulate a transaction with an amount equal to the invoice amount and content as PAYUser[userId]Order[orderId] with userId being the user ID, orderId being the order ID, for example, PAYUser2Order2.
  3. Check if your order status has changed to Paid, if it has, then it's successful.

Production Environment Integration

  1. You'll need to register an account here.
  2. Contact Sepay to activate the account.
  3. Fill in the information similar to the sandbox.
  4. Test with a low-value order.

Reference Documents:

  1. Creating and using webhooks: https://docs.sepay.vn/tich-hop-webhooks.html
  2. Simulating transactions in the sandbox: https://docs.sepay.vn/gia-lap-giao-dich.html