Skip to main content
API to create a new association for an app and account
POST https://services.leadconnectorhq.com/payments/custom-provider/provider

Autorización

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.

Query parameters

locationId
string
default:"Lk3nlfk4lxlelVEwcW"
required
Account id

Body

name
string
default:"Company Paypal Integration"
required
The name of the custom provider
description
string
required
Description of payment gateway. Shown on the payments integrations page as subtext
paymentsUrl
string
default:"https://testpayment.paypal.com"
required
This url will be loaded in iFrame to start a payment session.
queryUrl
string
default:"https://testsubscription.paypal.com"
required
The url used for querying payments related events. Ex. verify, refund, subscription etc.
imageUrl
string
default:"https://testsubscription.paypal.com"
required
Public image url for logo of the payment gateway displayed on the payments integrations page.
supportsSubscriptionSchedule
boolean
default:"True"
required
Whether the config supports subscription schedule or not. true represents config supports subscription schedule

Respuestas

name
string
default:"Company Paypal Integration"
required
The name of the custom provider
description
string
required
Description of payment gateway. Shown on the payments integrations page as subtext
paymentsUrl
string
default:"https://testpayment.paypal.com"
required
This url will be loaded in iFrame to start a payment session.
queryUrl
string
default:"https://testsubscription.paypal.com"
required
The url used for querying payments related events. Ex. verify, refund, subscription etc.
imageUrl
string
default:"https://testsubscription.paypal.com"
required
Public image url for logo of the payment gateway displayed on the payments integrations page.
_id
string
default:"662a44ad19a2a44d3cd9d749"
required
The unique identifier for the custom provider.
locationId
string
default:"Lk3nlfk4lxlelVEwcW"
required
Account id
marketplaceAppId
string
default:"65f0b217a05c774da7f1efa5"
required
The application id of marketplace
paymentProvider
object
Payment provider details.
deleted
boolean
default:"True"
required
Whether the config is deleted or not. true represents config is deleted
createdAt
string
default:"2023-11-20T10:23:36.515Z"
required
The creation timestamp of the custom provider.
updatedAt
string
default:"2024-01-23T09:57:04.846Z"
required
The last update timestamp of the custom provider.
traceId
string
default:"302d2cf4-1ba0-4bf5-bc3b-f8fa76fda58a"
Trace id of the custom provider.
{
  "name": "Company Paypal Integration",
  "description": "This payment gateway supports payments in India via UPI, Net banking, cards and wallets.",
  "paymentsUrl": "https://testpayment.paypal.com",
  "queryUrl": "https://testsubscription.paypal.com",
  "imageUrl": "https://testsubscription.paypal.com",
  "_id": "662a44ad19a2a44d3cd9d749",
  "locationId": "Lk3nlfk4lxlelVEwcW",
  "marketplaceAppId": "65f0b217a05c774da7f1efa5",
  "paymentProvider": "{ live: { liveMode: true }, test: { liveMode: false, apiKey: \"y5ZQxryRFXZHvUJZdLXXXXXX\", publishableKey: \"rzp_test_zPRoVMLOa0A9wo\" }}",
  "deleted": true,
  "createdAt": "2023-11-20T10:23:36.515Z",
  "updatedAt": "2024-01-23T09:57:04.846Z",
  "traceId": "302d2cf4-1ba0-4bf5-bc3b-f8fa76fda58a"
}
{}
{}
{}

Ejemplo

curl -X POST 'https://services.leadconnectorhq.com/payments/custom-provider/provider' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Company Paypal Integration",
  "description": "This payment gateway supports payments in India via UPI, Net banking, cards and wallets.",
  "paymentsUrl": "https://testpayment.paypal.com",
  "queryUrl": "https://testsubscription.paypal.com",
  "imageUrl": "https://testsubscription.paypal.com",
  "supportsSubscriptionSchedule": true
}'
const response = await fetch('https://services.leadconnectorhq.com/payments/custom-provider/provider', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
    Version: '2021-07-28',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"name": "Company Paypal Integration", "description": "This payment gateway supports payments in India via UPI, Net banking, cards and wallets.", "paymentsUrl": "https://testpayment.paypal.com", "queryUrl": "https://testsubscription.paypal.com", "imageUrl": "https://testsubscription.paypal.com", "supportsSubscriptionSchedule": true}),
});
const data = await response.json();
import os, requests
response = requests.request(
    'POST',
    'https://services.leadconnectorhq.com/payments/custom-provider/provider',
    headers={
        'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
        'Version': '2021-07-28',
        'Content-Type': 'application/json',
    },
    json={"name": "Company Paypal Integration", "description": "This payment gateway supports payments in India via UPI, Net banking, cards and wallets.", "paymentsUrl": "https://testpayment.paypal.com", "queryUrl": "https://testsubscription.paypal.com", "imageUrl": "https://testsubscription.paypal.com", "supportsSubscriptionSchedule": true},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/payments/custom-provider/provider');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
        'Version: 2021-07-28',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode({'name': 'Company Paypal Integration', 'description': 'This payment gateway supports payments in India via UPI, Net banking, cards and wallets.', 'paymentsUrl': 'https://testpayment.paypal.com', 'queryUrl': 'https://testsubscription.paypal.com', 'imageUrl': 'https://testsubscription.paypal.com', 'supportsSubscriptionSchedule': true}),
]);
$data = json_decode(curl_exec($ch), true);