SEPA Direct Debit

Vaulting

A payment method represents transactable payment information such as a customer's authorization to charge a SEPA Direct Debit account. Payment methods belong to a customer, are securely stored in the Braintree Vault, and have a payment_method_token attribute that you can store on your servers (with reduced PCI compliance burden) and later use to create transactions.

CreateAnchorIcon

Use Payment Method: Create to create a payment method for an existing customer using a payment method nonce received from the client:
  1. Ruby
result = gateway.payment_method.create(
    :customer_id => "131866",
    :payment_method_nonce => nonce_from_the_client
)
Alternatively, you can create a new customer with a payment method using Customer: Create with the payment_method_nonce parameter.

Once successfully created, you can use Transaction: Sale with the payment_method_token parameter to create a transaction.

FindAnchorIcon

Use Payment Method: Find to find a payment method:
  1. Ruby
payment_method = gateway.payment_method.find("token")
If the payment method can't be found, it will raise a Braintree::NotFoundError.

The return value of the Payment Method: Find call will be a PaymentMethod response object.

Note
The find action will also return a link to the mandate associated with the customer's payment method.

DeleteAnchorIcon

Use Payment Method: Delete to delete a payment method:
  1. Ruby
result = gateway.payment_method.delete("the_token")

result.success?
# true
If the payment method can't be found, it will raise a Braintree::NotFoundError.
  1. Ruby
result = gateway.payment_method.delete("the_token")

result.success?
# true
If the payment method can't be found, it will raise a Braintree::NotFoundError.

Note
The delete action will also revoke the mandate associated with the customer's payment method.