Airtm Purchases / Payins API
## Overview The Payins endpoint (also known as Purchases) enables your organization to accept payments from users for products, services, or any other transactions. This endpoint is essential for e-commerce platforms, service providers, and any business that needs to collect payments from customers through the Airtm platform. ## What are Payins? Payins represent incoming payments to your enterprise account. When a user makes a purchase or payment to your organization, it creates a payin operation that can be tracked and managed through this endpoint. ### Key Features - **Flexible Payment Processing** - Accept payments for various products and services - **Multi-Currency Support** - Process payments in different currencies - **Real-Time Status Updates** - Track payment progress in real-time - **Secure Checkout Process** - Redirect users to secure Airtm payment pages - **Webhook Integration** - Receive instant notifications on payment status changes - **Reference Code Tracking** - Link payments to your internal order systems ## Payment Flow 1. **Create Purchase** - Your system creates a purchase request with payment details 2. **User Checkout** - User is redirected to Airtm's secure checkout page 3. **Authentication** - User logs into their Airtm account to complete payment 4. **Processing** - Payment is processed and status updates are provided 5. **Completion** - Payment is completed and funds are transferred to your account ## Status Management ### Purchase Status Values | Status | Final? | Description | | ----------- | ------ | ------------------------------------------------- | | `created` | No | Purchase created, awaiting user payment | | `confirmed` | Yes | Payment completed successfully, funds transferred | | `canceled` | Yes | User canceled the purchase, no funds transferred | | `failed` | Yes | Payment processing failed | > [!TIP] > Implement case-insensitive status comparisons in your code to handle potential variations.