v1

latestOpenAPI 3.1.02026-07-24416405768.8 KB
q) Payments

Update a payment

Updates required payment fields and returns data needed to complete the payment. Depending on the payment type, only one update is permitted, so gather all required information before calling. The status field can be used to cancel or reverse a payment (gateway dependent).

put/eclipse-conductor/rest/v1/tenants/{tenantId}/payments/{paymentId}

Path parameters

tenantIdinteger required
paymentIdinteger required

Request body

amountnumber

Final total calculated amount to be paid including any tips etc. If the amount in the payment transaction data was for example 10 and a tip is required and is fixed at 5, then this amount would need to be set as 15. Amounts are in major currency unit.

callbackUrlstring

The URL Eclipse must post the PaymentResult to. Optional as one can always do a GET to get the result instead of using callbacks. This will be a system-system call

cardOnFileIdstring

Optional. Card on file id for pre-enrolled cards to use for the payment if applicable. Negates the need to provide actual card data E.g. PAN etc

customFraudChecksboolean

Optional. If user wants to enable custom fraud rule checks then, need to mark this flag true

descriptionstring

A description for the payment if being initiated from Eclipse

expiresstring date-time

When the payment must complete by. If not in final state before this time, Eclipse will timeout the payment

externalWalletIdstring

Optional. If the payment mechanism is via some proprietary (non-card based) interface such as an external wallet or bank account then this field can be used to identity the payers wallet id, account number, profile id etc.

externalWalletTypestring

Optional. If the payment mechanism is via some proprietary (non-card based) interface such as an external wallet or bank account then this field can be used to identify what wallet type this is.

landingUrlstring

Where the customers iFrame/Browser should be navigated to after the payment has completed (applicable to payments that use 3DS). If the URL contains <paymentId> then it will be replaced with the paymentId before the redirect.

locationstring

Optional. Any location information to add to the payment such as GPS coordinates or branch name etc

maxAmountnumber

This field specifies the maximum amount to make the partial payment

minAmountnumber

This field specifies the minimum amount to make the partial payment

notestring

Optional. User defined extra note related to payment in any format free text or JSON formatted text.

paymentMechanism'CARD' | 'CARD_PRESENT' | 'EFT' | 'EXTERNAL_WALLET' | 'WALLET'

Payment mechanism. CARD: Credit/Debit/Prepaid card will be used with eitherthe card data provided, card on file ID, or by a lightbox the customer can capture the card details in, CARD_PRESENT: specifica use case of card present acquiring, typically used with pos estate or tap on glass integrations, WALLET: The debit should be done on an Eclipse walletId provided, EXTERNAL_WALLET: Pay with the externalWalletId and externalWalletIdType

referencestring
status'CANCELLED' | 'ERROR_PERM' | 'REVERSED' | 'SUCCESSFUL'

Updated status of a payment to either cancel a PENDING payment from being further processed, or reverse a payment that is currently SUCCESSFUL

storeCardOnFileboolean

Optional. If the payment mechanism is to pay with a card and card details are provided then this indicates whether to store the card on file

templateIdstring

Optional. If provided then card ui will be rendered based on the provided templateId else fallback to default tenant template.

unattendedboolean

Optional. Indicates that the customer is not present for the payment and interactive authentication must not happen (e.g. 3DS)

walletIdinteger

Optional. If the payment mechanism is via an Eclipse wallet, then the Eclipse walletId can be provided in this field

Example request

{
  "expires": "2022-03-10T12:15:50-04:00",
  "paymentCardData": {
    "deleteAt": "2022-03-10T12:15:50-04:00"
  }
}

Response

OK

acceptedCardSchemesstring[]

If the payment can be made by card then the allowed card schemes that can be used

acceptedPaymentMechanismsstring[]

The ways that the payment can be made

accountNumberstring
accountTypestring
amountnumber

The amount payable. Amounts are in major currency unit

amountOptionstring

Contain Json string for purchase amount minimum and maximum. If it is not empty then the purchase amount must be in between of min and max amount specified in this attribute(min and max inclusive) and that amount must be sent on the updated purchase request

associatedPaymentIdinteger
authCodestring
bankResponsestring
branchCodestring
cardPhonestring

Deprecated. Use phone instead

completionUrlstring

URL to open in an iFrame or browser where customer can securely complete 3DS details if required. Normally this will not be provided until the payment has been posted/updated with sufficient data to be processable. However this is provided for GLOBAL_PAYMENT_LINK payments as these dont require further info from the API caller for the payment to be made

createdstring date-time

When the payment was posted

currencystring

The currency of the payment amount - e.g. USD, ZAR, NGN, TSH

customerIdinteger
descriptionstring

A description for the payment created from the payment data.E.g. Merchant info and QR description for a QR payment

emvIssuerAuthenticationDatastring

Data delivered to the chip card including the ARPC cryptogram for online issuer authentication

errorDescriptionstring

This will only be populated if there was an error

expiresstring date-time

When the payment must complete by. If not in final state before this time, Eclipse will timeout the payment

externalUniqueIdstring
extraInfostring

Loosely typed data resulting from the payment. E.g. could be a voucher id if the payment was for a VAS. The structure depends on what was being paid for.

feenumber
gatewayTransactionIdstring

The transaction identifier for this payment as provided by the gateway itself

lastModifiedstring date-time

When the payment was last modified

locationstring

Optional. Any location information to add to the payment such as GPS coordinates or branch name etc

merchantIdstring

The unique identifier for the merchant

merchantNamestring

The name of the merchant to whome the payment will go

merchantReferencestring

Reference for the merchant

notestring
organisationIdinteger
otherWalletIdinteger

payment receiver’s wallet ID, if applicable.

partialPaymentAllowedboolean

Will be true if the value allows a partial payment and amount must be sent on the updated purchase request

paymentDatastring

Loosely typed data about the payment. Depends on the payment type. E.g. could be a QRCode

paymentIdinteger

Unique identifier for this payment transaction

paymentReferencestring
paymentTypestring required

The deduced type of payment being done based on the type and paymentData

phonestring
pspIdstring
retrievalReferenceNumberinteger
status'BUILDING' | 'CANCELLED' | 'ERROR_PERM' | 'ERROR_TEMP' | 'PENDING' | 'REVERSED' | 'SUCCESSFUL' | 'TIMEOUT'

Status of a payment BUILDING: Not yet submitted as more data needs to be captured, PENDING:Being processed and can no longer be enhanced, SUCCESSFUL: Successfully completed, ERROR_PERM: Failed and wont ever succeed, ERROR_TEMP: Currently having an error but its being retried and may succeed or permanently fail, TIMEOUT: Failed as the process was not finalised in time, CANCELLED: Cancelled prior to SUCCESS or FAILURE, REVERSED: Reversed after success

tracingContextstring

Tracing data about the payment

walletIdinteger

Example response

{
  "created": "2022-03-10T12:15:50-04:00",
  "expires": "2022-03-10T12:15:50-04:00",
  "lastModified": "2022-03-10T12:15:50-04:00"
}