Skip to main content

Payment Method Service

monei.payment_method, save and manage cards or bank accounts.

List Payment Methods

response = monei.payment_method.get_user_payment_methods("sub-wallet-id")
for pm in response.payment_methods:
    print(pm.type, pm.last4)

Add a Payment Method

pm = monei.payment_method.create_payment_method({
    "type": "card",
    "card_number": "4111111111111111",
    "expiry_month": "12",
    "expiry_year": "2027",
    "cvv": "123",
    "sub_wallet_id": "sub-wallet-id",
})

Get Payment Method Details

pm = monei.payment_method.get_payment_method_details("pm-id")

Set Default Payment Method

monei.payment_method.set_default_payment_method("pm-id")

Delete a Payment Method

monei.payment_method.delete_user_payment_methods("pm-id")