Signup to plan with no active subscription

Resembles a signup except for the fact that customer might already exist in Billwerk+. To determine if a user exists, use: get customer.

If the user exists, use the following call:

curl -X POST \
-u 'priv_12051dfac75143fc827cf63a87f46df3:' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
  "plan": "gold",
  "signup_method": "source",
  "customer": "cust-001",
  "generate_handle": true,
  "source": "ct_e4926c46be444fcbbc809be06abfd706"
}' \
https://api.reepay.com/v1/subscription

When signing up to a new subscription for an existing customer in Billwerk+ a new payment method can be saved for the customer using Billwerk+ Checkout as described in the signup part and payment method provided as source.

Another option is to let the customer use an already entered payment method, if such exists. Existing payment methods can be fetched with:

curl -X GET \
-u 'priv_12051dfac75143fc827cf63a87f46df3:' \
-H 'Content-Type: application/json' \
https://api.reepay.com/v1/list/payment_method?customer=cust-001

A list of payment methods will be returned.

{
 [
    {
      "id": "ca_fcfac2016614418f969fa5697383e47c",
      "state": "active",
      "masked_card": "457111XXXXXX3777",
      ...
    }
   ...
  ]
}
  • Active cards can be presented to the customer with masked card number.
  • Existing cards can be used as an option for payment method for the new subscription.

The customer could choose between an existing card or entering a new card.

If an existing card is used as payment method, the create subscription call has to be used (only difference is the prefix on the source):

curl -X POST \
-u 'priv_12051dfac75143fc827cf63a87f46df3:' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
  "plan": "gold",
  "signup_method": "source",
  "customer": "cust-001",
  "generate_handle": true,
  "source": "ca_fcfac2016614418f969fa5697383e47c"
}' \
https://api.reepay.com/v1/subscription