SofizPay Logo

SofizPay

SofizPay Logo
SofizPay
Technical Documentation
Games & Apps Recharge

Games & Apps Recharge API

Unified and standard API to retrieve the full catalog of digital products and execute instant top-ups for any supported game, app, or digital service via SofizPay.

Standard Integration Workflow

Recharging any game or digital application follows a universal two-step standard flow:

Step 1GET /services/get_products/

Query Product Catalog & Pricing

Call the get_products endpoint to fetch all active games and digital products, along with operator codes, available packages, and updated prices in DZD.

Step 2POST /services/operation_post

Execute Standard Top-up

Call the operation_post endpoint passing the operator code, target account/player ID, and selected offer to credit the user immediately.

1. Query Products Catalog & Pricing

Retrieve all digital products, apps, and gaming packages available in your SofizPay catalog

GET API
GEThttps://sofizpay.com/services/get_products/

This endpoint returns available products filtered by availability, returning only simplified information (name and price)

This endpoint requires a valid SofizPay secret key for authentication via the encrypted_sk field

Request Parameters

Content-Type: application/json

ParameterTypeRequiredDescription
encrypted_skstringYesEncrypted or plain SofizPay secret key. Can be a plain key starting with "S" (56 characters) or an RSA-encrypted base64-encoded key
searchstringNoOptional search term to filter products by name

Request Example

Example with search term

bash
curl -X GET "https://sofizpay.com/services/get_products/" \
  -H "Content-Type: application/json" \
  -d '{
    "encrypted_sk": "SBXJ...",
    "search": "PUBG"
  }'

Example without search term (all products)

bash
curl -X GET "https://sofizpay.com/services/get_products/" \
  -H "Content-Type: application/json" \
  -d '{
    "encrypted_sk": "SBXJ..."
  }'

Success Response (200)

Returns a list of available products with their names and prices in DZT

json
1{
2  "status": "success",
3  "count": 8,
4  "products": [
5    {
6      "name": "PUBG 1320 UC",
7      "price": "4743.24"
8    },
9    {
10      "name": "PUBG 1800 UC",
11      "price": "5929.05"
12    },
13    {
14      "name": "PUBG 325 UC",
15      "price": "1185.81"
16    },
17    {
18      "name": "Free Fire 1080 Diamonds",
19      "price": "2150.00"
20    }
21  ]
22}

Response Fields

FieldTypeDescription
statusstringResponse status: "success" or "error"
countintegerTotal number of available products returned
productsarrayArray of product objects
products[].namestringProduct name
products[].pricestringProduct price in DZT

Error Responses

400 - Invalid JSON

json
{
  "status": "error",
  "message": "Invalid JSON"
}

400 - encrypted_sk is required

json
{
  "status": "error",
  "message": "encrypted_sk is required"
}

400 - Invalid Secret Key

json
{
  "status": "error",
  "message": "Invalid secret key"
}

400 - Invalid Secret Key Format

json
{
  "status": "error",
  "message": "Invalid secret key format"
}

500 - External API Error

json
{
  "status": "error",
  "message": "Error fetching products: [error details]"
}

Features

Authentication: Validates SofizPay secret keys
Encryption Support: Handles both plain and RSA-encrypted secret keys
Search Filtering: Optional search parameter to filter products
Availability Filter: Only returns products marked as available
Simplified Response: Returns only essential product information (name & price)
External API Integration: Fetches data from sofizpay.dz

Important Technical Notes:

  • All available products are returned if no search term is provided
  • Prices are returned as strings to prevent floating-point precision issues
  • Only products with is_available: true are included in the response
  • The endpoint uses CSRF exemption for easier client integration

2. Execute Game & App Top-up (Standard Endpoint)

Universal endpoint designed to handle top-ups for any supported game, application, or digital service

POST APIUniversal
POSThttps://sofizpay.com/services/operation_post

This unified endpoint processes top-ups for all supported digital products, games, and applications

Universal Standard Specification for All Products

This endpoint works identically for all products available in the SofizPay catalog. It is not limited to specific titles: simply provide the operator code and target user/player ID corresponding to the service.

Standard Request Structure

Universal standard request payload for any game, app, or digital card:

bash
curl --location 'https://sofizpay.com/services/operation_post' \
--header 'Content-Type: application/json' \
--data '{      
    "encrypted_sk": "YOUR_ENCRYPTED_SECRET_KEY OR PURE_SECRET_KEY",
    "operator": "PRODUCT_OPERATOR_CODE",
    "playerId": "TARGET_USER_OR_PLAYER_ID",
    "amount": AMOUNT_IN_DZD,
    "offer": "PACKAGE_OFFER_CODE"
}'

Standard Request Parameters

Content-Type: application/json

ParameterTypeStandard Description
encrypted_skstringEncrypted or plain secret key for authentication
operatorstringProduct or operator code from product catalog (e.g. pubg, freefire, or any catalog product)
playerIdstringTarget user ID, player ID, or account ID in the target game/app
amountnumberRecharge amount in Algerian Dinar (DZD) matching the selected package
offerstringPredefined package code or selected offer name from catalog

Account ID (playerId) Specification by Product Type

Mobile & PC Games

Mobile & PC Games: In-game Player ID, Character ID, or UID.

Apps & Platforms

Digital Apps & Platforms: User account ID, username, or profile handle.

Services & Cards

Digital Services: Beneficiary account number or associated service ID.

Standard Success Response (200 OK)

json
{
    "status": "success",
    "message": "Operation completed successfully",
    "operation_id": "OP_894321789",
    "transaction_id": "TX_448921102",
    "transaction_status": "confirmed"
}

Important Note: The operation is confirmed immediately, and digital credits are credited directly to the target user account.