Skip to main content
POST
/
api
/
adm
/
projectPaymentProcessors
Create Payment Processor Configuration
curl --request POST \
  --url https://localhost:44371/api/adm/projectPaymentProcessors \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

Description

Creates a new payment processor integration for a project including gateway provider (CyberSource, PayPal, Amazon), payment method type, and encrypted merchant credentials. Test configuration with a small transaction before production use.

Input

  • Body: model (ProjectPaymentProcessorCreateCommandRequest, required) — Configuration including:
    • name (string, required) — Descriptive name for the processor.
    • gateway (int, required) — Gateway provider (1=CyberSource, 2=PayPal, 3=Amazon).
    • companyProjectId (guid, required) — Project identifier.
    • paymentType (int, required) — Payment method type (1=CreditCard, 2=Amazon, 3=ExpressCheckout).
    • settingsJson (string, required) — JSON with merchant credentials.

Output

Returns a ProjectPaymentProcessorCreateCommandResponse containing the ID of the newly created processor configuration.

Example Request

POST /api/admin/project-payment-processors
Content-Type: application/json
Authorization: Bearer {token}

{
  "name": "Production CyberSource",
  "gateway": 1,
  "companyProjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "paymentType": 1,
  "settingsJson": "{\"merchantId\":\"merchant_12345\",\"apiKey\":\"xyz789\",\"sharedSecretKey\":\"secret\",\"testMode\":false}"
}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "id": "9ba85f64-5717-4562-b3fc-2c963f66afa7"
}

Errors

  • 400 Bad Request — Missing required fields, malformed settingsJson, invalid gateway value, or name exceeds length.
  • 404 Not Found — Project not found or inaccessible.
  • 409 Conflict — Processor with this gateway and payment type already exists for project.

Notes

  • SettingsJson structure varies by gateway; ensure all required credential fields included.
  • Credentials are automatically encrypted before storage.
  • New processors created in active state by default.
  • Gateway type cannot be changed after creation.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

The configuration details including gateway type, credentials, and payment method type.

Base structure for command requests that modify data. Represents the payload required to create a new project payment processor configuration.

name
string
required

The display name assigned to the processor configuration.

Maximum string length: 50
settingsJson
string
required

The JSON payload containing the processor configuration settings.

Minimum string length: 1
gateway
enum<string>

The gateway implementation the processor should use.

Available options:
CyberSource,
PayPal,
Amazon
companyProjectId
string<guid>

The identifier of the company project that will own the configuration.

paymentType
enum<string>

The payment method supported by the processor configuration.

Available options:
CreditCard,
Amazon,
ExpressCheckout

Response

Always returned. Check the success property in the response body to determine if the operation succeeded.

Standard response structure containing operation status and error information. Standard command response indicating the result of a data modification. Create response containing the identifier of the newly created entity. Represents the response returned after a project payment processor is created.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null

id
string<guid>

Unique identifier of the newly created entity.

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"