Retrieves the payment method matching the given id.
Retrieve detailed information about a specific payment method using its unique ID. This includes non-sensitive details such as card brand, last four digits, expiration date, and metadata.
Obtain complete payment method information by ID including card type and metadata.
Check card type and prepaid status using bin_type and meta.prepaid fields.
Useful for managing payment methods and verifying details before processing.
What You Can Do
- Obtain payment method details by ID - Get comprehensive information about stored payment methods
- Check card type and prepaid status - Determine if cards are debit/credit and prepaid
- Verify payment method details - Useful for managing payment methods before processing
- Check card-present tokenization source - Use
meta.isCpTokenizedandmeta.tokenTypeto tell whether a payment method was tokenized from a card-present (terminal) transaction and which provider processed it
Data Security & Compliance
Sensitive Data Exclusion: Full card numbers and security codes are not returned for security reasons to maintain PCI compliance.
What's Included:
- Card brand and type
- Last four digits
- Expiration date
- Metadata and status
- Customer association
What's Excluded:
- Full card numbers
- CVV/Security codes
- Other sensitive payment data
Card Information Details
Debit or Credit Indicator: Use bin_type field to determine if the card is "DEBIT" or "CREDIT".
Prepaid Card Check: Use meta.prepaid field to check if the card is prepaid.
Card-Present Tokenization: For payment methods tokenized from a card-present (terminal) transaction, meta.isCpTokenized is true and meta.tokenType identifies the tokenization provider (e.g. "blockchyp"). Both fields are absent from meta for payment methods created through other tokenization flows.
Payment Method Status: Always check the status field to ensure the payment method is active before processing.
Customer Verification: Verify the customer_id to confirm ownership of the payment method.
Integration Tips
Updating Payment Methods: Use this endpoint in conjunction with PUT /payment-method/{id} to update payment methods.
Before Processing: Always retrieve and verify payment method details before attempting to process payments.
Error Handling: Implement proper error handling for cases where payment methods don't exist or are inactive.
HTTP Response Codes
| Code | Response | Reason |
|---|---|---|
| 200 | Success | Returns a payment method object with details. |
| 400 | Bad Request | Invalid payment method ID format. |
| 401 | Unauthorized | Authentication failed. |
| 404 | Not Found | A payment method does not exist. |
| 500 | Internal Server Error | An unexpected error occurred on the server. |
Error Handling Best Practices
400 Bad Request: Validate payment method ID format before making the request. IDs should follow the expected format pattern.
401 Unauthorized: Ensure your API credentials are valid and included in the request headers.
404 Not Found: The payment method may have been deleted or the ID may be incorrect. Double-check the ID and consider implementing fallback logic.
500 Internal Server Error: Implement retry logic with exponential backoff for temporary server issues.
