Request Payment
curl --request POST \
--url https://api.changu.app/api/v1/wallet/request-payment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"walletId": "wallet_id_here",
"amount": 1000,
"description": "Payment for service XYZ",
"merchantName": "ACME Corporation"
}
'import requests
url = "https://api.changu.app/api/v1/wallet/request-payment"
payload = {
"walletId": "wallet_id_here",
"amount": 1000,
"description": "Payment for service XYZ",
"merchantName": "ACME Corporation"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
walletId: 'wallet_id_here',
amount: 1000,
description: 'Payment for service XYZ',
merchantName: 'ACME Corporation'
})
};
fetch('https://api.changu.app/api/v1/wallet/request-payment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.changu.app/api/v1/wallet/request-payment",
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([
'walletId' => 'wallet_id_here',
'amount' => 1000,
'description' => 'Payment for service XYZ',
'merchantName' => 'ACME Corporation'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.changu.app/api/v1/wallet/request-payment"
payload := strings.NewReader("{\n \"walletId\": \"wallet_id_here\",\n \"amount\": 1000,\n \"description\": \"Payment for service XYZ\",\n \"merchantName\": \"ACME Corporation\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.changu.app/api/v1/wallet/request-payment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"walletId\": \"wallet_id_here\",\n \"amount\": 1000,\n \"description\": \"Payment for service XYZ\",\n \"merchantName\": \"ACME Corporation\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.changu.app/api/v1/wallet/request-payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"walletId\": \"wallet_id_here\",\n \"amount\": 1000,\n \"description\": \"Payment for service XYZ\",\n \"merchantName\": \"ACME Corporation\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Payment request sent to user for approval",
"paymentRequestId": "550e8400-e29b-41d4-a716-446655440000",
"status": "PENDING",
"expiresAt": "2026-01-22T17:30:00.000Z"
}{
"statusCode": 400,
"message": "Invalid encrypted wallet ID"
}{
"statusCode": 400,
"message": "Invalid encrypted wallet ID"
}{
"statusCode": 400,
"message": "Invalid encrypted wallet ID"
}Wallet
Request Payment
Initiate a payment request that requires user approval in the mobile app. The payment request is stored in Redis and expires after 5 minutes. Users receive a real-time notification via WebSocket.
POST
/
wallet
/
request-payment
Request Payment
curl --request POST \
--url https://api.changu.app/api/v1/wallet/request-payment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"walletId": "wallet_id_here",
"amount": 1000,
"description": "Payment for service XYZ",
"merchantName": "ACME Corporation"
}
'import requests
url = "https://api.changu.app/api/v1/wallet/request-payment"
payload = {
"walletId": "wallet_id_here",
"amount": 1000,
"description": "Payment for service XYZ",
"merchantName": "ACME Corporation"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
walletId: 'wallet_id_here',
amount: 1000,
description: 'Payment for service XYZ',
merchantName: 'ACME Corporation'
})
};
fetch('https://api.changu.app/api/v1/wallet/request-payment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.changu.app/api/v1/wallet/request-payment",
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([
'walletId' => 'wallet_id_here',
'amount' => 1000,
'description' => 'Payment for service XYZ',
'merchantName' => 'ACME Corporation'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.changu.app/api/v1/wallet/request-payment"
payload := strings.NewReader("{\n \"walletId\": \"wallet_id_here\",\n \"amount\": 1000,\n \"description\": \"Payment for service XYZ\",\n \"merchantName\": \"ACME Corporation\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.changu.app/api/v1/wallet/request-payment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"walletId\": \"wallet_id_here\",\n \"amount\": 1000,\n \"description\": \"Payment for service XYZ\",\n \"merchantName\": \"ACME Corporation\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.changu.app/api/v1/wallet/request-payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"walletId\": \"wallet_id_here\",\n \"amount\": 1000,\n \"description\": \"Payment for service XYZ\",\n \"merchantName\": \"ACME Corporation\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Payment request sent to user for approval",
"paymentRequestId": "550e8400-e29b-41d4-a716-446655440000",
"status": "PENDING",
"expiresAt": "2026-01-22T17:30:00.000Z"
}{
"statusCode": 400,
"message": "Invalid encrypted wallet ID"
}{
"statusCode": 400,
"message": "Invalid encrypted wallet ID"
}{
"statusCode": 400,
"message": "Invalid encrypted wallet ID"
}Authorizations
Bearer token authentication using developer secret key. Format: Bearer sk_live_your_secret_key_here
Body
application/json
Wallet ID obtained from the get account endpoint
Example:
"wallet_id_here"
Amount to charge (minimum 0.01)
Required range:
x >= 0.01Example:
1000
Description of the payment
Example:
"Payment for service XYZ"
Merchant/company name for display in the payment request
Example:
"ACME Corporation"
Response
Payment request created successfully
Example:
true
Example:
"Payment request sent to user for approval"
Example:
"550e8400-e29b-41d4-a716-446655440000"
Available options:
PENDING Example:
"PENDING"
Example:
"2026-01-22T17:30:00.000Z"
⌘I
