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.
/v1/payment-methodsList 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
metadataobjectoptionalmetadatakey-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)requiredOnly return payment methods of the given type.
customer_idstringrequiredCustomer identifier
offsetnumberoptionalThe (zero-based) offset of the first item in the collection to return.
limitnumberoptionalThe maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.
Header parameters
payments-accountstringrequiredThe 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_morebooleanrequiredWhether or not there are more elements available after this set. If
false, this set comprises the end of the list.limitnumberoptionalThe maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.
offsetnumberoptionalThe (zero-based) offset of the first item in the collection to return.
totalnumberoptionalThe total items count.
itemsarray of PaymentMethodrequired
/v1/payment-methodsCreate 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-accountstringrequiredThe 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_debitPaymentMethodCreateParamsAchDebitoptionalIf this is an
ach_debitPaymentMethod, this hash contains details about the ACH Direct Debit bank account.billing_detailsPaymentMethodCreateParamsBillingDetailsoptionalBilling information associated with the PaymentMethod that may be used or required by most types of payment methods.
cardPaymentMethodCreateParamsCardoptionalIf this is a
cardPaymentMethod, 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_debitPaymentMethodCreateParamsEftDebitoptionalIf this is an
eft_debitPaymentMethod, this hash contains details about the EFT Direct Debit bank account.metadataobjectoptionalSet 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.
''ornull) to them. All keys can be unset by posting an empty value (i.e.{}ornull) tometadata.nick_namestringoptionalA customer provided name for the PaymentMethod.
payment_tokenstringoptionalA token generated by Paydude.js representing the details of a payment method (e.g. card or bank details)
terminal_reader_idstringoptionalRequired if this is a
card_presentPaymentMethod, this is the id of terminal reader you want to use to collect card information. Starts with a prefixterm_typestring (card | ach_debit | eft_debit | card_present)requiredThe 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, thenterminal_reader_idis 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_debitAchDebitDetailsoptionalIf this is a
ach_debitPaymentMethod, this hash contains details about the ACH Debit bank account.billing_detailsPaymentMethodBillingDetailsoptionalBilling information associated with the PaymentMethod that may be used or required by particular types of payment methods. (e.g. it is required for
ach_debitand Apple Pay)cardCardDetailsoptionalIf this is a
cardPaymentMethod, this hash contains the user's card details.card_presentCardDetailsoptionalchargeablebooleanrequiredIndicates 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-timerequiredTime at which the object was created.
customer_idstringoptionalThe ID of the Customer to which this PaymentMethod is saved.
eft_debitEftDebitDetailsoptionalIf this is a
eft_debitPaymentMethod, this hash contains details about the EFT Debit bank account.expires_atstring date-timeoptionalThe 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}/attachto make this PaymentMethod reusable.idstringrequiredUnique identifier for the object.
metadataobjectoptionalSet 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_namestringoptionalA customer provided name for the PaymentMethod.
terminal_readerTerminalReaderoptionalIf the payment method type is "card_present" then we return the terminal_reader object.
typestring (card | ach_debit | eft_debit | card_present)requiredThe 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-timerequiredTime at which the object was last updated.
/v1/payment-methods/{id}Get a Payment Method
Retrieves the details of an existing Payment Method.
Path parameters
idstringrequired
Header parameters
payments-accountstringrequiredThe 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_debitAchDebitDetailsoptionalIf this is a
ach_debitPaymentMethod, this hash contains details about the ACH Debit bank account.billing_detailsPaymentMethodBillingDetailsoptionalBilling information associated with the PaymentMethod that may be used or required by particular types of payment methods. (e.g. it is required for
ach_debitand Apple Pay)cardCardDetailsoptionalIf this is a
cardPaymentMethod, this hash contains the user's card details.card_presentCardDetailsoptionalchargeablebooleanrequiredIndicates 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-timerequiredTime at which the object was created.
customer_idstringoptionalThe ID of the Customer to which this PaymentMethod is saved.
eft_debitEftDebitDetailsoptionalIf this is a
eft_debitPaymentMethod, this hash contains details about the EFT Debit bank account.expires_atstring date-timeoptionalThe 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}/attachto make this PaymentMethod reusable.idstringrequiredUnique identifier for the object.
metadataobjectoptionalSet 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_namestringoptionalA customer provided name for the PaymentMethod.
terminal_readerTerminalReaderoptionalIf the payment method type is "card_present" then we return the terminal_reader object.
typestring (card | ach_debit | eft_debit | card_present)requiredThe 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-timerequiredTime at which the object was last updated.
/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-accountstringrequiredThe 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_detailsPaymentMethodCreateParamsBillingDetailsoptionalBilling information associated with the PaymentMethod that may be used or required by most types of payment methods.
metadataobjectoptionalSet 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.
''ornull) to them. All keys can be unset by posting an empty value (i.e.{}ornull) tometadata.nick_namestringoptionalA customer provided name for the PaymentMethod.
Responses
200PaymentMethod
ach_debitAchDebitDetailsoptionalIf this is a
ach_debitPaymentMethod, this hash contains details about the ACH Debit bank account.billing_detailsPaymentMethodBillingDetailsoptionalBilling information associated with the PaymentMethod that may be used or required by particular types of payment methods. (e.g. it is required for
ach_debitand Apple Pay)cardCardDetailsoptionalIf this is a
cardPaymentMethod, this hash contains the user's card details.card_presentCardDetailsoptionalchargeablebooleanrequiredIndicates 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-timerequiredTime at which the object was created.
customer_idstringoptionalThe ID of the Customer to which this PaymentMethod is saved.
eft_debitEftDebitDetailsoptionalIf this is a
eft_debitPaymentMethod, this hash contains details about the EFT Debit bank account.expires_atstring date-timeoptionalThe 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}/attachto make this PaymentMethod reusable.idstringrequiredUnique identifier for the object.
metadataobjectoptionalSet 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_namestringoptionalA customer provided name for the PaymentMethod.
terminal_readerTerminalReaderoptionalIf the payment method type is "card_present" then we return the terminal_reader object.
typestring (card | ach_debit | eft_debit | card_present)requiredThe 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-timerequiredTime at which the object was last updated.
/v1/payment-methods/{id}/attachAttach 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-accountstringrequiredThe 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_idstringrequiredThe ID of the Customer to which to attach the PaymentMethod.
Attach a Payment Method to a Customer
{
"customer_id": "{{CUSTOMER_ID}}"
}Responses
200PaymentMethod
ach_debitAchDebitDetailsoptionalIf this is a
ach_debitPaymentMethod, this hash contains details about the ACH Debit bank account.billing_detailsPaymentMethodBillingDetailsoptionalBilling information associated with the PaymentMethod that may be used or required by particular types of payment methods. (e.g. it is required for
ach_debitand Apple Pay)cardCardDetailsoptionalIf this is a
cardPaymentMethod, this hash contains the user's card details.card_presentCardDetailsoptionalchargeablebooleanrequiredIndicates 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-timerequiredTime at which the object was created.
customer_idstringoptionalThe ID of the Customer to which this PaymentMethod is saved.
eft_debitEftDebitDetailsoptionalIf this is a
eft_debitPaymentMethod, this hash contains details about the EFT Debit bank account.expires_atstring date-timeoptionalThe 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}/attachto make this PaymentMethod reusable.idstringrequiredUnique identifier for the object.
metadataobjectoptionalSet 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_namestringoptionalA customer provided name for the PaymentMethod.
terminal_readerTerminalReaderoptionalIf the payment method type is "card_present" then we return the terminal_reader object.
typestring (card | ach_debit | eft_debit | card_present)requiredThe 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-timerequiredTime at which the object was last updated.
/v1/payment-methods/{id}/detachDetach 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-accountstringrequiredThe 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_debitAchDebitDetailsoptionalIf this is a
ach_debitPaymentMethod, this hash contains details about the ACH Debit bank account.billing_detailsPaymentMethodBillingDetailsoptionalBilling information associated with the PaymentMethod that may be used or required by particular types of payment methods. (e.g. it is required for
ach_debitand Apple Pay)cardCardDetailsoptionalIf this is a
cardPaymentMethod, this hash contains the user's card details.card_presentCardDetailsoptionalchargeablebooleanrequiredIndicates 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-timerequiredTime at which the object was created.
customer_idstringoptionalThe ID of the Customer to which this PaymentMethod is saved.
eft_debitEftDebitDetailsoptionalIf this is a
eft_debitPaymentMethod, this hash contains details about the EFT Debit bank account.expires_atstring date-timeoptionalThe 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}/attachto make this PaymentMethod reusable.idstringrequiredUnique identifier for the object.
metadataobjectoptionalSet 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_namestringoptionalA customer provided name for the PaymentMethod.
terminal_readerTerminalReaderoptionalIf the payment method type is "card_present" then we return the terminal_reader object.
typestring (card | ach_debit | eft_debit | card_present)requiredThe 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-timerequiredTime at which the object was last updated.
/v1/payment-methods/ach-debit-tokenCreate 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-accountstringrequiredThe 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_debitPaymentMethodCreateParamsAchDebitrequiredDetails about the ACH Direct Debit bank account.
billing_detailsPaymentMethodCreateDebitSingleUseTokenParamsBillingDetailsrequiredBilling information associated with the PaymentMethod that may be used or required by particular types of payment methods.
Responses
201AchDebitSingleUseToken
created_atstring date-timerequiredTime at which the object was created.
detailsAchDebitDetailsoptionalThis hash contains details about the ACH Debit bank account.
expires_atstring date-timerequiredThe time at which the token expires and is no longer available.
payment_tokenstringrequiredThe single-use token that is capable of being used to generate an
ach_debitPayment Method. It represents bank account details.updated_atstring date-timerequiredTime at which the object was last updated.
