Payment methods
The balance and saved cards orders are charged to.
GET
/api/v1/payment-methods scope: api.<service>.purchaseList payment methods
The balance orders can be paid from and the saved cards they can be charged to. Pass a card's id as payment.card_id to charge that card; without it the default card is charged. Cards are added in the dashboard.
Requires the purchase level on at least one service.
Request
cURL
curl https://api.datafuel.ai/api/v1/payment-methods \ --header 'Authorization: Bearer df_live_your_key_here'
Response
{ "balance": { "available": 0, "currency": "usd" }, "cards": [ { "id": "pm_1QxYz", "brand": "visa", "last4": "4242", "exp_month": 0, "exp_year": 0, "default": false } ] }
{ "error": "string", "message": "string", "meta": {} }
{ "error": "string", "message": "string", "meta": {} }
{ "error": "string", "message": "string", "meta": {} }
{ "error": "string", "message": "string", "meta": {} }