# Create Payment Service Registers a payment service for the account. Endpoint: POST /api/v3/payment_services Version: 3.1.0 Security: apiKeyAuth ## Query parameters: - `api_key` (string, required) Your API Key. Example: "YOUR_API_KEY" ## Request fields (application/json): - `id` (integer, required) Id of the payment service to register (top level). Missing → 400; unknown id → 500. Example: 1 - `payment_service` (object, required) Required. Missing → 500 (generic error). - `payment_service.is_partner` (boolean) Easypay only. true registers a new Easypay partner account from the company data sent in credentials (company_responsible, company_name, address, postal_code, city, country, phone, email, invoice_email, tecnical_email, notification_email, iban, vat_number); otherwise the existing Easypay credentials (ep_user, ep_cin, entity, public_key, s_code) are used. - `payment_service.credentials` (object) Credential fields required by the selected provider, as key/value pairs. - `payment_service.credentials.key` (string) Example: "value" - `payment_service.extra_options` (object) - `payment_service.extra_options.auto_add_payment_reference` (boolean) Example: true - `payment_service.extra_options.auto_add_payment_reference_estimates` (boolean) - `payment_service.extra_options.auto_send_invoice_from_estimate` (boolean) ## Response 201 fields (application/json): - `payment_service` (object) - `payment_service.id` (integer) Example: 1 - `payment_service.name` (string) Example: "euPago" - `payment_service.url` (string) Example: "https://eupago.pt" - `payment_service.logo` (string) An HTML `` tag, not a URL. Example: "euPago" - `payment_service.configured` (boolean) Example: true - `payment_service.credentials` (array) - `payment_service.credentials.key` (string) Example: "api_key" - `payment_service.credentials.value` (string) Example: "1234-5678-9123-4567" - `payment_service.credentials.type` (string) Example: "text" - `payment_service.credentials.editable` (boolean) Example: true - `payment_service.extra_options` (object) The account's payment options. An empty object {} unless this is the configured payment service. - `payment_service.extra_options.auto_add_payment_reference` (boolean) Example: true - `payment_service.extra_options.auto_add_payment_reference_estimates` (boolean) - `payment_service.extra_options.auto_send_invoice_from_estimate` (boolean) ## Response 401 fields (application/json): - `errors` (array) Example: [{"error":"Authentication Error"}] - `errors.error` (string) ## Response 422 fields (application/json): - `errors` (array) Example: [{"error":"An unexpected error occurred"}] - `errors.error` (string) ## Response 500 fields (application/json): - `errors` (array) Example: [{"error":"An unexpected error occurred"}] - `errors.error` (string) ## Response 400 fields