Skip to navigation

Add payment method

Add a new payment method for a membership. By default the payment method is saved on the user account of the membership’s first admin member. Send payerAccountId or payerEmail to save it on the payer’s account instead.

Authentication

x-np-api-keystring
API Key authentication via header

Path parameters

tenantstringRequired

Your Entra Tenant ID. More details.

environmentstringRequired

Your Business Central Environment. More details.

companystringRequired

Your Business Central Company. More details.

membershipIdUUIDRequired
Unique identifier for a membership.

Headers

x-api-versiondateOptional

Used for API versioning. More details.

Request

This endpoint expects an object.
paymentMethodobjectRequired
The PaymentMethodCreateRequestDTO extends the PaymentMethodDTO and includes additional properties such as the paymentToken and shopperReference. This DTO is used when creating a new payment method.
payerAccountIdUUIDOptional

The ID of an existing user account to save the payment method on. Cannot be combined with payerEmail.

payerEmailstringOptional

The e-mail (max 80 characters) of the user account to save the payment method on. The account is created if none has this e-mail. Cannot be combined with payerAccountId.

Response

This endpoint returns an object.
paymentMethodobject

The MembershipPaymentMethodCreateResponseDTO extends the PaymentMethodCreateResponseDTO and includes additional property - the ID of the user account the payment method is saved on. This DTO is used when returning results for the membership payment method create request.