{"openapi":"3.1.0","info":{"title":"TeePay API","version":"2026-10-18","description":"The TeePay public API. All amounts are integer minor units. Authenticate with a secret API key from the TeePay dashboard."},"servers":[{"url":"https://api.teepay.me","description":"TeePay API"}],"security":[{"BearerAuth":[]}],"tags":[{"name":"Integration","description":"Credential identity and server-owned feature availability."},{"name":"Collections","description":"Mobile money push payments (USSD prompt to the customer) and collection reads."},{"name":"Checkout Sessions","description":"TeePay hosted checkout pages created from your server."},{"name":"Control Numbers","description":"Tanzanian Control Numbers and the verified payments received on them."},{"name":"Payouts","description":"Quoted payouts (disbursements) from your TeePay balance and payout reads."}],"paths":{"/v1/collections":{"get":{"operationId":"list-collections","description":"Your account's collections, newest first, filterable by status and currency. Requires collection:read.","security":[{"BearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"enum":["created","pending","processing","succeeded","failed","reversed","refunded"]}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}}],"responses":{"200":{"description":"Page of transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionPage"}}}},"401":{"description":"Invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or account access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"summary":"List collections","tags":["Collections"]},"post":{"operationId":"create-collection","description":"Sends a USSD payment prompt to the customer's phone. The customer approves it with their mobile money PIN. A 202 response means the request was accepted, not that the customer paid: read the collection or wait for the payment.completed webhook. customer.country and money.currency must be a pair your key can use (see Get capabilities); otherwise the error is unsupported_market. Requires collection:create and mobile money push enabled for your account.","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"example":"order-1001"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["money","customer"],"properties":{"money":{"type":"object","additionalProperties":false,"required":["amount_minor","currency"],"properties":{"amount_minor":{"type":"string","pattern":"^[1-9][0-9]{0,18}$","description":"Integer minor units of currency (ISO 4217 exponent)."},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"One of supported_currencies from /v1/capabilities."}}},"customer":{"type":"object","additionalProperties":false,"required":["country","phone"],"properties":{"name":{"type":"string","maxLength":160},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":40,"description":"Payer mobile money number in international format, e.g. +255712345678."},"country":{"type":"string","pattern":"^[A-Z]{2}$","description":"Payer wallet country; one of supported_countries from /v1/capabilities."}}},"description":{"type":"string","maxLength":240}}},"example":{"money":{"amount_minor":"500000","currency":"TZS"},"customer":{"country":"TZ","phone":"+255712345678","name":"Asha Juma","email":"asha@example.com"},"description":"Order 1001"}}}},"responses":{"202":{"description":"Persisted payment state, provider-neutral money and public reference; no provider credentials or diagnostics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"401":{"description":"Invalid credential"},"403":{"description":"Scope/account/runtime access denied"},"409":{"description":"Idempotency payload conflict"},"422":{"description":"Invalid input (invalid_request), country/currency not enabled (unsupported_market), amount outside the market range (invalid_amount) or transaction limit exceeded (collection_limit_exceeded)"},"429":{"description":"Admission rate limit exceeded"},"503":{"description":"Financial or admission service unavailable"}},"summary":"Create a mobile money payment","tags":["Collections"]}},"/v1/collections/{reference}":{"get":{"operationId":"get-collection","description":"One collection by its public_reference. Poll this after creating a mobile money payment until status is succeeded or failed. Requires collection:read.","security":[{"BearerAuth":[]}],"parameters":[{"name":"reference","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"example":"TP8K2M4QZ1"}],"responses":{"200":{"description":"Transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"401":{"description":"Invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope or account access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found for this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"summary":"Get a collection","tags":["Collections"]}},"/v1/capabilities":{"get":{"operationId":"get-capabilities","description":"Returns which features this key can use right now, and the countries and currencies it can collect in (supported_countries, supported_currencies). A feature is true only when the key has the scope, the account has the permission and TeePay has enabled the feature for the account. Read this instead of hard-coding markets: new countries appear here when TeePay enables them.","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Server-owned current capabilities; no-store; Redis rate-limit headers apply","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["api_version","environment","release_stage","features","supported_countries","supported_currencies"],"properties":{"api_version":{"const":"2026-10-18"},"environment":{"enum":["sandbox","live"]},"release_stage":{"enum":["read_only","owned_payouts","owned_collections"]},"features":{"type":"object","additionalProperties":false,"required":["integration_read","collection_read","disbursement_read","collection_create","disbursement_create","payments","checkout_sessions","payment_links","payment_pages","invoice_payments","payouts","beneficiaries","balances","refunds","webhook_endpoints","control_number_read","control_number_create","checkout_session_read"],"properties":{"integration_read":{"const":true},"collection_read":{"type":"boolean"},"disbursement_read":{"type":"boolean"},"collection_create":{"type":"boolean"},"disbursement_create":{"type":"boolean"},"payments":{"type":"boolean"},"checkout_sessions":{"type":"boolean"},"payment_links":{"const":false},"payment_pages":{"const":false},"invoice_payments":{"const":false},"payouts":{"type":"boolean"},"beneficiaries":{"const":false},"balances":{"const":false},"refunds":{"const":false},"webhook_endpoints":{"const":false},"control_number_read":{"type":"boolean"},"control_number_create":{"type":"boolean"},"checkout_session_read":{"type":"boolean"}}},"supported_countries":{"type":"array","uniqueItems":true,"items":{"type":"string","pattern":"^[A-Z]{2}$"},"description":"ISO 3166-1 alpha-2 countries where this key can create collections now, sorted. Empty when collection_create is false."},"supported_currencies":{"type":"array","uniqueItems":true,"items":{"type":"string","pattern":"^[A-Z]{3}$"},"description":"ISO 4217 currencies this key can collect in now, sorted. Empty when collection_create is false."}}}}}},"401":{"description":"Invalid, expired, revoked or wrong-environment credential"},"422":{"description":"Query parameters are not accepted"},"429":{"description":"Shared application or credential admission limit exceeded"},"503":{"description":"Authentication or distributed admission unavailable"}},"summary":"Get capabilities","tags":["Integration"]}},"/v1/disbursements/quote":{"post":{"operationId":"create-payout-quote","description":"Prices a payout to a mobile wallet or bank account. A quote does not send money. It expires after two minutes and must be confirmed with Create a payout. Requires disbursement:create and approved payouts.","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["money","destination","narration"],"properties":{"money":{"type":"object","additionalProperties":false,"required":["amount","currency"],"properties":{"amount":{"type":"integer","minimum":1,"description":"TeePay minor units"},"currency":{"const":"TZS"}}},"destination":{"oneOf":[{"type":"object","additionalProperties":false,"required":["channel","name","phone"],"properties":{"channel":{"const":"mobile"},"name":{"type":"string"},"phone":{"type":"string","pattern":"^255[0-9]{9}$"}}},{"type":"object","additionalProperties":false,"required":["channel","name","bank","account"],"properties":{"channel":{"const":"bank"},"name":{"type":"string"},"bank":{"type":"string"},"account":{"type":"string","pattern":"^[0-9]{1,34}$"}}}]},"narration":{"type":"string","maxLength":500}}},"example":{"money":{"amount":2500000,"currency":"TZS"},"destination":{"channel":"mobile","name":"Juma Ali","phone":"255712345678"},"narration":"Supplier payment October"}}}},"responses":{"200":{"description":"Server-issued, short-lived quote with id and total_minor"},"401":{"description":"Invalid credential"},"403":{"description":"Live payout approval missing"},"422":{"description":"Invalid amount or destination"},"503":{"description":"Policy or provider quote unavailable"}},"summary":"Quote a payout","tags":["Payouts"]}},"/v1/disbursements":{"get":{"operationId":"list-payouts","description":"Your account's payouts, newest first. Requires disbursement:read.","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Paginated payout records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionPage"}}}},"401":{"description":"Invalid credential"},"403":{"description":"Read scope or account access denied"}},"summary":"List payouts","tags":["Payouts"]},"post":{"operationId":"create-payout","description":"Confirms a valid quote and sends the payout. Your balance is reserved for the amount plus the fee before the payout is sent. If the outcome is uncertain (202), read the payout and never retry with a new idempotency_key. Requires disbursement:create.","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["quote_id","idempotency_key"],"properties":{"quote_id":{"type":"string","maxLength":128},"idempotency_key":{"type":"string","minLength":8,"maxLength":128}}},"example":{"quote_id":"QUOTE_ID_FROM_QUOTE_RESPONSE","idempotency_key":"payout-2026-10-0001"}}}},"responses":{"200":{"description":"Current committed payout state"},"202":{"description":"Submission outcome uncertain; use the same key and read the payout state"},"401":{"description":"Invalid credential"},"403":{"description":"Live payout approval missing"},"409":{"description":"Quote expired or idempotency conflict"},"422":{"description":"Invalid request, balance, or limit"},"503":{"description":"Provider or policy unavailable"}},"summary":"Create a payout","tags":["Payouts"]}},"/v1/disbursements/{reference}":{"get":{"operationId":"get-payout","description":"One payout by its TeePay reference. Requires disbursement:read.","security":[{"BearerAuth":[]}],"parameters":[{"name":"reference","in":"path","required":true,"schema":{"type":"string","maxLength":128},"example":"TP8K2M4QZ1"}],"responses":{"200":{"description":"Current payout record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"401":{"description":"Invalid credential"},"403":{"description":"Read scope or account access denied"},"404":{"description":"Reference not found"}},"summary":"Get a payout","tags":["Payouts"]}},"/v1/control-numbers":{"post":{"operationId":"create-control-number","description":"Issues a Tanzanian Control Number (TZS) for a bill or a customer. 201 returns the number; 202 means issuance is still in progress, so retry with the same Idempotency-Key, never a new one. Requires control_number:create and approved Control Number access.","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"example":"order-1001"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["kind","customer"],"properties":{"kind":{"enum":["bill","customer"]},"customer":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":160},"phone":{"type":"string","maxLength":20},"email":{"type":"string","maxLength":254}}},"description":{"type":"string","maxLength":240},"amount_minor":{"type":"string","pattern":"^[1-9][0-9]{0,18}$"},"maximum_minor":{"type":"string","pattern":"^[1-9][0-9]{0,18}$"},"payment_mode":{"enum":["EXACT","ALLOW_PARTIAL_AND_OVER_PAYMENT"]}}},"example":{"kind":"bill","customer":{"name":"Asha Juma","phone":"0712345678"},"description":"School fees, term 1","amount_minor":"5000000"}}}},"responses":{"201":{"description":"Control Number issued"},"202":{"description":"Issuance pending; retry with the same Idempotency-Key"},"401":{"description":"Invalid credential"},"403":{"description":"Scope or Control Number access denied"},"409":{"description":"Idempotency-Key reused with a different request"},"422":{"description":"Invalid request"},"429":{"description":"Rate or monthly creation limit reached"}},"summary":"Create a Control Number","tags":["Control Numbers"]},"get":{"operationId":"list-control-numbers","description":"Your Control Numbers with amounts collected and remaining. Requires control_number:read.","security":[{"BearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Page of Control Numbers"},"401":{"description":"Invalid credential"},"403":{"description":"Read scope or account access denied"}},"summary":"List Control Numbers","tags":["Control Numbers"]}},"/v1/control-numbers/{id}":{"get":{"operationId":"get-control-number","description":"One Control Number and the payments received on it. Only payments with status verified are money received; pending_verification and under_review are not. Requires control_number:read.","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"7c0e5d2a-1b3f-4c8e-9a6d-2f4b8e1c0d9a"}],"responses":{"200":{"description":"Control Number with payments"},"401":{"description":"Invalid credential"},"403":{"description":"Read scope or account access denied"},"404":{"description":"Not found for this account"}},"summary":"Get a Control Number","tags":["Control Numbers"]}},"/v1/checkout-sessions":{"post":{"operationId":"create-checkout-session","description":"Creates a TeePay hosted checkout page for your account. Redirect the customer to checkout_url. A payment profile is optional: when given, or when your account has a default profile, its branding, return URL and webhook URL are used. Repeating the same Idempotency-Key and body returns the same session with the header Idempotent-Replayed: true. Requires checkout:create. 30 creations per account per minute.","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":120,"pattern":"^[A-Za-z0-9_-]+$"},"example":"order-1001"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["title","amount_minor","currency"],"properties":{"title":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":200},"amount_minor":{"type":"string","pattern":"^[1-9][0-9]{0,12}$","description":"Integer minor units, e.g. \"500000\" is TZS 5,000.00."},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"expires_in":{"type":"integer","minimum":3600,"maximum":604800,"default":86400},"payment_profile_id":{"type":"string","format":"uuid"},"reference":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$","description":"Your order ID, echoed back."},"metadata":{"type":"object","maxProperties":10,"propertyNames":{"pattern":"^[A-Za-z0-9_.-]{1,40}$"},"additionalProperties":{"type":"string","maxLength":200}}}},"example":{"title":"Order 1001","description":"2 x Coffee bag","amount_minor":"500000","currency":"TZS","expires_in":86400,"reference":"order-1001","metadata":{"cart":"c-77"}}}}},"responses":{"201":{"description":"Checkout session","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["id","object","status","title","description","currency","amount_minor","checkout_url","payment_profile_id","reference","metadata","payment","environment","created_at","expires_at"],"properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"checkout_session"},"status":{"enum":["open","processing","paid","expired","unavailable"],"description":"paid only after TeePay verified and ledger-posted the payment; never from a browser redirect."},"title":{"type":"string"},"description":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"amount_minor":{"type":"string","pattern":"^[1-9][0-9]{0,12}$"},"checkout_url":{"type":["string","null"],"format":"uri","description":"TeePay hosted checkout to send or redirect the customer to."},"payment_profile_id":{"type":["string","null"]},"reference":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"payment":{"type":["object","null"],"additionalProperties":false,"properties":{"reference":{"type":"string"}}},"environment":{"enum":["live","sandbox"]},"created_at":{"type":"string"},"expires_at":{"type":["string","null"]}}}}}},"401":{"description":"Invalid credential"},"403":{"description":"Scope or account access denied"},"409":{"description":"Idempotency-Key reused with a different request"},"422":{"description":"Invalid request"},"429":{"description":"Rate limited"},"503":{"description":"Temporarily unavailable; retry"}},"summary":"Create a checkout session","tags":["Checkout Sessions"]},"get":{"operationId":"list-checkout-sessions","description":"Checkout sessions created through the API, newest first. Requires checkout:read.","security":[{"BearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,256}$"}}],"responses":{"200":{"description":"Page of checkout sessions","content":{"application/json":{"schema":{"type":"object","required":["object","items","next_cursor"],"properties":{"object":{"const":"list"},"items":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","object","status","title","description","currency","amount_minor","checkout_url","payment_profile_id","reference","metadata","payment","environment","created_at","expires_at"],"properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"checkout_session"},"status":{"enum":["open","processing","paid","expired","unavailable"],"description":"paid only after TeePay verified and ledger-posted the payment; never from a browser redirect."},"title":{"type":"string"},"description":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"amount_minor":{"type":"string","pattern":"^[1-9][0-9]{0,12}$"},"checkout_url":{"type":["string","null"],"format":"uri","description":"TeePay hosted checkout to send or redirect the customer to."},"payment_profile_id":{"type":["string","null"]},"reference":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"payment":{"type":["object","null"],"additionalProperties":false,"properties":{"reference":{"type":"string"}}},"environment":{"enum":["live","sandbox"]},"created_at":{"type":"string"},"expires_at":{"type":["string","null"]}}}},"next_cursor":{"type":["string","null"]}}}}}},"401":{"description":"Invalid credential"},"403":{"description":"Scope or account access denied"},"422":{"description":"Invalid request"},"429":{"description":"Rate limited"},"503":{"description":"Temporarily unavailable; retry"}},"summary":"List checkout sessions","tags":["Checkout Sessions"]}},"/v1/checkout-sessions/{id}":{"get":{"operationId":"get-checkout-session","description":"One checkout session. status becomes paid only after TeePay verified and ledger-posted the payment, and payment.reference is then set. Requires checkout:read.","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"7c0e5d2a-1b3f-4c8e-9a6d-2f4b8e1c0d9a"}],"responses":{"200":{"description":"Checkout session","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["id","object","status","title","description","currency","amount_minor","checkout_url","payment_profile_id","reference","metadata","payment","environment","created_at","expires_at"],"properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"checkout_session"},"status":{"enum":["open","processing","paid","expired","unavailable"],"description":"paid only after TeePay verified and ledger-posted the payment; never from a browser redirect."},"title":{"type":"string"},"description":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"amount_minor":{"type":"string","pattern":"^[1-9][0-9]{0,12}$"},"checkout_url":{"type":["string","null"],"format":"uri","description":"TeePay hosted checkout to send or redirect the customer to."},"payment_profile_id":{"type":["string","null"]},"reference":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"payment":{"type":["object","null"],"additionalProperties":false,"properties":{"reference":{"type":"string"}}},"environment":{"enum":["live","sandbox"]},"created_at":{"type":"string"},"expires_at":{"type":["string","null"]}}}}}},"401":{"description":"Invalid credential"},"403":{"description":"Scope or account access denied"},"404":{"description":"Not found for this account"},"422":{"description":"Invalid request"},"429":{"description":"Rate limited"},"503":{"description":"Temporarily unavailable; retry"}},"summary":"Get a checkout session","tags":["Checkout Sessions"]}},"/v1/whoami":{"get":{"operationId":"get-api-key","security":[{"BearerAuth":[]}],"description":"Returns the application, environment, scopes and prefix of the key making the request. Works with any valid key and never returns the secret.","responses":{"200":{"description":"Safe integration metadata","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["application_reference","environment","scopes","credential_prefix"],"properties":{"application_reference":{"type":"string"},"environment":{"enum":["sandbox","live"]},"scopes":{"type":"array","minItems":1,"maxItems":9,"items":{"enum":["integration:read","collection:read","collection:create","disbursement:read","disbursement:create","control_number:read","control_number:create","checkout:read","checkout:create"]}},"credential_prefix":{"type":"string","pattern":"^tp_(test|live)_[0-9a-f]{32}$"}}}}}},"401":{"description":"Safe error, no resource enumeration or credential material","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"field_errors":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}},"422":{"description":"Safe error, no resource enumeration or credential material","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"field_errors":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}},"429":{"description":"Safe error, no resource enumeration or credential material","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"field_errors":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}},"503":{"description":"Safe error, no resource enumeration or credential material","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"field_errors":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}}},"summary":"Get API key details","tags":["Integration"]}}},"components":{"schemas":{"Money":{"type":"object","required":["amount_minor","currency"],"properties":{"amount_minor":{"type":"integer","description":"Integer minor units. In responses this is a JSON number; requests send it as a string."},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}}},"Collection":{"type":"object","required":["id","operation","status","money","created_at","updated_at"],"properties":{"id":{"type":"string"},"public_reference":{"type":"string","description":"Use this reference to read the payment."},"operation":{"const":"charge"},"status":{"enum":["created","pending","processing","succeeded","failed","reversed","refunded"]},"status_detail":{"enum":["cancelled","expired"],"description":"Present only for failed payments the customer cancelled or that expired."},"money":{"$ref":"#/components/schemas/Money"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Transaction":{"type":"object","required":["id","operation","status","money","created_at","updated_at"],"properties":{"id":{"type":"string"},"public_reference":{"type":"string"},"operation":{"enum":["charge","payout"]},"status":{"enum":["created","pending","processing","succeeded","failed","reversed","refunded"]},"status_detail":{"type":"string"},"money":{"$ref":"#/components/schemas/Money"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"customer_name":{"type":"string"},"customer_phone":{"type":"string"},"method":{"type":"string"},"channel":{"type":"string"},"source":{"type":"string"},"fee":{"$ref":"#/components/schemas/Money"},"net":{"$ref":"#/components/schemas/Money"}}},"TransactionPage":{"type":"object","required":["items","next_cursor"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"next_cursor":{"type":["string","null"]}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}}}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Secret API key: tp_test_<prefix>.<secret> or tp_live_<prefix>.<secret>. Server-side only."}}}}