Connector Token
Non-PCI: tokenize then authorize
const paymentClient = new PaymentClient(config);
const response = await paymentClient.tokenAuthorize({
merchantTransactionId: "txn_001",
amount: { minorAmount: 1000, currency: Currency.USD },
connectorToken: { value: "pm_1AbcXyzStripeTestToken" },
address: { billingAddress: {} },
captureMethod: CaptureMethod.AUTOMATIC,
returnUrl: "https://example.com/return",
});from payments import (
PaymentServiceTokenAuthorizeRequest, Money, Currency, CaptureMethod,
PaymentAddress, Address, SecretString,
)
response = await payment_client.token_authorize(
PaymentServiceTokenAuthorizeRequest(
merchant_transaction_id="txn_001",
amount=Money(minor_amount=1000, currency=Currency.USD),
connector_token=SecretString(value="pm_1AbcXyzStripeTestToken"),
address=PaymentAddress(billing_address=Address()),
capture_method=CaptureMethod.AUTOMATIC,
return_url="https://example.com/return",
)
)Direct authorize with a token
Last updated
Was this helpful?

