Skip to content

Status, Receipts & Interactive

Send an SMS receipt for the recently completed payment.

POST /v1/notification/sms/{paymentReference}

Auth: Access token (Bearer).

Parameters

NameInRequiredDescription
paymentReferencepathYesA globally unique internal payment reference (UUID) that is returned when submitting a payment request.

Request body

FieldTypeRequiredDescription
toNumberstring?NoThe international mobile number (MSISDN) to which the SMS notification is sent.
receiptTypeConsumer, MerchantNoDetermines whether the SMS is formatted as a consumer receipt or a merchant receipt. Defaults to ZGA.Core.Models.Payments.ReceiptType.Consumer.
json
{
  "toNumber": "string",
  "receiptType": "Consumer"
}

Responses

StatusDescription
200The request was successful but does not return any results.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

ts
// @vantagepay/vantagepay
await client.payments.sendSmsPaymentNotification('c7b8a9d0-1234-4567-89ab-cdef01234567', '233555666112')
csharp
// VantagePay.SDK
await client.Payments.SendSmsNotificationAsync("c7b8a9d0-1234-4567-89ab-cdef01234567", "233555666112");

Send an email receipt for the recently completed payment.

POST /v1/notification/email/{paymentReference}

Auth: Access token (Bearer).

Parameters

NameInRequiredDescription
paymentReferencepathYesA globally unique internal payment reference (UUID) that is returned when submitting a payment request.

Request body

FieldTypeRequiredDescription
toEmailAddressstring?NoThe email address to which the payment notification or receipt is sent.
templateNamestring?NoOptional name of the notification template to use when rendering the email. When null, the default template for the given ZGA.Core.Models.Payments.Requests.EmailNotificationRequest.ReceiptType is applied.
receiptTypeConsumer, MerchantNoDetermines whether the email is formatted as a consumer receipt or a merchant receipt. Defaults to ZGA.Core.Models.Payments.ReceiptType.Consumer.
json
{
  "toEmailAddress": "string",
  "templateName": "string",
  "receiptType": "Consumer"
}

Responses

StatusDescription
200The request was successful but does not return any results.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

ts
// @vantagepay/vantagepay
await client.payments.sendEmailPaymentNotification('c7b8a9d0-1234-4567-89ab-cdef01234567', 'customer@example.com')
csharp
// VantagePay.SDK
await client.Payments.SendEmailNotificationAsync("c7b8a9d0-1234-4567-89ab-cdef01234567", "customer@example.com");

Check the status and progress of a payment based on a payment reference.

GET /v1/pay/status/{paymentReference}

This endpoint should be polled at an interval of at least one second to avoid receiving cached results.

Sample

json
GET /v1/pay/status/9fd4dff4-5edc-4b28-b593-dc76739a6171

Auth: Access token (Bearer).

Parameters

NameInRequiredDescription
paymentReferencepathYesA globally unique internal payment reference (UUID) that is returned when submitting a payment request.

Responses

StatusDescription
200The request was successful but does not return any results.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
resultobjectNoA model to hold the details of a payment request, including the current status of all associated transactions and the overall payment itself.
json
{
  "success": true,
  "result": {
    "isComplete": true,
    "percentageComplete": 0,
    "paymentStartedDate": "string",
    "paymentCompletedDate": "string",
    "yourReference": "string",
    "description": "string",
    "paymentReference": "00000000-0000-0000-0000-000000000000",
    "shortPaymentReference": "string",
    "splitReference": "00000000-0000-0000-0000-000000000000",
    "verificationCode": "string",
    "channel": "Unknown",
    "consumerReference": "00000000-0000-0000-0000-000000000000",
    "notificationFileReference": "00000000-0000-0000-0000-000000000000",
    "consumer": {},
    "paymentSources": {},
    "paymentDestinations": {},
    "amountTotals": {}
  }
}

Code samples

ts
// @vantagepay/vantagepay
const status = await client.payments.paymentStatusCheck('c7b8a9d0-1234-4567-89ab-cdef01234567')
csharp
// VantagePay.SDK
var status = await client.Payments.PaymentStatusCheckAsync(Guid.Parse("c7b8a9d0-1234-4567-89ab-cdef01234567"));

Check the status and progress of a QR Code payment based on a bill reference.

GET /v1/pay/status/qrpayment/{billReference}

This endpoint should be polled at an interval of at least one second to avoid receiving cached results.

