Payment Method Session - List Payment Methods
curl --request GET \
--url https://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methodsimport requests
url = "https://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methods"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methods', 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://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methods"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methods")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"payment_methods_enabled": [
{
"card_networks": [
{
"eligible_connectors": [
"stripe",
"adyen"
],
"surcharge_details": {
"surcharge": {
"type": "fixed",
"value": 123
},
"display_surcharge_amount": 123,
"display_tax_on_surcharge_amount": 123,
"display_total_surcharge_amount": 123,
"tax_on_surcharge": {
"percentage": 123
}
}
}
],
"required_fields": [
{
"required_field": "<string>",
"display_name": "<string>",
"field_type": "user_card_number",
"value": "<string>"
}
]
}
],
"customer_payment_methods": [
{
"payment_method_token": "7ebf443f-a050-4067-84e5-e6f6d4800aef",
"customer_id": "12345_cus_01926c58bc6e77c09e809964e72af8c8",
"recurring_enabled": true,
"created": "2023-01-18T11:04:09.922Z",
"requires_cvv": true,
"last_used_at": "2024-02-24T11:04:09.922Z",
"is_default": true,
"payment_method_data": {
"card": {
"saved_to_locker": true,
"last4_digits": "4242",
"expiry_month": "10",
"expiry_year": "25",
"card_holder_name": "John Doe",
"card_fingerprint": "fingerprint_12345",
"nick_name": "Card",
"card_isin": "4567890",
"card_issuer": "Issuer Bank",
"card_type": "Credit"
}
},
"bank": {
"mask": "<string>"
},
"billing": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
}
}
]
}Payment Method Session
Payment Method Session - List Payment Methods
List payment methods for the given payment method session. This endpoint lists the enabled payment methods for the profile and the saved payment methods of the customer.
GET
/
v2
/
payment-method-sessions
/
{id}
/
list-payment-methods
Payment Method Session - List Payment Methods
curl --request GET \
--url https://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methodsimport requests
url = "https://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methods"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methods', 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://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methods"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methods")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.birrpay.io/v2/payment-method-sessions/{id}/list-payment-methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"payment_methods_enabled": [
{
"card_networks": [
{
"eligible_connectors": [
"stripe",
"adyen"
],
"surcharge_details": {
"surcharge": {
"type": "fixed",
"value": 123
},
"display_surcharge_amount": 123,
"display_tax_on_surcharge_amount": 123,
"display_total_surcharge_amount": 123,
"tax_on_surcharge": {
"percentage": 123
}
}
}
],
"required_fields": [
{
"required_field": "<string>",
"display_name": "<string>",
"field_type": "user_card_number",
"value": "<string>"
}
]
}
],
"customer_payment_methods": [
{
"payment_method_token": "7ebf443f-a050-4067-84e5-e6f6d4800aef",
"customer_id": "12345_cus_01926c58bc6e77c09e809964e72af8c8",
"recurring_enabled": true,
"created": "2023-01-18T11:04:09.922Z",
"requires_cvv": true,
"last_used_at": "2024-02-24T11:04:09.922Z",
"is_default": true,
"payment_method_data": {
"card": {
"saved_to_locker": true,
"last4_digits": "4242",
"expiry_month": "10",
"expiry_year": "25",
"card_holder_name": "John Doe",
"card_fingerprint": "fingerprint_12345",
"nick_name": "Card",
"card_isin": "4567890",
"card_issuer": "Issuer Bank",
"card_type": "Credit"
}
},
"bank": {
"mask": "<string>"
},
"billing": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
}
}
]
}Path Parameters
The unique identifier for the Payment Method Session
Response
The payment method session is retrieved successfully
⌘I