Tin-matching
Purchase real-time TIN matching credits
Explicitly buy one currently offered credit pack using an authorized saved-card alias.
/api/v1/tin-matching/credits/purchase- Authentication
- OAuth 2.0 access token
- Required scopes
tin_matching.purchase- Idempotency key
- Required
- Rate-limit cost
- 10 units
How to use this endpoint
These operations require access to all account filers, including the authorizing member’s access. To permit credit purchases, enable Real-time TIN matching credits in both account Order permissions and the connection Limits, choose a saved credit card and set positive spending limits. Buying credits requires payment-management authority. Deposit balance and payment terms cannot fund credit packs.
Credit packs are explicit purchases and share the API daily amount and submission-count limits with orders. A declined or interrupted purchase still counts toward that day’s limits; exact retries count once. No automatic top-up occurs when credits run out.
Copy expected_version and pricing_digest from credits, expected_policy_version from funding and expected_total_minor from the selected package. Review and affirm current terms. Both versions, price and authority are checked before collection. Reuse the identical body and key after uncertainty; a pending receipt may require reconciliation. A changed body under the same key is rejected.
Retrying a request? Keep the same idempotency key and body after an uncertain result. A different key can repeat the action.
curl --request POST 'https://api.efilemagic.com/api/v1/tin-matching/credits/purchase' \
--header 'Authorization: Bearer <access-token>' \
--header 'Idempotency-Key: <unique-operation-key>' \
--header 'Content-Type: application/json' \
--data-binary @request.jsonReplace placeholders with your own values. Use the API resource origin provided for your environment.
Create request.json using the documented fields. Field descriptions are not sample values.
Request fields
8 fieldscapacityRequiredinteger
Credit quantity of one package offered by the credits endpoint. Minimum: 1. Maximum: 1000000000.
expected_policy_versionRequiredstring
Exact policy_version string returned by the funding endpoint. Exact quoted decimal version from funding. Preserve as a string; never convert through a JavaScript Number. Pattern: ^[1-9][0-9]*$
expected_total_minorRequiredinteger
Selected credit package price in USD cents, copied from the credits endpoint. Minimum: 1.
expected_versionRequiredinteger
Exact account_version returned by the credits endpoint; retain it on an uncertain purchase retry. Minimum: 0.
funding_aliasRequiredstring
Saved-card alias explicitly authorized for TIN credit purchases, returned by the funding endpoint. Minimum characters: 1. Maximum characters: 64.
pricing_digestRequiredstring
Exact pricing_digest returned with the current credit packages. Pattern: ^[0-9a-fA-F]{64}$
terms_acceptedRequiredtrue
Records the caller's acceptance of the specified terms. Value: true.
terms_versionRequiredstring
Current service terms version returned by the credits endpoint. Minimum characters: 1. Maximum characters: 128.
curl --request POST 'https://api.efilemagic.com/api/v1/tin-matching/credits/purchase' \
--header 'Authorization: Bearer <access-token>' \
--header 'Idempotency-Key: <unique-operation-key>' \
--header 'Content-Type: application/json' \
--data-binary @request.jsonReplace placeholders with your own values. Use the API resource origin provided for your environment.
Create request.json using the documented fields. Field descriptions are not sample values.
Retrying a request? Keep the same idempotency key and body after an uncertain result. A different key can repeat the action.
On success, data contains the fields below. meta includes api_version and request_id. Keep request_id when reporting a problem.
Response fields
7 fieldsamount_minorAlways returnedinteger
Minimum: 0.
capacityAlways returnedinteger
Minimum: 0.
completed_atAlways returnedstring | null
Type: string | null.
created_atAlways returnedstring
Type: string.
currencyAlways returnedstring
Type: string.
purchase_idAlways returnedstring (uuid)
Type: string (uuid).
statusAlways returnedstring
Allowed values: "pending", "completed", "rejected".
{
"data": {
"amount_minor": "integer",
"capacity": "integer",
"completed_at": "string | null",
"created_at": "string",
"currency": "string",
"purchase_id": "string (uuid)",
"status": "string"
},
"meta": {
"api_version": "v1",
"request_id": "string"
}
}Successful response structure. This outline shows field types, not a response to copy. Expand Response fields for nested properties and optional values.
Errors to handle
Errors use {error: {code, message}, meta}. Check the code and message before retrying. Authentication, validation and availability errors can occur before the operation runs.
- 400
invalid_request - Check required fields, selectors and supported values.
- 401
invalid_token - Obtain a valid OAuth token for this resource. Check its expiry and current authorization.
- 403
insufficient_scope - Request the listed scopes through the application's authorization flow.
- 403
forbidden - Check the connection's permissions and allowed filers. More scopes alone may not grant access.
- 404
not_found - Check the resource ID and its owning filer. Batch reads report missing IDs as documented.
- 409
conflict - Read the current state and resolve the conflict. Do not change the body under an existing idempotency key.
- 412
precondition_failed - Read the current version or preview again; a required precondition has changed.
- 422
validation_failed - Correct the reported validation issues before retrying.
- 429
rate_limited - Wait for Retry-After before retrying. Avoid concurrent retries.
- 500
internal_error - Retain request_id and retry an uncertain result with the same body and idempotency key.
- 503
service_unavailable - Retry with bounded backoff, preserving the body and idempotency key.