Stripe (external cards)
v1/stripe/public-key
/v1/stripe/public-keyAuth: None — public endpoint
Base path: /v1/stripe · Scope: tb:external-cards:read — Stripe is used to top an account up from an external bank card.
/v1/stripe/public-keycurl 'https://sandbox-bank.tedr.com/open-banking/v1/stripe/public-key'
const response = await fetch('https://sandbox-bank.tedr.com/open-banking/v1/stripe/public-key');
const { data } = await response.json();
import requests
response = requests.get('https://sandbox-bank.tedr.com/open-banking/v1/stripe/public-key')
data = response.json()['data']
Returns the Stripe publishable key for initialising Stripe.js or the Stripe SDK on your side. Authorization: not required.
v1/stripe/cards
/v1/stripe/cardsAuth: Bearer access token — how to use the access token.
Attach an external card to the client.
/v1/stripe/cardscurl -X POST 'https://sandbox-bank.tedr.com/open-banking/v1/stripe/cards' \
-H 'Authorization: Bearer <access-token>' \
-H 'Content-Type: application/json' \
-d '{ "cardTokenId": "tok_exampleOCUHBOJJ0oY9zGxGYtQ" }'
const response = await fetch('https://sandbox-bank.tedr.com/open-banking/v1/stripe/cards', {
method: 'POST',
headers: {
Authorization: 'Bearer <access-token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({ cardTokenId: 'tok_exampleOCUHBOJJ0oY9zGxGYtQ' }),
});
const { data } = await response.json();
import requests
response = requests.post(
'https://sandbox-bank.tedr.com/open-banking/v1/stripe/cards',
headers={'Authorization': 'Bearer <access-token>'},
json={'cardTokenId': 'tok_exampleOCUHBOJJ0oY9zGxGYtQ'},
)
data = response.json()['data']
Card data never passes through this API.
cardTokenId is the token returned by the Stripe SDK after the client enters their card data.
v1/stripe/cards — list and read
Card object: id, clientId, brand, country, expMonth, expYear, name.
GET /v1/stripe/cards
/v1/stripe/cardsAuth: Bearer access token — how to use the access token.
Query: ids[], pagination[limit], pagination[skip].
/v1/stripe/cardscurl 'https://sandbox-bank.tedr.com/open-banking/v1/stripe/cards' \
-H 'Authorization: Bearer <access-token>'
const response = await fetch('https://sandbox-bank.tedr.com/open-banking/v1/stripe/cards', {
headers: { Authorization: 'Bearer <access-token>' },
});
const { data } = await response.json();
import requests
response = requests.get(
'https://sandbox-bank.tedr.com/open-banking/v1/stripe/cards',
headers={'Authorization': 'Bearer <access-token>'},
)
data = response.json()['data']
GET /v1/stripe/cards/:cardId
/v1/stripe/cards/:cardIdAuth: Bearer access token — how to use the access token.
/v1/stripe/cards/:cardIdcurl 'https://sandbox-bank.tedr.com/open-banking/v1/stripe/cards/<cardId>' \
-H 'Authorization: Bearer <access-token>'
const response = await fetch('https://sandbox-bank.tedr.com/open-banking/v1/stripe/cards/<cardId>', {
headers: { Authorization: 'Bearer <access-token>' },
});
const { data } = await response.json();
import requests
response = requests.get(
'https://sandbox-bank.tedr.com/open-banking/v1/stripe/cards/<cardId>',
headers={'Authorization': 'Bearer <access-token>'},
)
data = response.json()['data']
v1/stripe/payment-intent
/v1/stripe/payment-intentAuth: Bearer access token — how to use the access token.
Top a virtual account up from an attached Stripe card.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| amount | string | Required | Top-up amount. | |
| creditorAccountId | UUID | Required | Virtual account to credit. | |
| debitorCardId | string | Required | Attached Stripe card. | |
| description | string | Optional | Shown on the Stripe payment. |
/v1/stripe/payment-intentcurl -X POST 'https://sandbox-bank.tedr.com/open-banking/v1/stripe/payment-intent' \
-H 'Authorization: Bearer <access-token>' \
-H 'Content-Type: application/json' \
-d '{
"amount": "100",
"creditorAccountId": "f1df072f-d728-4038-8d1f-f569eaafa92d",
"debitorCardId": "card_exampleOCUHBOJJ0oYUYH7TKeJ",
"description": "Top-up via Stripe"
}'
const response = await fetch('https://sandbox-bank.tedr.com/open-banking/v1/stripe/payment-intent', {
method: 'POST',
headers: {
Authorization: 'Bearer <access-token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
amount: '100',
creditorAccountId: 'f1df072f-d728-4038-8d1f-f569eaafa92d',
debitorCardId: 'card_exampleOCUHBOJJ0oYUYH7TKeJ',
description: 'Top-up via Stripe',
}),
});
const { data } = await response.json();
import requests
response = requests.post(
'https://sandbox-bank.tedr.com/open-banking/v1/stripe/payment-intent',
headers={'Authorization': 'Bearer <access-token>'},
json={
'amount': '100',
'creditorAccountId': 'f1df072f-d728-4038-8d1f-f569eaafa92d',
'debitorCardId': 'card_exampleOCUHBOJJ0oYUYH7TKeJ',
'description': 'Top-up via Stripe',
},
)
data = response.json()['data']
Returns { "id": "pi_…", "clientId": "…" }. The fee is taken from the client's tariff, taking the card's country into account.
