Creates a new payment method object. See Payment Pages 2.0 implementation overview to learn how to create payment methods through Hosted Payment Pages.
fields[] | Array of strings Allows you to specify which fields are returned in the response.
Example: fields[]=id,created_time |
payment_method.fields[] | Array of strings Deprecated Allows you to specify which fields are returned in the response.
Example: payment_method.fields[]=id,created_time |
account.fields[] | Array of strings Allows you to specify which fields are returned in the response.
Example: account.fields[]=id,created_time |
expand[] | Array of strings Allows you to expand responses by including related object information in a single call. See the Expand responses section of the Quickstart API Tutorials for detailed instructions. |
filter[] | Array of strings A case-sensitive filter on the list. See the Filter lists section of the Quickstart API Tutorial for detailed instructions. |
page_size | integer [ 1 .. 99 ] The maximum number of results to return in a single page. If the specified |
zuora-track-id | string A custom identifier for tracking API requests. If you set a value for this header, Zuora returns the same value in the response header. This header enables you to track your API calls to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), or quote ('). |
async | boolean Default: false Making asynchronous requests allows you to scale your applications more efficiently by leveraging Zuora's infrastructure to enqueue and execute requests for you without blocking. These requests also use built-in retry semantics, which makes them much less likely to fail for non-deterministic reasons, even in extreme high-throughput scenarios. Meanwhile, when you send a request to one of these endpoints, you can expect to receive a response in less than 150 milliseconds and these calls are unlikely to trigger rate limit errors. If set to true, Zuora returns a 202 Accepted response, and the response body contains only a request ID. |
zuora-entity-ids | string An entity ID. If you have Multi-entity enabled and the authorization token is valid for more than one entity, you must use this header to specify which entity to perform the operation on. If the authorization token is only valid for a single entity or you do not have Multi-entity enabled, you do not need to set this header. |
idempotency-key | string Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. This idempotency key should be a unique value, and the Zuora server identifies subsequent retries of the same request using this value. For more information, see Idempotent Requests. |
accept-encoding | string Include a |
content-encoding | string Include a |
object (CustomFields) Set of user-defined fields associated with this object. Useful for storing additional information about the object in a structured format. | |
type required | string The type of the payment method. An additional hash is included on the payment method with a name matching this value. It contains additional information specific to the payment method type. |
custom_type | string The custom type of the payment method from Universal Payment Connector. |
account_id | string A customer account identifier. |
object (BillingDetails) Billing information associated with the payment method that may be used or required by specific payment method types. | |
maximum_payment_attempts | number Maximum number of consecutive failed retry payment attempts using this payment method before retries are stopped. |
payment_retry_interval | integer The retry interval in hours. |
device_session_id | string Identifier of the device browser session. |
ip_address | string or null The IP address from which the Mandate was accepted by the customer. |
bank_identification_number | string The first six or eight digits of the payment method's number, such as the credit card number or account number. Banks use this number to identify a payment method. |
object (Card) Credit card information. When providing a card number, you must meet the requirements for PCI compliance. We strongly recommend using Zuora's Payment Pages 2.0 instead of interacting with this API directly. | |
object (PaypalExpressNative) If it is a | |
object (PaypalExpress) If it is a | |
object (PaypalAdaptive) If it is a | |
object (SepaDebit) If the | |
object (CcRef) If the | |
object (ApplePayCreate) If the | |
object (GooglePayCreate) If the | |
object (AchDebit) If the | |
object (BetalingsDebit) If the | |
object (AutogiroDebit) If the | |
object (BacsDebit) If the | |
object (AuBecsDebit) If the | |
object (NzBecsDebit) If the | |
object (PadDebit) If the | |
account_number | string A human-readable customer account identifier. It can be user-supplied. |
is_default | boolean Indicates whether it is the default payment method on the associated account. |
gateway_id | string Identifier of the payment gateway Zuora will use to authorize the payments that are made with this payment method. |
object |
Default Response
Bad Request
Unauthorized
Not Found
Method Not Allowed
Too Many Requests
Internal Server Error
Bad Gateway
Service Unavailable
Gateway Timeout
{- "type": "card",
- "account_id": "2c92c0f86cbe335a016cbece4a434ada",
- "is_default": false,
- "billing_details": {
- "name": "Anabelle Padberg",
- "address": {
- "line1": "101 Redwood Shores Parkway",
- "city": "Redwood City",
- "state": "California",
- "country": "United States",
- "postal_code": "94065"
}
}, - "card": {
- "card_number": "4111111111111111",
- "brand": "visa",
- "expiry_month": 12,
- "expiry_year": 2025
}
}
{- "id": "8ad09b7d83165cd10183197e356c4ae3",
- "updated_by_id": "2c92c0946a6dffc0016a7faab604299b",
- "updated_time": "2022-09-07T12:47:25-07:00",
- "created_by_id": "2c92c0946a6dffc0016a7faab604299b",
- "created_time": "2022-09-07T12:47:25-07:00",
- "custom_fields": {
- "field__c": "custom field value"
}, - "type": "card",
- "account_id": "2c92c0f86cbe335a016cbece4a434ada",
- "billing_details": {
- "name": "Anabelle Padberg",
- "address": {
- "line1": "101 Redwood Shores Parkway",
- "city": "Redwood City",
- "country": "United States",
- "state": "California",
- "postal_code": "94065"
}
}, - "maximum_payment_attempts": 0,
- "payment_retry_interval": 0,
- "bank_identification_number": "411111",
- "card": {
- "brand": "visa",
- "expiry_month": 12,
- "expiry_year": 2025,
- "last_4": "1111"
}, - "state": "active"
}