> For the complete documentation index, see [llms.txt](https://docs.ur.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ur.app/api-reference/api/cards.md).

# Cards

Prefund Account operations and the card authorization callback for Card Mode: Crypto Backed.

## Get Prefund balance

> Returns the current state of the Partner's Prefund Account. This endpoint is partner-scoped, not user-scoped; UR maintains one Prefund Account per partner, and the response is a flat, single-currency object for the settlement currency (defaults to USD). Poll at operational dashboard cadence, e.g. no more frequently than once per minute unless UR advises otherwise and do not call it from inside the Card Authorization callback; UR already performs Prefund availability checks before approving.

```json
{"openapi":"3.1.0","info":{"title":"UR API","version":"1.0.0"},"tags":[{"name":"Cards","description":"Prefund Account operations and the card authorization callback for Card Mode: Crypto Backed."}],"servers":[{"url":"https://openapi.ur.app","description":"Production (partner API)"},{"url":"https://uropenapi-qa.ur-inc.xyz","description":"Testnet (partner API)"}],"security":[{"partnerAuth":[]},{"userWalletAuth":[]}],"components":{"securitySchemes":{"partnerAuth":{"type":"apiKey","in":"header","name":"X-Api-Signature","description":"Partner Auth: EIP-191 signature by the partner's registered backend key, with X-Api-Deadline and optional X-Api-PublicKey headers. See the Signature and verify guide."},"userWalletAuth":{"type":"apiKey","in":"header","name":"sign","description":"User wallet auth (External Wallet Access Mode): EIP-191 signature by the user's wallet key, with tokenId, network, hash, and deadline headers. See the Signature and verify guide."}},"schemas":{"CardPrefundBalanceResponse":{"type":"object","description":"Standard response envelope for the Prefund balance endpoint. code 0 means success.","required":["code","message","data"],"properties":{"code":{"type":"integer","description":"0 on success; a non-zero value indicates a business rejection."},"message":{"type":"string","description":"Human-readable diagnostic; empty on success."},"data":{"$ref":"#/components/schemas/CardPrefundBalance"}}},"CardPrefundBalance":{"type":"object","description":"Current state of the partner's Prefund Account in its settlement currency.","required":["partnerId","account","currency","balance"],"properties":{"partnerId":{"type":"string","description":"Partner identifier registered with UR."},"account":{"type":"string","description":"On-chain address of the Prefund Account (Mantle)."},"currency":{"type":"string","description":"The settlement currency, agreed with UR (defaults to USD)."},"balance":{"type":"string","description":"Current balance, decimal string."},"minBalance":{"type":"string","description":"Minimum balance threshold. prefund.balance.alert fires when the balance reaches or falls below it."},"level":{"type":"string","enum":["normal","warning"],"description":"Balance level relative to minBalance. This endpoint emits normal (balance above minBalance) or warning (balance at or below minBalance) only."},"allowance":{"type":"string","description":"The card-spend contract allowance for this account, as a human-readable amount."},"updatedAt":{"type":"integer","format":"int64","description":"Unix seconds, last balance update."}}}}},"paths":{"/api/fma/v1/prefund-balance":{"get":{"tags":["Cards"],"operationId":"cardGetPrefundBalance","summary":"Get Prefund balance","description":"Returns the current state of the Partner's Prefund Account. This endpoint is partner-scoped, not user-scoped; UR maintains one Prefund Account per partner, and the response is a flat, single-currency object for the settlement currency (defaults to USD). Poll at operational dashboard cadence, e.g. no more frequently than once per minute unless UR advises otherwise and do not call it from inside the Card Authorization callback; UR already performs Prefund availability checks before approving.","parameters":[{"name":"X-Api-Signature","in":"header","required":true,"description":"Partner's EIP-191 signature for Partner Auth (0x-prefixed hex).","schema":{"type":"string"}},{"name":"X-Api-Deadline","in":"header","required":true,"description":"Unix seconds expiry for the request signature.","schema":{"type":"string"}},{"name":"X-Api-PublicKey","in":"header","required":true,"description":"Partner's signer Ethereum address.","schema":{"type":"string"}}],"responses":{"200":{"description":"Current Prefund Account state for the partner's settlement currency. The response does not include a settleMode field; record your configured settlement mode from onboarding.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardPrefundBalanceResponse"}}}}}}}}}
```

{% openapi-webhook spec="ur-api" name="cardAuthorization" method="post" %}
[ur-api](https://4401d86825a13bf607936cc3a9f3897a.r2.cloudflarestorage.com/gitbook-x-prod-openapi/raw/d60738e7b09baa14d700294ed8c6bb9ad4161d224c9b03199485a97e657e2fad.json?X-Amz-Algorithm=AWS4-HMAC-SHA256\&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD\&X-Amz-Credential=dce48141f43c0191a2ad043a6888781c%2F20260726%2Fauto%2Fs3%2Faws4_request\&X-Amz-Date=20260726T064306Z\&X-Amz-Expires=172800\&X-Amz-Signature=cf627749e31d0b341925ba7ba3b3cd6ac12e7ee7415c645755e2777275eba305\&X-Amz-SignedHeaders=host\&x-amz-checksum-mode=ENABLED\&x-id=GetObject)
{% endopenapi-webhook %}

{% openapi-webhook spec="ur-api" name="cardTransaction" method="post" %}
[ur-api](https://4401d86825a13bf607936cc3a9f3897a.r2.cloudflarestorage.com/gitbook-x-prod-openapi/raw/d60738e7b09baa14d700294ed8c6bb9ad4161d224c9b03199485a97e657e2fad.json?X-Amz-Algorithm=AWS4-HMAC-SHA256\&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD\&X-Amz-Credential=dce48141f43c0191a2ad043a6888781c%2F20260726%2Fauto%2Fs3%2Faws4_request\&X-Amz-Date=20260726T064306Z\&X-Amz-Expires=172800\&X-Amz-Signature=cf627749e31d0b341925ba7ba3b3cd6ac12e7ee7415c645755e2777275eba305\&X-Amz-SignedHeaders=host\&x-amz-checksum-mode=ENABLED\&x-id=GetObject)
{% endopenapi-webhook %}

{% openapi-webhook spec="ur-api" name="prefundBalanceAlert" method="post" %}
[ur-api](https://4401d86825a13bf607936cc3a9f3897a.r2.cloudflarestorage.com/gitbook-x-prod-openapi/raw/d60738e7b09baa14d700294ed8c6bb9ad4161d224c9b03199485a97e657e2fad.json?X-Amz-Algorithm=AWS4-HMAC-SHA256\&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD\&X-Amz-Credential=dce48141f43c0191a2ad043a6888781c%2F20260726%2Fauto%2Fs3%2Faws4_request\&X-Amz-Date=20260726T064306Z\&X-Amz-Expires=172800\&X-Amz-Signature=cf627749e31d0b341925ba7ba3b3cd6ac12e7ee7415c645755e2777275eba305\&X-Amz-SignedHeaders=host\&x-amz-checksum-mode=ENABLED\&x-id=GetObject)
{% endopenapi-webhook %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ur.app/api-reference/api/cards.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
