Skip to main content
WEBHOOK
issuing.transaction.failed
{
  "account_id": "<string>",
  "created_at": "<string>",
  "id": "<string>",
  "name": "<string>",
  "version": "<string>"
}
{
  "errCode": "<string>",
  "errMessage": "<string>"
}

Authorizations

signature
string
header
required

Request Signing

Request signing is used to verify the integrity of messages between the platform and merchants. Signing occurs in two scenarios:

  1. The merchant server signs requests sent to the PayLoco open platform;
  2. The PayLoco platform signs asynchronous notifications sent to merchants. PayLoco requires RSA private key signing and RSA public key verification. Developers must use the merchant private key to sign outgoing requests (scenario 1) and the PayLoco public key to verify incoming notifications (scenario 2).

Signing rules:

  1. Sign request.body using the merchant private key (SHA256WithRSA: compute SHA-256 hash, then RSA-encrypt with private key to produce the digital signature);
Signature signature = Signature.getInstance("SHA256withRSA");
signature.initSign(privateKey);
// When computing SHA256withRSA, convert byte stream with UTF-8 encoding to avoid incorrect signatures for Chinese parameters
signature.update(request.body);
byte[] signedHash = signature.sign();
  1. Base64-encode the signed result;
String signature = Base64.getEncoder().encodeToString(signedHash);
  1. Place the encoded value in the signature request header. Note: signing applies to request.body. When request.body is empty (e.g. query requests), no signature is required.

Body

application/json
account_id
string
required

Merchant ID

Example:

"acct_pIlscIfSOmirDp2SWk-vcQ"

created_at
string
required

Creation time in RFC3339 format: yyyy-MM-ddTHH:mm:ss.SSSXXX

Example:

"2024-05-24T14:29:32.682+08:00"

id
string
required

Unique identifier for the transaction

Example:

"6c2dc266-09ad-4235-b61a-767c7cd6d6ea"

name
string
required

Message subscription name

Example:

"issuing.transaction.failed"

version
string
required

Version

Example:

"2019-09-09"

data
object

Response

200 - application/json

OK

errCode
string
required

Response status code

Example:

"00000000"

errMessage
string
required

Error message

Example:

"Success"