Skip to main content

Account Creation

Specification

The Following tabel is spesification for this API :

API NameAccount Creation
FunctionThis API is used for merchant to register user account in Paydia Apps
Service Code06
MethodPOST
URL/snap/v1.0/registration-account-creation
Acceptapplication/json
Content Typeapplication/json
Related ServiceAccount Binding & Unbinding

Request

The following part will be describe about parameter of request in this API:

Request Parameter

The following table is a list of request parameter in this API:

The following table is Header of Request Parameters :

NoNameTypeLengthRequiredConditionRemarks
1Content-TypeStringVariable, 127 maxMandatory-Content type, value always application/json
2AuthorizationStringVariableMandatory-Contains B2B Bearer JWT Token, you've got it from Access Token B2B
3X-TIMESTAMPStringFixed, 25 maxMandatory-Transaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
4X-PARTNER-IDStringVariable, 36 maxMandatory-ID for partner was generated by Paydia. Unique ID for a partner
5X-EXTERNAL-IDStringVariable, 36 maxMandatory-Unique messaging reference ID generated by merchant. Numeric String. Reference number that should be unique in the same day
6CHANNEL-IDStringVariable, 5 maxMandatory-Device identification on which the API services is currently being accessed by the end user (customer)
7X-SIGNATUREStringVariableMandatory-Signature need to be generated with Symmetric Signature method

Body

The following table is a body of request parameter:

NoNameTypeLengthRequiredConditionRemarks
1partnerReferenceNoStringVariable, 64 maxMandatory-Unique transaction identifier on partner system which assigned to each transaction
2emailStringVariable, 254 maxMandatory-User email
3nameStringVariable, 128 maxMandatory-User name
4phoneNoStringVariable, 16 maxMandatory-User phone number. Example: 08XXXXXXXXXX
5redirectUrlStringVariable, 256 maxMandatory-When user authorization is success, the user will be redirected to this URL
6scopesStringVariable, 256 maxMandatory-The scopes of the authorization
7seamlessDataStringVariable, 512 maxOptional-Option for binding process.Please refer sample below to know how to include seamlessData
8seamlessData.mobileNumberStringVariable, 18 maxOptional-User's phone number. If this field is filled in, the user must log in with the number that has been included
9seamlessSignStringVariable, 512 maxConditionalIf the seamlessData is filledPlease refer sample below to know how to include seamlessSign. The steps to generate seamlessSign are:
  1. The partner uses the private key to sign seamlessData, while the provider will use the partner's public key for the verification process.
  2. Sign the seamlessData with generated privateKey and algorithm SHA256withRSA.
  3. EncodeBase64 the result of seamlessData which already signed by private key (Second Step).
  4. URLEncode the result of base64 encoded string (Third Step)
10stateStringVariable, 32 maxMandatory-Random string for CSRF protection purposes
11additionalInfoJSON ObjectVariableMandatory-Additional information
12additionalInfo.identityJSON ObjectVariableMandatory-Additional information of product code

Request Sample

The following script is a request sample of this API:

POST /snap/v1.0/registration-account-creation
X-TIMESTAMP: 2024-08-05T14:57:44+07:00
X-PARTNER-ID: 4abbcb6ce30229994c76169006e0dc9c
X-SIGNATURE: mmpCJ+NptQaT2SNlKpi/RCHFwPEbSGnN2UDGv0SRwaeo+Hz+A9y3lUvkbaVj3fC9q7pVJeJ/5MryCgNzX+LdWA==
X-EXTERNAL-ID: 1722844844
CHANNEL-ID: 12345
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJQYXlkaWEiLCJpYXQiOjE3MjI4MzEyODcsImV4cCI6MTcyMjkxNzY4NywiZGF0YSI6eyJlbnYiOiJwcm9kdWN0aW9uIn19.wFndHWrtUMYIdbTqOtXN1EQR1y2HgafWvu-wti8IIgk

