Pay with Cohort Go directly from your website (Agent)


Introduction

Add a 'Pay with Cohort Go' button to the end of your shopping cart journey will enable a seamless handover from your cart directly through a Cohort Go payment. Through this flow, you can pass a variable amount of information depending upon how much you'd like to customise the student experience.

Process Flow

StudentYour WebsiteCohort GoYour EmailInternational BankButton directs student to Cohort Go sitewith pre-configured payment details.Cohort Go requests relevant information from student andprovides local payment details.Clicks on the "Pay with Cohort Go Button"Navigates to Cohort Go Payments site and books payment.Notifies that funds are awaitingSends payment to Cohort GoNotifies payment receiptMatches paymentNotifies that funds have been receivedConverts funds to domestic currencyNotifies that funds have been remitted to the beneficary bank.StudentYour WebsiteCohort GoYour EmailInternational Bank

Redirect to the Cohort Go Payment Page

To initiate a payment, you'll need the referrer key which you can get it from your Cohort Go portal. The payment URL will have a URL like https://sample-agent.cohortgo.app

Lock student identity information

Assuming that you've generated invoice type, currency and amount as part of your flow, then you'll want to pass that through to the button. This is done by adding ?a=<amount>&ccy=<currency>&it=<invoice_type> parameters to your url. For example, if you amount of $500, then you'd have a URL like https://sample-provider.cohortgo.app?a=500&ccy=AUD&it=tuition.

Fields that are passed through are still edtiable. To disable/lock fields:

This can be done by including the fields into params _locked. Forexample, if you want to lock the given_name, family_name, then you;d have a URL like ?_locked=[given_name,family_name]. In this case, both of fields are now disabled since they are included in the _locked params.

Passing more information

URL GET

If your cart has additional information available, this can also be passed through to the payment page via the link.

Specifically, the following fields are the full options that can be sent in a GET query string:

FieldKeyDescriptionExample
Completion URLcompleteA URL to return to when the payment flow has been completed. A cps URL param will be included.?complete=http://app.example.com
Cancel URLcancelA URL to return to if the flow encounters an issue or the user attempts to cancel. A reason and msg URL param will be included. Reasons include user_initiated, invalid_fingerprint and missing_param?cancel=http://app.example.com
Amount (required)aSpecify a total amount.?a=5000
Currency (required)ccyThe currency of the invoice, i.e. the currency of the Amount field, in ISO 4217 format. See https://en.wikipedia.org/wiki/ISO_4217?ccy=BRL
Institution Name (required)inThe name of the institution.?in=Learning Centre
Invoice Type (required)itThe type of invoice. Must be one of [tuition, living_expenses, accommodation_fees, guardian_fees, other].?it=living_expenses
Invoice Document URLdocA PDF or image version of the invoice, e.g. a scan of the original invoice. This document will be attached to the payment. Note that if this leave blank, we will ask student to upload first before redirecting them to select payment method page.?doc=http://example.org/invoice001.png
Student Number (required)snThe student's id number, assigned by the institution.?sn=12345678
Completion Date (required)cdThe date the student will complete their study, in ISO 8601 format. See https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates?cd=2030-11-25
Email (required)eThe student's email address.[email protected]
Home Country (required)hcThe student's home country, used to drive the payment options available to the student. Specified as an ISO Alpha-2 country code. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for a catalogue of codes.?hc=CN
Destination Country (required)dcThe student's destination country, used to drive the payment options available to the student. Specified as an ISO Alpha-2 country code. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for a catalogue of codes.?dc=AU
Given Name (required)gnThe student's given name.?gn=Albert
Family Name (required)fnThe student's family name.?fn=Smith
Date of BirthdobThe student's date of birth in ISO 8601 format. See https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates?dob=1999-11-26
Phone NumberpThe student's phone number.?p=861083410308
Passport Country (required)pcThe student's passport country. Specified as an ISO Alpha-2 country code. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for a catalogue of codes.?pc=CN
Passport Number (required)pnThe student's passport number.?pn=M1234567
Locale (required)localeThe language to be used.?locale=en

See it in action:

Pay with Cohort Go

FORM POST

If your system has already captured most of the details of a student, you can jump directly to the payment method selection page by submitting these details as a Form POST.

Specifically, the following fields are the full options that can be sent as a POST:

