AI-Process Credit Card in n8n
AI-Process Credit Card is a PDF4me node action in n8n that reads a credit card image or PDF and returns the card details as structured JSON fields. Use it to capture cardholder name, card number, expiry, and issuing bank from a scan or photo instead of retyping them into a form by hand.
What this node does
PDF4me: AI-Process Credit Card takes a card file from Binary Data, a Base64 String, or a URL and applies vision AI to return a creditCardData object holding the individual card fields. It accepts PDF, PNG, JPG, and JPEG. Because it returns discrete values rather than a blob of text, the next workflow step can act on a single field, and you can choose deliberately which of those values are worth keeping.
Authenticating Your API Request
Every PDF4me node in n8n requires a valid Credential to connect with. Create or select one that holds your PDF4me API key so the workflow can authenticate extraction requests securely.
Important Facts You Should Not Miss
"" rather than being absent, so test for empty values instead of checking whether a key exists.warnings array and fallbackUsed to route doubtful results to review.
PDF4me AI-Process Credit Card action in n8n
Card OCR vs a Generic Document Parser
PDF4me ships both a card-specific action and a general parser. The card action knows what a card looks like; the general parser is told what to look for.
| Aspect | AI-Process Credit Card | AI Document Parser |
|---|---|---|
| Field set | A fixed card schema returned as creditCardData | Whatever fields you define for the document |
| Setup effort | None, the card fields are already known | You describe the fields you want extracted |
| Best fit | Payment cards specifically | Any document shape the card action does not cover |
| Extending it | Custom Field Keys for extras beyond the card schema | Fully defined by you from the start |
What Parameters Does AI-Process Credit Card Need?
Required: Action, Input Data Type, the field matching that input type, and Credit Card Name. Custom Field Keys is optional.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Action | Required | Selects the PDF4me node action to run. Choose AI-Process Credit Card. | AI-Process Credit Card |
| Input Data Type | Required | Format of the source card input. Choose Binary Data (from a previous node), Base64 String, or URL. | Binary Data |
| Input Binary Field | Conditional | Name of the binary property on the incoming n8n item that holds the card file. Required when Input Data Type is Binary Data. Defaults to data. | data |
| Base64 Credit Card Content | Conditional | Base64-encoded content of the card file. Required when Input Data Type is Base64 String. | JVBERi0xLjQKJ... |
| Credit Card URL | Conditional | Publicly reachable HTTPS URL to the card file. Required when Input Data Type is URL. | https://example.com/card.jpg |
| Credit Card Name | Required | Filename of the input file, used for format detection. Accepts .pdf, .png, .jpg, and .jpeg extensions, so give it the extension the file actually is. | card.jpg |
| Custom Field Keys | Optional | List of extra field keys to pull beyond the standard card schema. Leave empty unless the source carries values the built-in fields do not cover. | ["loyaltyId", "branchCode"] |
Output Fields
The node returns JSON rather than a file. The card values live inside the creditCardData object.
| Field | Type | What it contains |
|---|---|---|
creditCardData | Object | The extracted card fields. See the field breakdown below. |
jobId | String | Identifier for the AI processing job, useful when reporting an extraction problem. |
jobIdExt | String | External job identifier for third-party integration, null when unused. |
success | Boolean | True when extraction completed. Use it to branch error handling. |
message | String | Human-readable status message, carrying success confirmation or error detail. |
Fields Inside creditCardData
Any field the model cannot read on a given image comes back as an empty string.
| Field | Type | What it contains |
|---|---|---|
cardholderName | String | Name as it appears on the card. |
cardNumber | String | The primary account number. Regulated data, so handle deliberately. |
expiryDate | String | Expiry date, typically MM/YY. |
validFrom | String | Valid-from date where the card shows one. |
validThru | String | Valid-through date, often the same as expiryDate. |
cvv | String | Card security code. The PCI DSS standard prohibits retaining this after authorisation. |
cardType | String | Card type where detected, such as credit or debit. |
cardBrand | String | Card brand where detected, such as Visa or MasterCard. |
bankName | String | Bank name printed on the card. |
issuingBank | String | Issuing bank where it can be determined separately from bankName. |
accountNumber | String | Associated account number when the source is a statement rather than a card face. |
warnings | Array | Messages about data quality or extraction difficulty on this file. |
fallbackUsed | Boolean | Whether an alternative extraction path was used. A useful low-confidence signal. |
How Do I Set Up AI-Process Credit Card in n8n?
- Add PDF4me to your n8n workflow and choose the AI-Process Credit Card action.
- In Credential to connect with, select your PDF4me credential or click Create New Credential and paste your API key.
- Set Input Data Type to Binary Data (default), Base64 String, or URL and supply the matching card file field.
- Set Credit Card Name with the correct extension, for example
card.jpgorstatement.pdf. - Optionally add Custom Field Keys for values beyond the standard card schema.
- Execute the node and read the
creditCardDataobject from the response. - Before storing anything, select just the fields you actually need and drop the rest.
Typical Setups
Workflow ExamplesCommon n8n workflow patterns using AI-Process Credit Card.
- A customer uploads a photo of their card during sign-up.
- AI-Process Credit Card reads the cardholder name and expiry.
- Only the non-sensitive fields are used to prefill the form for confirmation.
- The node processes an uploaded card image.
- An IF node checks the warnings array and fallbackUsed flag.
- Anything doubtful goes to a review queue instead of straight through.
- A card image is processed once at capture time.
- Only expiryDate and the cardholder name are retained.
- A scheduled workflow flags cards approaching expiry for renewal outreach.
- A card statement PDF arrives in a shared mailbox.
- The node extracts bankName and accountNumber.
- The statement is filed against the matching account record.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Action | AI-Process Credit Card |
| Input Data Type | Binary Data |
| Input Binary Field | data |
| Credit Card Name | card.jpg |
| Custom Field Keys | (empty) |
| Accepted formats | PDF, PNG, JPG, JPEG |
| Returns | JSON with a creditCardData object |
| Credentials | PDF4me API credential |