# PrimePay - [PrimePay developer docs](https://docs.primepay.mw/index.md): Collect mobile money payments, send money and create payment links in Malawi with the PrimePay API. - [Quickstart](https://docs.primepay.mw/quickstart.md): Take your first test payment with the PrimePay sandbox API. - [Authentication](https://docs.primepay.mw/api-reference/authentication.md): Authenticate PrimePay API requests with a bearer API key. - [Testing in sandbox](https://docs.primepay.mw/api-reference/sandbox.md): Test PrimePay API integrations without real money. - [Payments](https://docs.primepay.mw/api-reference/payments-overview.md): Collect money from a customer's mobile money account into your PrimePay account. - [Hosted checkout](https://docs.primepay.mw/api-reference/checkout-overview.md): Send customers to a PrimePay payment page for one order, then confirm the result on your server. - [Webhooks](https://docs.primepay.mw/api-reference/webhooks.md): Get told when a payment, refund or payout finishes, and check that the message really came from PrimePay. - [Transfers](https://docs.primepay.mw/api-reference/transfers-overview.md): Move money instantly to merchant accounts and PrimePay wallets. - [Payouts](https://docs.primepay.mw/api-reference/payouts-overview.md): Send money out of PrimePay to Airtel Money, TNM Mpamba and bank accounts. - [Payment links](https://docs.primepay.mw/api-reference/payment-links-overview.md): Create checkout links you send to customers by WhatsApp, SMS, email or QR code. - [PrimePay API v1](https://docs.primepay.mw/api-reference/introduction.md): Collect mobile money payments, send transfers and make payouts with the PrimePay API. - [Idempotency](https://docs.primepay.mw/api-reference/idempotency.md): Retry requests that move money without double charges, transfers or payouts. - [Errors](https://docs.primepay.mw/api-reference/errors.md): The error shape every PrimePay API endpoint returns. - [List mobile money operators](https://docs.primepay.mw/api-reference/operators/list-mobile-money-operators.md): The operators you can collect from. Use an operator's `refId` as `provider` when you create a payment. A publishable key is enough. - [Create a payment](https://docs.primepay.mw/api-reference/payments/create-a-payment.md): Collects money from a customer's mobile money account into the account that owns the API key. The customer approves it on their phone, so the final result arrives later by webhook. - [Collect for a sub-merchant](https://docs.primepay.mw/api-reference/payments/collect-for-a-sub-merchant.md): Aggregator accounts only. Collects for a sub-merchant linked to your account. The body is the same as [Create a payment](/api-reference/payments/create-a-payment), and the agreed fee always applies. - [Get a payment](https://docs.primepay.mw/api-reference/payments/get-a-payment.md): Returns a payment by its PrimePay reference. - [Find a payment by order](https://docs.primepay.mw/api-reference/payments/find-a-payment-by-order.md): Returns the newest payment for a `merchantOrderId`. - [Refund a payment](https://docs.primepay.mw/api-reference/refunds/refund-a-payment.md): Sends money back to the number that paid. Leave out `amount` to refund everything still refundable. Needs a full secret key. - [List a payment's refunds](https://docs.primepay.mw/api-reference/refunds/list-a-payments-refunds.md): Lists a payment's refunds with `refundable` (what is left to refund). - [Get a refund](https://docs.primepay.mw/api-reference/refunds/get-a-refund.md): Returns one refund. - [Look up a merchant account](https://docs.primepay.mw/api-reference/transfers/look-up-a-merchant-account.md): Always show your user the recipient's name before sending. Send `recipientType` back unchanged when you make the transfer. - [Look up a PrimePay wallet](https://docs.primepay.mw/api-reference/transfers/look-up-a-primepay-wallet.md): Always show your user the recipient's name before sending. For privacy, only the first name and an initial are returned. - [Transfer to a merchant account](https://docs.primepay.mw/api-reference/transfers/transfer-to-a-merchant-account.md): Moves money from the account that owns the API key to one of your own accounts or another merchant's account. Instant and final. Needs a full secret key. - [Transfer to a PrimePay wallet](https://docs.primepay.mw/api-reference/transfers/transfer-to-a-primepay-wallet.md): Moves money from the account that owns the API key to a PrimePay wallet, by phone number. Instant and final. Needs a full secret key. - [Get a transfer](https://docs.primepay.mw/api-reference/transfers/get-a-transfer.md): Returns a transfer **sent from your account**. - [Look up a mobile money number](https://docs.primepay.mw/api-reference/payouts/look-up-a-mobile-money-number.md): Returns the recipient's name so you can show it before sending. `503 lookup_unavailable` means the name can't be checked right now; you can still send the payout. - [Look up a bank account](https://docs.primepay.mw/api-reference/payouts/look-up-a-bank-account.md): Returns the account holder's name so you can show it before sending. `503 lookup_unavailable` means the name can't be checked right now; you can still send the payout. - [List banks](https://docs.primepay.mw/api-reference/payouts/list-banks.md): The banks you can pay out to. Use a bank's `code` as `bankCode`. - [Pay a mobile money number](https://docs.primepay.mw/api-reference/payouts/pay-a-mobile-money-number.md): Sends money from the account that owns the API key to an Airtel Money or TNM Mpamba number. A new payout returns `201`, whatever its status. - [Pay a bank account](https://docs.primepay.mw/api-reference/payouts/pay-a-bank-account.md): Sends money from the account that owns the API key to a bank account. Use a `bankCode` from [List banks](/api-reference/payouts/list-banks). A new payout returns `201`, whatever its status. - [Get a payout](https://docs.primepay.mw/api-reference/payouts/get-a-payout.md): Returns a payout **sent from your account**. A failed payout has a `failureCode`, for example `DECLINED`. - [Create a payment link](https://docs.primepay.mw/api-reference/payment-links/create-a-payment-link.md): Makes a link that pays the account that owns the API key. Send either `amount` with `description`, or `items`. Give `url` to your customer. - [Create a payment link for a sub-merchant](https://docs.primepay.mw/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant.md): Aggregator accounts only. Makes a link that pays a sub-merchant linked to your account. The body is the same as [Create a payment link](/api-reference/payment-links/create-a-payment-link), and the agreed fee always applies. - [Get a payment link](https://docs.primepay.mw/api-reference/payment-links/get-a-payment-link.md): Returns the link. `timesPaid` is the number of completed payments. - [Deactivate a payment link](https://docs.primepay.mw/api-reference/payment-links/deactivate-a-payment-link.md): Stops a link taking payments. No body. A completed or expired link can't be changed (`409`). - [Reactivate a payment link](https://docs.primepay.mw/api-reference/payment-links/reactivate-a-payment-link.md): No body. Makes an `inactive` link payable again. A completed or expired link can't be changed (`409`). - [Create a checkout session](https://docs.primepay.mw/api-reference/checkout-sessions/create-a-checkout-session.md): Creates a PrimePay payment page for one order. Redirect the customer to `url`; it can be paid for 30 minutes. - [Check a checkout session](https://docs.primepay.mw/api-reference/checkout-sessions/check-a-checkout-session.md): Returns the session. Fulfil the order only when `status` is `complete`. - [Cancel a checkout session](https://docs.primepay.mw/api-reference/checkout-sessions/cancel-a-checkout-session.md): Cancels an unpaid session. No body. A paid session can't be cancelled (`409 session_complete`). - [SDKs](https://docs.primepay.mw/sdks/overview.md): Client libraries for the PrimePay API. - [Recipes](https://docs.primepay.mw/recipes/overview.md): Step-by-step guides for common PrimePay integrations. - [Accept a mobile money payment](https://docs.primepay.mw/recipes/accept-mobile-money-payment.md): Charge a customer's mobile money account and confirm the result before you fulfil the order. - [Refund a payment](https://docs.primepay.mw/recipes/refund-a-payment.md): Send money back to a customer for a successful payment, in full or in part. - [Changelog](https://docs.primepay.mw/changelog.md): New features, improvements and fixes to the PrimePay API. ## OpenAPI Specs - [openapi](/api-reference/openapi.yaml) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.