Connect your PayNow store
Connect your own PayNow store to your organization, and manage its subscriptions, gift cards and affiliates.
In the dashboard
PayNow is a payment provider that acts as merchant of record for the stores it runs. When your organization bills with Own gateway or Hybrid, Coritan charges your customers through your own PayNow store, and the money reaches you through PayNow rather than through Coritan's payouts. The PayNow section of the Billing tab holds the store connection and, once the store is connected, its gift cards, affiliate links and subscriptions.
Before you begin
Section titled Before you begin- You need a PayNow store, its store ID and an API key for it from the PayNow dashboard.
- To connect the store or change its connection, you need the owner or admin role. Billing members can see the connection and manage the gift cards, affiliate links and subscriptions.
How your billing mode uses the store
Section titled How your billing mode uses the store| Billing mode | How customers pay their invoices |
|---|---|
| Platform merchant of record | Through Coritan's payment gateways. A connected store is not used. |
| Hybrid | Through your PayNow store while its connection is active, and through Coritan's payment gateways when it is not. |
| Own gateway | Through your PayNow store only. Checkout fails while no active store is connected. |
Connect the store
Section titled Connect the store- In the dashboard, open the organization, then Billing, then PayNow.
- Select Connect store, or Edit connection when a store is already saved.
- Enter the Store ID and the API key. The key is write-only: when you edit the connection later, leave it empty to keep the stored one.
- Leave Webhook secret empty, or paste the secret of a webhook you created in PayNow (see the next section).
- To have PayNow pay your share of each payment into a PayNow payout account, enter its Payout account ID. Platform fee (basis points) is the part PayNow keeps back for Coritan: 600 means 6%. Leave it empty to use your organization's platform fee rate. Once a fee is stored, you can change it but not clear it.
- Set Store mode to match how you bill, and choose the Organization billing mode. The billing mode changes how Coritan charges every future invoice.
- Keep Connection active ticked, then select Save connection.
The card now shows Connected. Coritan does not test the API key when you save it, so the first checkout shows whether the store takes payments.
To stop charging through the store without losing its credentials, edit the connection, untick Connection active and save. The card then shows Disabled.
Check the webhook
Section titled Check the webhookCoritan marks an invoice paid when PayNow reports that the payment went through, so your store needs a webhook that points at Coritan. After you save the connection, look at the Webhook secret row. When it reads "Stored", the webhook is in place. Otherwise, create it in PayNow:
- In the PayNow dashboard, add a webhook with the URL
https://api.coritan.com/api/v1/webhooks/orgs/{org_id}/paynow, where{org_id}is your organization's numeric ID. The API returns it asidfromGET /api/v1/orgs/acme. - Subscribe it to these events:
OnOrderCompleted,OnPaymentCompleted,OnPaymentFailed,OnRefund,OnChargeback,OnChargebackClosed,OnSubscriptionRenewedandOnSubscriptionCanceled. - Copy the webhook's secret into Webhook secret in the Coritan dashboard, then select Save connection.
Coritan refuses a webhook whose signature does not match the secret.
Manage gift cards, affiliate links and subscriptions
Section titled Manage gift cards, affiliate links and subscriptionsThese cards appear once the store is connected and its connection is active. They read and change your PayNow store directly.
To create a gift card:
- Under Gift cards, select New gift card.
- Enter the Balance and the Currency. Leave Code empty to have one generated.
- Select Create gift card.
To create an affiliate link:
- Under Affiliate links, select New affiliate link.
- Enter the Code customers type at checkout and the Commission (%) it pays. In Customer ID, enter the customer who owns the code, or leave it empty for your brand.
- Select Create affiliate link.
The list shows how many Uses each code has had and the Revenue it brought in.
To cancel a subscription, select Cancel in its row under Subscriptions, then Cancel subscription.
Troubleshooting
Section titled Troubleshooting- "Organization PayNow store is not configured"
- Your billing mode is Own gateway and no active store is connected. Connect the store, tick Connection active, or switch the billing mode.
- Customers paid but their invoices stay unpaid
- PayNow is not reaching Coritan. Follow the steps in Check the webhook.
- A message that starts with "Failed to"
- PayNow refused the request. A
401or403in the message means the API key is wrong or cannot do this; enter a new key under Edit connection.
Related
Section titled RelatedWith the API
Section titled With the APIRead the connection. This takes the owner, admin or billing role:
curl "https://api.coritan.com/api/v1/orgs/acme/billing/paynow" \
-H "Authorization: Bearer $CORITAN_TOKEN"
The answer has billing_mode, configured (true when the connection is active and has a store ID and an API key), is_active, mode, store_id, has_api_key, has_webhook_secret, payout_id and platform_fee_bps. It never returns the key or the secret.
Save the connection. This takes the owner or admin role:
curl -X PUT "https://api.coritan.com/api/v1/orgs/acme/billing/paynow" \
-H "Authorization: Bearer $CORITAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"store_id": "358129046",
"api_key": "pnapi_example",
"mode": "own_gateway",
"is_active": true,
"billing_mode": "own_gateway"
}'
The body also takes webhook_secret, payout_id and platform_fee_bps. A credential you leave out keeps its stored value. Send mode and is_active every time: when they are missing, the connection becomes own_gateway and active. billing_mode takes platform_mor, own_gateway or hybrid. The answer is the connection as above, with webhook_url, the path of the webhook that PayNow calls.
The store's features take the owner, admin or billing role, and answer 503 with "PayNow not available" when there is no store to ask:
| Operation | What it does |
|---|---|
GET /api/v1/orgs/acme/billing/paynow/giftcards |
Lists the gift cards as giftcards. |
POST /api/v1/orgs/acme/billing/paynow/giftcards |
Creates a gift card. |
GET /api/v1/orgs/acme/billing/paynow/affiliates |
Lists the affiliate links as affiliates. |
POST /api/v1/orgs/acme/billing/paynow/affiliates |
Creates an affiliate link. |
GET /api/v1/orgs/acme/billing/paynow/subscriptions |
Lists the subscriptions as subscriptions. |
POST /api/v1/orgs/acme/billing/paynow/subscriptions/{subscription_id}/cancel |
Cancels a subscription. |
Coritan passes the body of a create to PayNow's management API as it is, and returns PayNow's answer. The dashboard sends balance in cents, currency and an optional code for a gift card, and code, commission_percent and an optional customer_id for an affiliate link. When PayNow refuses a list, the answer is 502; when it refuses a create or a cancel, it is 400. Both carry PayNow's reason.
API operations on this page
| Method | Path | What it does |
|---|---|---|
GET | /api/v1/orgs/{org_slug}/billing/paynow | Get paynow status |
PUT | /api/v1/orgs/{org_slug}/billing/paynow | Save org-owned PayNow store credentials (owngateway / hybrid) |
GET | /api/v1/orgs/{org_slug}/billing/paynow/affiliates | List paynow affiliates |
POST | /api/v1/orgs/{org_slug}/billing/paynow/affiliates | Create paynow affiliate |
GET | /api/v1/orgs/{org_slug}/billing/paynow/giftcards | List paynow giftcards |
POST | /api/v1/orgs/{org_slug}/billing/paynow/giftcards | Create paynow giftcard |
GET | /api/v1/orgs/{org_slug}/billing/paynow/subscriptions | List paynow subscriptions |
POST | /api/v1/orgs/{org_slug}/billing/paynow/subscriptions/{subscription_id}/cancel | Cancel paynow subscription |