curl --request GET \
--url https://sandbox.foldd.com/customers/{customer_id}/payment_methods \
--header 'api-key: <api-key>'import requests
url = "https://sandbox.foldd.com/customers/{customer_id}/payment_methods"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://sandbox.foldd.com/customers/{customer_id}/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.foldd.com/customers/{customer_id}/payment_methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://sandbox.foldd.com/customers/{customer_id}/payment_methods"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<api-key>")
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.foldd.com/customers/{customer_id}/payment_methods")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.foldd.com/customers/{customer_id}/payment_methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"customer_payment_methods": [
{
"payment_token": "7ebf443f-a050-4067-84e5-e6f6d4800aef",
"payment_method_id": "pm_iouuy468iyuowqs",
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"payment_method": "card",
"recurring_enabled": true,
"installment_payment_enabled": true,
"requires_cvv": true,
"default_payment_method_set": true,
"payment_method_type": "ach",
"payment_method_issuer": "Citibank",
"payment_method_issuer_code": "jp_hdfc",
"payment_experience": [
"redirect_to_url"
],
"card": {
"saved_to_locker": true,
"scheme": "<string>",
"issuer_country": "<string>",
"last4_digits": "<string>",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_token": "<string>",
"card_holder_name": "<string>",
"card_fingerprint": "<string>",
"nick_name": "<string>",
"card_network": "Visa",
"card_isin": "<string>",
"card_issuer": "<string>",
"card_type": "<string>"
},
"metadata": {},
"created": "2023-01-18T11:04:09.922Z",
"bank_transfer": {
"bank_account_number": "000123456",
"bank_routing_number": "110000000",
"bank_name": "Deutsche Bank",
"bank_country_code": "AF",
"bank_city": "California"
},
"bank": {
"mask": "<string>"
},
"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
}
},
"last_used_at": "2024-02-24T11:04:09.922Z",
"billing": {
"address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
}
}
],
"is_guest_customer": true
}List payment methods for a Customer
Lists all the applicable payment methods for a particular Customer ID.
curl --request GET \
--url https://sandbox.foldd.com/customers/{customer_id}/payment_methods \
--header 'api-key: <api-key>'import requests
url = "https://sandbox.foldd.com/customers/{customer_id}/payment_methods"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://sandbox.foldd.com/customers/{customer_id}/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.foldd.com/customers/{customer_id}/payment_methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://sandbox.foldd.com/customers/{customer_id}/payment_methods"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<api-key>")
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.foldd.com/customers/{customer_id}/payment_methods")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.foldd.com/customers/{customer_id}/payment_methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"customer_payment_methods": [
{
"payment_token": "7ebf443f-a050-4067-84e5-e6f6d4800aef",
"payment_method_id": "pm_iouuy468iyuowqs",
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"payment_method": "card",
"recurring_enabled": true,
"installment_payment_enabled": true,
"requires_cvv": true,
"default_payment_method_set": true,
"payment_method_type": "ach",
"payment_method_issuer": "Citibank",
"payment_method_issuer_code": "jp_hdfc",
"payment_experience": [
"redirect_to_url"
],
"card": {
"saved_to_locker": true,
"scheme": "<string>",
"issuer_country": "<string>",
"last4_digits": "<string>",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_token": "<string>",
"card_holder_name": "<string>",
"card_fingerprint": "<string>",
"nick_name": "<string>",
"card_network": "Visa",
"card_isin": "<string>",
"card_issuer": "<string>",
"card_type": "<string>"
},
"metadata": {},
"created": "2023-01-18T11:04:09.922Z",
"bank_transfer": {
"bank_account_number": "000123456",
"bank_routing_number": "110000000",
"bank_name": "Deutsche Bank",
"bank_country_code": "AF",
"bank_city": "California"
},
"bank": {
"mask": "<string>"
},
"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
}
},
"last_used_at": "2024-02-24T11:04:09.922Z",
"billing": {
"address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
}
}
],
"is_guest_customer": true
}Authorizations
Use the API key created under your merchant account from the Foldd dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.
Path Parameters
The unique identifier for the customer account
The three-letter ISO currency code
The three letter ISO currency code in uppercase. Eg: 'USD' for the United States Dollar.
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL Query Parameters
The two-letter ISO currency code
The minimum amount accepted for processing by the particular payment method.
The maximum amount accepted for processing by the particular payment method.
Indicates whether the payment method is eligible for recurring payments
Indicates whether the payment method is eligible for installment payments