The POST /payment_methods call allows your platform to create a payment method. Payment methods represent payment data like credit cards and bank accounts, and allow your platform to charge and accept money from a payer.
Api-Version required | string Example: 3.0 |
Content-Type required | stringapplication/json Example: application/json |
Unique-Key | string |
WePay-Risk-Token | string This header is required when tokenizing Payment Methods, Legal Entities, and Payout Methods when the tokenization JS library is not being used. |
Client-IP | string This header is required when tokenizing Payment Methods, Legal Entities, and Payout Methods when the tokenization JS library is not being used. |
type required | string Type of payment method.
| ||||||
object Credit card payment method information for Apple Pay. | |||||||
object Raw credit card information. | |||||||
object or null Any custom data your platform chooses to attach to this resource. The custom data must be key-value pairs and not contain any personally identifiable information (PII) or payment card (PCI) data. | |||||||
encoded_payment_method | string [ 1 .. 2048 ] characters Encoded payment data. Currently is used for POS payment tokens but in future may be used for other types of encoded payment information | ||||||
object Credit card payment method information for Google Pay. | |||||||
object Raw bank account information. | |||||||
object A Plaid processor token to make Plaid API calls. | |||||||
Array of objects or null Any rbit data your platform chooses to attach to this resource. The rbit data must be key-value pairs and can be an array of rbit objects. | |||||||
object A previously created token. Note: Using tokens to pass highly-sensitive data directly to WePay may help your platform avoid certain compliance and regulatory overhead. Learn more about tokens here. |
INVALID_PARAMS, MERCHANT_ACCOUNT_CANNOT_ACCEPT_PAYMENTS
NOT_AUTHORIZED
UNEXPECTED_ERROR
{- "type": "apple_pay",
- "apple_pay": {
- "payment_method_data": "fjwfhkdjsfjkdsnfjasfsd47845gds",
- "card_holder": {
- "holder_name": "John Snow",
- "email": "example@wepay.com",
- "address": {
- "country": "US",
- "postal_code": "94025"
}
}
}
}