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. Callback
  2. Promise
gateway.paymentMethod.create({
    customerId: "12345",
    paymentMethodNonce: nonceFromTheClient
}, (err, result) => {
    // handle response
});
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. Callback
  2. Promise
gateway.paymentMethod.find("token", (err, paymentMethod) => {
    // handle response
});
If the payment method can't be found, it will return a 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. Callback
  2. Promise
gateway.paymentMethod.delete("theToken", (err) => {
    // handle response
});
If the payment method can't be found, it will return a notFoundError.
  1. Callback
  2. Promise
gateway.paymentMethod.delete("theToken", (err) => { });
If the payment method can't be found, it will return a notFoundError.

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

Next Page: