Cards
Card user, product, transactions and setup endpoints
Creates a Marqeta card user with first name, last name, and wallet address.
Body
firstNamestringRequiredExample:
JohnlastNamestringRequiredExample:
DoewalletAddressstringRequiredExample:
0xabc12345deadbeef6789Responses
200
Card user created
application/json
400
Missing required fields
404
User not found
500
Internal server error
post
/api/cards/create-card-userPOST /api/cards/create-card-user HTTP/1.1
Host: platform.madra.finance
Content-Type: application/json
Accept: */*
Content-Length: 78
{
"firstName": "John",
"lastName": "Doe",
"walletAddress": "0xabc12345deadbeef6789"
}{
"userResult": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Body
cardUserIdstringRequiredExample:
user_123456Responses
200
Card products fetched and stored
application/json
500
Internal server error
post
/api/cards/create-card-productPOST /api/cards/create-card-product HTTP/1.1
Host: platform.madra.finance
Content-Type: application/json
Accept: */*
Content-Length: 28
{
"cardUserId": "user_123456"
}{
"cardProductResult": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Body
cardProductTokenstringRequiredExample:
cp_123456userTokenstringRequiredExample:
user_123456walletAddressstringOptionalExample:
0xabc12345deadbeef6789Responses
200
Card created
application/json
400
Missing required parameters
404
User not found
500
Internal server or Marqeta API error
post
/api/cards/create-cardPOST /api/cards/create-card HTTP/1.1
Host: platform.madra.finance
Content-Type: application/json
Accept: */*
Content-Length: 99
{
"cardProductToken": "cp_123456",
"userToken": "user_123456",
"walletAddress": "0xabc12345deadbeef6789"
}{
"cardCreateResult": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"cardResult": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Body
user_tokenstringRequiredExample:
user_abc123amountnumberRequiredExample:
100currencyCodestringRequiredExample:
USDResponses
200
Card funded
application/json
400
Missing required fields
500
Internal server or Marqeta API failure
post
/api/cards/fund-cardPOST /api/cards/fund-card HTTP/1.1
Host: platform.madra.finance
Content-Type: application/json
Accept: */*
Content-Length: 62
{
"user_token": "user_abc123",
"amount": 100,
"currencyCode": "USD"
}{
"fundCardResult": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Body
amountnumberRequiredExample:
100card_tokenstringRequiredExample:
card_abcdefcard_acceptor_midstringRequiredExample:
mid_123456networkstringRequiredExample:
visawebhookstringOptionalExample:
https://example.com/webhookResponses
200
Transaction simulated
application/json
400
Missing required fields
500
Internal server or Marqeta API failure
post
/api/cards/send-transactionPOST /api/cards/send-transaction HTTP/1.1
Host: platform.madra.finance
Content-Type: application/json
Accept: */*
Content-Length: 131
{
"amount": 100,
"card_token": "card_abcdef",
"card_acceptor_mid": "mid_123456",
"network": "visa",
"webhook": "https://example.com/webhook"
}{
"simulationResult": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Body
firstNamestringRequiredExample:
JanelastNamestringRequiredExample:
DoewalletAddressstringRequiredExample:
0xabc12345deadbeef6789Responses
200
Setup complete with user, products and card created
application/json
400
Missing required fields
404
User not found
500
Internal server error during setup
post
/api/cards/setupPOST /api/cards/setup HTTP/1.1
Host: platform.madra.finance
Content-Type: application/json
Accept: */*
Content-Length: 78
{
"firstName": "Jane",
"lastName": "Doe",
"walletAddress": "0xabc12345deadbeef6789"
}{
"userResult": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"cardProductResult": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"cardCreateResult": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"card": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}