Get started
API Endpoint
test: https://sandbox.redeemes.com/api/marchent
live: https://portal.redeemes.net/api/marchent
In this manual we will take you through a few simple steps to integrate our API in your webshop. This will enable your customers to choose from our vast range of digital goods in your webshop environment. Whether it is e-gift cards, game keys, phone credit or prepaid payment cards - your customer chooses, our API delivers and your webshop converts - directly from our stock! Ready to make this happen? Let’s go!
To use this API, you need an API key. Please contact us at Technical@redeemes.com to get your own API key.
Sign-In
# Here is a curl example
curl --request POST \
--url {{endPoint}}/v1/signin \
--header 'Accept: application/json' \
--data '{
"email":"yourEmail@redeemes.com",
"secret":" "
}
To find your prices and create orders, you need an API Token. This is a token you create by logging in
to the API. This is an expiring code, so you need to recreate this token after it has expired. You receive a
unix timestamp in your request with the invalidation time.
:
https://sandbox.redeemes.com/api/marchent/v1/signin
Result example :
{
"body": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiMjEwOTk2O
"expires_at": "2021-09-26T10:48:51.000000Z"
},
"message": null,
"errors": null
}
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| secret_key | String | Your API key. |
| String | your email. |
Main Categories
# Here is a curl example
curl --request GET \
--url {{endPoint}}/v1/categories \
--header 'Accept: application/json' \
--header 'Authorization: Bearer '
:
Get all main categories
:
https://sandbox.redeemes.com/api/marchent/v1/categories
Result example :
{
"body": [
{
"identifier": "gift-cards",
"name": "Gift Cards",
"description": null,
"logo": null,
"banner": null,
"has_sub": true
}
],
"message": null,
"errors": null
}
Sub Categories
---------------------------------------------------------------------
# Here is a curl example
curl --request GET \
--url {{endPoint}}/v1/categories/sub \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--data '{"identifier":"gift-cards"}'
Get all sub categories
:
https://sandbox.redeemes.com/api/marchent/v1/categories/sub
Result example :
{
"body": [
{
"identifier": "pubg-mobile",
"name": "Pubg",
"description": null,
"logo": null,
"banner": null,
"has_sub": true
}
],
"message": null,
"errors": null
}
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| identifier* | String | - |
Get Products
# Here is a curl example
curl --request GET \
--url {{endPoint}}/v1/products \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--data '{"category_identifier":"pubg-mobile","paginate":true}'
Get Products
:
https://sandbox.redeemes.com/api/marchent/v1/products
Result example :
{
"body": {
"products": [
{
"identifier": "test_amazon",
"name": "Test amazon",
"description": "Test amazon
",
"category": {
"identifier": "yankee-candle-range-value",
"name": "Yankee Candle Range Value",
"description": "...
",
"logo": "https://sandbox.redeemes.com/storage/media/sandbox/Yankee_Candle_Copy_2.jpg",
"banner": null,
"has_sub": false
},
"type": "range_value",
"is_in_stock": true,
"base_image": null,
"currency": {
"currency": "USD",
"rate": "1.0000"
},
"price": {
"amount": 0,
"formatted": 0,
"currency": "USD"
},
"price_from": 1,
"price_to": 10,
"price_from_with_percentage": 0.985,
"price_to_with_percentage": 9.85
}
]
"message": null,
"errors": null
}
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| category_identifier | String | - |
| paginate | bool | - |
Get all orders
# Here is a curl example
curl --request GET \
--url {{endPoint}}/v1/orders \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--data '{"page":1,"method":"api","productType":"codes","startDate":1625263540,"endDate":1625263540}'
:
:
https://sandbox.redeemes.com/api/marchent/v1/orders
Result example :
{
"body": {
"orders": [
{
"order_number": "ORDER-RED13987623",
"order_tracking": "RE-ORDER00000000000048",
"sub_total": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD",
"inCurrentCurrency": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD"
}
},
"total": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD",
"inCurrentCurrency": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD"
}
},
"method": "api",
"product_type": "codes",
"status": "finished",
"products": [
{
"identifier": "PUBG-Mobile-60-UC",
"name": "PUBG Mobile 60 UC",
"unit_price": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD",
"inCurrentCurrency": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD"
}
},
"line_total": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD",
"inCurrentCurrency": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD"
}
},
"qty": 1,
"status": "finished",
"codes": [
{
"code": "PUBGMOBILE-TESTCODE",
"serial": "P609U-26091-0CD59-25481-17A11"
}
]
}
],
"created_at": "2021-09-21T08:12:25.000000Z"
},
],
"current_page": 1,
"last_page": 1,
"per_page": 20
},
"message": null,
"errors": null
}
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| page | int | default 1 |
| method | String | values : api,bulk |
| productType | String | Values : codes,direct_top_up,range_value |
| startDate | int | Unix timestamp |
| endDate | int | Unix timestamp |
Get details order
---------------------------------------------------------------------
# Here is a curl example
curl --request GET \
--url {{endPoint}}/v1/orders/details \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--data '{"order_number":"ORDER-RED13987623"}
:
https://sandbox.redeemes.com/api/marchent/v1/orders/details
Result example :
{
"body": {
"order_number": "ORDER-RED13987623",
"order_tracking": "PU-ORDER00000000000048",
"sub_total": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD",
"inCurrentCurrency": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD"
}
},
"total": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD",
"inCurrentCurrency": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD"
}
},
"method": "api",
"product_type": "codes",
"status": "finished",
"products": [
{
"identifier": "PUBG-Mobile-60-UC",
"name": "PUBG Mobile 60 UC",
"unit_price": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD",
"inCurrentCurrency": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD"
}
},
"line_total": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD",
"inCurrentCurrency": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD"
}
},
"qty": 1,
"status": "finished",
"codes": [
{
"code": "PUBGMOBILE-TESTCODE",
"serial": "P609U-26091-0CD59-25481-17A11"
}
]
}
],
"created_at": "2021-09-21T08:12:25.000000Z"
},
"message": null,
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| order_number* | int | - |
Purchase (create Order)
# Here is a curl example
curl --request POST \
--url {{endPoint}}/v1/purchase/createOrder \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--data '{"identifier":"PUBG-Mobile-60-UC","qty":1,"price":10,"customOrderReference":"ORDER-ORDER00000000000048}'
Voucher
:
https://sandbox.redeemes.com/api/marchent/v1/purchase/createOrder
Result example :
{
"body": {
"orderReference": "PU-ORDER00000000000048",
"customOrderReference": "ORDER-RED13987623",
"lineTotal": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD",
"inCurrentCurrency": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD"
}
},
"unitPrice": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD",
"inCurrentCurrency": {
"amount": 9,
"formatted": "$9.00",
"currency": "USD"
}
},
"codes": [
{
"code": "PUBGMOBILE-TESTCODE",
"serial": "P609U-26091-0CD59-25481-17A11"
}
]
},
"message": null,
"errors": null
}
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| identifier* | String | required |
| qty* | int | - |
| price | int | if type of product is range value the price between (price_from and price_to) as found in the service products without percentage |
| customOrderReference | string | - |
Free Fire
# Here is a curl example
curl --request POST \
--url {{endPoint}}/v1/top-up/validation \
--header 'Accept: application/json' \
--data '{"identifier":"Free-Fire-test","account_id":10000118}
Make Validation
:
https://sandbox.redeemes.com/api/marchent/v1/top-up/validation
Result example :
{
"body": {
"status": true,
"message": "Account has been validated successfully",
"ean": "2345678918765",
"transaction_id": "FF-7238630a-20d8-4f06-9a3c-734ed8bb6f57",
"roles": {
"server_id": 0,
"app_identifier": "CS_SG",
"server": "",
"role_id": 0,
"client_type": 0,
"role": "quyi02",
"packed_role_id": 0
}
},
"message": "Account has been validated successfully",
"errors": null
}
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| identifier | String | required |
| account_id | int | required |
create Order(Free Fire)
---------------------------------------------------------------------
curl --request POST \
--url {{endPoint}}/v1/top-up/createOrder \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--data '{"identifier":"Free-Fire-test","account_id":10000118,"transaction_id":FF-7238630a-20d8-4f06-9a3c-734ed8bb6f57,"customOrderReference":"PU-ORDER00000000000029"}
Create Order Top Up
:
https://sandbox.redeemes.com/api/marchent/v1/top-up/createOrder
Result example :
{
"body": {
"orderReference": "RE-ORDER00000000000029",
"customOrderReference": "RE-ORDER00000000000029",
"lineTotal": {
"amount": 0.75,
"formatted": 0.75,
"currency": "USD"
},
"unitPrice": {
"amount": 0.75,
"formatted": 0.75,
"currency": "USD"
},
"account_id": "10000118"
},
"message": "Account has been topped up successfully",
"errors": null
}
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| identifier* | String | - |
| account_id* | int | - |
| transaction_id* | string | - |
| customOrderReference | any | - |
User Balance
# Here is a curl example
curl --request GET \
--url {{endPoint}}/v1/wallet/balance \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
Get User Balance
:
https://sandbox.redeemes.com/api/marchent/v1/wallet/balance
Result example :
{
"body": {
"amount": 517,
"formatted": "$517.00",
"currency": "USD",
"inCurrentCurrency": {
"amount": 517,
"formatted": "$517.00",
"currency": "USD"
}
},
"message": null,
"errors": null
}