Quick Start Guide

Process your first payment in 5 minutes

Prerequisites

Before you begin, make sure you have obtained your sandbox API credentials from the Yassir merchant dashboard.
1

Get your API credentials

Sign up for a Yassir merchant account and navigate to the API settings to obtain your:

  • Client ID (format: TENANT.SERVICE.ULID)
  • Client Secret
2

Create a payment intent

On your server, create a payment intent:

Bash
curl -X POST "https://api.payment.yassir.io/payments/intents?countryCode=DZA" \
  -H "Authorization: Basic $(echo -n 'your_client_id:your_client_secret' | base64)" \
  -H "Content-Type: application/json" \
  -H "x-platform: API" \
  -H "x-service: YOUR_SERVICE" \
  -d '{
    "actionId": "order_12345",
    "amount": 1500.00,
    "actionCurrencyCode": "DZD",
    "actionCountryCode": "DZA",
    "userId": "user_abc123"
  }'

Save the returned paymentId for the next step.

3

Proceed with payment

Submit the payment with a selected payment method:

Bash
curl -X POST "https://api.payment.yassir.io/payments/intents/{paymentId}/proceed" \
  -H "Authorization: Basic $(echo -n 'your_client_id:your_client_secret' | base64)" \
  -H "Content-Type: application/json" \
  -H "x-platform: API" \
  -H "x-service: YOUR_SERVICE" \
  -H "x-client-token: user_token_here" \
  -d '{
    "paymentMethodCode": "WALLET_V2"
  }'
4

Handle the result

Check the statusCode in the response:

  • 2 — Payment succeeded
  • 12 — Redirect the user to the payUrl for verification (OTP / 3DS)
  • 3 — Payment rejected, allow the user to retry

You should also set up webhooks to receive server-side notifications for asynchronous payment updates.

Next Steps

  • Set up webhooks to receive payment notifications
  • Configure your production credentials
  • Review our security best practices