Payment methods refer to the specific form of payment each customer uses (e.g. their credit card). Payment methods are tokenized, then charged at time of payment.
You can create payment methods ahead of time, then pass their existing tokens to payments.
Alternatively, you can create and tokenize payment methods inline when processing payments.
Note: For platforms, if the seller account status is not enabled
, 400
will be returned.
Idempotency-Key required | string <uuid> a string to identify your request (we recommend using a generated uuid, but you may use any unique string) see Idempotent Requests Example: my-request-123abc |
Authorization required | string the Example: Bearer {access_token} |
Sub-Account | string for platforms, the id of the sub account that this request applies to Example: acc_2IdMEOjIG6lJAncakgdBF2 |
Seller-Account | string Deprecated for platforms, the id of the seller account that this request applies to |
Payment method was created successfully
{- "payment_method": {
- "card": {
- "name": "Lindsay Whalen",
- "number": 4242424242421111,
- "verification": 123,
- "month": 5,
- "year": 2042,
- "address_postal_code": 55555,
- "metadata": {
- "new": "info"
}
}
}
}
{- "id": "pm_123xyz",
- "type": "payment_method",
- "data": {
- "signature": "3aGWnUznQ",
- "customer_id": "cust_123abc",
- "account_id": "acc_123",
- "card": {
- "id": "pm_123xyz",
- "name": "Lindsay Whalen",
- "acct_last_four": 1111,
- "brand": "visa",
- "token": "pm_123xyz",
- "month": "5",
- "year": "2042",
- "metadata": {
- "new": "info"
}, - "address_line1_check": "pass",
- "address_postal_code_check": "pass"
}
}, - "page_info": "string"
}
List the payment methods for your account. This endpoint supports pagination.
Authorization required | string the Example: Bearer {access_token} |
Sub-Account | string for platforms, the id of the sub account that this request applies to Example: acc_2IdMEOjIG6lJAncakgdBF2 |
Seller-Account | string Deprecated for platforms, the id of the seller account that this request applies to |
Successfully list payment methods
{- "id": 1,
- "type": "array",
- "data": [
- {
- "card": {
- "id": "pm_123xyz",
- "acct_last_four": 4242,
- "brand": "Visa",
- "name": "Amanda Kessel",
- "token": "pm_123xyz",
- "month": "5",
- "year": "2042",
- "metadata": { },
- "created_at": "2021-01-01T12:00:00Z",
- "updated_at": "2021-01-01T12:00:00Z",
- "address_line1_check": "unchecked",
- "address_postal_code_check": "unchecked"
}, - "customer_id": "cust_xyz",
- "signature": "4guAJNkVA3lRLVlanNVoBK",
- "account_id": "acc_123"
}, - {
- "bank_account": {
- "id": "pm_123xyz",
- "acct_last_four": 1111,
- "brand": "Wells Fargo",
- "name": "Phil Kessel",
- "token": "pm_123xyz",
- "metadata": { },
- "created_at": "2021-01-01T12:00:00Z",
- "updated_at": "2021-01-01T12:00:00Z"
}, - "customer_id": "cust_xyz",
- "signature": "4guAJNkVA3lRLVlanNVoBK",
- "account_id": "acc_123"
}
], - "page_info": {
- "end_cursor": "WyIyMDIyLTAyLTA4IDE5OjUyOjM3LjEwNDE3MzAwMCIsIjY4MDliYTU5LTYxYjctNDg3MS05YWFiLWE2Y2MyNmY3M2M1ZCJd",
- "has_next": false,
- "has_previous": false,
- "start_cursor": "WyIyMDIyLTAyLTA4IDIwOjAxOjU4LjEyMDIzMjAwMCIsIjU5ZTFjNGI1LWFlOWQtNDIyZC04MTVkLWNjNzQ5NzdlYmFjYSJd"
}
}
Get information about a payment method.
Successfully get a payment method
{- "id": "pm_123xyz",
- "type": "payment_method",
- "data": {
- "signature": "3aGWnUznQ",
- "customer_id": "cust_123abc",
- "account_id": "acc_123",
- "card": {
- "id": "pm_123xyz",
- "name": "Lindsay Whalen",
- "acct_last_four": 1111,
- "brand": "visa",
- "token": "pm_123xyz",
- "month": "5",
- "year": "2042",
- "metadata": {
- "new": "info"
}, - "address_line1_check": "pass",
- "address_postal_code_check": "pass"
}
}, - "page_info": "string"
}
Change a payment method's expiration date, address, or metadata.
Idempotency-Key required | string <uuid> a string to identify your request (we recommend using a generated uuid, but you may use any unique string) see Idempotent Requests Example: my-request-123abc |
Authorization required | string the Example: Bearer {access_token} |
object (UpdateCard) | |
object (UpdateBankAccount) Bank Account |
Payment method update was successful
{- "card": {
- "month": 5,
- "year": 2042,
- "address_line1": "123 Fake St",
- "address_line2": "Suite 101",
- "address_city": "Cityville",
- "address_state": "MN",
- "address_postal_code": 55555,
- "address_country": "US",
- "metadata": {
- "new": "info"
}
}, - "bank_account": {
- "metadata": {
- "new": "info"
}
}
}
{- "id": "pm_123xyz",
- "type": "payment_method",
- "data": {
- "signature": "3aGWnUznQ",
- "customer_id": "cust_123abc",
- "account_id": "acc_123",
- "card": {
- "id": "pm_123xyz",
- "name": "Lindsay Whalen",
- "acct_last_four": 1111,
- "brand": "visa",
- "token": "pm_123xyz",
- "month": "5",
- "year": "2042",
- "metadata": {
- "new": "info"
}, - "address_line1_check": "pass",
- "address_postal_code_check": "pass"
}
}, - "page_info": "string"
}
Copy a payment method from one sub account to another sub account. This allows one to share payment methods between accounts without having to collect the card information again. The original payment method's id / token should be provided in the path.
Idempotency-Key required | string <uuid> a string to identify your request (we recommend using a generated uuid, but you may use any unique string) see Idempotent Requests Example: my-request-123abc |
Authorization required | string the Example: Bearer {access_token} |
Payment method clone was successful
{- "destination_account_id": "acc_xyz123"
}
{- "id": "pm_123xyz",
- "type": "payment_method",
- "data": {
- "signature": "3aGWnUznQ",
- "customer_id": "cust_123abc",
- "account_id": "acc_123",
- "card": {
- "id": "pm_123xyz",
- "name": "Lindsay Whalen",
- "acct_last_four": 1111,
- "brand": "visa",
- "token": "pm_123xyz",
- "month": "5",
- "year": "2042",
- "metadata": {
- "new": "info"
}, - "address_line1_check": "pass",
- "address_postal_code_check": "pass"
}
}, - "page_info": "string"
}