Capture
curl --request POST \
--url https://gateway.paybyrd.com/api/v2/capture/{transactionId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": "<string>",
"isoAmount": 123
}
'import requests
url = "https://gateway.paybyrd.com/api/v2/capture/{transactionId}"
payload = {
"amount": "<string>",
"isoAmount": 123
}
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({amount: '<string>', isoAmount: 123})
};
fetch('https://gateway.paybyrd.com/api/v2/capture/{transactionId}', 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/capture/{transactionId}",
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([
'amount' => '<string>',
'isoAmount' => 123
]),
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/capture/{transactionId}"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"isoAmount\": 123\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/capture/{transactionId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"isoAmount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.paybyrd.com/api/v2/capture/{transactionId}")
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 \"amount\": \"<string>\",\n \"isoAmount\": 123\n}"
response = http.request(request)
puts response.read_body{
"amount": "3.00",
"isoAmount": 300,
"code": "BYRD200",
"description": "Operation successfully completed",
"sourceTransaction": {
"amount": "13.00",
"isoAmount": 1300,
"capturedAmount": "3.00",
"isoCapturedAmount": 300,
"remainingAmount": "10.00",
"isoRemainingAmount": 1000,
"transactionId": "4faa13cd-f6ff-414e-b5bd-b61d1e72e418"
},
"transactionId": "c16ce479-319d-4e7b-a966-7735c34b2cc5"
}{
"code": "BYRD010",
"description": "Request accepted",
"links": {
"href": "/api/v2/transactions?requestId=93ce3e62-82b9-4570-8248-45915e794fd0",
"rel": "transactions",
"type": "GET"
}
}Transactions
Capture
For the charge to be carried out from a pre-authorization, it’s necessary to send from your cash register to our API a request to capture the value of the payment-related transaction.
POST
/
api
/
v2
/
capture
/
{transactionId}
Capture
curl --request POST \
--url https://gateway.paybyrd.com/api/v2/capture/{transactionId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": "<string>",
"isoAmount": 123
}
'import requests
url = "https://gateway.paybyrd.com/api/v2/capture/{transactionId}"
payload = {
"amount": "<string>",
"isoAmount": 123
}
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({amount: '<string>', isoAmount: 123})
};
fetch('https://gateway.paybyrd.com/api/v2/capture/{transactionId}', 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/capture/{transactionId}",
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([
'amount' => '<string>',
'isoAmount' => 123
]),
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/capture/{transactionId}"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"isoAmount\": 123\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/capture/{transactionId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"isoAmount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.paybyrd.com/api/v2/capture/{transactionId}")
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 \"amount\": \"<string>\",\n \"isoAmount\": 123\n}"
response = http.request(request)
puts response.read_body{
"amount": "3.00",
"isoAmount": 300,
"code": "BYRD200",
"description": "Operation successfully completed",
"sourceTransaction": {
"amount": "13.00",
"isoAmount": 1300,
"capturedAmount": "3.00",
"isoCapturedAmount": 300,
"remainingAmount": "10.00",
"isoRemainingAmount": 1000,
"transactionId": "4faa13cd-f6ff-414e-b5bd-b61d1e72e418"
},
"transactionId": "c16ce479-319d-4e7b-a966-7735c34b2cc5"
}{
"code": "BYRD010",
"description": "Request accepted",
"links": {
"href": "/api/v2/transactions?requestId=93ce3e62-82b9-4570-8248-45915e794fd0",
"rel": "transactions",
"type": "GET"
}
}Path Parameters
Body
application/json
Response
200
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"

