{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars/sdk_sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["credential-value"]},"type":"markdown"},"seo":{"title":"Introduction","description":"The specifications of Ratepay's APIs for easy payment transactions.","siteUrl":"https://docs.ratepay.com","keywords":"Ratepay developer portal, Ratepay api portal, Ratepay api reference docs","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"introduction","__idx":0},"children":["Introduction"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"badges-container"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"className":"reading-time-badge"},"children":["⏱ 5 min"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"author-badge"},"children":["👤 Onboarding Developer Team (Alexandre S.)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Ratepay Java SDK provides a single-typed client for integrating with Ratepay's ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://docs.ratepay.com/docs/developer/api_integration/payment_2.0/payment_api_2.0"},"children":["Payment API 2.0"]}," using Java or Kotlin."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the SDK to authorize, capture, cancel, and refund payments without manually handling HTTP requests, OAuth authentication, or JSON serialization."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK is available on Maven as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["com.ratepay.sdk:ratepay-sdk-core"]},". All code examples are provided in both Java and Kotlin."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"key-features","__idx":1},"children":["Key features"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Simplified API integration:"]}," Use a single, thread-safe ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RatepayClient"]}," to interact with Ratepay's ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://docs.ratepay.com/docs/developer/api_integration/payment_2.0/payment_api_2.0"},"children":["Payment API 2.0"]},". See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/developer/sdk/client/client-configuration"},"children":["Client configuration"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Automatic authentication:"]}," The SDK manages OAuth2 access tokens, including retrieval and renewal. See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/developer/sdk/client/authentication"},"children":["Authentication"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type-safe responses:"]}," Handle payment outcomes such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Accepted"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Declined"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OtpRequired"]}," without relying on exceptions for expected business outcomes."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Structured error handling:"]},"  Identify and handle authentication, validation, network, and other API errors using dedicated exception subtypes. See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/developer/sdk/errors-and-resilience/exception-hierarchy"},"children":["Exception hierarchy"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Idempotency support:"]}," Use idempotency keys to safely retry supported payment operations. See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/developer/sdk/errors-and-resilience/idempotency-and-retries"},"children":["Idempotency and retries"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Testable design:"]}," Mock or extend the client interface to support unit testing, logging, and monitoring. See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/developer/sdk/testing/testing-overview"},"children":["Testing overview"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"payment-lifecycle","__idx":2},"children":["Payment lifecycle"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Operation"},"children":["Operation"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authorize"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authorize a payment for a customer's order."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capture"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Capture an authorized payment, typically when an order is shipped or confirmed."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["incrementalAuthorize"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Increase the authorized amount before capture."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancel"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cancel an authorization that has not been captured."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refund"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Refund a previously captured payment."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sendShippingInformation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Add shipping and tracking details to a capture."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"before-you-start","__idx":3},"children":["Before you start"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To use the SDK, you'll need:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Runtime:"]}," Java 17 or later, built with Maven 3.9+ or Gradle. See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/developer/sdk/getting-started/compatibility"},"children":["Compatibility"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credentials:"]}," an OAuth client ID and secret per environment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Environments:"]}," use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment.INTEGRATION"]}," for testing and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment.PRODUCTION"]}," for live"," ","transactions. They use separate credentials."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"rp-credentials"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"className":"rp-credentials__title"},"children":["\n      Credentials\n   "]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"rp-credentials__note"},"children":["\n      Individual credentials will be provided by your Ratepay representative.\n   "]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"rp-credentials__switcher"},"children":[{"$$mdtype":"Tag","name":"select","attributes":{"id":"env","aria-label":"API environment","className":"rp-credentials__select"},"children":[{"$$mdtype":"Tag","name":"option","attributes":{"value":"test"},"children":["Test"]},{"$$mdtype":"Tag","name":"option","attributes":{"value":"live"},"children":["Live"]}]}]},{"$$mdtype":"Tag","name":"div","attributes":{"id":"block-test","className":"rp-credentials__panel"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"className":"rp-credentials__divider"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"rp-credentials__fields"},"children":[{"$$mdtype":"Tag","name":"CredentialValue","attributes":{"label":"Client ID","value":"snbFcxD4Rxt2O4YqeGqDls9yrGWYhmQ0"},"children":[]},{"$$mdtype":"Tag","name":"CredentialValue","attributes":{"label":"Client Secret","value":"IHa7jiW0hMlH0VsoxDTZ03XH76NED7RwFvJLsmmUXg9fkowhiVQqp7EA84WoYT1Q"},"children":[]}]}]},{"$$mdtype":"Tag","name":"div","attributes":{"id":"block-live","className":"rp-credentials__panel","style":{"display":"none"}},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"className":"rp-credentials__divider"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"rp-credentials__fields"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{"className":"rp-credentials__field"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Client ID:"]},{"$$mdtype":"Tag","name":"span","attributes":{"className":"rp-credentials__note"},"children":["\n         You will receive this via your Ratepay representative.\n         "]}]},{"$$mdtype":"Tag","name":"p","attributes":{"className":"rp-credentials__field"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Client Secret:"]},{"$$mdtype":"Tag","name":"span","attributes":{"className":"rp-credentials__note"},"children":["\n         You will receive this via your Ratepay representative.\n         "]}]}]}]}]},{"$$mdtype":"Tag","name":"HtmlScript","attributes":{},"children":["\ndocument.getElementById('env').addEventListener('change', function() {\n  const isTest = this.value === 'test';\n  document.getElementById('block-test').style.display = isTest ? 'block' : 'none';\n  document.getElementById('block-live').style.display = isTest ? 'none' : 'block';\n});\n"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"get-started","__idx":4},"children":["Get started"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ready to integrate Ratepay into your application? Follow the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/developer/sdk/getting-started/installation"},"children":["Getting started"]}," guide to install the SDK, configure your client, and process your first test payment."]}]},"headings":[{"value":"Introduction","id":"introduction","depth":1},{"value":"Key features","id":"key-features","depth":2},{"value":"Payment lifecycle","id":"payment-lifecycle","depth":2},{"value":"Before you start","id":"before-you-start","depth":2},{"value":"Get started","id":"get-started","depth":2}],"frontmatter":{"seo":{"title":"Introduction"},"disableImagesOptimization":true,"markdown":{"toc":{"hide":false,"depth":3}}},"lastModified":"2026-11-03T16:38:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/developer/sdk/introduction","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}