Payment Methods

Create a Payment Method

This endpoint requires prior approval. New integrations should use the JustiFi Tokenize Payment Method Web Component to securely collect and tokenize payment method details.

The web component handles PCI-scoped data collection and returns a payment method token that you can pass to the Create Payment endpoint.

If you have a use case that requires creating payment methods directly via the API, contact JustiFi Customer Success for approval. At minimum, a completed SAQ (Self-Assessment Questionnaire) is required to allow raw PAN submissions.

Note: If the sub account status is not enabled, 400 will be returned.

post/payment_methods

Request

Headers

Idempotency-Keystring uuid required

a string to identify your request (we recommend using a generated uuid, but you may use any unique string) see Idempotent Requests

Authorizationstring required

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

Sub-Accountstring required

the id of the sub account that this request applies to

Request body

emailstring email

email address to associate with the payment method

force_tokenizeboolean

Optional. If set to true in the request payload, allows for tokenization even if validations and authorization fail during the creation of the payment method

Example request

{
  "payment_method": {
    "card": {
      "name": "Kevin Garnett",
      "address_line1": "123 Fake St",
      "address_line2": "Suite 101",
      "address_city": "Cityville",
      "address_state": "MN",
      "address_country": "US",
      "brand": "Visa",
      "metadata": {}
    },
    "bank_account": {
      "account_owner_name": "Lindsay Whalen",
      "routing_number": "110000000",
      "account_number": "000123456789",
      "account_type": "checking",
      "account_owner_type": "individual",
      "country": "US",
      "currency": "usd",
      "bank_name": "Wells Fargo",
      "metadata": {}
    }
  }
}

Response

Payment method was created successfully

OR
OR

Example response

{
  "type": "payment_method",
  "data": {
    "id": "pm_123xyz",
    "signature": "3aGWnUznQ",
    "customer_id": "cust_123abc",
    "account_id": "acc_123",
    "status": "valid",
    "invalid_reason": "INVALID_ACCOUNT_NUMBER",
    "payment_method_import_id": "pmi_123xyz",
    "created_at": "2024-01-01T12:00:00Z",
    "updated_at": "2024-01-01T12:00:00Z",
    "card": {
      "id": "pm_123xyz",
      "name": "Lindsay Whalen",
      "brand": "visa",
      "digital_wallet": "apple_pay",
      "token": "pm_123xyz",
      "month": "5",
      "year": "2042",
      "metadata": {
        "new": "info"
      },
      "address_line1_check": "pass",
      "address_postal_code_check": "pass",
      "bin_details": {
        "type": "Credit",
        "card_brand": "Visa",
        "card_class": "Consumer",
        "country": "United States of America",
        "issuer": "WELLS FARGO BANK, N.A.",
        "funding_source": "Credit"
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.