cURL
curl --request POST \
--header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
--url https://sandbox.straddle.com/v1/bridge/mastercard \
--header 'Content-Type: application/json' \
--data '{
"customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"mastercard": {
"consent_receipt_id": "<string>",
"customer_id": "<string>",
"account_id": "<string>"
}
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
mastercard: {
consent_receipt_id: '<string>',
customer_id: '<string>',
account_id: '<string>'
},
metadata: {},
config: {},
external_id: '<string>'
})
};
fetch('https://{environment}.straddle.com/v1/bridge/mastercard', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{environment}.straddle.com/v1/bridge/mastercard"
payload = {
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mastercard": {
"consent_receipt_id": "<string>",
"customer_id": "<string>",
"account_id": "<string>"
},
"metadata": {},
"config": {},
"external_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://{environment}.straddle.com/v1/bridge/mastercard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mastercard\": {\n \"consent_receipt_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"account_id\": \"<string>\"\n },\n \"metadata\": {},\n \"config\": {},\n \"external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paykey": "<string>",
"label": "Bank of America ****1234",
"source": "straddle",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"config": {
"sandbox_outcome": "standard",
"processing_method": "inline"
},
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"institution_name": "Bank of America",
"status_details": {
"message": "Bank account sucesfully validated",
"reason": "insufficient_funds",
"source": "watchtower",
"changed_at": "2023-11-07T05:31:56Z",
"code": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"bank_data": {
"routing_number": "021000021",
"account_number": "****1234",
"account_type": "checking"
},
"metadata": {},
"balance": {
"status": "pending",
"supported": true,
"account_balance": 123,
"updated_at": "2023-11-07T05:31:56Z"
},
"external_id": "<string>"
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}Bridge
Bridge a Mastercard consent receipt
Creates a new paykey from a Mastercard Open Finance connection your application already owns. Supply the consent receipt granting Straddle third-party access along with the pseudonymous Mastercard customer and account identifiers, and Straddle retrieves the bank details, account holder names, and live balance on your behalf.
POST
/
v1
/
bridge
/
mastercard
cURL
curl --request POST \
--header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
--url https://sandbox.straddle.com/v1/bridge/mastercard \
--header 'Content-Type: application/json' \
--data '{
"customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"mastercard": {
"consent_receipt_id": "<string>",
"customer_id": "<string>",
"account_id": "<string>"
}
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
mastercard: {
consent_receipt_id: '<string>',
customer_id: '<string>',
account_id: '<string>'
},
metadata: {},
config: {},
external_id: '<string>'
})
};
fetch('https://{environment}.straddle.com/v1/bridge/mastercard', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{environment}.straddle.com/v1/bridge/mastercard"
payload = {
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mastercard": {
"consent_receipt_id": "<string>",
"customer_id": "<string>",
"account_id": "<string>"
},
"metadata": {},
"config": {},
"external_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://{environment}.straddle.com/v1/bridge/mastercard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mastercard\": {\n \"consent_receipt_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"account_id\": \"<string>\"\n },\n \"metadata\": {},\n \"config\": {},\n \"external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paykey": "<string>",
"label": "Bank of America ****1234",
"source": "straddle",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"config": {
"sandbox_outcome": "standard",
"processing_method": "inline"
},
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"institution_name": "Bank of America",
"status_details": {
"message": "Bank account sucesfully validated",
"reason": "insufficient_funds",
"source": "watchtower",
"changed_at": "2023-11-07T05:31:56Z",
"code": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"bank_data": {
"routing_number": "021000021",
"account_number": "****1234",
"account_type": "checking"
},
"metadata": {},
"balance": {
"status": "pending",
"supported": true,
"account_balance": 123,
"updated_at": "2023-11-07T05:31:56Z"
},
"external_id": "<string>"
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}Authorizations
Headers
Body
application/jsontext/jsonapplication/*+json
Was this page helpful?