IZI + CloudPayments Integration
IZI + CloudPayments Integration
Section titled “IZI + CloudPayments Integration”CloudPayments is one of the supported payment gateways in IZI. Once connected, club clients can top up their balance by card, Apple Pay, or Google Pay directly from the CRM or mobile app — no redirect to third-party pages.
Prerequisites
Section titled “Prerequisites”- Active CloudPayments merchant account (KYC completed)
- Public ID and API Secret from CloudPayments dashboard
- IZI API token with
OWNERorADMINrole at the organization level
Step 1 — Configure in IZI API
Section titled “Step 1 — Configure in IZI API”mutation ConfigurePaymentGateway($input: PaymentGatewayInput!) { configurePaymentGateway(input: $input) { id type isActive publicId }}{ "input": { "organizationId": "org_abc123", "type": "CLOUDPAYMENTS", "publicId": "pk_your_public_id", "apiSecret": "your_api_secret", "description": "Main acquirer" }}apiSecret is stored encrypted and not returned in responses. To update it, call the mutation again.
Step 2 — CloudPayments Webhook
Section titled “Step 2 — CloudPayments Webhook”In the CloudPayments dashboard: Settings → Notifications → Check and Pay.
URL for both notification types:
https://api.izi.is/payments/cloudpayments/callbackIZI handles Check and Pay notifications. On Check it validates the amount and client existence. On Pay it credits the balance and creates a transaction.
Step 3 — Initiate a Payment via API
Section titled “Step 3 — Initiate a Payment via API”To trigger a client balance top-up through the widget:
mutation InitiateTopUp($input: InitiatePaymentInput!) { initiateTopUpPayment(input: $input) { paymentUrl transactionId expiresAt }}{ "input": { "clientId": "client_xyz", "clubId": "club_abc123", "amount": 500, "returnUrl": "https://yourapp.example.com/payment/success", "description": "Balance top-up" }}The response includes paymentUrl to redirect the client. After payment, CloudPayments sends a notification to IZI and the balance is credited automatically.
Step 4 — Testing
Section titled “Step 4 — Testing”CloudPayments test cards:
| Card | Result |
|---|---|
4111 1111 1111 1111 | Successful payment |
4444 4444 4444 4441 | Bank decline |
5500 0000 0000 0004 | 3DS confirmation |
Test mode is enabled in the CloudPayments dashboard. All test transactions don’t charge real money but go through the full IZI cycle including balance credit on a test client profile.
Tracking Payment Status
Section titled “Tracking Payment Status”query PaymentStatus($transactionId: ID!) { payment(id: $transactionId) { id status amount clientId createdAt confirmedAt gatewayTransactionId }}Statuses: PENDING → AUTHORIZED → CONFIRMED | CANCELLED | FAILED.
Or subscribe via IZI webhook for PAYMENT_RECEIVED:
mutation CreatePaymentWebhook { createWebhook(input: { url: "https://your-service.example.com/payments", events: ["PAYMENT_RECEIVED", "PAYMENT_FAILED"] }) { id secret }}Refunds
Section titled “Refunds”mutation RefundPayment($input: RefundInput!) { refundPayment(input: $input) { success refundId amount }}{ "input": { "transactionId": "txn_abc123", "amount": 500, "reason": "Client request" }}Partial refunds are supported. amount cannot exceed the original transaction amount.
Related Pages
Section titled “Related Pages”- Authentication & Tokens — token for mutations
- Webhooks — PAYMENT_RECEIVED events
- API Error Codes — payment operation errors
- SDK Examples — ready wrappers for payment operations
Frequently asked questions
How long does CloudPayments integration take?
The technical integration takes 1–2 hours with a ready CloudPayments account. CloudPayments merchant onboarding itself takes 1–3 business days on the payment provider side.
What payment methods does CloudPayments support through IZI?
Visa/MasterCard/Mir cards, Apple Pay, Google Pay, SberPay. Crypto and faster payments depend on your CloudPayments merchant plan.
What happens to the balance if a payment is cancelled?
On refund, IZI automatically deducts the corresponding amount from the client's balance. If the balance was partially spent, the remainder is deducted; the difference requires manual handling.
Can I use multiple payment gateways simultaneously?
Yes. IZI supports multiple gateways per organization. You can configure CloudPayments for some clubs and a different acquirer for others.