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_identifierpayment_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_piipayment_method_card_expiry_piipayment_method_cvv_piipayment_method_billing_namepayment_method_billing_addresspayment_method_billing_zipcodepayment_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_namepayment_method_billing_zipcodepayment_method_ach_aba_piipayment_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=truepayment_amountpayment_currency
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Best Practices to Ensure Fast API Response TimesBy 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 ListingsFor the fastest responses, sending
return_minimal_info=trueensures that PayNearMe will only return thepnm_order_identifierand thepnm_customer_identifier.If you require more information in the response than that, but do not require payment history, sending
return_no_pmts=truein your request will eliminate payment history entirely.If you prefer to receive just the most recent payment, sending
last_pmt_only=truein your request will limit the response to just the most recent payment.
Limiting Payment Method ListingsUse
payment_methods_limitto 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 ListingsThe fees specified in the
payment_methodsarray 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 MethodsThe /
create_payment_methodcall can only be used to create PayPal and Venmo payment methods for disbursements.