# Getting Started with Khipu Follow these steps to make your first integration with Khipu using Instant Payments. ### 1. Create a Collector Account First, you need an account on [Khipu](https://khipu.com). Once registered, create a collection account and link it to a bank account to receive payments. ### 2. Get Your Credentials From your private session on [Khipu Portal](https://khipu.com/login), access to: - Account options (on your sidebar) - Unfold the option "To integrate Khipu into your website" - Get your 'Collector ID' (unique identifier) - Get your 'New API Key' (use the development mode key for testing) > ⚠️ Store your secret key in a safe place. Never expose it publicly. ### 3. Create a Test Payment Make an HTTP `POST` request to the Khipu endpoint: ```bash POST https://khipu.com/api/3.0/payments ``` ### Headers: ```http Authorization: Basic {base64_encode(id_cobrador:clave_secreta)} Content-Type: application/json ``` ### Body (JSON): ```json { "subject": "Compra de prueba", "amount": 1000, "currency": "CLP", "transaction_id": "pedido-1234", "return_url": "https://tu-sitio.com/exito", "cancel_url": "https://tu-sitio.com/cancelado", "notify_url": "https://tu-sitio.com/notificacion" } ``` ### 4. Redirect the User to Pay The response will include a URL: ```json "payment_url": "https://khipu.com/payment/show/..." ``` Redirect the user to this URL so they can complete the payment. Once completed, Khipu will redirect the user back to your site via: `return_url`. ### 5. Wait for the Payment Notification Khipu will send a webhook to `notify_url` with the payment details. Only consider the payment valid once you have received and verified this notification. ### 6. Verify and Go Live Once everything works in testing, repeat the process using your production credentials. Make sure notifications are enabled, your bank account is registered, and your site is accessible from the internet. ✅ **Done! You're now ready to start receiving payments with Khipu.**