Profile & Agreement
Create a new consumer.
POST /v1/consumer
Sample
POST /v1/consumer
{
"yourReference": "{{$guid}}",
"firstName": "{{$randomFirstName}}",
"lastName": "{{$randomLastName}}",
"emailAddress": "{{$randomEmail}}",
"mobileNumber": "{{$randomPhoneNumber}}",
"countryIsoCode": "GHA",
"dateOfBirth": "1982-08-16",
"addresses": [
{
"addressType": "POST",
"addressLine1": "{{$randomStreetAddress}}",
"addressLine2": "Test 1",
"postalCode": "23021",
"countryIsoCode": "GHA",
"city": "Accra",
"location": {
"longitude": -0.08176,
"latitude": 5.64311
}
}
]
}Auth: Access token (Bearer).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
createdDate | string | No | The UTC date and time at which this consumer record was created. |
loginCredentials | object | No | Login credentials for a user account - used to authenticate and generate access tokens. |
preferredName | string? | No | The consumer's preferred display name, if different from their first name. |
fullNameOfNextOfKin | string? | No | The full name of the consumer's nominated next of kin. |
contactNumberForNextOfKin | string? | No | The contact phone number for the consumer's next of kin. |
alternateContactNumber | string? | No | An additional contact number for the consumer, supplementary to their primary mobile number. |
invitationCode | string? | No | An optional invitation or referral code entered by the consumer during registration. |
isRegistrationComplete | boolean | No | true if the consumer has completed the self-registration flow. |
isEmailVerified | boolean | No | true if the consumer has verified their email address via a confirmation link or OTP. |
isMobileNumberVerified | boolean | No | true if the consumer has verified their mobile number via an OTP. |
identityDocuments | array<object>? | No | The identity documents (e.g. passport, national ID) associated with this consumer. |
kycLookupResults | array<object>? | No | The results of KYC identity lookups performed for this consumer across all configured providers. |
files | array<object>? | No | Files uploaded for this consumer (e.g. selfies, documents used for KYC and biometric verification). |
devices | array<object>? | No | Mobile and POS devices registered to this consumer for push notification delivery. |
addresses | array<object>? | No | Physical addresses linked to this consumer (billing, shipping, postal, and primary). |
beneficiaries | array<object>? | No | Saved beneficiaries (payee shortcuts) associated with the consumer for faster repeat payments. |
accounts | object | No | A container for all financial accounts linked to a consumer, grouped by account type. |
attributes | array<object>? | No | Custom attribute values associated with this consumer (partner-specific metadata). |
rewardPointsInfo | object | No | A summary of a consumer's loyalty reward points balance and tier standing. |
reference | string? | No | The system-assigned unique reference (UUID) for this consumer. Assigned on creation; null on new records before persistence. |
yourReference | string? | No | An optional external reference from the caller's system that identifies this consumer in their own data store. |
source | string? | No | The identifier of the originating system or partner that registered this consumer. |
userReference | string? | No | The unique reference (UUID) of the authentication user account associated with this consumer profile, if one exists. |
firstName | string? | No | The consumer's first (given) name. |
lastName | string? | No | The consumer's last name (surname). |
middleName | string? | No | The consumer's middle name, if applicable. |
emailAddress | string? | No | The consumer's email address. |
mobileNumber | string? | No | The consumer's mobile number in international MSISDN format. |
countryIsoCode | one of 248 values (e.g. None, AFG, ALB, ...) | No | The ISO 3166-1 alpha-3 country code of the country where the consumer resides. |
dateOfBirth | string? | No | The consumer's date of birth. |
gender | Male, Female | No | The consumer's gender. |
preferredLanguage | one of 238 values (e.g. None, AAR, AFR, ...) | No | The consumer's preferred language for communications. |
kycStatusSummary | Unverified, Verified, Rejected | No | A summary of the consumer's Know Your Customer (KYC) verification status across all required identity checks. |
isActive | boolean | No | true if the consumer account is active; false if it has been deactivated. |
{
"createdDate": "string",
"loginCredentials": {
"username": "string",
"password": "string",
"isLockedOut": true,
"reasonForLockout": "string"
},
"preferredName": "string",
"fullNameOfNextOfKin": "string",
"contactNumberForNextOfKin": "string",
"alternateContactNumber": "string",
"invitationCode": "string",
"isRegistrationComplete": true,
"isEmailVerified": true,
"isMobileNumberVerified": true,
"identityDocuments": [
{}
],
"kycLookupResults": [
{}
],
"files": [
{}
],
"devices": [
{}
],
"addresses": [
{}
],
"beneficiaries": [
{}
],
"accounts": {
"bankAccounts": [],
"mobileWallets": [],
"loanAccounts": [],
"insurancePolicies": [],
"genericAccounts": [],
"cards": []
},
"attributes": [
{}
],
"rewardPointsInfo": {
"pointsBalance": 0,
"rewardTier": 0,
"creditTransactionCount": 0
},
"reference": "00000000-0000-0000-0000-000000000000",
"yourReference": "string",
"source": "string",
"userReference": "00000000-0000-0000-0000-000000000000",
"firstName": "string",
"lastName": "string",
"middleName": "string",
"emailAddress": "string",
"mobileNumber": "string",
"countryIsoCode": "None",
"dateOfBirth": "string",
"gender": "Male",
"preferredLanguage": "None",
"kycStatusSummary": "Unverified",
"isActive": true
}Responses
| Status | Description |
|---|---|
200 | The request was successful and a consumer was created. |
400 | The request failed validation, the error object will contain further information. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
result | object | No | Core identity and contact details for a consumer (end user). |
{
"success": true,
"result": {
"reference": "00000000-0000-0000-0000-000000000000",
"yourReference": "string",
"source": "string",
"userReference": "00000000-0000-0000-0000-000000000000",
"firstName": "string",
"lastName": "string",
"middleName": "string",
"emailAddress": "string",
"mobileNumber": "string",
"countryIsoCode": "None",
"dateOfBirth": "string",
"gender": "Male",
"preferredLanguage": "None",
"kycStatusSummary": "Unverified",
"isActive": true
}
}Code samples
// @vantagepay/vantagepay
const consumer = await client.consumers.createConsumer({
firstName: 'Jane',
lastName: 'Doe',
mobileNumber: '233555666112',
emailAddress: 'customer@example.com',
countryIsoCode: 'GHA',
languageIsoCode: 'ENG',
})// VantagePay.SDK
using VantagePay.Models.Consumers;
using VantagePay.Models.Lookups;
var consumer = await client.Consumers.CreateConsumerAsync(new Consumer
{
FirstName = "Jane",
LastName = "Doe",
MobileNumber = "233555666112",
EmailAddress = "customer@example.com",
CountryIsoCode = Country.GHA,
LanguageIsoCode = Language.ENG,
});Update your consumer details.
PUT /v1/consumer
Sample
PUT /v1/consumer
{
"reference": "ff1af424-9ece-42d1-897d-f023f91f3ce2",
"firstName": "{{$randomFirstName}}",
"lastName": "{{$randomLastName}}",
"emailAddress": "{{$randomEmail}}",
"mobileNumber": "{{$randomPhoneNumber}}",
"countryIsoCode": "GHA",
"dateOfBirth": "1983-10-16"
}Auth: Access token (Bearer).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
createdDate | string | No | The UTC date and time at which this consumer record was created. |
loginCredentials | object | No | Login credentials for a user account - used to authenticate and generate access tokens. |
preferredName | string? | No | The consumer's preferred display name, if different from their first name. |
fullNameOfNextOfKin | string? | No | The full name of the consumer's nominated next of kin. |
contactNumberForNextOfKin | string? | No | The contact phone number for the consumer's next of kin. |
alternateContactNumber | string? | No | An additional contact number for the consumer, supplementary to their primary mobile number. |
invitationCode | string? | No | An optional invitation or referral code entered by the consumer during registration. |
isRegistrationComplete | boolean | No | true if the consumer has completed the self-registration flow. |
isEmailVerified | boolean | No | true if the consumer has verified their email address via a confirmation link or OTP. |
isMobileNumberVerified | boolean | No | true if the consumer has verified their mobile number via an OTP. |
identityDocuments | array<object>? | No | The identity documents (e.g. passport, national ID) associated with this consumer. |
kycLookupResults | array<object>? | No | The results of KYC identity lookups performed for this consumer across all configured providers. |
files | array<object>? | No | Files uploaded for this consumer (e.g. selfies, documents used for KYC and biometric verification). |
devices | array<object>? | No | Mobile and POS devices registered to this consumer for push notification delivery. |
addresses | array<object>? | No | Physical addresses linked to this consumer (billing, shipping, postal, and primary). |
beneficiaries | array<object>? | No | Saved beneficiaries (payee shortcuts) associated with the consumer for faster repeat payments. |
accounts | object | No | A container for all financial accounts linked to a consumer, grouped by account type. |
attributes | array<object>? | No | Custom attribute values associated with this consumer (partner-specific metadata). |
rewardPointsInfo | object | No | A summary of a consumer's loyalty reward points balance and tier standing. |
reference | string? | No | The system-assigned unique reference (UUID) for this consumer. Assigned on creation; null on new records before persistence. |
yourReference | string? | No | An optional external reference from the caller's system that identifies this consumer in their own data store. |
source | string? | No | The identifier of the originating system or partner that registered this consumer. |
userReference | string? | No | The unique reference (UUID) of the authentication user account associated with this consumer profile, if one exists. |
firstName | string? | No | The consumer's first (given) name. |
lastName | string? | No | The consumer's last name (surname). |
middleName | string? | No | The consumer's middle name, if applicable. |
emailAddress | string? | No | The consumer's email address. |
mobileNumber | string? | No | The consumer's mobile number in international MSISDN format. |
countryIsoCode | one of 248 values (e.g. None, AFG, ALB, ...) | No | The ISO 3166-1 alpha-3 country code of the country where the consumer resides. |
dateOfBirth | string? | No | The consumer's date of birth. |
gender | Male, Female | No | The consumer's gender. |
preferredLanguage | one of 238 values (e.g. None, AAR, AFR, ...) | No | The consumer's preferred language for communications. |
kycStatusSummary | Unverified, Verified, Rejected | No | A summary of the consumer's Know Your Customer (KYC) verification status across all required identity checks. |
isActive | boolean | No | true if the consumer account is active; false if it has been deactivated. |
{
"createdDate": "string",
"loginCredentials": {
"username": "string",
"password": "string",
"isLockedOut": true,
"reasonForLockout": "string"
},
"preferredName": "string",
"fullNameOfNextOfKin": "string",
"contactNumberForNextOfKin": "string",
"alternateContactNumber": "string",
"invitationCode": "string",
"isRegistrationComplete": true,
"isEmailVerified": true,
"isMobileNumberVerified": true,
"identityDocuments": [
{}
],
"kycLookupResults": [
{}
],
"files": [
{}
],
"devices": [
{}
],
"addresses": [
{}
],
"beneficiaries": [
{}
],
"accounts": {
"bankAccounts": [],
"mobileWallets": [],
"loanAccounts": [],
"insurancePolicies": [],
"genericAccounts": [],
"cards": []
},
"attributes": [
{}
],
"rewardPointsInfo": {
"pointsBalance": 0,
"rewardTier": 0,
"creditTransactionCount": 0
},
"reference": "00000000-0000-0000-0000-000000000000",
"yourReference": "string",
"source": "string",
"userReference": "00000000-0000-0000-0000-000000000000",
"firstName": "string",
"lastName": "string",
"middleName": "string",
"emailAddress": "string",
"mobileNumber": "string",
"countryIsoCode": "None",
"dateOfBirth": "string",
"gender": "Male",
"preferredLanguage": "None",
"kycStatusSummary": "Unverified",
"isActive": true
}Responses
| Status | Description |
|---|---|
200 | The request was successful and the consumer details were updated. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
404 | The request was successful but does not return any results. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
result | object | No | Full consumer profile, extending ZGA.Core.Models.Consumers.BasicConsumer with linked accounts, KYC documents, devices, notification preferences, and extended identity fields. |
{
"success": true,
"result": {
"createdDate": "string",
"loginCredentials": {},
"preferredName": "string",
"fullNameOfNextOfKin": "string",
"contactNumberForNextOfKin": "string",
"alternateContactNumber": "string",
"invitationCode": "string",
"isRegistrationComplete": true,
"isEmailVerified": true,
"isMobileNumberVerified": true,
"identityDocuments": [],
"kycLookupResults": [],
"files": [],
"devices": [],
"addresses": [],
"beneficiaries": [],
"accounts": {},
"attributes": [],
"rewardPointsInfo": {},
"reference": "00000000-0000-0000-0000-000000000000",
"yourReference": "string",
"source": "string",
"userReference": "00000000-0000-0000-0000-000000000000",
"firstName": "string",
"lastName": "string",
"middleName": "string",
"emailAddress": "string",
"mobileNumber": "string",
"countryIsoCode": "None",
"dateOfBirth": "string",
"gender": "Male",
"preferredLanguage": "None",
"kycStatusSummary": "Unverified",
"isActive": true
}
}Code samples
// @vantagepay/vantagepay
const consumer = await client.consumers.getConsumer()
consumer.preferredName = 'Janey'
const updated = await client.consumers.updateConsumer(consumer)// VantagePay.SDK
var consumer = await client.Consumers.GetConsumerAsync();
consumer!.PreferredName = "Janey";
var updated = await client.Consumers.UpdateConsumerAsync(consumer);Delete your consumer details.
DELETE /v1/consumer
Sample
DELETE /v1/consumerAuth: Access token (Bearer).
Responses
| Status | Description |
|---|---|
200 | The request was successful and the consumer was deleted. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
404 | The request was successful but does not return any results. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
{
"success": true
}Code samples
// @vantagepay/vantagepay
await client.consumers.deleteConsumer() // also ends the session// VantagePay.SDK
await client.Consumers.DeleteConsumerAsync(); // also ends the sessionGet your consumer information.
GET /v1/consumer
Sample
GET /v1/consumer/ff1af424-9ece-42d1-897d-f023f91f3ce2Auth: Access token (Bearer).
Responses
| Status | Description |
|---|---|
200 | The request was successful and the consumer information was returned. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
404 | The request was successful but does not return any results. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
result | object | No | Full consumer profile, extending ZGA.Core.Models.Consumers.BasicConsumer with linked accounts, KYC documents, devices, notification preferences, and extended identity fields. |
{
"success": true,
"result": {
"createdDate": "string",
"loginCredentials": {},
"preferredName": "string",
"fullNameOfNextOfKin": "string",
"contactNumberForNextOfKin": "string",
"alternateContactNumber": "string",
"invitationCode": "string",
"isRegistrationComplete": true,
"isEmailVerified": true,
"isMobileNumberVerified": true,
"identityDocuments": [],
"kycLookupResults": [],
"files": [],
"devices": [],
"addresses": [],
"beneficiaries": [],
"accounts": {},
"attributes": [],
"rewardPointsInfo": {},
"reference": "00000000-0000-0000-0000-000000000000",
"yourReference": "string",
"source": "string",
"userReference": "00000000-0000-0000-0000-000000000000",
"firstName": "string",
"lastName": "string",
"middleName": "string",
"emailAddress": "string",
"mobileNumber": "string",
"countryIsoCode": "None",
"dateOfBirth": "string",
"gender": "Male",
"preferredLanguage": "None",
"kycStatusSummary": "Unverified",
"isActive": true
}
}Code samples
// @vantagepay/vantagepay
const consumer = await client.consumers.getConsumer()// VantagePay.SDK
var consumer = await client.Consumers.GetConsumerAsync();Retrieves the HTML content of the consumer agreement, populated with the current consumer's information.
GET /v1/consumer/agreement
The returned HTML is personalized with the consumer's name, address, and the current date. The response is served with a content type of "text/html" and is cached for 24 hours. If the consumer reference is invalid, or if the agreement template or consumer information cannot be found, an appropriate error response is returned.
Auth: Access token (Bearer).
Responses
| Status | Description |
|---|---|
200 | The request was successful but does not return any results. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Code samples
// @vantagepay/vantagepay
const agreementHtml = await client.consumers.getConsumerAgreement()// VantagePay.SDK
var agreementHtml = await client.Consumers.GetConsumerAgreementAsync();Accepts the agreement for the currently authenticated user and creates a signed agreement file if one does not already exist within the last 24 hours.
POST /v1/consumer/agreement/accept
If the user has already accepted and verified the agreement within the past 24 hours, the method returns an Accepted response without creating a new agreement file. Otherwise, it generates a new agreement PDF, uploads it, and marks it as verified. The method requires the user to be authenticated and associated with a valid consumer reference.
Auth: Access token (Bearer).
Responses
| Status | Description |
|---|---|
200 | The request was successful but does not return any results. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
{
"success": true
}Code samples
// @vantagepay/vantagepay
await client.consumers.acceptConsumerAgreement()// VantagePay.SDK
await client.Consumers.AcceptConsumerAgreementAsync();Create a consumer contact/lead record.
POST /v1/consumer/contact
Auth: Access token (Bearer).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
details | object? | No | The contact detail key/value pairs. Keys and values are both strings. |
{
"details": {}
}Responses
| Status | Description |
|---|---|
200 | The request was successful and a consumer contact/lead record was created. |
400 | The request failed validation, the error object will contain further information. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
{
"success": true
}Code samples
// @vantagepay/vantagepay
await client.consumers.contactSupport({
details: { subject: 'Card query', message: 'I need help with a transaction.' },
})// VantagePay.SDK
// Sends a support contact request. Not wrapped by the .NET SDK.
// Not wrapped by the .NET SDK - call the endpoint directly with an authorized HttpClient.
using var http = new HttpClient { BaseAddress = new Uri("https://sandbox-api.vantagepay.dev") };
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", client.ApiTokens.AccessToken);
var response = await http.PostAsync("/v1/consumer/contact", content: null);
response.EnsureSuccessStatusCode();Stores feedback from a consumer.
POST /v1/consumer/feedback/send
Sample
POST /v1/consumer/feedbcak
{
"description": "This is amazing!"
}Auth: Access token (Bearer).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
description | string? | No | The free-text feedback message left by the consumer. |
{
"description": "string"
}Responses
| Status | Description |
|---|---|
200 | The request was successful and the feedback was saved. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
{
"success": true
}Code samples
// @vantagepay/vantagepay
await client.consumers.submitFeedback('Great app, very easy to use!')// VantagePay.SDK
await client.Consumers.AddConsumerFeedbackAsync("Great app, very easy to use!");