cURL
curl -X POST https://api.rebellapp.com/v1/payments/linkPayCreate \
-H "Content-Type: application/json" \
-H "Client-Id: YOUR_CLIENT_ID" \
-H "Request-Time: 2024-01-10T12:00:00Z" \
-H "Signature: algorithm=SHA256withRSA, keyVersion=1, signature=URL_ENCODED_BASE64_SIGNATURE" \
-d '{
"productCode": "51051000101000100054",
"order": {
"orderTitle": "Monthly subscription - Premium plan",
"merchantTransId": "checkout-20240321-987",
"orderAmount": {
"currency": "EUR",
"value": "499"
},
"latitude": "45.0703",
"longitude": "7.6869",
"transactionAddress": "Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy",
"merchant": {
"store": {
"externalStoreId": "STORE_001"
}
}
},
"paymentNotifyUrl": "https://merchant.example.com/rebell/webhook",
"paymentRedirectUrl": "https://merchant.example.com/order/result",
"extendInfo": "{\"channelSource\":\"MOBILE_H5\"}"
}'// Sign the exact body string you send (see Authentication)
const body = JSON.stringify({
"productCode": "51051000101000100054",
"order": {
"orderTitle": "Monthly subscription - Premium plan",
"merchantTransId": "checkout-20240321-987",
"orderAmount": {
"currency": "EUR",
"value": "499"
},
"latitude": "45.0703",
"longitude": "7.6869",
"transactionAddress": "Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy",
"merchant": {
"store": {
"externalStoreId": "STORE_001"
}
}
},
"paymentNotifyUrl": "https://merchant.example.com/rebell/webhook",
"paymentRedirectUrl": "https://merchant.example.com/order/result",
"extendInfo": "{\"channelSource\":\"MOBILE_H5\"}"
});
const response = await fetch('https://api.rebellapp.com/v1/payments/linkPayCreate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Client-Id': 'YOUR_CLIENT_ID',
'Request-Time': new Date().toISOString(),
'Signature': 'algorithm=SHA256withRSA, keyVersion=1, signature=URL_ENCODED_BASE64_SIGNATURE'
},
body
});
const data = await response.json();
// Redirect the user to the Rebell app
window.location.href = data.appLinks.ios.shortUrl; // or appLinks.android.shortUrl / redirectUrlimport json
import requests
body = json.dumps({
"productCode": "51051000101000100054",
"order": {
"orderTitle": "Monthly subscription - Premium plan",
"merchantTransId": "checkout-20240321-987",
"orderAmount": {
"currency": "EUR",
"value": "499"
},
"latitude": "45.0703",
"longitude": "7.6869",
"transactionAddress": "Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy",
"merchant": {
"store": {
"externalStoreId": "STORE_001"
}
}
},
"paymentNotifyUrl": "https://merchant.example.com/rebell/webhook",
"paymentRedirectUrl": "https://merchant.example.com/order/result",
"extendInfo": "{\"channelSource\":\"MOBILE_H5\"}"
}, separators=(',', ':')) # sign exactly this string
response = requests.post(
'https://api.rebellapp.com/v1/payments/linkPayCreate',
headers={
'Content-Type': 'application/json',
'Client-Id': 'YOUR_CLIENT_ID',
'Request-Time': '2024-01-10T12:00:00Z',
'Signature': 'algorithm=SHA256withRSA, keyVersion=1, signature=URL_ENCODED_BASE64_SIGNATURE'
},
data=body
)
data = response.json()
redirect_url = data['redirectUrl']
app_links = data['appLinks']<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rebellapp.com/v1/payments/linkPayCreate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'productCode' => '51051000101000100054',
'order' => [
'orderTitle' => 'Monthly subscription - Premium plan',
'merchantTransId' => 'checkout-20240321-987',
'orderAmount' => [
'currency' => 'EUR',
'value' => '499'
],
'latitude' => '45.0703',
'longitude' => '7.6869',
'transactionAddress' => 'Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy',
'merchant' => [
'store' => [
'externalStoreId' => 'STORE_001'
]
]
],
'paymentNotifyUrl' => 'https://merchant.example.com/rebell/webhook',
'paymentRedirectUrl' => 'https://merchant.example.com/order/result',
'extendInfo' => '{"channelSource":"MOBILE_H5"}'
]),
CURLOPT_HTTPHEADER => [
"Client-Id: <api-key>",
"Content-Type: application/json",
"Request-Time: <api-key>",
"Signature: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rebellapp.com/v1/payments/linkPayCreate"
payload := strings.NewReader("{\n \"productCode\": \"51051000101000100054\",\n \"order\": {\n \"orderTitle\": \"Monthly subscription - Premium plan\",\n \"merchantTransId\": \"checkout-20240321-987\",\n \"orderAmount\": {\n \"currency\": \"EUR\",\n \"value\": \"499\"\n },\n \"latitude\": \"45.0703\",\n \"longitude\": \"7.6869\",\n \"transactionAddress\": \"Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy\",\n \"merchant\": {\n \"store\": {\n \"externalStoreId\": \"STORE_001\"\n }\n }\n },\n \"paymentNotifyUrl\": \"https://merchant.example.com/rebell/webhook\",\n \"paymentRedirectUrl\": \"https://merchant.example.com/order/result\",\n \"extendInfo\": \"{\\\"channelSource\\\":\\\"MOBILE_H5\\\"}\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Signature", "<api-key>")
req.Header.Add("Client-Id", "<api-key>")
req.Header.Add("Request-Time", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.rebellapp.com/v1/payments/linkPayCreate")
.header("Signature", "<api-key>")
.header("Client-Id", "<api-key>")
.header("Request-Time", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"productCode\": \"51051000101000100054\",\n \"order\": {\n \"orderTitle\": \"Monthly subscription - Premium plan\",\n \"merchantTransId\": \"checkout-20240321-987\",\n \"orderAmount\": {\n \"currency\": \"EUR\",\n \"value\": \"499\"\n },\n \"latitude\": \"45.0703\",\n \"longitude\": \"7.6869\",\n \"transactionAddress\": \"Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy\",\n \"merchant\": {\n \"store\": {\n \"externalStoreId\": \"STORE_001\"\n }\n }\n },\n \"paymentNotifyUrl\": \"https://merchant.example.com/rebell/webhook\",\n \"paymentRedirectUrl\": \"https://merchant.example.com/order/result\",\n \"extendInfo\": \"{\\\"channelSource\\\":\\\"MOBILE_H5\\\"}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rebellapp.com/v1/payments/linkPayCreate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Signature"] = '<api-key>'
request["Client-Id"] = '<api-key>'
request["Request-Time"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"productCode\": \"51051000101000100054\",\n \"order\": {\n \"orderTitle\": \"Monthly subscription - Premium plan\",\n \"merchantTransId\": \"checkout-20240321-987\",\n \"orderAmount\": {\n \"currency\": \"EUR\",\n \"value\": \"499\"\n },\n \"latitude\": \"45.0703\",\n \"longitude\": \"7.6869\",\n \"transactionAddress\": \"Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy\",\n \"merchant\": {\n \"store\": {\n \"externalStoreId\": \"STORE_001\"\n }\n }\n },\n \"paymentNotifyUrl\": \"https://merchant.example.com/rebell/webhook\",\n \"paymentRedirectUrl\": \"https://merchant.example.com/order/result\",\n \"extendInfo\": \"{\\\"channelSource\\\":\\\"MOBILE_H5\\\"}\"\n}"
response = http.request(request)
puts response.read_body{
"result": {
"resultStatus": "S",
"resultCode": "SUCCESS",
"resultMessage": "Create Success"
},
"merchantTransId": "checkout-20240321-987",
"acquirementId": "20251124111212800100166473700277756",
"redirectUrl": "https://<rebell-cashier-host>/...",
"appLinks": {
"android": {
"applicationId": "<android-application-id>",
"shortUrl": "https://<rebell-short-link-host>/s/abc123",
"targetPath": "<android-target-path>"
},
"ios": {
"applicationId": "<ios-application-id>",
"shortUrl": "https://<rebell-short-link-host>/s/abc123",
"targetPath": "<ios-target-path>"
}
}
}{
"result": {
"resultStatus": "S",
"resultCode": "<string>",
"resultMessage": "<string>"
}
}Payments
Link Pay Create
Create a redirect link for app-to-app or browser-to-app payment flow.
POST
/
v1
/
payments
/
linkPayCreate
cURL
curl -X POST https://api.rebellapp.com/v1/payments/linkPayCreate \
-H "Content-Type: application/json" \
-H "Client-Id: YOUR_CLIENT_ID" \
-H "Request-Time: 2024-01-10T12:00:00Z" \
-H "Signature: algorithm=SHA256withRSA, keyVersion=1, signature=URL_ENCODED_BASE64_SIGNATURE" \
-d '{
"productCode": "51051000101000100054",
"order": {
"orderTitle": "Monthly subscription - Premium plan",
"merchantTransId": "checkout-20240321-987",
"orderAmount": {
"currency": "EUR",
"value": "499"
},
"latitude": "45.0703",
"longitude": "7.6869",
"transactionAddress": "Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy",
"merchant": {
"store": {
"externalStoreId": "STORE_001"
}
}
},
"paymentNotifyUrl": "https://merchant.example.com/rebell/webhook",
"paymentRedirectUrl": "https://merchant.example.com/order/result",
"extendInfo": "{\"channelSource\":\"MOBILE_H5\"}"
}'// Sign the exact body string you send (see Authentication)
const body = JSON.stringify({
"productCode": "51051000101000100054",
"order": {
"orderTitle": "Monthly subscription - Premium plan",
"merchantTransId": "checkout-20240321-987",
"orderAmount": {
"currency": "EUR",
"value": "499"
},
"latitude": "45.0703",
"longitude": "7.6869",
"transactionAddress": "Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy",
"merchant": {
"store": {
"externalStoreId": "STORE_001"
}
}
},
"paymentNotifyUrl": "https://merchant.example.com/rebell/webhook",
"paymentRedirectUrl": "https://merchant.example.com/order/result",
"extendInfo": "{\"channelSource\":\"MOBILE_H5\"}"
});
const response = await fetch('https://api.rebellapp.com/v1/payments/linkPayCreate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Client-Id': 'YOUR_CLIENT_ID',
'Request-Time': new Date().toISOString(),
'Signature': 'algorithm=SHA256withRSA, keyVersion=1, signature=URL_ENCODED_BASE64_SIGNATURE'
},
body
});
const data = await response.json();
// Redirect the user to the Rebell app
window.location.href = data.appLinks.ios.shortUrl; // or appLinks.android.shortUrl / redirectUrlimport json
import requests
body = json.dumps({
"productCode": "51051000101000100054",
"order": {
"orderTitle": "Monthly subscription - Premium plan",
"merchantTransId": "checkout-20240321-987",
"orderAmount": {
"currency": "EUR",
"value": "499"
},
"latitude": "45.0703",
"longitude": "7.6869",
"transactionAddress": "Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy",
"merchant": {
"store": {
"externalStoreId": "STORE_001"
}
}
},
"paymentNotifyUrl": "https://merchant.example.com/rebell/webhook",
"paymentRedirectUrl": "https://merchant.example.com/order/result",
"extendInfo": "{\"channelSource\":\"MOBILE_H5\"}"
}, separators=(',', ':')) # sign exactly this string
response = requests.post(
'https://api.rebellapp.com/v1/payments/linkPayCreate',
headers={
'Content-Type': 'application/json',
'Client-Id': 'YOUR_CLIENT_ID',
'Request-Time': '2024-01-10T12:00:00Z',
'Signature': 'algorithm=SHA256withRSA, keyVersion=1, signature=URL_ENCODED_BASE64_SIGNATURE'
},
data=body
)
data = response.json()
redirect_url = data['redirectUrl']
app_links = data['appLinks']<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rebellapp.com/v1/payments/linkPayCreate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'productCode' => '51051000101000100054',
'order' => [
'orderTitle' => 'Monthly subscription - Premium plan',
'merchantTransId' => 'checkout-20240321-987',
'orderAmount' => [
'currency' => 'EUR',
'value' => '499'
],
'latitude' => '45.0703',
'longitude' => '7.6869',
'transactionAddress' => 'Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy',
'merchant' => [
'store' => [
'externalStoreId' => 'STORE_001'
]
]
],
'paymentNotifyUrl' => 'https://merchant.example.com/rebell/webhook',
'paymentRedirectUrl' => 'https://merchant.example.com/order/result',
'extendInfo' => '{"channelSource":"MOBILE_H5"}'
]),
CURLOPT_HTTPHEADER => [
"Client-Id: <api-key>",
"Content-Type: application/json",
"Request-Time: <api-key>",
"Signature: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rebellapp.com/v1/payments/linkPayCreate"
payload := strings.NewReader("{\n \"productCode\": \"51051000101000100054\",\n \"order\": {\n \"orderTitle\": \"Monthly subscription - Premium plan\",\n \"merchantTransId\": \"checkout-20240321-987\",\n \"orderAmount\": {\n \"currency\": \"EUR\",\n \"value\": \"499\"\n },\n \"latitude\": \"45.0703\",\n \"longitude\": \"7.6869\",\n \"transactionAddress\": \"Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy\",\n \"merchant\": {\n \"store\": {\n \"externalStoreId\": \"STORE_001\"\n }\n }\n },\n \"paymentNotifyUrl\": \"https://merchant.example.com/rebell/webhook\",\n \"paymentRedirectUrl\": \"https://merchant.example.com/order/result\",\n \"extendInfo\": \"{\\\"channelSource\\\":\\\"MOBILE_H5\\\"}\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Signature", "<api-key>")
req.Header.Add("Client-Id", "<api-key>")
req.Header.Add("Request-Time", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.rebellapp.com/v1/payments/linkPayCreate")
.header("Signature", "<api-key>")
.header("Client-Id", "<api-key>")
.header("Request-Time", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"productCode\": \"51051000101000100054\",\n \"order\": {\n \"orderTitle\": \"Monthly subscription - Premium plan\",\n \"merchantTransId\": \"checkout-20240321-987\",\n \"orderAmount\": {\n \"currency\": \"EUR\",\n \"value\": \"499\"\n },\n \"latitude\": \"45.0703\",\n \"longitude\": \"7.6869\",\n \"transactionAddress\": \"Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy\",\n \"merchant\": {\n \"store\": {\n \"externalStoreId\": \"STORE_001\"\n }\n }\n },\n \"paymentNotifyUrl\": \"https://merchant.example.com/rebell/webhook\",\n \"paymentRedirectUrl\": \"https://merchant.example.com/order/result\",\n \"extendInfo\": \"{\\\"channelSource\\\":\\\"MOBILE_H5\\\"}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rebellapp.com/v1/payments/linkPayCreate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Signature"] = '<api-key>'
request["Client-Id"] = '<api-key>'
request["Request-Time"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"productCode\": \"51051000101000100054\",\n \"order\": {\n \"orderTitle\": \"Monthly subscription - Premium plan\",\n \"merchantTransId\": \"checkout-20240321-987\",\n \"orderAmount\": {\n \"currency\": \"EUR\",\n \"value\": \"499\"\n },\n \"latitude\": \"45.0703\",\n \"longitude\": \"7.6869\",\n \"transactionAddress\": \"Torino||Corso Duca degli Abruzzi,24||10129||IT||Italy\",\n \"merchant\": {\n \"store\": {\n \"externalStoreId\": \"STORE_001\"\n }\n }\n },\n \"paymentNotifyUrl\": \"https://merchant.example.com/rebell/webhook\",\n \"paymentRedirectUrl\": \"https://merchant.example.com/order/result\",\n \"extendInfo\": \"{\\\"channelSource\\\":\\\"MOBILE_H5\\\"}\"\n}"
response = http.request(request)
puts response.read_body{
"result": {
"resultStatus": "S",
"resultCode": "SUCCESS",
"resultMessage": "Create Success"
},
"merchantTransId": "checkout-20240321-987",
"acquirementId": "20251124111212800100166473700277756",
"redirectUrl": "https://<rebell-cashier-host>/...",
"appLinks": {
"android": {
"applicationId": "<android-application-id>",
"shortUrl": "https://<rebell-short-link-host>/s/abc123",
"targetPath": "<android-target-path>"
},
"ios": {
"applicationId": "<ios-application-id>",
"shortUrl": "https://<rebell-short-link-host>/s/abc123",
"targetPath": "<ios-target-path>"
}
}
}{
"result": {
"resultStatus": "S",
"resultCode": "<string>",
"resultMessage": "<string>"
}
}Authorizations
Body
application/json
Response
OK