Skip to main content

Prerequisites

Before you start, make sure you have:

Yabetoo Account

Create an account if you haven’t already

API Keys

Get your test API keys from the Dashboard
Never share your secret API key publicly. Use environment variables to store them securely.

Step 1: Get your API keys

1

Log in to your Dashboard

Go to app.yabetoo.com and log in to your account
2

Navigate to API Keys

Click on Settings > API Keys in the sidebar
3

Copy your test keys

Copy your test secret key (starts with sk_test_)
Test keys allow you to simulate payments without real money. Use them during development.

Step 2: Install an SDK (optional)

Choose your preferred language:
npm install @yabetoo/sdk-js

Step 3: Create your first payment

The fastest way to accept payments. Redirect your customers to a Yabetoo-hosted page.
import Yabetoo from "@yabetoo/sdk-js";

const yabetoo = new Yabetoo("sk_test_XXXXXXXXXXXXXXXXXXXXXXXX");

const session = await yabetoo.sessions.create({
  accountId: "acct_xxxxxxxx",
  total: 5000,
  currency: "xaf",
  successUrl: "https://your-site.com/success",
  cancelUrl: "https://your-site.com/cancel",
  items: [
    {
      productId: "prod_123",
      productName: "Premium Plan",
      quantity: 1,
      price: 5000,
    },
  ],
});

// Redirect customer to session.url
console.log(session.url);

Option B: Custom Integration

For full control over the payment experience, use the Payment Intent API.
import Yabetoo from "@yabetoo/sdk-js";

const yabetoo = new Yabetoo("sk_test_XXXXXXXXXXXXXXXXXXXXXXXX");

// Step 1: Create payment intent
const intent = await yabetoo.payments.create({
  amount: 5000,
  currency: "xaf",
  description: "Premium Plan subscription",
});

// Step 2: Confirm with customer's payment method
const payment = await yabetoo.payments.confirm(intent.id, {
  clientSecret: intent.clientSecret,
  firstName: "John",
  lastName: "Doe",
  receiptEmail: "[email protected]",
  paymentMethodData: {
    type: "momo",
    momo: {
      country: "cg",
      msisdn: "242123456789",
      operatorName: "mtn",
    },
  },
});

console.log(payment.status); // "succeeded"

Step 4: Test your integration

Use these test phone numbers in sandbox mode:
Phone NumberBehavior
242000000001Always succeeds
242000000002Always fails (insufficient funds)
242000000003Pending for 30 seconds, then succeeds
Check your Dashboard to see all test transactions in real-time.

Step 5: Go live

When you’re ready to accept real payments:
1

Complete account verification

Submit your business documents in the Dashboard
2

Switch to production keys

Replace sk_test_ with sk_live_ in your code
3

Update webhook endpoints

Point webhooks to your production server
Congratulations! You’re now ready to accept payments with Yabetoo.

Next steps