FieldKeyDescriptionExample
Completion URLcompleteA URL to return to when the payment flow has been completed. A cps URL param will be included.?complete=http://app.example.com
Cancel URLcancelA URL to return to if the flow encounters an issue or the user attempts to cancel. A reason and msg URL param will be included. Reasons include user_initiated, invalid_fingerprint and missing_param?cancel=http://app.example.com
Amount (required)aSpecify a total amount.?a=5000
Currency (required)ccyThe currency of the invoice, i.e. the currency of the Amount field, in ISO 4217 format. See https://en.wikipedia.org/wiki/ISO_4217?ccy=BRL
Institution Name (required)inThe name of the institution.?in=Learning Centre
Invoice Type (required)itThe type of invoice. Must be one of [tuition, living_expenses, accommodation_fees, guardian_fees, other].?it=living_expenses
Invoice Document URLdocA PDF or image version of the invoice, e.g. a scan of the original invoice. This document will be attached to the payment. Note that if this leave blank, we will ask student to upload first before redirecting them to select payment method page.?doc=http://example.org/invoice001.png
Student Number (required)snThe student's id number, assigned by the institution.?sn=12345678
Completion Date (required)cdThe date the student will complete their study, in ISO 8601 format. See https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates?cd=2030-11-25
Email (required)eThe student's email address.[email protected]
Home Country (required)hcThe student's home country, used to drive the payment options available to the student. Specified as an ISO Alpha-2 country code. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for a catalogue of codes.?hc=CN
Destination Country (required)dcThe student's destination country, used to drive the payment options available to the student. Specified as an ISO Alpha-2 country code. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for a catalogue of codes.?dc=AU
Given Name (required)gnThe student's given name.?gn=Albert
Family Name (required)fnThe student's family name.?fn=Smith
Date of BirthdobThe student's date of birth in ISO 8601 format. See https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates?dob=1999-11-26
Phone NumberpThe student's phone number.?p=861083410308
Passport Country (required)pcThe student's passport country. Specified as an ISO Alpha-2 country code. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for a catalogue of codes.?pc=CN
Passport Number (required)pnThe student's passport number.?pn=M1234567
Locale (required)localeThe language to be used.?locale=en
Payer Details

In cases where the payer is not the same as the student, you are also able to populate their details:

FieldKeyDescriptionExample
EmailpeThe payers's email.[email protected]
Given NamepgnThe payers's given name.?pgn=George
Family NamepfnThe payers's family name.?pfn=Smith
Date of BirthpdobThe payers's date of birth in ISO 8601 format. See https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates?pdob=1999-11-26
Phone NumberppThe payers's phone number.?pp=861083410308
Passport CountryppcThe payers's passport country. Specified as an ISO Alpha-2 country code. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for a catalogue of codes.?ppc=CN
Passport NumberppnThe payers's passport number.?ppn=M1234567

See it in action:

Invoice Details

Student Details

Payer Details

Redirect URLs

Opening the Payment Cart in an iframe

To prevent the user being directed away from your domain, the Cohort Go UI can be displayed in an <iframe> tag. There are many jQuery based libraries that can assist with this. For example, the Featherlight jQuery plugin can enable this based purely upon data attributes:

<script src="//code.jquery.com/jquery-latest.js"></script>
<script src="//cdn.rawgit.com/noelboss/featherlight/1.7.13/release/featherlight.min.js" type="text/javascript" charset="utf-8"></script>
<link href="//cdn.rawgit.com/noelboss/featherlight/1.7.13/release/featherlight.min.css" type="text/css" rel="stylesheet" />

<a href="https://agent-devsite-demo.demo.s.chrtpy.com?a=2000&ccy=SGD&cd=2021-08-26&dc=AU&e=user%40gmail.com&fn=User&gn=Test&hc=CN&in=QUT&it=tuition&locale=en&pn=A123456&sn=123123&complete=https://cohortgo.dev/guides/agent-payment-buttons&cancel=https://cohortgo.dev/guides/agent-payment-buttons" style="display: inline-block; padding: 5px 10px 2px 10px; background-color: #324A87; color: white; border-radius: 5px" data-featherlight="iframe" data-featherlight-iframe-height="800" data-featherlight-iframe-width="1000">Pay with Cohort Go</a>

See it in action:

Pay with Cohort Go

Notifications

The Cohort Go System can notify you when payment is funds received or settled via the email notification.

Testing Notifications

  1. Before you begin: Request a 'Demo' account from your Cohort Go account representative, and use that to login here so that the links we provide take you to the right place.
  2. Create a test payment via your test subdomain (include you referrer key), along with the invoice details to the parameters. For an example: https://<REFERRER_KEY>.cohortgo.app?a=500&it=tuition&ccy=AUD
  3. Visit your User page to assign yourself the notification preferences. Find your email and and click edit (make sure your notification preferences is Manager or Finance).
  4. Visit your Agent Transaction page to see your new payment. Click on the payment to visit the detail page.
  5. Click 'Apply Funds' to simulate funds being received by Cohort Go.
  6. Click 'Settle Funds' to simulate funds being paid from Cohort Go to your account. You should be able to receive email notificatoin to your inbox now.