Interface Payment

Generator to generate payment related entries.

interface Payment {
    achAccountNumber(): string;
    achRoutingNumber(): string;
    bitcoinAddress(): string;
    bitcoinPrivateKey(): string;
    creditCard(): Record<string, unknown>;
    creditCardCVV(): string;
    creditCardExp(): string;
    creditCardExpMonth(): string;
    creditCardExpYear(): string;
    creditCardNumber(types: string[], bins: string[], gaps: boolean): string;
    creditCardNumberFormatted(): string;
    creditCardType(): string;
    currency(): Record<string, string>;
    currencyLong(): string;
    currencyShort(): string;
    price(min: number, max: number): number;
}

Methods

  • A bank account number used for Automated Clearing House transactions and electronic transfers.

    Returns string

    a random ach account number

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.achAccountNumber())
    }

    Output (formatted as JSON value)

    "805388385166"
    
  • Unique nine-digit code used in the U.S. for identifying the bank and processing electronic transactions.

    Returns string

    a random ach routing number

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.achRoutingNumber())
    }

    Output (formatted as JSON value)

    "605388385"
    
  • Cryptographic identifier used to receive, store, and send Bitcoin cryptocurrency in a peer-to-peer network.

    Returns string

    a random bitcoin address

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.bitcoinAddress())
    }

    Output (formatted as JSON value)

    "1t1xAUWhqY1QsZFAlYm6Z75zxerJ"
    
  • Secret, secure code that allows the owner to access and control their Bitcoin holdings.

    Returns string

    a random bitcoin private key

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.bitcoinPrivateKey())
    }

    Output (formatted as JSON value)

    "5KgZY1TaSmxpQcUsBAkWXFnidi9UsGRsoQq3dWe4oZz5zrG9VVC"
    
  • Plastic card allowing users to make purchases on credit, with payment due at a later date.

    Returns Record<string, unknown>

    a random credit card

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.creditCard())
    }

    Output (formatted as JSON value)

    {"Type":"Mastercard","Number":"2713883851665706","Exp":"04/32","Cvv":"489"}
    
  • Three or four-digit security code on a credit card used for online and remote transactions.

    Returns string

    a random credit card cvv

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.creditCardCVV())
    }

    Output (formatted as JSON value)

    "405"
    
  • Date when a credit card becomes invalid and cannot be used for transactions.

    Returns string

    a random credit card exp

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.creditCardExp())
    }

    Output (formatted as JSON value)

    "10/27"
    
  • Month of the date when a credit card becomes invalid and cannot be used for transactions.

    Returns string

    a random credit card exp month

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.creditCardExpMonth())
    }

    Output (formatted as JSON value)

    "07"
    
  • Year of the date when a credit card becomes invalid and cannot be used for transactions.

    Returns string

    a random credit card exp year

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.creditCardExpYear())
    }

    Output (formatted as JSON value)

    "25"
    
  • Unique numerical identifier on a credit card used for making electronic payments and transactions.

    Parameters

    • types: string[]

      Types

    • bins: string[]

      Bins

    • gaps: boolean

      Gaps

    Returns string

    a random credit card number

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.creditCardNumber(["none","how","these","keep","trip","congolese","choir","computer","still","far"],["unless","army","party","riches","theirs","instead","here","mine","whichever","that"],false))
    }

    Output (formatted as JSON value)

    "0"
    
  • Unique numerical identifier on a credit card used for making electronic payments and transactions.

    Returns string

    a random credit card number formatted

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.creditCardNumberFormatted())
    }

    Output (formatted as JSON value)

    "4111-1111-1111-1111"
    
  • Classification of credit cards based on the issuing company.

    Returns string

    a random credit card type

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.creditCardType())
    }

    Output (formatted as JSON value)

    "Mastercard"
    
  • Medium of exchange, often in the form of paper money or coins, used for trade and transactions.

    Returns Record<string, string>

    a random currency

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.currency())
    }

    Output (formatted as JSON value)

    {"Short":"VEF","Long":"Venezuela Bolivar"}
    
  • Complete name of a specific currency used for official identification in financial transactions.

    Returns string

    a random currency long

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.currencyLong())
    }

    Output (formatted as JSON value)

    "Venezuela Bolivar"
    
  • Short 3-letter word used to represent a specific currency.

    Returns string

    a random currency short

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.currencyShort())
    }

    Output (formatted as JSON value)

    "VEF"
    
  • The amount of money or value assigned to a product, service, or asset in a transaction.

    Parameters

    • min: number

      Min

    • max: number

      Max

    Returns number

    a random price

    import { Faker } from "k6/x/faker"

    let faker = new Faker(11)

    export default function () {
    console.log(faker.payment.price(0,1000))
    }

    Output (formatted as JSON value)

    563.3