Payment cards endpoint¶
Fetch all payment cards¶
-
payment_cards
([params = None])¶
param dict params: | |
---|---|
(optional) pagination options | |
return: | Collection of payment cards |
Example:
client.payment_cards({"page": 2, "limit": 1})
Fetch a payment card¶
-
payment_card
(payment_card_id)¶ Parameters: payment_card_id (str or int) – ID of the payment card to fetch Returns: Payment card model
Example:
card = client.payment_card(3456)
card.last4 # => "8148"
card.branch # => "MasterCard"
Create a payment card¶
-
create_payment_card
(params)¶ Parameters: params (dict) – Payment card parameters Returns: Payment card model
Note that the card will be added to the user identified by the currently used API token. The card will not be available to any other user, and Lokalise will not store card details. Once the card is added, its details are sent to Stripe.
Example:
card = client.create_payment_card({
"number": "4242424242420391",
"cvc": 123,
"exp_month": 9,
"exp_year": 2025
})
card.last4 # => "0391"