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 PaymentMethodToken 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. C#
var request = new PaymentMethodRequest {
    CustomerId = "131866",
    PaymentMethodNonce = NonceFromTheClient
};

Result<paymentmethod> result = gateway.PaymentMethod.Create(request);
Alternatively, you can create a new customer with a payment method using Customer: Create with the PaymentMethodNonce parameter.

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

FindAnchorIcon

Use Payment Method: Find to find a payment method:
  1. C#
PaymentMethod paymentMethod = gateway.PaymentMethod.Find("token");
If the payment method can't be found, it will throw a NotFoundException.

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. C#
var result = gateway.PaymentMethod.Delete("the_token");
result.IsSuccess(); // true
If the payment method can't be found, it will throw a NotFoundException.
  1. C#
var result = gateway.PaymentMethod.Delete("the_token");
result.IsSuccess(); // true
If the payment method can't be found, it will throw a NotFoundException.

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