curl --request POST \
--url https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.json())
const response = await fetch(
"https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture",
{
method: "POST",
headers: { Authorization: "Bearer <token>" },
}
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture")
.header("Authorization", "Bearer <token>")
.asString();
{
"success": true,
"message": "Payment captured successfully"
}
{
"name": "BAD_REQUEST",
"message": "Cannot capture an AUTO_CAPTURE payment",
"status": 400,
"errors": []
}
{
"name": "NOT_FOUND",
"message": "Payment not found",
"status": 404,
"errors": []
}
Card on File
Manual Capture Payment
Capture payment via the Atoa Card on File API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.
POST
/
api
/
payments
/
card
/
payment-request
/
{paymentRequestId}
/
capture
curl --request POST \
--url https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.json())
const response = await fetch(
"https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture",
{
method: "POST",
headers: { Authorization: "Bearer <token>" },
}
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture")
.header("Authorization", "Bearer <token>")
.asString();
{
"success": true,
"message": "Payment captured successfully"
}
{
"name": "BAD_REQUEST",
"message": "Cannot capture an AUTO_CAPTURE payment",
"status": 400,
"errors": []
}
{
"name": "NOT_FOUND",
"message": "Payment not found",
"status": 404,
"errors": []
}
Capture a previously authorized card payment. This collects the funds from the customer’s card.
Only applicable for
Response
MANUAL_CAPTURE and CAPTURE_BEFORE_EXPIRY payments that have not yet been captured. Cannot capture AUTO_CAPTURE payments (they are captured immediately on creation).
Authorization
Bearer<accessSecret>
Path Parameters
string
required
The payment request ID from the Charge Saved Card response.
boolean
true if the payment was captured successfully.string
Confirmation message.
curl --request POST \
--url https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.json())
const response = await fetch(
"https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture",
{
method: "POST",
headers: { Authorization: "Bearer <token>" },
}
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.atoa.me/api/payments/card/payment-request/{paymentRequestId}/capture")
.header("Authorization", "Bearer <token>")
.asString();
{
"success": true,
"message": "Payment captured successfully"
}
{
"name": "BAD_REQUEST",
"message": "Cannot capture an AUTO_CAPTURE payment",
"status": 400,
"errors": []
}
{
"name": "NOT_FOUND",
"message": "Payment not found",
"status": 404,
"errors": []
}
⌘I