Fetch Payment Attempt
curl --request GET \
--url https://service-sandbox.tazapay.com/v3/payment_attempt/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://service-sandbox.tazapay.com/v3/payment_attempt/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://service-sandbox.tazapay.com/v3/payment_attempt/{id}', 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://service-sandbox.tazapay.com/v3/payment_attempt/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://service-sandbox.tazapay.com/v3/payment_attempt/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://service-sandbox.tazapay.com/v3/payment_attempt/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://service-sandbox.tazapay.com/v3/payment_attempt/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "",
"data": {
"amount": 9899,
"balance_transaction": "btr_d679f6dqd9ne66lsngb0",
"charge_currency": "PLN",
"created_at": "2023-07-23T08:03:29.718275Z",
"customer": "cus_d209e84kspu2df5phfm0",
"customer_details": {
"country": "PL",
"email": "sowajan1010@gmail.com",
"name": "Jan",
"phone": {
"calling_code": "48",
"number": "1234369"
}
},
"fx_transaction": {
"exchange_rate": 0.219768,
"final": {
"amount": 2173,
"currency": "EUR"
},
"id": "fx_d209ek2fhufa9pkp5c4g",
"initial": {
"amount": 9888,
"currency": "PLN"
},
"object": "fx_transaction"
},
"id": "pat_d209ek5qd9ne66lsn6gg",
"metadata": null,
"object": "payment_attempt",
"payin": "chk_d209e85qd65u66lsn1g0",
"payment_method_details": {
"card": {
"cardholder_name": "jan cebella",
"checks": {
"cvc_check": "pass"
},
"expiry": {
"month": 7,
"year": 2031
},
"first6": "428771",
"funding": "debit",
"issuer": "ing bank slaski sa",
"issuing_country": "pl",
"last4": "6095",
"scheme": "visa",
"three_d_secure": {
"eci": "05",
"result": "attempt_acknowledged",
"version": "2.2.0"
}
},
"type": "card"
},
"reference_id": "TR000001385673188",
"refunded": "true",
"status": "succeeded",
"status_description": ""
}
}"{}"Payment Attempts
Fetch Payment Attempt
Refers to each attempt by the customer to pay using a particular payment method
GET
/
v3
/
payment_attempt
/
{id}
Fetch Payment Attempt
curl --request GET \
--url https://service-sandbox.tazapay.com/v3/payment_attempt/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://service-sandbox.tazapay.com/v3/payment_attempt/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://service-sandbox.tazapay.com/v3/payment_attempt/{id}', 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://service-sandbox.tazapay.com/v3/payment_attempt/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://service-sandbox.tazapay.com/v3/payment_attempt/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://service-sandbox.tazapay.com/v3/payment_attempt/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://service-sandbox.tazapay.com/v3/payment_attempt/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "",
"data": {
"amount": 9899,
"balance_transaction": "btr_d679f6dqd9ne66lsngb0",
"charge_currency": "PLN",
"created_at": "2023-07-23T08:03:29.718275Z",
"customer": "cus_d209e84kspu2df5phfm0",
"customer_details": {
"country": "PL",
"email": "sowajan1010@gmail.com",
"name": "Jan",
"phone": {
"calling_code": "48",
"number": "1234369"
}
},
"fx_transaction": {
"exchange_rate": 0.219768,
"final": {
"amount": 2173,
"currency": "EUR"
},
"id": "fx_d209ek2fhufa9pkp5c4g",
"initial": {
"amount": 9888,
"currency": "PLN"
},
"object": "fx_transaction"
},
"id": "pat_d209ek5qd9ne66lsn6gg",
"metadata": null,
"object": "payment_attempt",
"payin": "chk_d209e85qd65u66lsn1g0",
"payment_method_details": {
"card": {
"cardholder_name": "jan cebella",
"checks": {
"cvc_check": "pass"
},
"expiry": {
"month": 7,
"year": 2031
},
"first6": "428771",
"funding": "debit",
"issuer": "ing bank slaski sa",
"issuing_country": "pl",
"last4": "6095",
"scheme": "visa",
"three_d_secure": {
"eci": "05",
"result": "attempt_acknowledged",
"version": "2.2.0"
}
},
"type": "card"
},
"reference_id": "TR000001385673188",
"refunded": "true",
"status": "succeeded",
"status_description": ""
}
}"{}"Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
ID of the payment attempt
Was this page helpful?
⌘I