Create an app integration payment gateway

Creates a new app integration payment gateway.

post
Header parameters
Brand-URLstringRequired

The brand URL of the request. This is used to identify the brand.

Example: YOUR_BRAND_URL
Auth-KeystringRequired

This is used to authenticate the request. If the request is not authenticated, the server will return a 401 Unauthorized response.

Example: YOUR_AUTH_KEY
Body

The request data transfer object for the payment gateway integration. This DTO is used when creating or updating an integration with payment providers like PayPal and Stripe.

appIntegrationIdstring · min: 1Required

The app integration id of the payment gateway.

namestring · min: 1Required

The name of the payment gateway integration.

ipnListenerLinkstring · uri · min: 1Required

The IPN (Instant Payment Notification) listener link of the payment gateway. This endpoint will receive payment notifications from the gateway. For PayPal: This is your IPN listener URL for payment status updates. For Stripe: This would be your webhook URL for payment events.

cancelLinkWithoutLoginstring · uri | nullableOptional

The payment link of the payment gateway. This is used when unauthenticated users cancel payment and need to be redirected. For PayPal/Stripe: Fallback URL when session is lost or user isn't logged in.

cancelLinkstring · uri · min: 1Required

The cancel link of the payment gateway. Users will be redirected here when they cancel a payment. For PayPal: Set as the cancel_url in PayPal checkout. For Stripe: Used as cancel_url in Stripe Checkout sessions.

returnLinkstring · uri · min: 1Required

The return link of the payment gateway. Users will be redirected here after successful payment. For PayPal: Set as the return_url in PayPal checkout. For Stripe: Used as success_url in Stripe Checkout sessions.

publicKeystring · min: 1Required

The public key of the payment gateway. For PayPal: Client ID from your PayPal app credentials. For Stripe: Publishable key from your Stripe dashboard.

privateKeystring · min: 1Required

The private key of the payment gateway. For PayPal: Secret from your PayPal app credentials. For Stripe: Secret key from your Stripe dashboard.

descriptionstring | nullableOptional

Description of the payment gateway. For PayPal/Stripe: Optional description that appears in your dashboard.

notesstring | nullableOptional

The notes of the payment gateway. For PayPal/Stripe: Internal notes about this integration.

testModeboolean | nullableOptional

Flag to indicate if the payment gateway is in test mode. When true, transactions will use the provider's sandbox environment. For PayPal: Uses https://api.sandbox.paypal.com instead of production. For Stripe: Uses test mode keys and endpoints. Default is false (production mode).

isDefaultbooleanOptional

Flag to indicate if the payment gateway integration is the default.

statusstring · enumOptionalPossible values:
Responses
201
The request was successful.
application/json
post
POST /api/v1/app-integrations/payment-gateway HTTP/1.1
Host: protocol.jframework.io
Brand-URL: text
Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 529

{
  "appIntegrationId": "sApKpllz4sAplsmzha",
  "name": "Stripe Payment Gateway",
  "ipnListenerLink": "https://subdomain.com/ipn-listener",
  "cancelLinkWithoutLogin": "https://subdomain.com/cancel-no-login",
  "cancelLink": "https://subdomain.com/cancel",
  "returnLink": "https://subdomain.com/return",
  "publicKey": "pk_test_51H8EXAMPLEKEY",
  "privateKey": "sk_test_51H8EXAMPLEKEY",
  "description": "PayPal integration for online payments.",
  "notes": "This is a sample payment gateway for testing purposes.",
  "testMode": true,
  "isDefault": false,
  "status": "Active"
}
{
  "success": true,
  "statusCode": 201,
  "message": "The request was successful.",
  "data": {
    "appIntegration": {
      "type": "PaymentGateway",
      "name": "Stripe",
      "domain": "https://stripe.com",
      "description": "Stripe payment gateway",
      "logoURL": null,
      "status": "Active",
      "id": "sApKpllz4sAplsmzha"
    },
    "name": null,
    "ipnListenerLink": "https://example.com/ipn-listener",
    "cancelLinkWithoutLogin": "https://example.com/cancel-no-login",
    "cancelLink": "https://example.com/cancel",
    "returnLink": "https://example.com/return",
    "publicKey": "public-key-example",
    "privateKey": "private-key-example",
    "description": "Example Payment Gateway",
    "notes": "This is a sample payment gateway for testing purposes.",
    "testMode": true,
    "isDefault": false,
    "status": "Inactive",
    "id": "sApKpllz4sAplsmzha"
  },
  "errors": []
}

Last updated

Was this helpful?