Payment Methods
User and location payment methods management
Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Location ID
^[1-9][0-9]*$Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/api/v1/locations/string/payment-methods/prepaid"nullAuthorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Location ID
^[1-9][0-9]*$Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/v1/locations/string/payment-methods/prepaid"{ "status": "success", "data": { "paymentMethod": "prepaid", "enabled": true }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Return URL after Adyen Drop-in completes
Client channel — defaults to Web
Value in
- "Web"
- "iOS"
- "Android"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/loyalty/adyen-card-session" \ -H "Content-Type: application/json" \ -d '{ "returnUrl": "string" }'{ "status": "success", "data": { "sessionId": "string", "sessionData": "string", "clientKey": "string", "environment": "string" }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Adyen session ID from adyen-card-session response
sessionResult token from Adyen Drop-in onPaymentCompleted
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/loyalty/finalize-card-session" \ -H "Content-Type: application/json" \ -d '{ "sessionId": "string", "sessionResult": "string" }'{ "status": "success", "data": { "card": { "id": "string", "brand": "string", "last4": "string", "expiryMonth": 0, "expiryYear": 0, "isDefault": true, "isTokenized": true, "nickname": "string" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Purchase intent ID containing card data
User email (required if no phone)
emailUser phone number (required if no email)
Whether to also enroll in loyalty program
Location ID for enrollment (required if enrollInProgram)
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/loyalty/link-payment-method" \ -H "Content-Type: application/json" \ -d '{ "purchaseIntentId": "string" }'{ "status": "success", "data": { "user": { "id": 0, "isNewUser": true }, "paymentMethod": { "linked": true, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "brand": "string", "last4": "string" }, "enrollment": { "enrolled": true, "pointsAwarded": 0, "newBalance": 0 } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Purchase intent ID containing card data
User ID to link the card to
Location ID for enrollment context
Must be verbal for staff-assisted flow
Value in
- "verbal"
Staff member who captured verbal consent
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/loyalty/staff-link-payment-method" \ -H "Content-Type: application/json" \ -d '{ "purchaseIntentId": "string", "userId": 0, "locationId": 0, "consentMethod": "verbal", "retailerUserId": 0 }'{ "status": "success", "data": { "cardLinked": true, "enrolled": true, "pointsAwarded": 0 }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Query Parameters
Search term (name, email, or phone)
2 <= lengthOptional purchase intent ID for tab member auto-suggest
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/loyalty/user-search?q=string"{ "status": "success", "data": { "users": [ { "id": 0, "email": "string", "firstName": "string", "lastName": "string", "phone": "string" } ], "autoSuggested": { "userId": 0, "firstName": "string", "lastName": "string", "email": "string", "autoSuggested": true } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Purchase intent ID
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/purchases/string/loyalty-status"{ "status": "success", "data": { "loyaltyScenario": "POINTS_EARNED", "pointsEarned": { "points": 0, "newBalance": 0 }, "enrollmentOffer": { "programId": 0, "programName": "string", "potentialPoints": 0 }, "cardLinkOffer": { "programId": 0, "programName": "string", "potentialPoints": 0, "brand": "string", "last4": "string" }, "user": { "id": 0, "email": "string" }, "location": { "id": 0, "name": "string", "hasLoyaltyProgram": true } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
User ID
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/retailer/users/string/payment-methods"{ "status": "success", "data": { "paymentMethods": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "nickname": "string", "brand": "string", "last4": "string", "expiryMonth": 0, "expiryYear": 0, "isDefault": true, "isTokenized": true, "lastUsedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z" } ], "defaultStoredMethodId": "string", "lastUsedStoredMethodId": "string", "lastUsedKind": "card", "savedSwish": { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "payerAlias": "string", "lastUsedAt": "2019-08-24T14:15:22Z" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/users/me/payment-methods"{ "status": "success", "data": { "paymentMethods": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "nickname": "string", "brand": "string", "last4": "string", "expiryMonth": 0, "expiryYear": 0, "isDefault": true, "isTokenized": true, "lastUsedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z" } ], "defaultStoredMethodId": "string", "lastUsedStoredMethodId": "string", "lastUsedKind": "card", "savedSwish": { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "payerAlias": "string", "lastUsedAt": "2019-08-24T14:15:22Z" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Payment method UUID
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Custom nickname for the card
1 <= length <= 100Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/v1/users/me/payment-methods/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "nickname": "string" }'{ "status": "success", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "nickname": "string", "brand": "string", "last4": "string", "expiryMonth": 0, "expiryYear": 0, "isDefault": true, "isTokenized": true, "lastUsedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z" }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Payment method UUID
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/api/v1/users/me/payment-methods/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "status": "success", "data": { "message": "string" }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Payment method UUID
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/users/me/payment-methods/497f6eca-6276-4993-bfeb-53cbbbba6f08/default"{ "status": "success", "data": { "message": "string" }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}