Payment Methods
Manage credit and debit cards associated with your Daakey account. Payment methods are required for booking vehicles, as charges are automatically processed when bookings start, extend, or incur additional fees.
Daakey uses Stripe for secure payment processing. Card details are never stored on Daakey servers—instead, Stripe provides secure tokenized references that can be used for charges. This ensures PCI compliance and protects your financial information.
The default payment method is automatically used for new bookings unless you specify otherwise. You can add multiple cards and switch between them as needed.
Security
All payment data is handled by Stripe, a PCI Level 1 certified payment processor. Your full card numbers are never transmitted to or stored on Daakey servers.
List Payment Methods
Retrieve all saved payment methods associated with your account. This endpoint is useful for displaying a "Payment Methods" screen or a card selector during checkout.
Endpoint
INFO
GET /api/v1/client/payment-methods
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
X-Agency-Signature | {signature} | Yes |
Example Request
curl -X GET https://api.daakey.com/api/v1/client/payment-methods \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Agency-Signature: {signature}"Success Response (200)
{
"success": true,
"message": "Payment methods retrieved",
"data": [
{
"id": 1,
"type": "card",
"brand": "visa",
"last_four": "4242",
"exp_month": 12,
"exp_year": 2025,
"is_default": true,
"created_at": "2024-01-01T00:00:00Z"
},
{
"id": 2,
"type": "card",
"brand": "mastercard",
"last_four": "5555",
"exp_month": 6,
"exp_year": 2026,
"is_default": false,
"created_at": "2024-01-10T00:00:00Z"
}
],
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Add Payment Method
Add a new payment method using Stripe.
Endpoint
INFO
POST /api/v1/client/payment-methods
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_method_id | string | Yes | Stripe PaymentMethod ID |
set_default | boolean | No | Set as default method |
Example Request
curl -X POST https://api.daakey.com/api/v1/client/payment-methods \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Agency-Signature: {signature}" \
-d '{
"payment_method_id": "pm_1234567890",
"set_default": true
}'Success Response (201)
{
"success": true,
"message": "Payment method added",
"data": {
"id": 3,
"type": "card",
"brand": "amex",
"last_four": "0005",
"exp_month": 3,
"exp_year": 2027,
"is_default": true,
"created_at": "2024-01-15T00:00:00Z"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Remove Payment Method
Delete a saved payment method.
Endpoint
INFO
DELETE /api/v1/client/payment-methods/{id}
Example Request
curl -X DELETE https://api.daakey.com/api/v1/client/payment-methods/2 \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Agency-Signature: {signature}"Success Response (200)
{
"success": true,
"message": "Payment method removed",
"data": null,
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Error Response (400)
{
"success": false,
"message": "Cannot remove default payment method",
"data": null,
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Set Default Payment Method
Set a payment method as default.
Endpoint
INFO
POST /api/v1/client/payment-methods/{id}/default
Example Request
curl -X POST https://api.daakey.com/api/v1/client/payment-methods/2/default \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Agency-Signature: {signature}"Success Response (200)
{
"success": true,
"message": "Default payment method updated",
"data": {
"id": 2,
"type": "card",
"brand": "mastercard",
"last_four": "5555",
"is_default": true
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Notes
- Payment methods are stored securely via Stripe
- At least one payment method is required for bookings
- The default payment method cannot be removed directly