Introduction
This documentation is intended for current and future Partners of Simpay. Before implementation, it is necessary to first define the service in the Partner Panel and wait for its activation.
Other languages
Language | Link |
---|---|
Polski | https://docs.simpay.pl/pl/shell/#wstep |
English | https://docs.simpay.pl/en/shell/#wstep |
Pre-made libraries
Pagination
Pagination object
"pagination": {
"total": 1,
"count": 1,
"per_page": 15,
"current_page": 1,
"total_pages": 1,
"links": {
"next_page": null,
"prev_page": null
}
}
If pagination is available in the request it is possible to use the following URL Parameters
.
URL parameters
Name | Type | Description |
---|---|---|
page | integer | Page |
limit | integer | Limit of results. default: 15, maximum: 99 |
Object description
Name | Type | Description |
---|---|---|
Total | int | Number of all records in the object |
Count | int | Number of records on the current page |
PerPage | int | Number of records maximum per page |
CurrentPage | int | Current page |
TotalPages | int | Number of total pages |
links.NextPage | string | URL of the next page |
links.PrevPage | string | URL of previous page |
SMS
const sms = new Sms('0b4dca15', '3eea38f407073ff0abff956b57d71783');
Sms(string apiKey, string apiPassword) → Sms
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
apiKey | string | Yes | API key from partner panel |
apiPassword | string | Yes | API password from partner panel |
sms() → sms
Available methods in the sms object
Name | Description |
---|---|
getServices | Downloading the list of services |
getService | Downloading service information |
getTransactions | Downloading a list of transactions |
getTransaction | Downloading transaction information |
getServiceNumbers | Downloading available numbers for the service |
getServiceNumber | Downloading information about a single number |
getNumbers | Downloading all available numbers |
getNumber | Downloading a single sms number |
verifySmsCode | Code validation |
Downloading the list of services
await sms.getServices();
Example response
[
{
id: 3549,
type: 'ONE_TIME_CODE',
status: 'service_active',
name: 'TEST',
prefix: 'SIM',
suffix: 'TESTSIMPAY',
adult: false,
created_at: 2021-11-08T17:18:53.000Z
}
]
getServicesPaginated(page, limit) → array
- There is pagination available in this query! Read about pagination
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
page | integer | No | Page number |
limit | integer | No | Limit of objects per page |
Response description
Name | Type | Description |
---|---|---|
id | integer | Id Services |
type | string | Service type |
status | string | Service status. service_active - means active status |
name | string | Service name |
prefix | string | SMS content prefix |
suffix | string | Suffix of SMS content |
adult | boolean | Is the service 18+ |
created_at | datetime | Date of service creation in the format: ISO 8601 |
Downloading service information
await sms.getService(3549)
Example response
{
id: 3549,
type: 'ONE_TIME_CODE',
status: 'service_active',
name: 'TEST',
prefix: 'SIM',
suffix: 'TESTSIMPAY',
description: 'Usługa testowa',
adult: false,
numbers: [
'7055', '7136', '7255',
'7355', '7455', '7555',
'7636', '77464', '78464',
'7936', '91055', '91155',
'91455', '91664', '91955',
'92055', '92555'
],
created_at: 2021-11-08T17:18:53.000Z
}
getService(int serviceId) → object
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
serviceId | integer | No | Service id |
Response description
Name | Type | Description |
---|---|---|
id | integer | Id Services |
type | string | Service type |
status | string | Service status. service_active - means active status |
name | string | Service name |
prefix | string | SMS content prefix |
suffix | string | Suffix of SMS content |
description | string | Service description |
adult | boolean | Is the service 18+ |
numbers | array | List of SMS numbers available in the service |
created_at | datetime | Date of service creation in the format: ISO 8601 |
Downloading a list of transactions
await sms.getTransactions(3549)
Example response
[
{
id: 2216609,
from: 123123123,
code: '81FFC5',
used: true,
send_at: 2021-11-14T18:00:36.000Z
}
]
getTransactionsPaginated(int serviceId, int page, int limit) → array
- There is pagination available in this query! Read about pagination
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
serviceId | integer | Yes | Service id |
page | integer | No | Page |
limit | integer | No | Limit of objects per page |
Response description
Name | Type | Description |
---|---|---|
id | integer | Transaction id |
from | integer | Number from which SMS was sent |
code | string | SMS return code |
used | boolean | Was the code used |
send_at | datetime | Date of sending the SMS in the format: ISO 8601 |
Downloading transaction information
await sms.getTransaction(3549, 2216609)
Example response
{
id: 2216609,
from: 123123123,
code: '81FFC5',
used: true,
send_number: 7055,
value: 0.5,
send_at: 2021-11-14T18:00:36.000Z
}
getTransaction(int serviceId, int transactionId) → object
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
serviceId | integer | Yes | Service id |
transactionId | integer | No | Transaction id |
Response description
Name | Type | Description |
---|---|---|
id | integer | Transaction id |
from | integer | Number from which SMS was sent |
code | string | SMS return code |
used | bolean | Was the code used |
send_number | integer | Number to which SMS was sent |
value | float | The net cost of a sent SMS |
send_at | datetime | Date of sending the SMS in the format: ISO 8601 |
Downloading available numbers for the service
await sms.getServiceNumbers(3549)
Example response
{
success: true,
data: [
{ number: 7055, value: 0.5, value_gross: 0.62, adult: false },
{ number: 7136, value: 1, value_gross: 1.23, adult: false },
{ number: 7255, value: 2, value_gross: 2.46, adult: false },
{ number: 7355, value: 3, value_gross: 3.69, adult: false },
{ number: 7455, value: 4, value_gross: 4.92, adult: false },
{ number: 7555, value: 5, value_gross: 6.15, adult: false },
{ number: 7636, value: 6, value_gross: 7.38, adult: false },
{ number: 7936, value: 9, value_gross: 11.07, adult: false },
{ number: 77464, value: 7, value_gross: 8.61, adult: false },
{ number: 78464, value: 8, value_gross: 9.84, adult: false },
{ number: 91055, value: 10, value_gross: 12.3, adult: false },
{ number: 91155, value: 11, value_gross: 13.53, adult: false },
{ number: 91455, value: 14, value_gross: 17.22, adult: false },
{ number: 91664, value: 16, value_gross: 19.68, adult: false },
{ number: 91955, value: 19, value_gross: 23.37, adult: false }
],
pagination: {
total: 17,
count: 15,
per_page: 15,
current_page: 1,
total_pages: 2,
links: {
next_page: 'https://api.simpay.pl/sms/3549/numbers?page=2',
prev_page: null
}
}
}
getServiceNumbersPaginated(int serviceId, int page, int limit) → array
- There is pagination available in this query! Read about pagination
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
serviceId | integer | Yes | Service id |
page | integer | No | Page |
limit | integer | No | Limit of objects per page |
Response description
Name | Type | Description |
---|---|---|
number | integer | SMS number |
value | float | Net amount |
value_gross | float | Gross amount |
adult | boolean | Is it 18+ |
Downloading information about a single number
await sms.getServiceNumber(3549, 7055)
Example response
{
number: 7055
value: 0.5
value_gross: 0.62
adult: false
}
getServiceNumber(int serviceId, int number) → object
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
serviceId | integer | Yes | Service id |
number | integer | Yes | Number |
Response description
Name | Type | Description |
---|---|---|
number | integer | SMS number |
value | float | Net amount |
value_gross | float | Gross amount |
adult | boolean | Is it 18+ |
Downloading all available numbers
await sms.getNumbers()
Example response
{
success: true,
data: [
{ number: 7055, value: 0.5, value_gross: 0.62, adult: false },
{ number: 7255, value: 2, value_gross: 2.46, adult: false },
{ number: 7136, value: 1, value_gross: 1.23, adult: false },
{ number: 7355, value: 3, value_gross: 3.69, adult: false },
{ number: 7455, value: 4, value_gross: 4.92, adult: false },
{ number: 7555, value: 5, value_gross: 6.15, adult: false },
{ number: 7636, value: 6, value_gross: 7.38, adult: false },
{ number: 77464, value: 7, value_gross: 8.61, adult: false },
{ number: 78464, value: 8, value_gross: 9.84, adult: false },
{ number: 7936, value: 9, value_gross: 11.07, adult: false },
{ number: 91055, value: 10, value_gross: 12.3, adult: false },
{ number: 91155, value: 11, value_gross: 13.53, adult: false },
{ number: 91455, value: 14, value_gross: 17.22, adult: false },
{ number: 91664, value: 16, value_gross: 19.68, adult: false },
{ number: 91955, value: 19, value_gross: 23.37, adult: false }
],
pagination: {
total: 26,
count: 15,
per_page: 15,
current_page: 1,
total_pages: 2,
links: {
next_page: 'https://api.simpay.pl/sms/numbers?page=2',
prev_page: null
}
}
}
getNumbersPaginated(int page, int limit) → array
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
page | integer | No | Page |
limit | integer | No | Limit of objects per page |
Response description
Name | Type | Description |
---|---|---|
number | integer | SMS number |
value | float | Net amount |
value_gross | float | Gross amount |
adult | boolean | Is it 18+ |
Downloading a single sms number
getNumber(int number) → object
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
number | integer | Yes | Number |
Response description
Name | Type | Description |
---|---|---|
number | integer | SMS number |
value | float | Net amount |
value_gross | float | Gross amount |
adult | boolean | Is it 18+ |
Code validation
await sms.verifySmsCode(3549, '81FFC5', 7055)
Example response for new code
{
used: false,
code: '81FFC5',
test: true,
from: '123123123',
number: 7055,
value: 0.5,
}
Example response for the code used
{
used: true,
code: '81FFC5',
test: true,
from: '123123123',
number: 7055,
value: 0.5,
used_at: 2021-12-10T21:10:44.000Z
}
verifySmsCode(int serviceId, string code, int number) -> object
Parameters description
Name | Type | Required | Description |
---|---|---|---|
serviceId | integer | Yes | Service id |
code | string | Yes | Return code from SMS |
number | integer | No | The number to which the SMS was to be sent |
Response description
Name | Type | Description |
---|---|---|
used | boolean | Was the SMS used |
code | string | Return code from SMS |
test | boolean | Is the test SMS |
from | integer | Number from which SMS was sent |
number | integer | Number to which SMS was sent |
value | integer | Net amount of SMS cost |
used_at | datetime | Date when SMS was used in the format: ISO 8601, only available if used is equal to true . |
Models
Here you will find models of types, statuses, etc. for SMS services
Service status
Name | Description |
---|---|
service_new | New (to be verified) |
service_active | Active |
service_blocked | Blocked |
service_deleted | Deleted |
service_second_verify | Re-verification |
service_rejected | Rejected |
service_verify | Verification |
service_ongoing_registration | In the course of registration |
Service type
Name | Description |
---|---|
ONE_TIME_CODE | One-time code |
CODE_PACK | Packet of codes |
API_URL | API |
SMSXML
const smsXml = new SmsXml('testKey','apiPassword');
SimPay(string apiKey, string apiPassword) → SimPay
SMS Api XML allows you to control the entire process of receiving the sms and sending the code on the partner’s side of the service. The partner prepares the URL link according to the described SimPay specification. When the user places an order (sends an SMS message), our system queries the URL provided by the partner and downloads the code directly.
smsXml(string hashKey) → smsXml
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
hashKey | string | Yes | Signature creation key located in the partner panel in the service |
Receiving SMS information
const smsParse = smsXml.checkParameters(req.body);
if (!smsParse) {
// An error occurred while processing a text message.
return;
}
// Generating a code for return
const smsCode = smsXml.generateCode();
console.log( smsXml.generateXml(`Twoj kod doladowania to ${smsCode}`) );
DirectBilling
const directbilling = new DirectBilling('0b4dca15', '3eea38f407073ff0abff956b57d71783');
DirectBilling(string apiKey, string apiPassword) → DirectBilling
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
apiKey | string | Yes | API key from partner panel |
apiPassword | string | Yes | API password from partner panel |
Available methods in the directbilling object
Name | Description |
---|---|
getServices | Downloading the list of services |
getService | Downloading service information |
getTransactions | Downloading a list of transactions |
getTransaction | Downloading transaction information |
createTransaction | Generating transaction |
Downloading the list of services
directbilling.getServices();
Example response
[
{
id: 158,
name: 'TEST',
suffix: 'TESTSIMPAY',
status: 'service_active',
created_at: 2021-11-08T17:19:16.000Z
}
]
getServicesPaginated(int page, int limit) → array
- There is pagination available in this query! Read about pagination
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
page | integer | No | Page number |
limit | integer | No | Limit of objects per page |
Response description
Name | Type | Description |
---|---|---|
id | integer | Service id |
name | string | Name of the service |
suffix | string | Service suffix |
status | string | Service status, for more information check Models |
created_at | datetime | Date of service creation in the format: ISO 8601 |
Downloading service information
directbilling.getService(158);
Example response
{
id: 158,
name: 'TEST',
suffix: 'TESTSIMPAY',
status: 'service_active',
api: {
complete: 'https://simpay.pl/',
failure: 'https://simpay.pl/'
},
providers: {
't-mobile': false,
orange: false,
play: false,
plus: false
},
commissions: {
't-mobile': {
commission_0: '60',
commission_9: '60',
commission_25: '60'
},
orange: {
commission_0: '67',
commission_9: '67',
commission_25: '70'
},
play: {
commission_0: '55',
commission_9: '65',
commission_25: '70'
},
plus: {
commission_0: '50',
commission_9: '50',
commission_25: '60'
}
},
maxValues: {
't-mobile': '250',
orange: '300',
play: '600',
plus: '400'
},
created_at: 2021 - 11 - 08 T17: 19: 16.000 Z
}
getService(int serviceId) → object
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
serviceId | integer | No | Service id |
Response description
Name | Type | Description |
---|---|---|
id | integer | Service id |
name | string | Name of the service |
suffix | string | Service suffix |
status | string | Service status, for more information check Models |
api[complete] | string | Redirection url in case of successful transaction |
api[failure] | string | Redirection url in case of transaction failure |
providers[t-mobile] | boolean | T-Mobile operator availability |
providers[orange] | boolean | Orange operator availability |
providers[play] | boolean | Play operator availability |
providers[plus] | boolean | Operator availability Plus |
commissions[t-mobile][commission_0] | string | Partner commission in % of T-Mobile operator from the amount of 0.01 PLN to 8.99 PLN |
commissions[t-mobile][commission_9] | string | Partner commission in % of T-Mobile operator from the amount of PLN 9.00 to PLN 24.99 |
commissions[t-mobile][commission_25] | string | Partner commission in % of T-Mobile operator from the amount of PLN 25.00 up to the maximum amount |
commissions[orange][commission_9] | string | Partner’s commission in % of Orange operator from the amount of 0.01 PLN to 8.99 PLN |
commissions[orange][commission_25] | string | Partner commission in % of Orange operator from the amount of PLN 9.00 to PLN 24.99 |
commissions[orange][commission_0] | string | Partner commission in % of Orange operator from the amount of PLN 25.00 up to the maximum amount |
commissions[play][commission_0] | string | Partner commission in % of Play operator from the amount of 0.01 PLN to 8.99 PLN |
commissions[play][commission_9] | string | Partner commission in % of Play operator from the amount of PLN 9.00 to PLN 24.99 |
commissions[play][commission_25] | string | Partner commission in % of Play operator from the amount of 25.00 PLN up to the maximum amount |
commissions[plus][commission_0] | string | Partner commission in % of Plus operator from the amount of 0.01 PLN to 8.99 PLN |
commissions[plus][commission_9] | string | Partner commission in % of Plus operator from the amount of PLN 9.00 to PLN 24.99 |
commissions[plus][commission_25] | string | Partner commission in % of Plus operator from the amount of 25.00 PLN up to the maximum amount |
maxValues[t-mobile] | string | Maximum amount of a single transaction for T-Mobile operator |
maxValues[orange] | string | Maximum amount of a single transaction for the operator Orange |
maxValues[play] | string | Maximum amount of a single transaction for Play operator |
maxValues[plus] | string | Maximum amount of a single transaction for Plus operator |
created_at | datetime | Date of service creation in the format: ISO 8601 |
Commission calculation
directbilling.calculate(158, 10.00);
Example response
{
orange: {
net: 14.93,
gross: 18.36
},
play: {
net: 15.39,
gross: 18.93
},
't-mobile': {
net: 16.67,
gross: 20.5
},
plus: {
net: 20,
gross: 24.6
}
}
calculate(int serviceId, float amount) → object
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
serviceId | integer | Yes | Service Id |
amount | float | Yes | The amount we want to receive |
Response description
Name | Type | Description |
---|---|---|
orange[net] | float | Net amount |
orange[gross] | float | Gross amount |
play[net] | float | Net amount |
play[gross] | float | Gross amount |
t-mobile[net] | float | Net amount |
t-mobile[gross] | float | Gross amount |
plus[net] | float | Net amount |
plus[gross] | float | Gross amount |
- If the operator is not active or the amount is too large a
null
will be returned.
Downloading a list of transactions
directbilling.getTransactions(158);
Example response
[{
id: 559917,
status: 'transaction_db_confirmed',
value: 42.86,
value_net: 30,
operator: 'orange',
created_at: 2021 - 11 - 17 T01: 53: 21.000 Z,
updated_at: 2021 - 11 - 17 T01: 53: 21.000 Z
},
{
id: 559916,
status: 'transaction_db_confirmed',
value: 45.72,
value_net: 32,
operator: 'orange',
created_at: 2021 - 11 - 17 T01: 52: 44.000 Z,
updated_at: 2021 - 11 - 17 T01: 52: 44.000 Z
},
{
id: 559914,
status: 'transaction_db_confirmed',
value: 0.45,
value_net: 0.3,
operator: 'orange',
created_at: 2021 - 11 - 17 T01: 41: 41.000 Z,
updated_at: 2021 - 11 - 17 T01: 41: 41.000 Z
},
{
id: 559913,
status: 'transaction_db_confirmed',
value: 0.02,
value_net: 0.01,
operator: 'orange',
created_at: 2021 - 11 - 17 T01: 40: 33.000 Z,
updated_at: 2021 - 11 - 17 T01: 40: 33.000 Z
},
{
id: 559912,
status: 'transaction_db_payed',
value: 0.01,
value_net: 0,
operator: 'orange',
created_at: 2021 - 11 - 17 T01: 35: 36.000 Z,
updated_at: 2021 - 11 - 17 T01: 35: 36.000 Z
},
{
id: 559911,
status: 'transaction_db_payed',
value: 0.01,
value_net: 0,
operator: 'orange',
created_at: 2021 - 11 - 17 T01: 26: 43.000 Z,
updated_at: 2021 - 11 - 17 T01: 26: 43.000 Z
},
{
id: 559910,
status: 'transaction_db_rejected',
value: 0.01,
value_net: 0,
operator: 'orange',
created_at: 2021 - 11 - 17 T01: 26: 30.000 Z,
updated_at: 2021 - 11 - 17 T01: 26: 30.000 Z
},
{
id: 559909,
status: 'transaction_db_confirmed',
value: 0.01,
value_net: 0,
operator: 'orange',
created_at: 2021 - 11 - 17 T01: 26: 04.000 Z,
updated_at: 2021 - 11 - 17 T01: 26: 04.000 Z
},
{
id: 559908,
status: 'transaction_db_payed',
value: 0.01,
value_net: 0,
operator: 'orange',
created_at: 2021 - 11 - 17 T01: 25: 47.000 Z,
updated_at: 2021 - 11 - 17 T01: 25: 47.000 Z
},
{
id: 559907,
status: 'transaction_db_payed',
value: 0.01,
value_net: 0,
operator: 'orange',
created_at: 2021 - 11 - 17 T01: 22: 12.000 Z,
updated_at: 2021 - 11 - 17 T01: 22: 12.000 Z
}
]
getTransactionsPaginated(int serviceId, int page, int limit) → array
- There is pagination available in this query! Read about pagination
Response description
Name | Type | Description |
---|---|---|
id | integer | Transaction id |
status | string | Status of transaction, for more information check Models |
value | float | Transaction amount |
value_netto | float | Net transaction amount |
operator | string | Operator, see list of operators in Models |
created_at | datetime | The date the transaction was created in the format: ISO 8601 |
updated_at | datetime | Transaction update date in the format: ISO 8601 |
Downloading transaction information
directbilling.getTransaction(139, 559911);
Example response
{
id: 559911,
status: 'transaction_db_payed',
phoneNumber: null,
control: 'control',
value: 0.01,
value_net: 0,
operator: 'orange',
notify: {
is_send: false,
last_send_at: '2021-11-18T15:56:04+00:00',
count: 10
},
created_at: 2021-11-17T01:26:43.000Z,
updated_at: 2021-11-17T01:26:43.000Z
}
getTransaction(int serviceId, int transactionId) → object
Response description
Name | Type | Description |
---|---|---|
id | integer | Transaction id |
status | string | Status of transaction, for more information check Models |
phoneNumber | string/null | The phone number that was forced when the transaction was generated |
control | string | Status of transaction, for more information check Models |
value | float | Transaction amount |
value_netto | float | Net transaction amount |
operator | string | Operator, see list of operators in Models |
notify | array | Server notification board, see below |
notify[is_send] | boolean | Information whether the notification has been sent |
notify[last_send_at] | datetime | Date the last notification was sent in the format: ISO 8601 |
notify[count] | integer | Number of notifications sent |
created_at | datetime | The date the transaction was created in the format: ISO 8601 |
updated_at | datetime | Transaction update date in the format: ISO 8601 |
Generating transaction
await db.createTransaction(158, 'APIKEY', {
amount: 10.00,
amountType: AmountType.GROSS,
control: 'test'
})
Example response
{
success: true,
data: {
transactionId: '',
redirectUrl: ''
}
}
createTransaction(int serviceId, string apiKey, DbTransactionRequest request) → object
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
serviceId | integer | Yes | Service id |
apiKey | string | Yes | Api key from the partner panel, available in the service |
Typy kwoty
Nazwa | Opis |
---|---|
AmountType.NET | Type of net transaction amount |
AmountType.GROSS | Type of gross transaction amount |
AmountType.REQUIRED | Type of transaction amount, net amount required |
Object description
Name | Type | Description |
---|---|---|
transactionId | string | UUID of the transaction |
redirectUrl | string | The address to which the customer should be redirected |
After generating the transaction, the user should be redirected to the url given in the response, it can be retrieved from the object under the key redirectUrl
.
Receiving transaction information
const notify = directbilling.checkNotification( 'mdRhwVlXc3WMN4Dbd3hfvkap4', req.body );
if( !notify ) {
return;
}
res.status(200).send('OK')
Obiekt jaki zostanie przesłany do serwisu partnera
{
"id": 1111,
"service_id": 1,
"status": "transaction_db_payed",
"values": {
"net": 11.07,
"gross": 11.07,
"partner": 11.07
},
"returns": {
"complete": "https://www.simpay.pl",
"failure": "https://www.simpay.pl"
},
"control": "test",
"number_from": "123123123",
"provider": 1,
"signature": "signature"
}
checkNotification(string apiKey, string payload)
Parameters description
Name | Type | Required? | Description |
---|---|---|---|
apiKey | string | Yes | Api key from the partner panel, available in the service |
payload | string | Yes | Body of the incoming request |
Description of the request sent
Name | Type | Description |
---|---|---|
id | integer | Transaction id |
service_id | integer | Service id |
status | string | Status of transaction, for more information check Models |
values | object | Object with transaction amounts |
values[net] | float | Net transaction amount |
values[gross] | float | Gross transaction amount |
values[partner] | float | Partner’s commission |
returns | object | Post-transaction redirect URL object |
returns[complete] | string | The address to which the customer was to be redirected after a valid transaction |
returns[failure] | string | The address to which the customer was to be redirected after the transaction was not correct |
control | string | Control field to be used by partner |
number_from | string | The phone number from which the transaction was conducted |
provider | integer | Payment operator, see more at Models |
signature | string | The signature to be compared with the newly generated signature, see below |
Models
Service status
Name | Description |
---|---|
service_db_new | New |
service_db_active | Active |
service_db_rejected | Rejected |
service_db_ongoing_registration | In the course of registration |
Transaction status
Name | Description |
---|---|
transaction_db_new | New |
transaction_db_confirmed | User redirected |
transaction_db_rejected | Rejected |
transaction_db_canceled | Cancelled |
transaction_db_payed | Paid |
transaction_db_generate_error | Error during generating |
Provider
Name | Description |
---|---|
1 | Orange |
2 | Plus |
3 | Play |
4 | T-Mobile |
Security
Verification of customer certificate
Notifications from SimPay servers are signed with a certificate.
Example of nginx configuration with client certificate verification on location /notify
# Tutaj wpisz fingerprint certyfikatu otrzymanego od SimPay
set $simpay_fingerprint "13d4313b94469038cdbab1839559ae381309a79d";
# Tutaj podmień ścieżkę na tą z certyfikatem otrzymanym od SimPay
ssl_client_certificate /opt/simpay/ssl/ipn.simpay.pem;
ssl_verify_client optional;
ssl_verify_depth 2;
location /notify {
if ($ssl_client_verify != "SUCCESS") { return 403; }
if ($ssl_client_fingerprint != $simpay_fingerprint) {
return 403;
}
}
SimPay IPN Certificate
-----BEGIN CERTIFICATE-----
MIICZjCCAe2gAwIBAgIUESmcYMAYfB5YTAGSqCyOay9OnZgwCgYIKoZIzj0EAwIw
czEmMCQGA1UEAwwdUGF5bWVudHMgU29sdXRpb25zIFJvb3QgQ0EgWDExJjAkBgNV
BAoMHVBheW1lbnRzIFNvbHV0aW9ucyBzcC4geiBvLm8uMRQwEgYDVQQHDAtLcmFz
bm9zaWVsYzELMAkGA1UEBhMCUEwwHhcNMjExMTExMTg0NzI5WhcNMzExMTA5MTg0
NzI5WjBzMSYwJAYDVQQDDB1QYXltZW50cyBTb2x1dGlvbnMgUm9vdCBDQSBYMTEm
MCQGA1UECgwdUGF5bWVudHMgU29sdXRpb25zIHNwLiB6IG8uby4xFDASBgNVBAcM
C0tyYXNub3NpZWxjMQswCQYDVQQGEwJQTDB2MBAGByqGSM49AgEGBSuBBAAiA2IA
BE371EkfU3OZJj6aUnv4JLfQ773ShbEooYxFc//DsWVi0rps0MUlpLuWpDN9tqdh
DJWQpdXq2Pam3nbzEr/klHeFRBBdI4ghWjs3GX+KxNUMMp0qVFNxZ+oBDdBkb7GD
s6NCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
FMplUBx3+kPIl5fkMLREXv5DwQyvMAoGCCqGSM49BAMCA2cAMGQCMGLV6BCrVb/W
RjsFkmho+qVUa9mdm54dPDI4JZ5rb98BnU0xxSGpPwXc+odSgPox7QIwXP1vJztU
qPn0D9ZdNFSIg7wpppLwIfhniv3gy4khuI9PAuWF76rjs90+Ij/pR67n
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIICWjCCAeGgAwIBAgIUcPa5Jqg71Be/IaLIlPy4XDLJJP8wCgYIKoZIzj0EAwIw
czEmMCQGA1UEAwwdUGF5bWVudHMgU29sdXRpb25zIFJvb3QgQ0EgWDExJjAkBgNV
BAoMHVBheW1lbnRzIFNvbHV0aW9ucyBzcC4geiBvLm8uMRQwEgYDVQQHDAtLcmFz
bm9zaWVsYzELMAkGA1UEBhMCUEwwHhcNMjExMTExMTk0OTUwWhcNMzExMTA5MTk0
OTUwWjBnMRowGAYDVQQDDBFTaW1wYXkgUm9vdCBDQSBYMTEmMCQGA1UECgwdUGF5
bWVudHMgU29sdXRpb25zIHNwLiB6IG8uby4xFDASBgNVBAcMC0tyYXNub3NpZWxj
MQswCQYDVQQGEwJQTDB2MBAGByqGSM49AgEGBSuBBAAiA2IABE9noXtjwMQ0IlDy
Anddos7JRYf3EcCbW8/ilHQcBxkE8828iTK+4bw1h8KYRzEfJRSZmZMlbH8AKPSC
oukSbSAnMMSu8vQ2QBQKwjjsxIttLv63HHBQ4c5k7C6WYm28C6NCMEAwDgYDVR0P
AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFDPp5r7ojf5I/9pO
Z6uZKGAoJwS7MAoGCCqGSM49BAMCA2cAMGQCMCgFY0DWNkHPr1yV7inFuKPIKUBT
XzWc7F1vlcWszNuNJtyaxiSUsmysYxyxD0+QEwIwQ53zxnkppiw9+luTIZAxkchi
DoEV+E1e5GR8f4QaKCPIb4y9qp9dpWd9328sXvVP
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIICCDCCAY2gAwIBAgIUUGkJrAO+6V0xrOcbZ5szLAix4bIwCgYIKoZIzj0EAwIw
ZzEaMBgGA1UEAwwRU2ltcGF5IFJvb3QgQ0EgWDExJjAkBgNVBAoMHVBheW1lbnRz
IFNvbHV0aW9ucyBzcC4geiBvLm8uMRQwEgYDVQQHDAtLcmFzbm9zaWVsYzELMAkG
A1UEBhMCUEwwHhcNMjIwMjA3MTk0MTU3WhcNMzIwMjA1MTk0MTU3WjBjMRYwFAYD
VQQDDA1TaW1wYXkgSVBOIFgxMSYwJAYDVQQKDB1QYXltZW50cyBTb2x1dGlvbnMg
c3AuIHogby5vLjEUMBIGA1UEBwwLS3Jhc25vc2llbGMxCzAJBgNVBAYTAlBMMHYw
EAYHKoZIzj0CAQYFK4EEACIDYgAEmFd9ZEds0KBVKuRsi50sO+B+NUJM2MRbXnTh
7kkStVk8XFIzOHWEhbppttB1RaOrPpIT/Ys/+/YXWAGTAvubuWYH2rDYFv8h54gU
VI8HGK81aVbQmv8ln5tug7rKKmKtMAoGCCqGSM49BAMCA2kAMGYCMQC7sy+9bFAU
ZWUWgI0KRFWSYTwdhOC4V84+Ea4PCvVPha26hMe9NqB1A1Vf3tInBWUCMQD0x33e
8jDjlCiXN0jDf+5gKsREQs9Q2pF6r+P7uzX26dT+OvOz6IfJlYS+SEXYHjU=
-----END CERTIFICATE-----
IP addresses of servers
Notifications from SimPay servers are sent from the following IP addresses
LP | IP |
---|---|
1 | 135.125.153.121 |