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:
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.
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
https://sofizpay.com/services/get_products/This endpoint returns available products filtered by availability, returning only simplified information (name and price)
Request Parameters
Content-Type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
encrypted_sk | string | Yes | Encrypted or plain SofizPay secret key. Can be a plain key starting with "S" (56 characters) or an RSA-encrypted base64-encoded key |
search | string | No | Optional search term to filter products by name |
Request Example
Example with search term
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)
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
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
| Field | Type | Description |
|---|---|---|
status | string | Response status: "success" or "error" |
count | integer | Total number of available products returned |
products | array | Array of product objects |
products[].name | string | Product name |
products[].price | string | Product price in DZT |
Error Responses
400 - Invalid JSON
{
"status": "error",
"message": "Invalid JSON"
}400 - encrypted_sk is required
{
"status": "error",
"message": "encrypted_sk is required"
}400 - Invalid Secret Key
{
"status": "error",
"message": "Invalid secret key"
}400 - Invalid Secret Key Format
{
"status": "error",
"message": "Invalid secret key format"
}500 - External API Error
{
"status": "error",
"message": "Error fetching products: [error details]"
}Features
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
https://sofizpay.com/services/operation_postThis 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:
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
| Parameter | Type | Standard Description |
|---|---|---|
encrypted_sk | string | Encrypted or plain secret key for authentication |
operator | string | Product or operator code from product catalog (e.g. pubg, freefire, or any catalog product) |
playerId | string | Target user ID, player ID, or account ID in the target game/app |
amount | number | Recharge amount in Algerian Dinar (DZD) matching the selected package |
offer | string | Predefined package code or selected offer name from catalog |
Account ID (playerId) Specification by Product Type
Mobile & PC Games: In-game Player ID, Character ID, or UID.
Digital Apps & Platforms: User account ID, username, or profile handle.
Digital Services: Beneficiary account number or associated service ID.
Standard Success Response (200 OK)
{
"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.