/create_payment_method

Enables you to create a credit/debit card, ACH, PayPal, or Venmo payment method while returning the payment_method_identifier. Use this endpoint to just create and tokenize payment methods or to simultaneously create the payment method and send a payment. The following parameters are required when creating payment methods:

  • pnm_order_identifier
  • payment_method_type

Credit and Debit Cards

When creating credit or debit card payment methods, be sure to include the following required parameters:
  • payment_method_card_number_pii
  • payment_method_card_expiry_pii
  • payment_method_cvv_pii
  • payment_method_billing_name
  • payment_method_billing_address
  • payment_method_billing_zipcode
  • payment_method_billing_phone (Can be made an optional parameter)

Bank Accounts

When creating ACH payment methods, be sure to include the following required parameters:
  • payment_method_billing_name
  • payment_method_billing_zipcode
  • payment_method_ach_aba_pii
  • payment_method_ach_account_pii

PayPal and Venmo

When creating a PayPal payment method, be sure to include the payment_method_paypal_account_id parameter. For Venmo payment methods, include the payment_method_venmo_username parameter.

Sending the Payment

If you want to send payment at the same time you create the payment method, be sure to include the following required parameters:
  • send_payment=true
  • payment_amount
  • payment_currency

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
📘

Best Practices to Ensure Fast API Response Times

By default, PayNearMe will return all payments related to an order in response to your API call. This results in lengthy responses as your orders accrue payments in our system. The following options reduce load times and bandwidth usage, helping to lower network costs.

Limiting Payment Listings

For the fastest responses, sending return_minimal_info=true ensures that PayNearMe will only return the pnm_order_identifier and the pnm_customer_identifier.

If you require more information in the response than that, but do not require payment history, sending return_no_pmts=true in your request will eliminate payment history entirely.

If you prefer to receive just the most recent payment, sending last_pmt_only=true in your request will limit the response to just the most recent payment.

Limiting Payment Method Listings

Use payment_methods_limit to limit the number of stored payment methods (accounts) returned within each payment method type (i.e., paypal, venmo, debit, gpay, ach, cash_app) in the response. This is useful for orders with many saved payment methods where returning all accounts would impact performance.

🚧

Payment Method Fee Listings

The fees specified in the payment_methods array represent the default convenience fees associated with each payment method. However, the actual fee charged to the consumer may vary depending on the payment channel (i.e., site_channel). To retrieve the most accurate fee information for each combination of payment method and payment channel, use the /get_fees endpoint.

❗️

PayPal and Venmo Payment Methods

The /create_payment_method call can only be used to create PayPal and Venmo payment methods for disbursements.

Body Params
string
enum
required

The type of payment method you are creating. Supported options include the following:

  • ach
  • card
  • paypal
  • venmo

Allowed:
string
required

The PAN of the credit or debit card.

string
required

The expiration date of the credit or debit card in MM/YYYY format.

string
required

The card verification value (CVV) of the credit or debit card.

string
required

The name of the account holder associated with the card or bank account.'

string
required

The billing street address associated with the card or bank account.

string
required

The 5- or 9-digit billing ZIP code associated with the card or bank account.

string
required

The phone number of the account holder associated with this card or bank account. While this parameter defaults to required, it can be made optional. For more information, contact your PayNearMe Technical Account Manager.

string
required
Defaults to S2411573363

Identifies your client site.

string
required

The Unix Epoch time of the call

string
required
Defaults to 3.0

The version of the API. This version must match the version associated with your API key pair.

string
required

The HMAC signature that is calculated by running your API Secret Key and the alphabetized, concatenated parameters of the request payload through the SHA256 message digest algorithm.

string
required
Defaults to 84338052224

The unique identifier for this order.

string

A client-defined ID or name for the payment method.

string

Set to true to only return payment method data and not the full order.

string

Enter a date in YYYY-MM-DD format to filter the list of payments that are returned in the order object response. For example, entering 2012-07-01 returns all payments that occurred on or after 2012-07-01 00:00:00 -0700.

string

Enter a date in YYYY-MM-DD format to filter the list of payments that are returned in the order object response. For example, entering 2012-07-01 returns all payments that occurred on or before 2012-07-01 00:00:00 -0700.

string

Enforces a limit to the number of payments that are returned in the order object response. For example, entering 2 limits the number of payments listed in the order to the 2 most recent payments. Use this parameter in conjunction with the sort_payments parameter to sort the listed payments by oldest (i.e.,asc) or the most recent (i.e., desc). By default, all payments are returned, which can slow down response time.

integer

Maximum number of payment processor accounts (PPAs) to return per payment method. Use 0 for no PPAs. Default: unlimited.

string
enum

Sorts the payments returned in the order object response from oldest to most recent (i.e., asc) or from the most recent payments to oldest (i.e., desc). The default value for this parameter is asc.

Allowed:
string

Submit as true to only return the most recent payment made for the order in the order object response.

string

Submit as true if you don't want payment records returned in the order object response.

string

Set to true to make a payment for this order at the same time you are creating the payment method.

string

The payment amount you are making towards the specified order. Required if send_payment=true.

string

USD

string

A client-defined ID for the payment record. If specified, it will be echoed back in both the Authorization and Confirmation callbacks. This parameter can also be added to the order in the Authorization callback response.

string

Specifies the name of the pricing schedule (e.g.,agent, agent_recurring, consumer, consumer_recurring,consumer_ivr). Supported values can include site-configured pricing schedules.

string
enum

The payment channel where this payment was created.

Allowed:
string

The email or mobile number that PayNearMe will contact to confirm completion of the payment.

Response

Language
URL
LoadingLoading…
Response
Choose an example:
application/json