{
"partnerReferenceNo": "14a34986-5ff8-40f1-9f12-1f1eecfdad63",
"email": "[email protected]",
"name": "Margarett",
"phoneNo": "0812345678801",
"redirectUrl": "https://paydia.id/redirect/",
"scopes": "PUBLIC_ID",
"seamlessData": "%7B%22mobileNumber%22%3A%220812345678801%22%7D",
"seamlessSign": "PHK8ZHXT3HD5ogm21KRh9WZKIycAcKRR%2BVACoP1xyTjRmkPPpszuBoLuRBC17wiSXD1uh%2F5Wo%2BoJLWotjvWar%2Fn3mc%2F5zNRsKPvDJrdL8JVCGJXOSSA8N%2BtgLC4nJvp7UO7bOlEznLvItLtNHITBBUsNk9ghPSZ6U8kBT4KdtCnRJsZnCpw9dQZXOvJDcvGzN0SSm00gv8KbrPahzBT4jaXhIeGPEzL%2F3Tn%2FYceUtF%2FVx81uXOFiR10KZ71rfMSRzp0pQEdAv0%2BiuCRsdKWTJElcie%2FVzOl%2Fs3LToAS3LULnQi2kUjLU%2B%2FXJOE8GKdF624h73pda5R92XTbbU%2Bbe4Q%3D%3D",
"state": "1722844664",
"additionalInfo": {
"identity": {
"type": "1",
"id": "123456789012345",
"name": "Budi Wahyudi",
"address": "Jl Pintu Air",
"placeOfBirth": "Jakarta",
"dateOfBirth": "2000-01-01",
"occupation": "10",
"gender": "0",
"citizenship": "0",
"selfie": "https://i.pinimg.com/564x/97/48/94/974894c52777ad59f48560c846e58726.jpg",
"frontIdPhoto": "https://i.pinimg.com/564x/97/48/94/974894c52777ad59f48560c846e58726.jpg",
"backIdPhoto": "https://i.pinimg.com/564x/97/48/94/974894c52777ad59f48560c846e58726.jpg"
}
}
}

Response

The following part will be describe about parameter of response in this API:

Response Parameter

The following table is a list of response parameter in this API:

Body

The following table is a body of response parameter:

NoNameTypeLengthRequiredConditionRemarks
1responseCodeStringFixed, 7 maxMandatory-Refer to response code list
2responseMessageStringVariable, 150 maxMandatory-Refer to response code list
3referenceNoStringVariable, 64 maxOptional-Transaction identifier on Paydia
4partnerReferenceNoStringVariable, 64 maxMandatory-Unique transaction identifier on partner system which assigned to each transaction
5stateStringVariable, 32 maxMandatory-Random string for CSRF protection purposes
6additionalInfoJSON ObjectVariableMandatory-Additional information
7additionalInfo.directUrlStringVariable, 2048 maxMandatory-Paydia checkout URL

Response Sample

The following script is a response sample of this API:

{
"responseCode": "2000600",
"responseMessage": "Successful",
"referenceNo": "PtLunDV0kE0FN5rm",
"partnerReferenceNo": "14a34986-5ff8-40f1-9f12-1f1eecfdad63",
"state": "1722844664",
"additionalInfo": {
"directUrl": "https://oauth-pwa-snap.paydia.co.id/?partnerId=4abbcb6ce30229994c76169006e0dc9c&timestamp=2024-08-05T14%3A57%3A47%2B07%3A00&externalId=Nk4dFNdzrUmyIuks&channelId=12345&scopes=PUBLIC_ID&state=1722844664&redirectUrl=https%3A%2F%2Fpaydia.id%2Fredirect%2F&seamlessData=%7B%22mobileNumber%22%3A%220812345678801%22%7D&seamlessSign=PHK8ZHXT3HD5ogm21KRh9WZKIycAcKRR%252BVACoP1xyTjRmkPPpszuBoLuRBC17wiSXD1uh%252F5Wo%252BoJLWotjvWar%252Fn3mc%252F5zNRsKPvDJrdL8JVCGJXOSSA8N%252BtgLC4nJvp7UO7bOlEznLvItLtNHITBBUsNk9ghPSZ6U8kBT4KdtCnRJsZnCpw9dQZXOvJDcvGzN0SSm00gv8KbrPahzBT4jaXhIeGPEzL%252F3Tn%252FYceUtF%252FVx81uXOFiR10KZ71rfMSRzp0pQEdAv0%252BiuCRsdKWTJElcie%252FVzOl%252Fs3LToAS3LULnQi2kUjLU%252B%252FXJOE8GKdF624h73pda5R92XTbbU%252Bbe4Q%253D%253D"
}
}

Response Code and Message

The following table is the list response code and message of Account Inquiry API:

NoResponse CodeResponse MessageRemarks
12000600SuccessfulSuccess to be processed
24000601Invalid Field FormatInvalid format for certain field
34000602Invalid Mandatory FieldMissing or invalid format on mandatory field
44010600Unauthorized. [reason]General unauthorized error
54010601Invalid Token (B2B)Invalid or Expired Access Token
64030605Exceeds Transaction Amount LimitMinimum or maximum amount limit
74090600ConflictCannot use same X-EXTERNAL-ID in same day
84090601Duplicate partnerReferenceNoDuplicate partnerReferenceNo
95000602Backend system failure500 internal server error