SDK quickstart
Install the generated SDKs for TypeScript, Python, and Go and create a merchant with an onboarding link.
SDK quickstart
The Vortex Payments SDKs are generated from the same OpenAPI contract as the API reference. Pick a language and make your first merchant + onboarding-link call in a few lines.
The examples below use 2026-08, the current public surface. New dated surfaces
ship as new SDK entries; existing ones never change under you.
TypeScript
Install from the public npm registry:
pnpm add @vortex-api/vortex
import {
createVortex,
createMerchantAccount,
createMerchantOnboardingLink,
} from "@vortex-api/vortex/2026-08";
// vp_test_ key = sandbox; vp_live_ key = production.
const vortex = createVortex({ apiKey: process.env.VORTEX_API_KEY });
const { data: merchant, error: merchantError } = await createMerchantAccount({
client: vortex,
body: {
environment: "sandbox",
externalMerchantRef: "my-first-merchant",
displayName: "My First Merchant",
legalEntityType: "CORPORATION",
merchantMode: "processing",
country: "USA",
defaultCurrency: "USD",
},
});
if (merchantError) throw new Error(JSON.stringify(merchantError));
const merchantId = merchant.data.id as string;
console.log(merchantId); // ma_...
const { data: link, error: linkError } = await createMerchantOnboardingLink({
client: vortex,
path: { merchantAccountId: merchantId },
body: {
environment: "sandbox",
createdByRef: "operator:my-user-id",
},
});
if (linkError) throw new Error(JSON.stringify(linkError));
console.log(link.data.hostedMerchantOnboardingUrl);
Python
Install from PyPI:
pip install vortex-sdk
import os
import vortex
# vp_test_ key = sandbox; vp_live_ key = production.
# Point at the sandbox host while you build and test.
configuration = vortex.Configuration(
host="https://api.sandbox.vortex.nyc"
)
configuration.access_token = os.environ["VORTEX_API_KEY"]
client = vortex.ApiClient(configuration)
api = vortex.PaymentsReadinessApi(client)
merchant = api.create_merchant_account(
vortex.MerchantAccountCreateRequest(
environment="sandbox",
external_merchant_ref="my-first-merchant",
display_name="My First Merchant",
legal_entity_type="CORPORATION",
merchant_mode="processing",
country="USA",
default_currency="USD",
)
)
merchant_id = merchant.data["id"]
print(merchant_id) # ma_...
link = api.create_merchant_onboarding_link(
merchant_id,
vortex.MerchantOnboardingLinkRequest(
environment="sandbox",
created_by_ref="operator:my-user-id",
),
)
print(link.data["hostedMerchantOnboardingUrl"])
Go
Install the module:
go get github.com/vortexnyc/vortex-go
package main
import (
"context"
"fmt"
"os"
vortex "github.com/vortexnyc/vortex-go"
)
func main() {
cfg := vortex.NewConfiguration()
// vp_test_ key = sandbox; vp_live_ key = production.
// Point at the sandbox host while you build and test.
cfg.Host = "api.sandbox.vortex.nyc"
cfg.Scheme = "https"
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("VORTEX_API_KEY"))
client := vortex.NewAPIClient(cfg)
ctx := context.Background()
req := vortex.NewMerchantAccountCreateRequest(
"sandbox",
"My First Merchant",
"CORPORATION",
"USA",
"processing",
"USD",
)
req.ExternalMerchantRef = vortex.PtrString("my-first-merchant")
merchant, _, err := client.PaymentsReadinessAPI.CreateMerchantAccount(ctx).
MerchantAccountCreateRequest(*req).
Execute()
if err != nil {
panic(err)
}
merchantId := merchant.Data["id"].(string)
fmt.Println(merchantId) // ma_...
linkReq := vortex.NewMerchantOnboardingLinkRequest(
"sandbox",
"operator:my-user-id",
)
link, _, err := client.PaymentsReadinessAPI.CreateMerchantOnboardingLink(ctx, merchantId).
MerchantOnboardingLinkRequest(*linkReq).
Execute()
if err != nil {
panic(err)
}
fmt.Println(link.Data["hostedMerchantOnboardingUrl"])
}
What the SDK handles for you
- Auto-retry on
408/429/5xxand network failures. - Idempotency on mutating calls — the client generates a constant
Idempotency-Keyacross retries. - Typed errors with
requestId,status,code, anddocsUrl. - Environment on the key — there is no
environmentconstructor option to misconfigure. The request body still includesenvironment, and the API rejects a mismatch.