Open Gateway Callback API
The calls Open Gateway makes back to your Software Product. You implement these; Open Gateway calls them.
Open Gateway (OG) returns to your Software Product in three ways:
| Callback | When | How | Page |
|---|---|---|---|
| Consent success | The Consumer completes the consent flow and the agreement is ACTIVE. | OG redirects the Consumer's browser to the redirectUri from your prime request. | Consent redirect: Consent success |
| Consent error | The consent flow fails at the Data Holder, or the Consumer cancels. | OG redirects the Consumer's browser to the errorRedirectUri from your prime request, or to redirectUri if you did not supply one. | Consent redirect: Consent error |
| CDR end of life | An agreement is revoked or expires. | OG sends a signed request to the Agreement Template's agreementEndCallbackUrl. | CDR end-of-life webhook |
The consent redirects are browser redirects, so the Consumer arrives at your Software Product with the result in the query string. The end-of-life webhook is a server-to-server call that OG retries until your Software Product accepts it.
You register where these callbacks go in two places:
- Agreement Template:
allowed_redirect_urislists the URIs a prime request may name asredirectUriorerrorRedirectUri, andagreementEndCallbackUrlis the end-of-life webhook (see What is an Agreement Template). - Prime request:
redirectUri,errorRedirectUriandstatefor one consent (see Prime a CDR sharing arrangement).