Options
All
  • Public
  • Public/Protected
  • All
Menu

Will allow us to use the methods related to your card where we can create a card, obtain a card get all the cards of your users and delete card.

Hierarchy

Index

Constructors

Methods

  • It allows you to create a card.

    Parameters

    Returns Promise<ResponseSdk<ResponseInData<CardTokenized>>>

    const payload: cardPayload = {
    expiry_month: '11',
    expiry_year: '2025',
    card_holder: 'Duna Developers',
    card_holder_dni: '22333444-4',
    card_number: '5416752602582580',
    card_cvv: '123',
    address1: 'Vergara 548',
    zip: '001100',
    city: 'santiago',
    state: 'rm',
    country: 'cl',
    phone: '12345755'
    }

    const { data, error } = await checkout.createCard(payload)
  • It allows you to remove a card.

    Parameters

    • cardId: string

    Returns Promise<ResponseSdk<ResponseInData<Card>>>

      const { data, error } = await checkout.deleteCard('8aa1bfad-7a51-4870-8800');
    
  • It allows you to get a card.

    Parameters

    • cardId: string

    Returns Promise<ResponseSdk<ResponseInData<Card>>>

      const { data, error } = await checkout.getCard('8XX1XXXX-7a51-4870-8800')
    
  • It allows you to get all of the user's cards.

    Returns Promise<ResponseSdk<ResponseInData<CardTokenized[]>>>

     {
    data: [
    {
    id: string,
    user_id: string,
    card_holder: string,
    card_holder_dni: string,
    token: string,
    company: string,
    last_four: string,
    expiration_date: string,
    created_at: Date,
    updated_at: Date,
    deleted_at: null
    }
    ]
    }

    recipes

    const { data, error } = await checkout.getCards()
    

Generated using TypeDoc