Skip to main content
POST
/
v1
/
payment
/
intent
JavaScript
import Benny from '@bennyapi/sdk';

const client = new Benny({
  subdomain: 'My-Subdomain',
  apiKey: process.env['BENNY_API_KEY'], // This is the default and can be omitted
});

const response = await client.payment.createIntent({
  amount: 0,
  externalUserId: 'externalUserId',
  fulfillmentAddress: {
    address1: 'address1',
    city: 'city',
    postalCode: 'postalCode',
    state: 'AL',
  },
  fulfillmentType: 'DELIVERY',
  tenderType: 'EBT_CASH',
  tokenId: 'tokenId',
});

console.log(response.paymentIntentId);
{
  "paymentIntentId": "<string>"
}

Authorizations

api-key
string
header
required

API key authentication for public endpoints

Body

application/json
amount
integer
required

The amount in cents for the payment.

tenderType
enum<string>
required

The tender type of SNAP or EBT Cash.

Available options:
EBT_CASH,
SNAP,
BANK_CARD
fulfillmentType
enum<string>
required

The fulfillment type.

Available options:
DELIVERY,
PICKUP
externalUserId
string
required

Your organization's representation of the customer ID.

fulfillmentAddress
object
required

The fulfillment address

tokenId
string
required

The payment method ID.

orderId
string

Your organization's representation of the order ID ID.

Response

Payment intent created successfully.

paymentIntentId
string
required

The payment intent ID. Payment intents expire after 1 hour.