{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/sidebars.yaml","api-docs-apis/openapi.yaml":"api-docs-apis/openapi.yaml"},"props":{"metadata":{"markdoc":{"tagList":["replay-openapi"]},"type":"markdown"},"seo":{"title":"Reefpay Docs","description":"Reefpay is the groundbreaking payment gateway that lets you integrate with the future of payments."},"dynamicMarkdocComponents":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"create-and-update-a-client","__idx":0},"children":["Create and update a client"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Creating a client is the first step in boarding a merchant. It returns the credentials that merchant will authenticate with, and those credentials are shown exactly once."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"before-you-start","__idx":1},"children":["Before you start"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your reseller ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Api-Key"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Client-Id"]}," — see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/get-started/authentication"},"children":["Authentication"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your own client ID, which becomes the new client's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parent_id"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-a-client","__idx":2},"children":["Create a client"]},{"$$mdtype":"Tag","name":"ReplayOpenApi","attributes":{"descriptionFile":"api-docs-apis/openapi.yaml","operationId":"createClient","parameters":{},"options":{},"environments":{}},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Six fields are required:"]},{"$$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":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Notes"},"children":["Notes"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parent_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your client ID. The reseller or ISO this account sits under"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reseller"]},", lowercase"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dba"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The doing-business-as name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["address"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A list of one to three addresses, one per ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},". It must include the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LEGAL"]}," address"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["website"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The merchant's website, at most ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["30 characters"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["admin_contact_details"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An object, with four required fields of its own"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LEGAL"]}," address and the website are what the card processor receives as the merchant's street address and URL, so both have to be real. Each address needs a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LEGAL"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BILLING"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PHYSICAL"]}," — and a street in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["line1"]},", and no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," can appear twice. The rest of an address is optional:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"\"address\": [\n  { \"type\": \"LEGAL\", \"line1\": \"123 Main St\", \"city\": \"Fairfax\", \"state\": \"VA\", \"postal_code\": \"22030\", \"country\": \"US\" }\n]\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["admin_contact_details"]}," on a create needs ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["first_name"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["last_name"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["time_zone"]},". ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["time_zone"]}," comes from a fixed list of seven US zones, not the full IANA database — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["America/New_York"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["America/Chicago"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["America/Denver"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["America/Los_Angeles"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["America/Phoenix"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["America/Anchorage"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Pacific/Honolulu"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"store-the-api-key-now","__idx":3},"children":["Store the API key now"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response carries ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_key"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"CLIENT-01KFDKXMQ637EKEAY410MSQSXB\",\n  \"dba\": \"Acme Jewelry\",\n  \"api_key\": \"pk_live_01KFDKXMQ637EKEAY410MSQSXB\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["This is the only response that ever contains it."]}," There is no endpoint that reads a key back and no way to recover one. Write it to your secret store before you do anything else with the response."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," is the new client's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Client-Id"]},". The merchant sends both."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"update-a-client","__idx":4},"children":["Update a client"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/clients/{clientId}"]}," — a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["POST"]},", not a PUT or a PATCH. The API uses POST for updates throughout."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"parent_id\": \"CLIENT-01JMRSPCK7XVNP3KS8F2W4T6Y\",\n  \"dba\": \"Acme Fine Jewelry\",\n  \"admin_contact_details\": {}\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Three fields are required on every update: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parent_id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dba"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["admin_contact_details"]},"."]}," Send the current value of any you are not changing. Leave one out and the update returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVALID_REQUEST_DATA"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["details"]}," names each missing field."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["admin_contact_details"]}," has to be present, but nothing inside it is required, even though it has four required fields on a create. Send ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{}"]}," when the contact details are not changing, or only the contact fields you are changing."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every other field is optional. Send only the fields you are changing; everything you omit is left alone."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parent_id"]}," is not read-only."]}," The gateway stores whatever you send as the client's parent, so a different value moves the client under that account. Two fields cannot be changed after creation: the client's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," and its API key."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"there-is-no-delete","__idx":5},"children":["There is no delete"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Clients cannot be removed through the API. To stop a merchant processing, deactivate its integrations with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["is_active: false"]}," — see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/platforms/connect-a-processor"},"children":["Connect a processor"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"field-rules-the-schema-does-not-state","__idx":6},"children":["Field rules the schema does not state"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Two constraints the service enforces and the description does not yet describe. They return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVALID_REQUEST_DATA"]},"."]},{"$$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":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"What is rejected"},"children":["What is rejected"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Plus-addressing, and any top-level domain longer than four characters. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ops+paradise@example.com"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ops@acme.agency"]}," both fail"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["admin_contact_details.phone"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A separator after the country code, even though the shared ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Phone"]}," schema publishes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["+1-800-555-1234"]}," as an example. Send ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["+18005551234"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":7},"children":["Next steps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/platforms/connect-a-processor"},"children":["Connect a processor"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/platforms/act-on-behalf-of-a-client"},"children":["Act on behalf of a client"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/platforms/client-reports"},"children":["Client reports"]}]}]}]},"headings":[{"value":"Create and update a client","id":"create-and-update-a-client","depth":1},{"value":"Before you start","id":"before-you-start","depth":2},{"value":"Create a client","id":"create-a-client","depth":2},{"value":"Store the API key now","id":"store-the-api-key-now","depth":2},{"value":"Update a client","id":"update-a-client","depth":2},{"value":"There is no delete","id":"there-is-no-delete","depth":2},{"value":"Field rules the schema does not state","id":"field-rules-the-schema-does-not-state","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"title":"Create and update a client","shortTitle":"Create a client","intro":"Board a merchant under your reseller account, and change its details later. The create response is the only place its API key ever appears.","type":"how-to","seo":{"title":""}},"lastModified":"2026-11-04T00:46:56.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/platforms/create-and-update-a-client","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}