{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Credit"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"credit","__idx":0},"children":["Credit"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Credit API exposes the live state of your business's credit with Rho. All"," ","three endpoints require the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credit:read"]}," scope on an API Access Token."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Credit has two surfaces: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["credit programs"]},", which describe the terms under"," ","which card spend is funded, and a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["balance"]},", which is a point-in-time snapshot"," ","for one program. Period history for spending, repayments, and cashback is"," ","available through the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/v1/statements"},"children":["Statements API"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"list-credit-programs","__idx":1},"children":["List credit programs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/v1/credit-programs"]}," returns every credit program belonging to the"," ","business linked to the API Access Token."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl \"https://rhoapi.rho.co/api/v1/credit-programs\" \\\n  -H \"Authorization: Bearer $RHO_API_TOKEN\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"credit_programs\": [\n    {\n      \"id\": \"81000000-0000-4000-8000-000000000001\",\n      \"name\": \"Daily Credit\",\n      \"account_id\": \"30000000-0000-4000-8000-000000000007\",\n      \"repayment_cadence\": \"daily\",\n      \"cashback_rate\": 1.15,\n      \"credit_limit\": {\n        \"amount\": 25000000,\n        \"currency\": \"USD\"\n      }\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cashback_rate"]}," is a percentage, so ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1.15"]}," means 1.15%. Money amounts are in"," ","the currency's smallest unit, such as cents for USD."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following fields are omitted when Rho does not have a value:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account_id"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credit_limit"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["archived_at"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An active program normally omits ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["archived_at"]},"; an archived program includes"," ","the timestamp when it was archived. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["repayment_cadence"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["daily"]}," when each"," ","day's spend is repaid the next day, or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["monthly"]}," when spend settles once per"," ","statement period."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"get-a-credit-program","__idx":2},"children":["Get a credit program"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/v1/credit-programs/{credit_program_id}"]}," returns one program belonging"," ","to your business."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl \"https://rhoapi.rho.co/api/v1/credit-programs/$PROGRAM_ID\" \\\n  -H \"Authorization: Bearer $RHO_API_TOKEN\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account_id"]},", when present, to join the program to the"," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/v1/accounts"},"children":["Accounts"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/v1/transactions"},"children":["Transactions"]}," APIs."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"get-a-live-credit-balance","__idx":3},"children":["Get a live credit balance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/v1/credit-programs/{credit_program_id}/balance"]}," computes a live"," ","balance snapshot. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["as_of"]}," identifies when the snapshot was computed."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl \"https://rhoapi.rho.co/api/v1/credit-programs/$PROGRAM_ID/balance\" \\\n  -H \"Authorization: Bearer $RHO_API_TOKEN\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"credit_program_id\": \"81000000-0000-4000-8000-000000000001\",\n  \"account_id\": \"30000000-0000-4000-8000-000000000007\",\n  \"credit_limit\": {\"amount\": 25000000, \"currency\": \"USD\"},\n  \"available_credit\": {\"amount\": 21850000, \"currency\": \"USD\"},\n  \"settled_balance\": {\"amount\": 2500000, \"currency\": \"USD\"},\n  \"pending_charges\": {\"amount\": 650000, \"currency\": \"USD\"},\n  \"balance_due\": {\"amount\": 1750000, \"currency\": \"USD\"},\n  \"balance_due_date\": \"2026-10-15\",\n  \"period_start_date\": \"2026-09-01\",\n  \"period_end_date\": \"2026-09-30\",\n  \"as_of\": \"2026-09-30T12:00:00Z\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["available_credit"]}," is the limit net of pending charges and outstanding balance."," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settled_balance"]}," contains settled outstanding transactions, while"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pending_charges"]}," contains authorized card transactions that have not settled."," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["balance_due"]}," and the period fields describe the repayment period with an"," ","outstanding amount. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account_id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["balance_due_date"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["period_start_date"]},", and"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["period_end_date"]}," are omitted when unavailable."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"errors-and-business-isolation","__idx":4},"children":["Errors and business isolation"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400 Bad Request"]}," means a path identifier is not a UUID."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403 Forbidden"]}," means the API Access Token does not have ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credit:read"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404 Not Found"]}," means the program is not available to the authenticated"," ","business. Missing programs and programs belonging to another business return"," ","the same response."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429 Too Many Requests"]}," means the client should wait before retrying."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500 Internal Server Error"]}," means the program or balance could not be safely"," ","represented."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["503 Service Unavailable"]}," means a required upstream service is temporarily"," ","unavailable."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Credit endpoints are not paginated and do not issue page tokens."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"reference","__idx":5},"children":["Reference"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api/v1/openapi/credit"},"children":["Rho API v1 reference"]}," for all fields and"," ","responses."]}]},"headings":[{"value":"Credit","id":"credit","depth":1},{"value":"List credit programs","id":"list-credit-programs","depth":2},{"value":"Get a credit program","id":"get-a-credit-program","depth":2},{"value":"Get a live credit balance","id":"get-a-live-credit-balance","depth":2},{"value":"Errors and business isolation","id":"errors-and-business-isolation","depth":2},{"value":"Reference","id":"reference","depth":2}],"frontmatter":{"seo":{"title":"Credit"}},"lastModified":"2026-10-23T10:00:23.881Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/v1/credit","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}