Payment Methods

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.

Create a Payment Method

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.

Request
header Parameters
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 access_token value returned from the JustiFi oauth/token endpoint (be sure to append Bearer before the token)

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
Note: seller account is deprecated, please use sub account

Request Body schema: application/json
required
object
email
string <email>

email address to associate with the payment method

Responses
201

Payment method was created successfully

post/payment_methods
Request samples
application/json
{
  • "payment_method": {
    }
}
Response samples
application/json
{
  • "id": "pm_123xyz",
  • "type": "payment_method",
  • "data": {
    },
  • "page_info": "string"
}

List Payment Methods

List the payment methods for your account. This endpoint supports pagination.

Request
query Parameters
customer_id
string

Filter records which are associated with a customer.

Example: customer_id=cust_123xyz
header Parameters
Authorization
required
string

the access_token value returned from the JustiFi oauth/token endpoint (be sure to append Bearer before the token)

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
Note: seller account is deprecated, please use sub account

Responses
200

Successfully list payment methods

get/payment_methods
Request samples
Response samples
application/json
{
  • "id": 1,
  • "type": "array",
  • "data": [
    ],
  • "page_info": {
    }
}

Get a Payment Method

Get information about a payment method.

Request
path Parameters
token
required
string
header Parameters
Authorization
required
string

the access_token value returned from the JustiFi oauth/token endpoint (be sure to append Bearer before the token)

Example: Bearer {access_token}
Responses
200

Successfully get a payment method

get/payment_methods/{token}
Request samples
Response samples
application/json
{
  • "id": "pm_123xyz",
  • "type": "payment_method",
  • "data": {
    },
  • "page_info": "string"
}

Update a Payment Method

Change a payment method's expiration date, address, or metadata.

Request
path Parameters
token
required
string
header Parameters
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 access_token value returned from the JustiFi oauth/token endpoint (be sure to append Bearer before the token)

Example: Bearer {access_token}
Request Body schema: application/json
object (UpdateCard)
object (UpdateBankAccount)

Bank Account

Responses
200

Payment method update was successful

patch/payment_methods/{token}
Request samples
application/json
{
  • "card": {
    },
  • "bank_account": {
    }
}
Response samples
application/json
{
  • "id": "pm_123xyz",
  • "type": "payment_method",
  • "data": {
    },
  • "page_info": "string"
}

Clone a Payment Method

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.

Request
path Parameters
token
required
string
header Parameters
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 access_token value returned from the JustiFi oauth/token endpoint (be sure to append Bearer before the token)

Example: Bearer {access_token}
Request Body schema: application/json
destination_account_id
string

The sub account id to which the payment method should be cloned

Responses
200

Payment method clone was successful

post/payment_methods/{token}/clone
Request samples
application/json
{
  • "destination_account_id": "acc_xyz123"
}
Response samples
application/json
{
  • "id": "pm_123xyz",
  • "type": "payment_method",
  • "data": {
    },
  • "page_info": "string"
}