Sample

json
GET /v1/pay/qrpayment/status/ABC123456

Auth: Access token (Bearer).

Parameters

NameInRequiredDescription
billReferencepathYesThe bill reference associated with the QR Code payment.

Responses

StatusDescription
200The request was successful but does not return any results.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
resultobjectNoA model to hold the details of a payment request, including the current status of all associated transactions and the overall payment itself.
json
{
  "success": true,
  "result": {
    "isComplete": true,
    "percentageComplete": 0,
    "paymentStartedDate": "string",
    "paymentCompletedDate": "string",
    "yourReference": "string",
    "description": "string",
    "paymentReference": "00000000-0000-0000-0000-000000000000",
    "shortPaymentReference": "string",
    "splitReference": "00000000-0000-0000-0000-000000000000",
    "verificationCode": "string",
    "channel": "Unknown",
    "consumerReference": "00000000-0000-0000-0000-000000000000",
    "notificationFileReference": "00000000-0000-0000-0000-000000000000",
    "consumer": {},
    "paymentSources": {},
    "paymentDestinations": {},
    "amountTotals": {}
  }
}

Code samples

ts
// @vantagepay/vantagepay
// Checks the status of a bill/QR payment.
// Not wrapped by the JavaScript SDK - call the endpoint directly with the active token.
const response = await fetch(baseUrl + '/v1/pay/status/qrpayment/' + billReference, {
  method: 'GET',
  headers: { Authorization: 'Bearer ' + ApiTokens.accessToken },
})
const result = await response.json()
csharp
// VantagePay.SDK
// Checks the status of a bill/QR payment.
// 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.GetAsync($"/v1/pay/status/qrpayment/{billReference}");
response.EnsureSuccessStatusCode();

Get detailed payment information for generating receipts.

GET /v1/pay/receipt/{paymentReference}

Auth: Access token (Bearer).

Parameters

NameInRequiredDescription
paymentReferencepathYesA globally unique internal payment reference (UUID) that is returned when submitting a payment request.

Responses

StatusDescription
200The request was successful but does not return any results.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
resultobjectNoA payment status response that also includes the line items associated with the transaction, suitable for generating receipts.
json
{
  "success": true,
  "result": {
    "lineItems": [],
    "isComplete": true,
    "percentageComplete": 0,
    "paymentStartedDate": "string",
    "paymentCompletedDate": "string",
    "yourReference": "string",
    "description": "string",
    "paymentReference": "00000000-0000-0000-0000-000000000000",
    "shortPaymentReference": "string",
    "splitReference": "00000000-0000-0000-0000-000000000000",
    "verificationCode": "string",
    "channel": "Unknown",
    "consumerReference": "00000000-0000-0000-0000-000000000000",
    "notificationFileReference": "00000000-0000-0000-0000-000000000000",
    "consumer": {},
    "paymentSources": {},
    "paymentDestinations": {},
    "amountTotals": {}
  }
}

Code samples

ts
// @vantagepay/vantagepay
const receipt = await client.payments.paymentReceipt('c7b8a9d0-1234-4567-89ab-cdef01234567')
csharp
// VantagePay.SDK
var receipt = await client.Payments.GetPaymentReceiptAsync(Guid.Parse("c7b8a9d0-1234-4567-89ab-cdef01234567"));

Submit a PIN or voucher code to unblock a transaction that is in a 'requires PIN' state.

POST /v1/transaction/pin/{transactionReference}

Sample

json
POST /v1/transaction/pin/1dc67f55-f445-481d-8c89-471b2082dd06
{
  "pin": "123456"
}

Auth: Access token (Bearer).

Parameters

NameInRequiredDescription
transactionReferencepathYesA globally unique internal transaction reference (UUID).

Request body

FieldTypeRequiredDescription
pinstring?NoThe PIN or voucher code entered by the end user.
json
{
  "pin": "string"
}

Responses

StatusDescription
202The request was successful but does not return any results.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

ts
// @vantagepay/vantagepay
import { OnRequiresPin } from '@vantagepay/vantagepay'

client.events.subscribe(OnRequiresPin, async (_, data) => {
  await client.payments.submitPinCode(data.transactionReference, '1234')
})
csharp
// VantagePay.SDK
client.Payments.OnRequiresPin = data =>
{
    _ = client.Payments.SubmitPinCodeAsync(data.TransactionReference, "1234");
};

