curl --request POST \
--url https://sandbox.foldd.com/customers/{customer_id}/mandates \
--header 'api-key: <api-key>'import requests
url = "https://sandbox.foldd.com/customers/{customer_id}/mandates"
headers = {"api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'api-key': '<api-key>'}};
fetch('https://sandbox.foldd.com/customers/{customer_id}/mandates', 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}/mandates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/mandates"
req, _ := http.NewRequest("POST", 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.post("https://sandbox.foldd.com/customers/{customer_id}/mandates")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.foldd.com/customers/{customer_id}/mandates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"mandate_id": "<string>",
"status": "active",
"payment_method_id": "<string>",
"payment_method": "<string>",
"payment_method_type": "<string>",
"card": {
"last4_digits": "<string>",
"card_exp_month": "<string>",
"card_exp_year": "<string>",
"card_holder_name": "<string>",
"card_token": "<string>",
"scheme": "<string>",
"issuer_country": "<string>",
"card_fingerprint": "<string>",
"card_isin": "<string>",
"card_issuer": "<string>",
"card_network": "Visa",
"card_type": "<string>",
"nick_name": "<string>"
},
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "2022-09-10T10:11:12Z",
"online": {
"ip_address": "123.32.25.123",
"user_agent": "<string>"
}
}
}
]Mandates - Customer Mandates List
Lists all the mandates for a particular customer id.
curl --request POST \
--url https://sandbox.foldd.com/customers/{customer_id}/mandates \
--header 'api-key: <api-key>'import requests
url = "https://sandbox.foldd.com/customers/{customer_id}/mandates"
headers = {"api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'api-key': '<api-key>'}};
fetch('https://sandbox.foldd.com/customers/{customer_id}/mandates', 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}/mandates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/mandates"
req, _ := http.NewRequest("POST", 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.post("https://sandbox.foldd.com/customers/{customer_id}/mandates")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.foldd.com/customers/{customer_id}/mandates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"mandate_id": "<string>",
"status": "active",
"payment_method_id": "<string>",
"payment_method": "<string>",
"payment_method_type": "<string>",
"card": {
"last4_digits": "<string>",
"card_exp_month": "<string>",
"card_exp_year": "<string>",
"card_holder_name": "<string>",
"card_token": "<string>",
"scheme": "<string>",
"issuer_country": "<string>",
"card_fingerprint": "<string>",
"card_isin": "<string>",
"card_issuer": "<string>",
"card_network": "Visa",
"card_type": "<string>",
"nick_name": "<string>"
},
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "2022-09-10T10:11:12Z",
"online": {
"ip_address": "123.32.25.123",
"user_agent": "<string>"
}
}
}
]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.
Response
List of retrieved mandates for a customer
The identifier for mandate
The status of the mandate, which indicates whether it can be used to initiate a payment.
active, inactive, pending, revoked The identifier for payment method
The payment method
The payment method type
Show child attributes
Show child attributes
This "CustomerAcceptance" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.
Show child attributes
Show child attributes