Create
curl --request POST \
--url https://gateway.paybyrd.com/api/v2/subscriptions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"personId": 10,
"isoAmount": 1000,
"currency": "EUR",
"orderRef": "AMZ1962",
"productDescription": "Spider-Man HQ subscription",
"intervalType": "monthly",
"interval": 1,
"startDate": "1962-08-15",
"endDate": "2082-08-15",
"timeZone": "Europe/Berlin"
}
'import requests
url = "https://gateway.paybyrd.com/api/v2/subscriptions"
payload = {
"personId": 10,
"isoAmount": 1000,
"currency": "EUR",
"orderRef": "AMZ1962",
"productDescription": "Spider-Man HQ subscription",
"intervalType": "monthly",
"interval": 1,
"startDate": "1962-08-15",
"endDate": "2082-08-15",
"timeZone": "Europe/Berlin"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
personId: 10,
isoAmount: 1000,
currency: 'EUR',
orderRef: 'AMZ1962',
productDescription: 'Spider-Man HQ subscription',
intervalType: 'monthly',
interval: 1,
startDate: '1962-08-15',
endDate: '2082-08-15',
timeZone: 'Europe/Berlin'
})
};
fetch('https://gateway.paybyrd.com/api/v2/subscriptions', 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://gateway.paybyrd.com/api/v2/subscriptions",
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([
'personId' => 10,
'isoAmount' => 1000,
'currency' => 'EUR',
'orderRef' => 'AMZ1962',
'productDescription' => 'Spider-Man HQ subscription',
'intervalType' => 'monthly',
'interval' => 1,
'startDate' => '1962-08-15',
'endDate' => '2082-08-15',
'timeZone' => 'Europe/Berlin'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://gateway.paybyrd.com/api/v2/subscriptions"
payload := strings.NewReader("{\n \"personId\": 10,\n \"isoAmount\": 1000,\n \"currency\": \"EUR\",\n \"orderRef\": \"AMZ1962\",\n \"productDescription\": \"Spider-Man HQ subscription\",\n \"intervalType\": \"monthly\",\n \"interval\": 1,\n \"startDate\": \"1962-08-15\",\n \"endDate\": \"2082-08-15\",\n \"timeZone\": \"Europe/Berlin\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://gateway.paybyrd.com/api/v2/subscriptions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"personId\": 10,\n \"isoAmount\": 1000,\n \"currency\": \"EUR\",\n \"orderRef\": \"AMZ1962\",\n \"productDescription\": \"Spider-Man HQ subscription\",\n \"intervalType\": \"monthly\",\n \"interval\": 1,\n \"startDate\": \"1962-08-15\",\n \"endDate\": \"2082-08-15\",\n \"timeZone\": \"Europe/Berlin\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.paybyrd.com/api/v2/subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"personId\": 10,\n \"isoAmount\": 1000,\n \"currency\": \"EUR\",\n \"orderRef\": \"AMZ1962\",\n \"productDescription\": \"Spider-Man HQ subscription\",\n \"intervalType\": \"monthly\",\n \"interval\": 1,\n \"startDate\": \"1962-08-15\",\n \"endDate\": \"2082-08-15\",\n \"timeZone\": \"Europe/Berlin\"\n}"
response = http.request(request)
puts response.read_body{
"code": "BYRD200",
"description": "Operation successfully completed",
"operationStatus": "Success",
"subscriptionId": "435483a2-78b5-49e3-8f37-cd1c18834e02",
"isoAmount": 1000,
"currency": "EUR",
"orderRef": "AMZ1962",
"productDescription": "Spider-Man HQ subscription",
"intervalType": "monthly",
"interval": 1,
"startDate": "1962-08-15",
"endDate": "2082-08-15",
"timeZone": "Europe/Berlin",
"checkoutUrl": "https://link.paybyrd.com/sub_Kr6ZKx8uD"
}Subscription
Create
POST
/
api
/
v2
/
subscriptions
Create
curl --request POST \
--url https://gateway.paybyrd.com/api/v2/subscriptions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"personId": 10,
"isoAmount": 1000,
"currency": "EUR",
"orderRef": "AMZ1962",
"productDescription": "Spider-Man HQ subscription",
"intervalType": "monthly",
"interval": 1,
"startDate": "1962-08-15",
"endDate": "2082-08-15",
"timeZone": "Europe/Berlin"
}
'import requests
url = "https://gateway.paybyrd.com/api/v2/subscriptions"
payload = {
"personId": 10,
"isoAmount": 1000,
"currency": "EUR",
"orderRef": "AMZ1962",
"productDescription": "Spider-Man HQ subscription",
"intervalType": "monthly",
"interval": 1,
"startDate": "1962-08-15",
"endDate": "2082-08-15",
"timeZone": "Europe/Berlin"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
personId: 10,
isoAmount: 1000,
currency: 'EUR',
orderRef: 'AMZ1962',
productDescription: 'Spider-Man HQ subscription',
intervalType: 'monthly',
interval: 1,
startDate: '1962-08-15',
endDate: '2082-08-15',
timeZone: 'Europe/Berlin'
})
};
fetch('https://gateway.paybyrd.com/api/v2/subscriptions', 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://gateway.paybyrd.com/api/v2/subscriptions",
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([
'personId' => 10,
'isoAmount' => 1000,
'currency' => 'EUR',
'orderRef' => 'AMZ1962',
'productDescription' => 'Spider-Man HQ subscription',
'intervalType' => 'monthly',
'interval' => 1,
'startDate' => '1962-08-15',
'endDate' => '2082-08-15',
'timeZone' => 'Europe/Berlin'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://gateway.paybyrd.com/api/v2/subscriptions"
payload := strings.NewReader("{\n \"personId\": 10,\n \"isoAmount\": 1000,\n \"currency\": \"EUR\",\n \"orderRef\": \"AMZ1962\",\n \"productDescription\": \"Spider-Man HQ subscription\",\n \"intervalType\": \"monthly\",\n \"interval\": 1,\n \"startDate\": \"1962-08-15\",\n \"endDate\": \"2082-08-15\",\n \"timeZone\": \"Europe/Berlin\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://gateway.paybyrd.com/api/v2/subscriptions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"personId\": 10,\n \"isoAmount\": 1000,\n \"currency\": \"EUR\",\n \"orderRef\": \"AMZ1962\",\n \"productDescription\": \"Spider-Man HQ subscription\",\n \"intervalType\": \"monthly\",\n \"interval\": 1,\n \"startDate\": \"1962-08-15\",\n \"endDate\": \"2082-08-15\",\n \"timeZone\": \"Europe/Berlin\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.paybyrd.com/api/v2/subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"personId\": 10,\n \"isoAmount\": 1000,\n \"currency\": \"EUR\",\n \"orderRef\": \"AMZ1962\",\n \"productDescription\": \"Spider-Man HQ subscription\",\n \"intervalType\": \"monthly\",\n \"interval\": 1,\n \"startDate\": \"1962-08-15\",\n \"endDate\": \"2082-08-15\",\n \"timeZone\": \"Europe/Berlin\"\n}"
response = http.request(request)
puts response.read_body{
"code": "BYRD200",
"description": "Operation successfully completed",
"operationStatus": "Success",
"subscriptionId": "435483a2-78b5-49e3-8f37-cd1c18834e02",
"isoAmount": 1000,
"currency": "EUR",
"orderRef": "AMZ1962",
"productDescription": "Spider-Man HQ subscription",
"intervalType": "monthly",
"interval": 1,
"startDate": "1962-08-15",
"endDate": "2082-08-15",
"timeZone": "Europe/Berlin",
"checkoutUrl": "https://link.paybyrd.com/sub_Kr6ZKx8uD"
}Body
application/json
Response
201 - application/json
201
Represents the Paybyrd code of the web request. To see more details check in Return Codes [blocked] page.
Available options:
BYRD010, BYRD200, BYRD201, BYRD203, BYRD205, BYRD206, BYRD207, BYRD208, BYRD230, BYRD231, BYRD240, BYRD290, BYRD291, BYRD292, BYRD294, BYRD299, BYRD401, BYRD403, BYRD900, BYRD901, BYRD999 Example:
"BYRD200"
Represents a textually the description of the Paybyrd code of the web request. To see more details check in Return Codes [blocked] page
Available options:
Request accepted, Operation successfully completed, Payment being processed. Waiting for shopper, An error occurred while processing the payment. Please query the transaction to confirm its status, Operation rejected, Operation blocked by velocity, Pending redirect, Payment canceled by the shopper, Payment already refunded, The refund amount exceeds the remaining balance of the original payment, Token is expired, An error occurred while pre processing the transaction. Please review your request and try again, An error occurred during while preparing transaction for acquiring. Please review your request and try again, No payment methods available for this operation. Please contact Paybyrd's support, Transaction could not be updated. Please review your request and try again, Operation could not be completed. Please review your request and try again, Resource access is forbidden, Resource access unauthorized, Invalid input, Resource not found, Operation failed Example:
"Operation successfully completed"

