SDK ReferenceParameters

Parameters

SDK Parameters

Payment Invoice Request

ParameterNode.js keyPython keyPHP keyJava keyTypeRequiredDescription
Payment Link IDpaymentLinkIdpayment_link_idpaymentLinkIdpaymentLinkIdstringThe Payment Link ID from your Apara dashboard
AmountamountamountamountamountstringAmount to charge, e.g. "100" or "49.99"
CurrencycurrencycurrencycurrencycurrencystringISO 4217 code, e.g. "USD", "EUR", "SGD"
Success URLsuccessRedirectUrlsuccess_redirect_urlsuccessRedirectUrlsuccessRedirectUrlstringRedirect URL after successful payment
Failure URLfailureRedirectUrlfailure_redirect_urlfailureRedirectUrlfailureRedirectUrlstringRedirect URL after failed payment
Product DetailsproductDetailsproduct_detailsproductDetailsproductDetailsobjectProduct info shown at checkout
CustomerindividualindividualindividualindividualobjectCustomer details for pre-fill / KYC
Order IDcustomerOrderIdcustomer_order_idcustomerOrderIdcustomerOrderIdstringYour internal order reference ID

Node.js

{
  paymentLinkId: "string",        // Required
  amount: "string",               // Required — e.g. "100" or "49.99"
  currency: "string",             // Required — ISO 4217, e.g. "USD"
  successRedirectUrl: "string",   // Required
  failureRedirectUrl: "string",   // Required
  productDetails: { ... },        // Optional — see below
  individual: { ... },            // Optional — see below
  customerOrderId: "string",      // Optional — your internal order ID
}

Python

PaymentInvoiceRequest(
    payment_link_id="string",         # Required
    amount="string",                  # Required — e.g. "100" or "49.99"
    currency="string",                # Required — ISO 4217, e.g. "USD"
    success_redirect_url="string",    # Required
    failure_redirect_url="string",    # Required
    product_details=ProductDetails(), # Optional — see below
    individual=Individual(),          # Optional — see below
    customer_order_id="string",       # Optional — your internal order ID
)

Java

paymentInvoiceRequest.builder()
    .paymentLinkId(String)           // Required: Payment link identifier
    .amount(String)                  // Required: Payment amount
    .currency(String)                // Required: Currency code (USD, EUR, etc.)
    .productDetails(productDetails)  // Optional — see below
    .individual(individual)          // Optional — see below
    .successRedirectUrl(String)      // Required: Success redirect URL
    .failureRedirectUrl(String)      // Required: Failure redirect URL
    .customerOrderId(String)         // Optional
    .build();

PHP

$paymentData = new PaymentInvoiceRequest(
    'LINK_ID',
    '100',
    'USD',
    'https://example.com/success',
    'https://example.com/failure'
);
$paymentData->productDetails  = $product;
$paymentData->individual      = $individual;
$paymentData->customerOrderId = 'order-001';

productDetails / ProductDetails

Product information displayed on the checkout page.

FieldNode.js keyPython keyRequiredDescription
NamenamenameName of the product or service
DescriptiondescriptiondescriptionShort description of the product
Image URLimageUrlimage_urlURL of a product image

Node.js

productDetails: {
  name: "Premium Annual Plan",
  description: "12-month access to all features",
  imageUrl: "https://example.com/product.png",
}

Python

from apara.types import ProductDetails

ProductDetails(
    name="Premium Annual Plan",
    description="12-month access to all features",
    image_url="https://example.com/product.png",
)

Java

productDetails(productDetails.builder()
        .name("Premium Subscription")
        .description("Monthly subscription plan")
        .build())

PHP

'productDetails'     => [
        'name'        => 'Premium Plan',
        'description' => 'Monthly subscription',
    ]

individual / Individual

Customer information used to pre-fill the checkout form or speed up KYC verification.

FieldNode.js keyPython keyRequiredDescription
First namefirstNamefirst_nameCustomer's first name
Last namelastNamelast_nameCustomer's last name
EmailemailemailCustomer's email address
PhonephonephonePhone number without country code
Phone codephoneCodephone_codeDialing code, e.g. "+1", "+91"
CountrycountrycountryISO 3166-1 alpha-3 for Node.js and PHP (e.g. "USA"), alpha-2 for Python (e.g. "US")
AddressaddressaddressCustomer's address (see below)

Node.js

individual: {
  firstName: "Jane",
  lastName: "Smith",
  email: "jane.smith@example.com",
  phone: "9876543210",
  phoneCode: "+1",
  country: "USA",
  address: {
    street: "123 Main St",
    city: "New York",
    state: "NY",
    postalCode: "10001",
  },
}

Python

from apara.types import Individual, Address

Individual(
    first_name="Jane",
    last_name="Smith",
    email="jane.smith@example.com",
    phone="9876543210",
    phone_code="+1",
    country="US",
    address=Address(
        street="123 Main St",
        city="New York",
        state="NY",
        postal_code="10001",
    ),
)

Java

individual(individual.builder()
        .firstName("John")
        .lastName("Doe")
        .email("john@example.com")
        .phone("1234567890")
        .phoneCode("+1")
        .country("US")
        .build())

PHP

'individual'         => [
        'firstName' => 'John',
        'lastName'  => 'Doe',
        'email'     => 'john@example.com',
        'phone'     => '1234567890',
        'phoneCode' => '+1',
        'country'   => 'US',
    ]

address / Address

FieldNode.js keyPython keyDescription
StreetstreetstreetStreet address
CitycitycityCity name
StatestatestateState or province
Postal codepostalCodepostal_codeZIP or postal code