Get a link where a person saves the card agents will charge
curl --request POST \
--url https://api.rial.io/v1/me/credits/payment-method \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"monthly_cap_cents": 500500
}
'import requests
url = "https://api.rial.io/v1/me/credits/payment-method"
payload = { "monthly_cap_cents": 500500 }
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({monthly_cap_cents: 500500})
};
fetch('https://api.rial.io/v1/me/credits/payment-method', 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.rial.io/v1/me/credits/payment-method",
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([
'monthly_cap_cents' => 500500
]),
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.rial.io/v1/me/credits/payment-method"
payload := strings.NewReader("{\n \"monthly_cap_cents\": 500500\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.rial.io/v1/me/credits/payment-method")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"monthly_cap_cents\": 500500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rial.io/v1/me/credits/payment-method")
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 \"monthly_cap_cents\": 500500\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>",
"expires_at": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"decline_code": "<string>",
"month_spent_cents": 123,
"monthly_cap_cents": 123,
"idempotency_key": "<string>"
}
}Get a link where a person saves the card agents will charge
A link where a person saves the card agents charge. The monthly cap you ask for is printed on that page; nothing changes until they finish.
POST
/
v1
/
me
/
credits
/
payment-method
Get a link where a person saves the card agents will charge
curl --request POST \
--url https://api.rial.io/v1/me/credits/payment-method \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"monthly_cap_cents": 500500
}
'import requests
url = "https://api.rial.io/v1/me/credits/payment-method"
payload = { "monthly_cap_cents": 500500 }
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({monthly_cap_cents: 500500})
};
fetch('https://api.rial.io/v1/me/credits/payment-method', 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.rial.io/v1/me/credits/payment-method",
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([
'monthly_cap_cents' => 500500
]),
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.rial.io/v1/me/credits/payment-method"
payload := strings.NewReader("{\n \"monthly_cap_cents\": 500500\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.rial.io/v1/me/credits/payment-method")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"monthly_cap_cents\": 500500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rial.io/v1/me/credits/payment-method")
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 \"monthly_cap_cents\": 500500\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>",
"expires_at": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"decline_code": "<string>",
"month_spent_cents": 123,
"monthly_cap_cents": 123,
"idempotency_key": "<string>"
}
}Authorizations
Secret API key, created in the dashboard under Settings → API. Send it as Authorization: Bearer rk_secret_… from your server only. Publishable keys (pk_live_…) are for the native SDKs and reach the capture endpoints alone. An unknown key returns 401.
Body
application/json
Required range:
1000 <= x <= 1000000