Some payment processors require additional parameters. See the Additional Guidance section for processor-specific requirements.
Basic Charge
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Amount in major units (e.g., 25.00 for $25.00) |
currency | string | Yes | ISO 4217 currency code (e.g., “USD”, “EUR”) |
card | object | Yes | Card details (see below) |
paymentGatewayAccountName | string | Conditional | Name of stored Payment Gateway Account. Required if not providing paymentGatewayAccount inline. |
paymentGatewayAccount | object | Conditional | Inline gateway credentials. Takes precedence over paymentGatewayAccountName. |
myRef | string | No | Your custom reference for this transaction |
payerDetails | object | No | Billing information of the card owner |
isDigital | boolean | No | Required by some processors for digital goods |
orderDesc | string | No | Order description (required by some processors) |
certificateName | string | No | Client certificate name if required by gateway |
networkTokenBrand | string | No | For network tokens: “Visa”, “MasterCard”, or “Amex” |
Card Object
| Field | Type | Required | Description |
|---|---|---|---|
cardNumber | string | Yes | Card number (PAN), or a token reference with @ prefix (e.g., @abc123) |
cardHolderName | string | Yes | Cardholder name as it appears on the card |
expirationMonth | integer | Yes | Two-digit expiration month (1-12) |
expirationYear | integer | Yes | Four-digit expiration year |
cvv | string | No | Card verification code |
To use a tokenized card number, prefix the token with
@ in the cardNumber field: "cardNumber": "@your-token-id". See Tokenization.Payer Details Object
| Field | Type | Description |
|---|---|---|
firstName | string | Cardholder first name |
lastName | string | Cardholder last name |
email | string | Email address |
address | string | Street address |
city | string | City |
state | string | State/province |
zip | string | Postal code |
countryCode | string | Country code |
clientIPAddress | string | Customer’s IP address |
Using a Stored Token
If you’ve tokenized a card number with StringTokens, reference it in thecardNumber field with an @ prefix:
Using Inline Credentials
Instead of a stored Payment Gateway Account, you can provide credentials inline:Response Codes
| Code | Description |
|---|---|
202 | Accepted - transaction sent to payment gateway |
400 | Bad request - invalid parameters |
401 | Not authenticated - invalid API key |
409 | Conflict - rejected by payment gateway |
500 | Error with payment gateway |
503 | Temporary failure with payment gateway |
Charge vs Authorize
| Operation | When to Use |
|---|---|
| Charge | Immediate fulfillment, digital goods, services |
| Authorize | Delayed fulfillment, physical goods, variable amounts |