Authentication¶
You will need 2 keys to use Wipays API: public_key and secret_key. You can receive both API keys from your support manager.
API Keys¶
Public Key¶
public_key is used to authenticate your requests to the API. You should include it in the body of your request.
Secret Key¶
secret_key is used to generate and verify signatures for Instant Payment Notification (IPN).
Security Notice
You should keep both keys secure and never expose them to the public.
How to Authenticate¶
To authorize your requests, add the field public_key to the body of your request:
curl -X POST https://{{DOMAIN}}/endpoint \
-H "Content-Type: application/json" \
-d '{
  "public_key": "your_api_key"
}'
Example Request¶
Here's an example of an authenticated request:
curl -X POST https://{{DOMAIN}}/payment/initiate \
-H "Content-Type: application/json" \
-d '{
  "public_key": "your_api_key",
  "amount": 100.00,
  "currency": "USD",
  "customer": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "[email protected]",
    "mobile": "+1234567890"
  },
  "details": "Payment for order #123",
  "identifier": "unique_order_id",
  "success_url": "https://yourdomain.com/success",
  "cancel_url": "https://yourdomain.com/cancel",
  "ipn_url": "https://yourdomain.com/ipn",
  "site_name": "Your Store"
}'
Next Steps¶
- Create HPP payment - Hosted payment page integration
- Explore H2H payments - Direct payment processing
- Set up payment notifications - Receive status updates