@blockchyp/blockchyp-ts 2.18.8 → 2.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +147 -1
- package/_bundles/blockchyp.js +1010 -55
- package/_bundles/blockchyp.js.map +1 -1
- package/_bundles/blockchyp.min.js +1 -1
- package/_bundles/blockchyp.min.js.map +1 -1
- package/lib/src/client.d.ts +12 -0
- package/lib/src/client.js +20 -0
- package/lib/src/client.js.map +1 -1
- package/lib/src/models.d.ts +907 -13
- package/lib/src/models.js +965 -30
- package/lib/src/models.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +21 -0
- package/src/models.ts +7487 -5928
package/README.md
CHANGED
|
@@ -385,6 +385,61 @@ client.void(request)
|
|
|
385
385
|
|
|
386
386
|
```
|
|
387
387
|
|
|
388
|
+
#### Card Metadata
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
* **API Credential Types:** Merchant
|
|
393
|
+
* **Required Role:** Payment API Access
|
|
394
|
+
|
|
395
|
+
This API allows you to retrieve card metadata.
|
|
396
|
+
|
|
397
|
+
Card metadata requests can use a payment terminal to retrieve metadata or
|
|
398
|
+
use a previously enrolled payment token.
|
|
399
|
+
|
|
400
|
+
**Terminal Transactions**
|
|
401
|
+
|
|
402
|
+
For terminal transactions, make sure you pass in the terminal name using the `terminalName` property.
|
|
403
|
+
|
|
404
|
+
**Token Transactions**
|
|
405
|
+
|
|
406
|
+
If you have a payment token, omit the `terminalName` property and pass in the token with the `token`
|
|
407
|
+
property instead.
|
|
408
|
+
|
|
409
|
+
**Card Numbers and Mag Stripes**
|
|
410
|
+
|
|
411
|
+
You can also pass in PANs and Mag Stripes, but you probably shouldn't, as this will
|
|
412
|
+
put you in PCI scope and the most common vector for POS breaches is keylogging.
|
|
413
|
+
If you use terminals for manual card entry, you'll bypass any keyloggers that
|
|
414
|
+
might be maliciously running on the point-of-sale system.
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
```typescript
|
|
420
|
+
import * as BlockChyp from '@blockchyp/blockchyp-ts';
|
|
421
|
+
|
|
422
|
+
const client = BlockChyp.newClient({
|
|
423
|
+
apiKey: 'ZDSMMZLGRPBPRTJUBTAFBYZ33Q',
|
|
424
|
+
bearerToken: 'ZLBW5NR4U5PKD5PNP3ZP3OZS5U',
|
|
425
|
+
signingKey: '9c6a5e8e763df1c9256e3d72bd7f53dfbd07312938131c75b3bfd254da787947'
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
const request = new BlockChyp.CardMetadataRequest();
|
|
429
|
+
request.test = true;
|
|
430
|
+
request.terminalName = 'Test Terminal';
|
|
431
|
+
|
|
432
|
+
client.cardMetadata(request)
|
|
433
|
+
.then(function(httpResponse) {
|
|
434
|
+
const response: BlockChyp.CardMetadataResponse = httpResponse.data;
|
|
435
|
+
console.log('Response: ' + JSON.stringify(response));
|
|
436
|
+
})
|
|
437
|
+
.catch(function (error: any) {
|
|
438
|
+
console.log(error);
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
```
|
|
442
|
+
|
|
388
443
|
#### Time Out Reversal
|
|
389
444
|
|
|
390
445
|
|
|
@@ -3848,6 +3903,49 @@ client.inviteMerchantUser(request)
|
|
|
3848
3903
|
|
|
3849
3904
|
```
|
|
3850
3905
|
|
|
3906
|
+
#### Add Gateway Merchant
|
|
3907
|
+
|
|
3908
|
+
|
|
3909
|
+
|
|
3910
|
+
* **API Credential Types:** Partner
|
|
3911
|
+
* **Required Role:** Gateway Boarding
|
|
3912
|
+
|
|
3913
|
+
This is a partner level API that can be used to manually board gateway merchants. Use this API in conjunction
|
|
3914
|
+
with Platform Configuration to instantly board gateway merchants. Note that most partners don't have
|
|
3915
|
+
permission to do this and are unlikely to get it.
|
|
3916
|
+
|
|
3917
|
+
Settings can be changed by using the Update Merchant API.
|
|
3918
|
+
|
|
3919
|
+
|
|
3920
|
+
|
|
3921
|
+
|
|
3922
|
+
```typescript
|
|
3923
|
+
import * as BlockChyp from '@blockchyp/blockchyp-ts';
|
|
3924
|
+
|
|
3925
|
+
const client = BlockChyp.newClient({
|
|
3926
|
+
apiKey: 'ZDSMMZLGRPBPRTJUBTAFBYZ33Q',
|
|
3927
|
+
bearerToken: 'ZLBW5NR4U5PKD5PNP3ZP3OZS5U',
|
|
3928
|
+
signingKey: '9c6a5e8e763df1c9256e3d72bd7f53dfbd07312938131c75b3bfd254da787947'
|
|
3929
|
+
});
|
|
3930
|
+
|
|
3931
|
+
const request = new BlockChyp.AddGatewayMerchantRequest();
|
|
3932
|
+
|
|
3933
|
+
const profile = new BlockChyp.MerchantProfile();
|
|
3934
|
+
profile.dbaName = 'DBA Name';
|
|
3935
|
+
profile.companyName = 'Corporate Entity Name';
|
|
3936
|
+
request.profile = profile;
|
|
3937
|
+
|
|
3938
|
+
client.addGatewayMerchant(request)
|
|
3939
|
+
.then(function(httpResponse) {
|
|
3940
|
+
const response: BlockChyp.MerchantProfileResponse = httpResponse.data;
|
|
3941
|
+
console.log('Response: ' + JSON.stringify(response));
|
|
3942
|
+
})
|
|
3943
|
+
.catch(function (error: any) {
|
|
3944
|
+
console.log(error);
|
|
3945
|
+
});
|
|
3946
|
+
|
|
3947
|
+
```
|
|
3948
|
+
|
|
3851
3949
|
#### Add Test Merchant
|
|
3852
3950
|
|
|
3853
3951
|
|
|
@@ -4220,7 +4318,7 @@ const client = BlockChyp.newClient({
|
|
|
4220
4318
|
});
|
|
4221
4319
|
|
|
4222
4320
|
const request = new BlockChyp.MerchantCredentialGenerationRequest();
|
|
4223
|
-
|
|
4321
|
+
request.merchantId = '<MERCHANT ID>';
|
|
4224
4322
|
|
|
4225
4323
|
client.merchantCredentialGeneration(request)
|
|
4226
4324
|
.then(function(httpResponse) {
|
|
@@ -4233,6 +4331,54 @@ client.merchantCredentialGeneration(request)
|
|
|
4233
4331
|
|
|
4234
4332
|
```
|
|
4235
4333
|
|
|
4334
|
+
#### Submit Application
|
|
4335
|
+
|
|
4336
|
+
|
|
4337
|
+
|
|
4338
|
+
* **API Credential Types:** Partner
|
|
4339
|
+
* **Required Role:** INVITE MERCHANT
|
|
4340
|
+
|
|
4341
|
+
This is a partner level API that can be used to submit applications to add new merchant accounts. The application requires a significant amount of detailed information about the merchant and their business. Rather than providing an exhaustive list of required fields, we recommend submitting as much information as possible in your initial request.
|
|
4342
|
+
|
|
4343
|
+
If any required fields are missing or if there are any validation errors, the API will return specific error messages indicating which fields need to be addressed. Simply review these validation errors, fill in the missing information or correct any errors, and resubmit the application.
|
|
4344
|
+
|
|
4345
|
+
Key areas of information include:
|
|
4346
|
+
- Business details (name, type, tax information)
|
|
4347
|
+
- Contact information
|
|
4348
|
+
- Address information (physical and mailing)
|
|
4349
|
+
- Owner details
|
|
4350
|
+
- Bank account information
|
|
4351
|
+
- Transaction volume estimates
|
|
4352
|
+
- Operational settings (timezone, batch close time, etc.)
|
|
4353
|
+
|
|
4354
|
+
**Note:** Some fields may be conditionally required based on the values of other fields. The validation process will guide you through ensuring all necessary information is provided.
|
|
4355
|
+
|
|
4356
|
+
|
|
4357
|
+
|
|
4358
|
+
|
|
4359
|
+
```typescript
|
|
4360
|
+
import * as BlockChyp from '@blockchyp/blockchyp-ts';
|
|
4361
|
+
|
|
4362
|
+
const client = BlockChyp.newClient({
|
|
4363
|
+
apiKey: 'ZDSMMZLGRPBPRTJUBTAFBYZ33Q',
|
|
4364
|
+
bearerToken: 'ZLBW5NR4U5PKD5PNP3ZP3OZS5U',
|
|
4365
|
+
signingKey: '9c6a5e8e763df1c9256e3d72bd7f53dfbd07312938131c75b3bfd254da787947'
|
|
4366
|
+
});
|
|
4367
|
+
|
|
4368
|
+
const request = new BlockChyp.SubmitApplicationRequest();
|
|
4369
|
+
|
|
4370
|
+
|
|
4371
|
+
client.submitApplication(request)
|
|
4372
|
+
.then(function(httpResponse) {
|
|
4373
|
+
const response: BlockChyp.Acknowledgement = httpResponse.data;
|
|
4374
|
+
console.log('Response: ' + JSON.stringify(response));
|
|
4375
|
+
})
|
|
4376
|
+
.catch(function (error: any) {
|
|
4377
|
+
console.log(error);
|
|
4378
|
+
});
|
|
4379
|
+
|
|
4380
|
+
```
|
|
4381
|
+
|
|
4236
4382
|
|
|
4237
4383
|
|
|
4238
4384
|
|