Create a plan

​

Create a new plan

Body·

required
application/json

Request Arguments for creating or updating a plan. The source declares no types for these fields; each type below is inferred from the example payload.

  • Transaction amount, in dollars, e.g. 10.99 = 10 dollars and 99 cents.

  • Transaction currency, in currency type, e.g. USD, CAD.

  • The cycle of how often the card will be charged on the subscription or plan. Choices are: DAILY, WEEKLY, MOTHLY, QUARTERLY, or ANNUALLY.

    values
    DAILYWEEKLYMOTHLYQUARTERLYANNUALLY
  • The title you give to each plan, which should be unique for each plan.

  • The total number of payments within this plan.

  • Sets whether receipt should be sent after transaction. Default is false.

Responses

  • application/json
Request Example for post/plan-service/plan
curl https://apigateway.payfirma.com/plan-service/plan \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "Sample Daily Plan",
  "amount": 10.99,
  "currency": "CAD",
  "frequency": "DAILY",
  "number_of_payments": 10,
  "send_receipt": false
}'
{
  "id": 2992429,
  "lookup_id": "99ffb59876mnb",
  "name": "Sample Daily Plan",
  "amount": 10.99,
  "currency": "CAD",
  "frequency": "DAILY",
  "number_of_payments": 10,
  "send_receipt": false,
  "total_subscriptions": 10,
  "current_subscriptions": 2
}