Test connection
Services
Under services you find several calls that can be used to support your payment flow:
- Test your connection to us
- Convert an amount from one currency to another
- Convert between different bank account notations
- Retrieve the card type and country where the card was issued based on the IIN of the card
- Retrieve the ARN (Acquirer Reference Number), RRN (Retrieval Reference Number), Amount and Currency for a payment
Request
You can use this call to verify your connection to our platform. If you receive an OK result you know that your connection with us is working correctly, your authentication credentials are correct and your account is setup correctly in our system.
The request does not have any additional input parameters.
Request example
This scenario you will probably use the most
-
const sdkResponse = await client.v1.services.testconnection("merchantId"); // sdkResponse has the following properties: // - status: the HTTP status code // - body: the response body // - isSuccess: true if the call was successful, // or false if the Worldline Global Collect platform returned an error response
Responses
Please find below an overview of the possible responses.
Response 200 - OKTestConnection
When you get a 200 response your connection test was successful.
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
result | string | no | read close |
close
DescriptionOK result on the connection to the payment engine.
|
Response example
This scenario you will probably use the most
-
{ "result" : "OK" }
Response 403 - UnauthorizedErrorResponse
When something is wrong with your credentials you will get a 403 response. This could happen when you are trying to access a merchantId that is not linked to your account.
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
errorId | string | yes | read close |
close
DescriptionUnique reference, for debugging purposes, of this error response
|
|||
array of object | yes | read close | |
close
DescriptionList of one or more errors
|
|||
object | no | read close | |
category | string | no | read close |
close
DescriptionCategory the error belongs to. The category should give an indication of the type of error you are dealing with.
Possible values:
|
|||
code | string | yes | read close |
close
DescriptionError code
|
|||
httpStatusCode | integer | no | read close |
close
DescriptionHTTP status code for this error that can be used to determine the type of error
|
|||
id | string | no | read close |
close
DescriptionID of the error. This is a short human-readable message that briefly describes the error.
|
|||
message | string | no | read close |
close
DescriptionHuman-readable error message that is not meant to be relayed to customer as it might tip off people who are trying to commit fraud
|
|||
propertyName | string | no | read close |
close
DescriptionReturned only if the error relates to a value that was missing or incorrect.
Contains a location path to the value as a JSonata query. Some common examples:
|
|||
requestId | string | no | read close |
close
DescriptionID of the request that can be used for debugging purposes
|
Response example
This scenario you will probably use the most
-
{ "errorId" : "3b8c849b-e805-4c61-bd4d-baa2cb9ff8d0-0000119f", "errors" : [ { "code" : "9007", "message" : "ACCESS_TO_MERCHANT_NOT_ALLOWED" } ] }