Submit a transaction confirmation to unblock a transaction that is in a 'requires confirmation' state.

POST /v1/transaction/confirm/{transactionReference}

Sample

json
POST /v1/transaction/confirm/1ae12fcf-a32b-45b8-a9af-4fef6b684567
{
  "confirm": false
}

Auth: Access token (Bearer).

Parameters

NameInRequiredDescription
transactionReferencepathYesA globally unique internal transaction reference (UUID).

Request body

FieldTypeRequiredDescription
confirmbooleanNotrue if the user has confirmed the transaction; false to cancel it.
json
{
  "confirm": true
}

Responses

StatusDescription
202The request was successful but does not return any results.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

ts
// @vantagepay/vantagepay
import { OnRequiresConfirmation } from '@vantagepay/vantagepay'

client.events.subscribe(OnRequiresConfirmation, async (_, data) => {
  await client.payments.submitConfirmation(data.transactionReference, true)
})
csharp
// VantagePay.SDK
client.Payments.OnRequiresConfirmation = data =>
{
    _ = client.Payments.SubmitConfirmationAsync(data.TransactionReference, confirm: true);
};

Submit address details to unblock a transaction that is in a 'requires address' state.

POST /v1/transaction/address/{transactionReference}

Sample

json
POST /v1/transaction/address/1ae12fcf-a32b-45b8-a9af-4fef6b684567
{
  "addressType": "POST",
  "addressLine1": "No. 20 Bissau Avenue",
  "addressLine2": "West Legon",
  "addressLine3": "",
  "postalCode": "00233",
  "countryIsoCode": "GHA",
  "city": "Accra",
  "state": "Accra"
}

Auth: Access token (Bearer).

Parameters

NameInRequiredDescription
transactionReferencepathYesA globally unique internal transaction reference (UUID).

Request body

FieldTypeRequiredDescription
referencestring?NoThe system-assigned unique reference (UUID) for this address.
yourReferencestring?NoAn optional external reference from the caller's system that identifies this address.
addressTypeMAIN, POST, BILL, SHIPNoThe classification of this address (e.g. billing, shipping, postal, main).
addressLine1stringYesThe first line of the street address.
addressLine2string?NoThe second line of the street address, if applicable.
addressLine3string?NoThe third line of the street address, if applicable.
postalCodestring?NoThe postal or ZIP code for this address.
countryIsoCodeone of 248 values (e.g. None, AFG, ALB, ...)YesThe ISO 3166-1 alpha-3 country code of the country where this address is located.
citystringYesThe city or town of this address.
statestring?NoThe state, province, or region of this address, if applicable.
locationobjectNoA geographic coordinate with an optional time zone and description. Used to pin an address or entity on a map.
descriptionstring?NoA free-text description or label for this address (e.g. "Head Office", "Warehouse").
formattedstring?NoA single-line formatted string representation of the full address.
isActivebooleanNotrue if this address record is currently active.
json
{
  "reference": "00000000-0000-0000-0000-000000000000",
  "yourReference": "string",
  "addressType": "MAIN",
  "addressLine1": "string",
  "addressLine2": "string",
  "addressLine3": "string",
  "postalCode": "string",
  "countryIsoCode": "None",
  "city": "string",
  "state": "string",
  "location": {
    "latitude": 0,
    "longitude": 0,
    "timeZone": "string",
    "description": "string"
  },
  "description": "string",
  "formatted": "string",
  "isActive": true
}

Responses

StatusDescription
202The request was successful but does not return any results.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

ts
// @vantagepay/vantagepay
import { OnRequiresAddress } from '@vantagepay/vantagepay'

client.events.subscribe(OnRequiresAddress, async (_, data) => {
  await client.payments.submitAddress(data.transactionReference, {
    addressType: 'BILL',
    addressLine1: '10 Main Road',
    city: 'Johannesburg',
    countryIsoCode: 'ZAF',
    postalCode: '2196',
  })
})
csharp
// VantagePay.SDK
using VantagePay.Models.Common;
using VantagePay.Models.Lookups;

client.Payments.OnRequiresAddress = data =>
{
    _ = client.Payments.SubmitAddressAsync(data.TransactionReference, new Address
    {
        AddressType = AddressType.Billing,
        AddressLine1 = "10 Main Road",
        City = "Johannesburg",
        CountryIsoCode = Country.ZAF,
        PostalCode = "2196",
    });
};

Payments for Africa