LogoLogo
  • Introduction
  • Quick Start
  • User Management
  • Card Management
  • Address Management
  • Payment Processing
  • Account Secuirty
  • Payment Security
  • Glossary
  • How to Integrate
    • WooCommerce
    • Magento
    • Custom System
Powered by GitBook
On this page
  • Included APIs:
  • 1. Save New User
  • Response:
  • 2. Send OTP Via Email
  • Response:
  • 3. Verify OTP
  • Response:
  • 4. User Login
  • Response:
Export as PDF

User Management

The User Management section deals with endpoints related to the creation, authentication, and management of user accounts within Krepling Pay. It ensures your customers can securely register, log in, and manage their profiles.

Included APIs:

  1. Save New User: Registers a new user with all necessary details like name, email, and address, ensuring that users can start transactions.

  2. Send OTP Via Email: Sends a One-Time Password to the user's email for verification purposes, enhancing security by verifying the email address ownership.

  3. Verify OTP: Confirms the OTP provided by the user, completing the verification process and activating the user account.

  4. User Login: Authenticates the user's credentials, granting access to their account and enabling them to perform transactions securely.

1. Save New User

Good to know: User data protection is paramount at Krepling. The use of end-to-end encryption for all user-related API calls ensures that personal and sensitive information is secure during transmission.

  • Endpoint: POST /api/Checkout/SaveNewUser

  • Purpose: Registers a new user in the checkout application.

  • Request Body:

{
  "FullName": "John Doe",
  "EmailId": "john.doe@example.com",
  "Phone": "+1234567890",
  "Password": "securepassword",
  "CardNumber": "4111111111111111",
  "CardValidityDate": "1225",
  "CardCVVNumber": "123",
  "DeliveryAddress1": "123 Main St",
  "City": "Anytown",
  "State": "Anystate",
  "ZipCode": "12345",
  "Country": "USA"
}

Response:

  • Status 200: User added successfully.

{
  "status": 1,
  "message": "User added successfully",
  "id": "4936"
}

2. Send OTP Via Email

Good to know: Utilizing OTPs for email verification introduces an additional security layer, ensuring that only legitimate users can create and verify their accounts, protecting against unauthorized access.

  • Endpoint: POST /api/SMS/GetSixDigitOnEmail

  • Purpose: Sends an OTP to the user's email for verification.

  • Request Body:

{
  "EmailId": "john.doe@example.com"
}

Response:

  • Status 200: OTP sent successfully.

{
  "status": 1,
  "message": "OTP sent successfully via mail"
}

3. Verify OTP

  • Endpoint: POST /api/SMS/VerifyOTPbyEmail

  • Purpose: Verifies the OTP entered by the user.

  • Request Body:

{
  "Email": "john.doe@example.com",
  "OTP": "426609"
}

Response:

  • Status 200: OTP verified successfully.

{
  "status": 1,
  "message": "OTP verified successfully"
}

4. User Login

Good to know: Smooth user registration and login processes not only enhance security but also improve the overall user experience, encouraging more transactions.

  • Endpoint: POST /api/Checkout/CustomerLogin

  • Purpose: Authenticates and logs in the user.

  • Request Body:

{
  "UserName": "john.doe@example.com",
  "Password": "securepassword"
}

Response:

  • Status 200: Login successful.

{
  "status": 1,
  "message": "Login Successful",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
PreviousQuick StartNextCard Management

Last updated 2 months ago