Skip to main content
POST
/
v1
/
payment
/
method
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.createMethod({
  externalUserId: 'externalUserId',
  mask: 'mask',
  tokenId: 'tokenId',
});

console.log(response);
{
  "code": "BAD_REQUEST",
  "message": "Invalid input parameters"
}

Authorizations

api-key
string
header
required

API key authentication for public endpoints

Body

application/json
tokenId
string
required

The token ID returned from the mobile or web SDK representing the EBT card.

externalUserId
string
required

The representation of your customer ID.

mask
string
required

Response

Payment method created successfully.