Paying too much to process cards? Get a cheaper quote today.Schedule a call →

Payment Methods

7 endpoints. Base URL https://api.paymentsonline.io, sandbox https://api.sandbox-paymentsonline.io.

Every request needs payments-api-key and payments-account.

GET/v1/payment-methods

List a Customer's Payment Methods

Returns a list of Payment Methods for a given Customer. The Payment Methods are sorted with the most recently created appearing first.

Query parameters

  • metadataobjectoptional

    metadata key-value pairs to filter by. Only exact matches on the key-value pair(s) will be returned. Example: ?metadata[internal_customer_id]=7cb1159d-875e-47ae-a309-319fa7ff395b.

  • typestring (card | ach_debit | eft_debit | card_present)required

    Only return payment methods of the given type.

  • customer_idstringrequired

    Customer identifier

  • offsetnumberoptional

    The (zero-based) offset of the first item in the collection to return.

  • limitnumberoptional

    The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.

Header parameters

  • payments-accountstringrequired

    The id of the Paydude Account (usually starting with the prefix acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.

Responses

200PaginatedDto | object

  • has_morebooleanrequired

    Whether or not there are more elements available after this set. If false, this set comprises the end of the list.

  • limitnumberoptional

    The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.

  • offsetnumberoptional

    The (zero-based) offset of the first item in the collection to return.

  • totalnumberoptional

    The total items count.

  • itemsarray of PaymentMethodrequired

POST/v1/payment-methods

Create a Payment Method

Creates a Payment Method. To use this endpoint, you must first submit your PCI Attestation of Compliance (AOC). Please contact integrations@paymentsonline.io for information on how to submit your documentation.

Header parameters

  • payments-accountstringrequired

    The id of the Paydude Account (usually starting with the prefix acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.

Request body application/jsonrequired

  • ach_debitPaymentMethodCreateParamsAchDebitoptional

    If this is an ach_debit PaymentMethod, this hash contains details about the ACH Direct Debit bank account.

  • billing_detailsPaymentMethodCreateParamsBillingDetailsoptional

    Billing information associated with the PaymentMethod that may be used or required by most types of payment methods.

  • cardPaymentMethodCreateParamsCardoptional

    If this is a card PaymentMethod, this hash contains the user's card details. When providing a card number, you must meet the requirements for PCI compliance. We strongly recommend using Paydude.js instead of interacting with this API directly.

  • eft_debitPaymentMethodCreateParamsEftDebitoptional

    If this is an eft_debit PaymentMethod, this hash contains details about the EFT Direct Debit bank account.

  • metadataobjectoptional

    Set of [key-value pairs](#section/Metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value (i.e. '' or null) to them. All keys can be unset by posting an empty value (i.e. {} or null) to metadata.

  • nick_namestringoptional

    A customer provided name for the PaymentMethod.

  • payment_tokenstringoptional

    A token generated by Paydude.js representing the details of a payment method (e.g. card or bank details)

  • terminal_reader_idstringoptional

    Required if this is a card_present PaymentMethod, this is the id of terminal reader you want to use to collect card information. Starts with a prefix term_

  • typestring (card | ach_debit | eft_debit | card_present)required

    The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. If the selected type is card_present, then terminal_reader_id is required.

Create a card Payment Method

{
  "type": "card",
  "card": {
    "number": "4111111111111111",
    "exp_month": 12,
    "exp_year": 2031,
    "cvc": "123"
  },
  "billing_details": {
    "name": "John Doe",
    "address": {
      "zip": "12345"
    }
  }
}

Create a card present Payment Method

{
  "type": "card_present",
  "terminal_reader_id": "{{TERMINAL_READER_ID}}"
}

Responses

201PaymentMethod

  • ach_debitAchDebitDetailsoptional

    If this is a ach_debit PaymentMethod, this hash contains details about the ACH Debit bank account.

  • billing_detailsPaymentMethodBillingDetailsoptional

    Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. (e.g. it is required for ach_debit and Apple Pay)

  • cardCardDetailsoptional

    If this is a card PaymentMethod, this hash contains the user's card details.

  • card_presentCardDetailsoptional

  • chargeablebooleanrequired

    Indicates whether or not the payment method can be used to make a charge. When a payment method is created via Paydude.js, a payment method is only capable of being used once (i.e. single-use) unless it is attached to a customer, in which case it becomes reusable.

  • created_atstring date-timerequired

    Time at which the object was created.

  • customer_idstringoptional

    The ID of the Customer to which this PaymentMethod is saved.

  • eft_debitEftDebitDetailsoptional

    If this is a eft_debit PaymentMethod, this hash contains details about the EFT Debit bank account.

  • expires_atstring date-timeoptional

    The time at which this PaymentMethod expires and is no longer available. PaymentMethods are created using a token generated by Paydude.js representing the details of a payment method (e.g. card or bank details). This token is a single-use token with an expiration date. Use /payment-methods/{id}/attach to make this PaymentMethod reusable.

  • idstringrequired

    Unique identifier for the object.

  • metadataobjectoptional

    Set of [key-value pairs](#section/Metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • nick_namestringoptional

    A customer provided name for the PaymentMethod.

  • terminal_readerTerminalReaderoptional

    If the payment method type is "card_present" then we return the terminal_reader object.

  • typestring (card | ach_debit | eft_debit | card_present)required

    The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.

  • updated_atstring date-timerequired

    Time at which the object was last updated.

GET/v1/payment-methods/{id}

Get a Payment Method

Retrieves the details of an existing Payment Method.

Path parameters

  • idstringrequired

Header parameters

  • payments-accountstringrequired

    The id of the Paydude Account (usually starting with the prefix acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.

Responses

200PaymentMethod

  • ach_debitAchDebitDetailsoptional

    If this is a ach_debit PaymentMethod, this hash contains details about the ACH Debit bank account.

  • billing_detailsPaymentMethodBillingDetailsoptional

    Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. (e.g. it is required for ach_debit and Apple Pay)

  • cardCardDetailsoptional

    If this is a card PaymentMethod, this hash contains the user's card details.

  • card_presentCardDetailsoptional

  • chargeablebooleanrequired

    Indicates whether or not the payment method can be used to make a charge. When a payment method is created via Paydude.js, a payment method is only capable of being used once (i.e. single-use) unless it is attached to a customer, in which case it becomes reusable.

  • created_atstring date-timerequired

    Time at which the object was created.

  • customer_idstringoptional

    The ID of the Customer to which this PaymentMethod is saved.

  • eft_debitEftDebitDetailsoptional

    If this is a eft_debit PaymentMethod, this hash contains details about the EFT Debit bank account.

  • expires_atstring date-timeoptional

    The time at which this PaymentMethod expires and is no longer available. PaymentMethods are created using a token generated by Paydude.js representing the details of a payment method (e.g. card or bank details). This token is a single-use token with an expiration date. Use /payment-methods/{id}/attach to make this PaymentMethod reusable.

  • idstringrequired

    Unique identifier for the object.

  • metadataobjectoptional

    Set of [key-value pairs](#section/Metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • nick_namestringoptional

    A customer provided name for the PaymentMethod.

  • terminal_readerTerminalReaderoptional

    If the payment method type is "card_present" then we return the terminal_reader object.

  • typestring (card | ach_debit | eft_debit | card_present)required

    The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.

  • updated_atstring date-timerequired

    Time at which the object was last updated.

PATCH/v1/payment-methods/{id}

Update a Payment Method

Updates a Payment Method by setting the values of the provided parameters. Any parameters not provided will be left unchanged. The Payment Method must be attached to a Customer to be updated.

Path parameters

  • idstringrequired

Header parameters

  • payments-accountstringrequired

    The id of the Paydude Account (usually starting with the prefix acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.

Request body application/jsonrequired

  • billing_detailsPaymentMethodCreateParamsBillingDetailsoptional

    Billing information associated with the PaymentMethod that may be used or required by most types of payment methods.

  • metadataobjectoptional

    Set of [key-value pairs](#section/Metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value (i.e. '' or null) to them. All keys can be unset by posting an empty value (i.e. {} or null) to metadata.

  • nick_namestringoptional

    A customer provided name for the PaymentMethod.

Responses

200PaymentMethod

  • ach_debitAchDebitDetailsoptional

    If this is a ach_debit PaymentMethod, this hash contains details about the ACH Debit bank account.

  • billing_detailsPaymentMethodBillingDetailsoptional

    Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. (e.g. it is required for ach_debit and Apple Pay)

  • cardCardDetailsoptional

    If this is a card PaymentMethod, this hash contains the user's card details.

  • card_presentCardDetailsoptional

  • chargeablebooleanrequired

    Indicates whether or not the payment method can be used to make a charge. When a payment method is created via Paydude.js, a payment method is only capable of being used once (i.e. single-use) unless it is attached to a customer, in which case it becomes reusable.

  • created_atstring date-timerequired

    Time at which the object was created.

  • customer_idstringoptional

    The ID of the Customer to which this PaymentMethod is saved.

  • eft_debitEftDebitDetailsoptional

    If this is a eft_debit PaymentMethod, this hash contains details about the EFT Debit bank account.

  • expires_atstring date-timeoptional

    The time at which this PaymentMethod expires and is no longer available. PaymentMethods are created using a token generated by Paydude.js representing the details of a payment method (e.g. card or bank details). This token is a single-use token with an expiration date. Use /payment-methods/{id}/attach to make this PaymentMethod reusable.

  • idstringrequired

    Unique identifier for the object.

  • metadataobjectoptional

    Set of [key-value pairs](#section/Metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • nick_namestringoptional

    A customer provided name for the PaymentMethod.

  • terminal_readerTerminalReaderoptional

    If the payment method type is "card_present" then we return the terminal_reader object.

  • typestring (card | ach_debit | eft_debit | card_present)required

    The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.

  • updated_atstring date-timerequired

    Time at which the object was last updated.

PUT/v1/payment-methods/{id}/attach

Attach a Payment Method to a Customer

Attaches a Payment Method to a Customer, converting it from single-use to reusable. Before attaching a card_present Payment Method to a Customer, the Payment Method must have been successfully used on a Terminal Reader. Payment Methods expire 15 minutes after creation. After 15 minutes, the Payment Method can no longer be attached to a Customer.

Path parameters

  • idstringrequired

Header parameters

  • payments-accountstringrequired

    The id of the Paydude Account (usually starting with the prefix acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.

Request body application/jsonrequired

  • customer_idstringrequired

    The ID of the Customer to which to attach the PaymentMethod.

Attach a Payment Method to a Customer

{
  "customer_id": "{{CUSTOMER_ID}}"
}

Responses

200PaymentMethod

  • ach_debitAchDebitDetailsoptional

    If this is a ach_debit PaymentMethod, this hash contains details about the ACH Debit bank account.

  • billing_detailsPaymentMethodBillingDetailsoptional

    Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. (e.g. it is required for ach_debit and Apple Pay)

  • cardCardDetailsoptional

    If this is a card PaymentMethod, this hash contains the user's card details.

  • card_presentCardDetailsoptional

  • chargeablebooleanrequired

    Indicates whether or not the payment method can be used to make a charge. When a payment method is created via Paydude.js, a payment method is only capable of being used once (i.e. single-use) unless it is attached to a customer, in which case it becomes reusable.

  • created_atstring date-timerequired

    Time at which the object was created.

  • customer_idstringoptional

    The ID of the Customer to which this PaymentMethod is saved.

  • eft_debitEftDebitDetailsoptional

    If this is a eft_debit PaymentMethod, this hash contains details about the EFT Debit bank account.

  • expires_atstring date-timeoptional

    The time at which this PaymentMethod expires and is no longer available. PaymentMethods are created using a token generated by Paydude.js representing the details of a payment method (e.g. card or bank details). This token is a single-use token with an expiration date. Use /payment-methods/{id}/attach to make this PaymentMethod reusable.

  • idstringrequired

    Unique identifier for the object.

  • metadataobjectoptional

    Set of [key-value pairs](#section/Metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • nick_namestringoptional

    A customer provided name for the PaymentMethod.

  • terminal_readerTerminalReaderoptional

    If the payment method type is "card_present" then we return the terminal_reader object.

  • typestring (card | ach_debit | eft_debit | card_present)required

    The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.

  • updated_atstring date-timerequired

    Time at which the object was last updated.

PUT/v1/payment-methods/{id}/detach

Detach a Payment Method from a Customer

Detaches a Payment Method from a Customer. Once detached, the Payment Method can no longer be used to confirm a Payment Intent.

Path parameters

  • idstringrequired

Header parameters

  • payments-accountstringrequired

    The id of the Paydude Account (usually starting with the prefix acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.

Responses

200PaymentMethod

  • ach_debitAchDebitDetailsoptional

    If this is a ach_debit PaymentMethod, this hash contains details about the ACH Debit bank account.

  • billing_detailsPaymentMethodBillingDetailsoptional

    Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. (e.g. it is required for ach_debit and Apple Pay)

  • cardCardDetailsoptional

    If this is a card PaymentMethod, this hash contains the user's card details.

  • card_presentCardDetailsoptional

  • chargeablebooleanrequired

    Indicates whether or not the payment method can be used to make a charge. When a payment method is created via Paydude.js, a payment method is only capable of being used once (i.e. single-use) unless it is attached to a customer, in which case it becomes reusable.

  • created_atstring date-timerequired

    Time at which the object was created.

  • customer_idstringoptional

    The ID of the Customer to which this PaymentMethod is saved.

  • eft_debitEftDebitDetailsoptional

    If this is a eft_debit PaymentMethod, this hash contains details about the EFT Debit bank account.

  • expires_atstring date-timeoptional

    The time at which this PaymentMethod expires and is no longer available. PaymentMethods are created using a token generated by Paydude.js representing the details of a payment method (e.g. card or bank details). This token is a single-use token with an expiration date. Use /payment-methods/{id}/attach to make this PaymentMethod reusable.

  • idstringrequired

    Unique identifier for the object.

  • metadataobjectoptional

    Set of [key-value pairs](#section/Metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • nick_namestringoptional

    A customer provided name for the PaymentMethod.

  • terminal_readerTerminalReaderoptional

    If the payment method type is "card_present" then we return the terminal_reader object.

  • typestring (card | ach_debit | eft_debit | card_present)required

    The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.

  • updated_atstring date-timerequired

    Time at which the object was last updated.

POST/v1/payment-methods/ach-debit-token

Create an ACH Debit Single-Use TokenDeprecated

Creates a single-use token for ACH debit which is used to create a Payment Method.

Header parameters

  • payments-accountstringrequired

    The id of the Paydude Account (usually starting with the prefix acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.

Request body application/jsonrequired

  • ach_debitPaymentMethodCreateParamsAchDebitrequired

    Details about the ACH Direct Debit bank account.

  • billing_detailsPaymentMethodCreateDebitSingleUseTokenParamsBillingDetailsrequired

    Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

Responses

201AchDebitSingleUseToken

  • created_atstring date-timerequired

    Time at which the object was created.

  • detailsAchDebitDetailsoptional

    This hash contains details about the ACH Debit bank account.

  • expires_atstring date-timerequired

    The time at which the token expires and is no longer available.

  • payment_tokenstringrequired

    The single-use token that is capable of being used to generate an ach_debit Payment Method. It represents bank account details.

  • updated_atstring date-timerequired

    Time at which the object was last updated.