SDK Reference Library
Distribute
In this document you will find documentation about enums, helper classes and custom types that make it easier for you, as a developer, to work with Ping Payments SDK.
Enums
CurrencyEnum
Namespace: PingPayments.Shared.Enums
Definition
Contains the supported currencies.
Fields
SEK | Swedish krona (SEK) |
NOK | Norwegian krone (NOK) |
EUR | European euro (EUR) |
GBP | Brittish pound (GBP) |
DKK | Danish krone (DKK) |
Usage
CurrencyEnum.SEK;
CurrencyEnum.NOK;
CurrencyEnum.EUR;
CurrencyEnum.GBP;
CurrencyEnum.DKK;
DistributeMethodEnum
Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Shared.V1
Definition
Contains the supported distribuated methods.
Fields
sms | Distributed via SMS |
Distributed via email |
Usage
DistributeMethodEnum.sms;
DistributeMethodEnum.email;
MethodEnum
Namespace: PingPayments.Shared.Enums
Definition
Contains the supported Payment Methods. These methods are used in combination with the Payment Providers in the ProviderEnum.
Fields
E-commerce | Used in combination with the Swish provider. |
M-commerce | Used in combination with the Swish provider. |
card | Used in combination with the Payment Iq providers. |
invoice | Used in combination with the billmate provider. |
autogiro | Used in combination with the Bankgirot provider. |
Vipps | Used in combination with the Payment Iq provider. |
deposit | Used in combination with the Ping provider. |
credit | Used in combination with the Ping provider. |
dummy | Used in combination with the Dummy provider. |
bank_loan | Used in combination with the Baase provider. |
Usage
MethodEnum.e_commerce
MethodEnum.m_commerce
MethodEnum.pis
MethodEnum.card
MethodEnum.invoice
MethodEnum.autogiro
MethodEnum.vipps
MethodEnum.deposit
MethodEnum.credit
MethodEnum.dummy
MethodEnum.bank_loan
PaymentStatusEnum
Namespace: PingPayments.Shared.Enums
Definition
Contains the different kinds of status a payment can have.
Fields
INITIATED | Payment is initiated and Ping starts sending status updates |
PENDING | Payment awaits the next action |
DECLINED | Payment could not be processed |
CRASHED | Payment caused an unexpected error |
COMPLETED | Successful payment |
EXPIRED | Payment timed out |
ABORTED | Payment was canceled by payer |
OVERFUNDED | Payment has been overfunded |
UNDERFUNDED | Payment has been underfunded |
FUNDED | Payment has been funded |
Usage
PaymentStatusEnum.INITIATED
PaymentStatusEnum.PENDING
PaymentStatusEnum.DECLINED
PaymentStatusEnum.CRASHED
PaymentStatusEnum.COMPLETED
PaymentStatusEnum.EXPIRED
PaymentStatusEnum.ABORTED
PaymentStatusEnum.FUNDED
ProviderEnum
Namespace: PingPayments.Shared.Enums
Definition
Contains the supported Payment Providers. These providers are used in combination with the Payment Methods in the MethodEnum.
Fields
Swish | Used in combination with the e_commerce and m_commerce methods. |
billmate | Used in combination with the invoice method. |
Bankgirot | Used in combination with the autogiro method. |
payment_iq | Used in combination with the card and vipps methods. |
ping | Used in combination with the deposit method. |
dummy | Used in combination with the dummy method. |
baase | Used in combination with the bank_loan method. |
Usage
ProviderEnum.swish
ProviderEnum.billmate
ProviderEnum.bankgirot
ProviderEnum.payment_iq
ProviderEnum.ping
ProviderEnum.dummy
ProviderEnum.baase
ReferenceTypeEnum
Namespace: PingPayments.Shared.Enums
Definition
Contains the supported refrence types.
Fields
OCR | OCR (Optical Character Recognition) used on the Swedish market. |
KID | KID (Customer Identification Number) used on the Norwegian market. |
Usage
ReferenceTypeEnum.OCR
ReferenceTypeEnum.KID
MerchantStatus
Namespace: PingPayments.Shared.Enums
Definition
Contains the supported merchant statuses.
Fields
CREATED | Merchant has just been created |
APPROVED | Merchant has been approved |
DENIED | Merhcant has been denied |
PENDING | Merchants is awaiting further status updates |
Usage
MerchantStatus.CREATED
MerchantStatus.APPROVED
MerchantStatus.DENIED
MerchantStatus.PENDING
ProcesseTypeEnum
Namespace: PingPayments.Mimic.Deposit.Create.V1
Definition
Contains the supported process types.
Fields
instant | Deposit gets processed instantly |
simulated | Deposit simulates the process |
Usage
ProcesseTypeEnum.instant
ProcesseTypeEnum.simulated
LegalEntityTypeEnum
Namespace: PingPayments.KYC.Shared
Definition
Contains the supported entity types of a merchant
Fields
person |
organization |
Usage
LegalEntityTypeEnum.person
LegalEntityTypeEnum.organization
GenderEnum
Namespace: PingPayments.KYC.Shared
Definition
Contains the supported genders.
Fields
male |
female |
unknown |
Usage
GenderEnum.male
GenderEnum.female
GenderEnum.unknown
SwishQrCodeFormat
Namespace: PingPayments.PaymentsApi.Payments.V1.Initiate.Request
Definition
Contains supported image formats of a qr-code.
Fields
Enums |
---|
transparent_svg |
transparent_png |
solid_jpg |
solid_svg |
solid_png |
Usage
SwishQrCodeFormat.transparent_svg
SwishQrCodeFormat.transparent_png
SwishQrCodeFormat.solid_jpg
SwishQrCodeFormat.solid_svg
SwishQrCodeFormat.solid_png
Helper classes
CreatePayment
Namespace: PingPayments.PaymentsApi.Payments.V1.Initiate.Request
Definition
A static partial class that contains classes and methods for creating payments.
Billmate
Invoice
Parameters | Type | Required | Description |
---|---|---|---|
orderItems | OrderItem[] | Yes | Array of OrderItems. |
firstName | string | Yes | Payer first name |
lastName | string | Yes | Payer last name |
nationalIdNumber | string | Yes | Payer national ID number |
string | Yes | Payer email adress | |
phoneNumber | string | Yes | Payer phone number |
country | string | Yes | Payer country of residence given in 2 letters, and follows the ISO codes (alpha-2) as described in the ISO 3166 international standard. For example Swedens ISO code is "SE". |
ipAddress | string | Yes | IP address of the device that the payment is being made from |
customerReference | string | Yes | Customer reference |
isCompanyCustomer | boolean | Yes | Whether or not the payer is paying as a company |
statusCallbackUrl | Uri | No | Callback where the Tenant will get payment updates through HTTP. |
metadata | Dictionary<string, dynamic> | No | Custom metadata for payment. |
CreatePayment.Billmate.Invoice
(
new OrderItem[]
{
new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
},
"firstname",
"lastname",
nationalIdNumber,
"[email protected]",
phoneNumber,
"SE",
ipAddress,
"customer reference",
true,
statusCallbackUrl
);
Dummy
New
Paramaters | Type | Required | Description |
---|---|---|---|
currency | CurrencyEnum | Yes | Currency used for payment. |
orderItems | OrderItem[] | Yes | Array of OrderItems. |
statusCallbackUrl | Uri | No | Callback where the Tenant will get payment updates through HTTP. |
desiredPaymentStatus | PaymentStatusEnum | No | Desired payment status |
metadata | Dictionary<string, dynamic> | No | Custom metadata for payment. |
CreatePayment.Dummy.New
(
CurrencyEnum.SEK,
new OrderItem[]
{
new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
},
statusCallbackUrl,
PaymentStatusEnum.COMPLETED
);
Bankgirot
Autogiro
Paramaters | Type | Required | Description |
---|---|---|---|
orderItems | OrderItem[] | Yes | Array of OrderItems. |
mandateId | string | Yes | Ping Payments Autogiro mandate ID |
statusCallbackUrl | Uri | No | Callback where the Tenant will get payment updates through HTTP. |
metadata | Dictionary<string, dynamic> | No | Custom metadata for payment. |
CreatePayment.Bankgirot.Autogiro
(
new OrderItem[]
{
new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
},
mandateId,
statusCallbackUrl,
metadata
);
PaymentIq
Card
Paramaters | Type | Required | Description |
---|---|---|---|
currency | CurrencyEnum | Yes | Currency used for payment. |
orderItems | OrderItem[] | Yes | Array of OrderItems. |
successUrl | Uri | Yes | URL to which the user is directed at the end of a successful payment |
cancelUrl | Uri | Yes | URL to which the user is directed if the payment fails |
statusCallbackUrl | Uri | No | Callback where the Tenant will get payment updates through HTTP. |
locale | string | No | Default: "en-us" . Locale to use for localizing the Payment IQ Cashier UI |
metadata | Dictionary<string, dynamic> | No | Custom metadata for payment. |
CreatePayment.PaymentIq.Card
(
CurrencyEnum.SEK,
new OrderItem[]
{
new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
},
successUrl,
cancelUrl,
statusCallbackUrl
);
Vipps
Paramaters | Type | Required | Description |
---|---|---|---|
orderItems | OrderItem[] | Yes | Array of OrderItems. |
successUrl | Uri | Yes | URL to which the user is directed at the end of a successful payment |
cancelUrl | Uri | Yes | URL to which the user is directed if the payment fails |
statusCallbackUrl | Uri | No | Callback where the Tenant will get payment updates through HTTP. |
locale | string | No | Default: "en-us" . Locale to use for localizing the Payment IQ Cashier UI |
metadata | Dictionary<string, dynamic> | No | Custom metadata for payment |
CreatePayment.PaymentIq.Vipps
(
new OrderItem[]
{
new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
},
successUrl,
cancelUrl,
statusCallbackUrl
);
Swish
Ecommerce
Paramaters | Type | Required | Description |
---|---|---|---|
orderItems | OrderItem[] | Yes | Array of OrderItems. |
phoneNumber | string | Yes | Swish-connected phone number of payer |
message | string | Yes | Message associated with the payment. Made available to the payee |
statusCallbackUrl | Uri | No | Callback where the Tenant will get payment updates through HTTP. |
metadata | Dictionary<string, dynamic> | No | Custom metadata for payment. |
CreatePayment.Swish.Ecommerce
(
new OrderItem[]
{
new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
},
phoneNumber,
"message",
statusCallbackUrl
);
Mcommerce
Paramaters | Type | Required | Description |
---|---|---|---|
orderItems | OrderItem[] | Yes | Array of OrderItems. |
message | string | Yes | Message associated with the payment. Made available to the payee |
statusCallbackUrl | Uri | No | Callback where the Tenant will get payment updates through HTTP. |
swishQrCode | SwishQrCode | No | Object containing parameters regarding a qr code for a swish paymen |
metadata | Dictionary<string, dynamic> | No | Custom metadata for payment. |
CreatePayment.Swish.Mcommerce
(
new OrderItem[]
{
new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
},
"message",
statusCallbackUrl
);
PingDeposit
Ocr
Paramaters | Type | Required | Description |
---|---|---|---|
currency | CurrencyEnum | Yes | Currency used for deposit. |
orderItems | OrderItem[] | Yes | Array of OrderItems. |
desiredDateOfPayment | DateTimeOffset | No | Desired date of payment |
statusCallbackUrl | Uri | No | Callback where the Tenant will get payment updates through HTTP.s |
metadata | Dictionary<string, dynamic> | No | Custom metadata for deposit. |
reuseReference | string | No | Reference to an already completed deposit payment |
completeWhenFunded | bool | No | If this parameter is set to false, the payment status will not change to COMPLETED when the payment funds matches the total amount, the payment status will instead remain at status FUNDED. The deafult value of this parameter is set to true |
CreatePayment.PingDeposit.Ocr
(
CurrencyEnum.SEK,
new OrderItem[]
{
new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
},
DateTimeOffset.Now.AddMonths(1),
statusCallbackUrl,
metadata,
"reference to be reused",
false
);
Kid
Paramaters | Type | Required | Description |
---|---|---|---|
currency | CurrencyEnum | Yes | Currency used for deposit. |
orderItems | OrderItem[] | Yes | Array of OrderItems. |
desiredDateOfPayment | DateTimeOffset | No | Desired date of payment |
statusCallbackUrl | Uri | No | Callback where the Tenant will get payment updates through HTTP.s |
metadata | Dictionary<string, dynamic> | No | Custom metadata for deposit. |
reuseReference | string | No | Reference to an already completed deposit payment |
completeWhenFunded | bool | No | If this parameter is set to false, the payment status will not change to COMPLETED when the payment funds matches the total amount, the payment status will instead remain at status FUNDED. The deafult value of this parameter is set to true |
CreatePayment.PingDeposit.Kid
(
CurrencyEnum.NOK,
new OrderItem[]
{
new OrderItem(500, "OrderItem", NorwegianVat.Standard25, MerchantId),
},
DateTimeOffset.Now.AddMonths(1),
statusCallbackUrl,
metadata,
"reference to be reused",
false
);
PingCredit
New
Paramaters | Type | Required | Description |
---|---|---|---|
currency | CurrencyEnum | Yes | Currency used for payment. |
orderItems | OrderItem[] | Yes | Array of OrderItems. |
statusCallbackUrl | Uri | No | Callback where the Tenant will get payment updates through HTTP. |
metadata | Dictionary<string, dynamic> | No | Custom metadata for payment. |
CreatePayment.PingDeposit.New
(
CurrencyEnum.SEK,
new OrderItem[]
{
new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
},
statusCallbackUrl
);
CreatePaymentProviderMethod
Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Create.V1.Request
Definition
A static class that contains factory methods for creating the payment provider methods available in the checkout.
Fields
Billmate | Through the Billmate provider, the payment method Invoice is possible. |
Payment Iq | Through the Payment Iq provider, the payment methods Card and Vipps are possible. |
Swish | Through the Swish provider, the payment methods Mcommerceand Ecommerce are possible. |
usage
CreatePaymentProviderMethod.Billmate.Invoice();
CreatePaymentProviderMethod.PaymentIq.Card();
CreatePaymentProviderMethod.PaymentIq.Vipps();
CreatePaymentProviderMethod.Swish.Mcommerce("Swish message");
CreatePaymentProviderMethod.Swish.Ecommerce("Swish message");
DistributeMethod
Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Send.V1.Requests
Definition
A static class that contains factory methods. The methods returns a SendPaymentLinkRequestBody modified with the desired distribution methods.
Fields
When you want to send a Payment Link via email. | |
Sms | When you want to send a Payment Link via sms. |
SmsAndEmail | When you want to send a Payment Link via both sms and email. |
usage
DistributeMethod.Sms.New("phoneNumber");
DistributeMethod.Email.New("email");
DistributeMethod.SmsAndEmail.New("phoneNumber", "email");
Locale
Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Shared.V1
Definition
A static class that contains the supported languages for the receipts and invoices and in the checkout.
Fields
Swedish | This will determine swedish as the language on the receipt/invoice and in the checkout. |
Norwegian | This will determine norwegian as the language on the receipt/invoice and in the checkout. |
Usage
Locale.Swedish
Locale.Norwegian
NorwegianVat
Namespace: PingPayments.Shared
Definition
A static class that contains the most common VAT rates for Norway.
Fields
Standard25 | All other taxable goods and services. |
Reduced15 | Food and beverages. |
Reduced11Point1 | Supply of raw fish. |
Reduced6 | Certain cultural and sporting activities; transport services. |
Zero | E-books. |
Usage
NorwegianVat.Standard25
NorwegianVat.Reduced15
NorwegianVat.Reduced11Point1
NorwegianVat.Reduced6
NorwegianVat.Zero
SwedishVat
Namespace: PingPayments.Shared
Definition
A static class that contains the most common VAT rates for Sweden.
Fields
Vat25 | General tax rate, which applies to most goods and services. |
Vat12 | Charged on food, hotels, and artists' own sales of works of art. |
Vat6 | Applies to newspapers, magazines, books, concerts and passenger transport (taxis, buses, flights and trains) in Sweden. |
Zero | Applies to financial services, membership fees, and so forth. |
Usage
SwedishVat.Vat25
SwedishVat.Vat12
SwedishVat.Vat6
SwedishVat.Zero
Custom types
Adress
Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Shared.V1
Usage
new Adress("Ărebro", "Signalgatan 7", "702 25");
AisMerchantRequest
Namespace: PingPayments.KYC.Merchant.V1.AIS
Property | Type | Required | Description |
---|---|---|---|
Country | string | Yes | Country of merchant |
MerchantId | Guid | No | Id of a merchant |
Distribution | Distribution | No | Way of distribution |
string | No | Email of merchant | |
PhoneNumber | string | No | Phone number of merchant |
PsuId | string | No | psu Id of merchant |
Redirects | Redirects | No | Object of redirect urls |
Style | Style | No | Style options |
Usage
new AisMerchantRequest
(
"SE",
merchantId
distributionObj,
"[email protected]",
"0701231212",
"199611015676",
redirects,
style
);
BankAccount
Namespace: PingPayments.KYC.Shared
Usage
new BankAccount
{
Bic = "NDEASESS",
Iban = "SE7280000810340009783242",
Bban = "41971150033",
Clearing = "6985",
Plusgiro = "12345678",
Bankgiro = "87654321"
};
CreateDepositRequest
Namespace: PingPayments.Mimic.Deposit.Create.V1
Property | Type | Required | Description |
---|---|---|---|
Amount | int | Yes | Amount to be payed |
Currency | CurrencyEnum | Yes | Currency of the payment |
ReferenceType | ReferenceTypeEnum | Yes | Reference type |
Reference | string | Yes | Reference of the payment |
Iban | string | No | IBAN of the target account, only necessary if simulating a deposit payment |
Type | ProcesseTypeEnum | No | How the deposit should be processed |
Usage
new CreateDepositRequest(1000, CurrencyEnum.SEK, ReferenceTypeEnum.KID, "reference");
CreateInvoiceRequest
Namespace: PingPayments.PaymentLinksApi.Files.Invoice.Create.V1
Property | Type | Required | Description |
---|---|---|---|
ReferenceType | ReferenceTypeEnum | Yes | Reference type the end user will use to pay the invoice. |
DokumentName | string | No | Name of the document. |
Usage
new CreateInvoiceRequest(ReferenceTypeEnum.KID);
CreateMerchantRequest
Namespace: PingPayments.PaymentsApi.Merchants.Create.V1
Property | Type | Required | Description |
---|---|---|---|
Name | string | Yes | Name of the Merchant. |
Organization | Ogranization | No | Organization object. |
Person | Person | No | Person object. |
Usage
new CreateMerchantRequest
{
Name = "test merchant AB",
Organization = new Organization
{
Country = "SE",
SeOrganizationNumber = "1234567890"
}
};
CreatePaymentOrderRequest
Namespace: PingPayments.PaymentsApi.PaymentOrders.Create.V1
Property | Type | Required | Description |
---|---|---|---|
Currency | CurrencyEnum | Yes | Enum: SEK , NOK . Payments connected to a payment order must have the same currency as the payment order. |
SplitParamters | dynamic | No | Parameters used to control parts of the Split Tree. |
SplitTreeId | Guid | No | Id of a specific Split Tree. |
Usage
new CreatePaymentOrderRequest(CurrencyEnum.SEK);
CreatePaymentLinkRequest
Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Create.V1.Request
Property | Type | Requierd | Description |
---|---|---|---|
SplitTreeId | Guid | No | Id of a specific split tree. |
Currency | CurrencyEnum | Yes | The currency which the amounts is given in. |
Customer | Customer | Yes | Customer intended to pay the PaymentLink. |
DueDate | string | Yes | The expiration date of the PaymentLink. |
Locale | string | Yes | The language used for the invoice. This will determin the language on the receipt/invoice and in the checkout. |
Items | Item[] | Yes | An array of Items inclueded in the PaymentLink. |
Supplier | Supplier | Yes | Supplier of a PaymentLink. |
PaymentProviderMethods | PaymentProviderMethod[] | Yes | An array of payment provider methods available in the checkout. |
CheckoutCancelUrl | string | No | Customer gets redirected here when canceling a checkout. |
CheckoutSuccessUrl | string | No | Customer gets redirected here when completed a checkout successfully. |
CheckoutUrl | string | No | The url to the checkout (should only be set if building a custom checkout). |
DeliveryAdress | Adress | No | Adress for delivery. |
InvoiceAdress | Adress | No | Invoice adress for the payment. |
LogoImageLink | string | No | An url to a png image to view on the invoice and receipt. The image dimensions shouls be aproxomatly 3:1 for the best fit. |
PaymentLinkStatusCallbackUrl | string | No | The callback which gets triggerd when a payment link status is changed. |
Metadata | Dictionary<string, dynamic> | No | Custom metadata for a PaymentLink. |
Usage
new CreatePaymentLinkRequest
(
orderId,
CurrencyEnum.SEK,
customer,
dueDate,
Locale.Swedish,
new Item[]
{
new Item("Hawaii Pizza", merchantID, 7000, 2, SwedishVat.Vat12)
},
supplier,
new PaymentProviderMethod[]
{
swishMcommmerce,
billmate
}
);
Customer
Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Shared.V1
Property | Type | Requierd | Description |
---|---|---|---|
FirstName | string | Yes | First name of the Customer intended to pay the PaymentLink. |
LastName | string | Yes | Last name of the Customer intended to pay the PaymentLink. |
string | No | Email of the Customer intended to pay the PaymentLink. | |
Phone | string | No | Phone number of the Customer intended to pay the PaymentLink. |
Refrence | string | no | A reference Customer intended to pay the PaymentLink. |
Usage
new Customer("Elon", "Musk");
Distribution
Namespace: PingPayments.KYC.Shared
Property | Type | Required | Description |
---|---|---|---|
EmailOptions | EmailOptions | Yes | Options for email distribution |
SmsOptions | SmsOptions | Yes | Options for sms distribution |
Usage
new Distribution()
{
EmailOptions = emailOption,
SmsOption = smsOptions
};
EmailOptions
Namespace: PingPayments.KYC.Shared
Usage
new EmailOptions()
{
Distribute = true,
Originator = "originator"
};
SmsOptions
Namespace: PingPayments.KYC.Shared
Usage
new EmailOptions()
{
Distribute = true,
Message = "message"
Originator = "originator"
};
File
Namespace: PingPayments.KYC.Shared
Usage
new File
{
Content = "JVBERi0yLjAKJbq63toKMSAwIG9iajw8L1R5cGUvQ2F0YWxvZy9QYWdlcyAyIDAgUi9NZXRhZGF0YSAxM...nR4cmVmCjE5MTM2CiUlRU9G",
ContentType = "application/pdf;base64",
Name = "file.pdf"
};
GetKycRequest
Namespace: PingPayments.KYC.Merchant.V1.Get
If
MerchantId
is provided,PageSize
andPage
will get overwritten
Usage
new GetKycRequest(merchantId);
InitiatePaymentRequest
Namespace: PingPayments.PaymentsApi.Payments.V1.Initiate.Request
Property | Type | Requierd | Description |
---|---|---|---|
Currency | CurrencyEnum | Yes | Currency used for payment. |
TotalAmount | int | Yes | Total amount in minor currency unit. |
OrderItems | OrderItem[] | Yes | An array of OrderItems. |
Provider | ProviderEnum | Yes | The provider used for the payment. |
Method | MethodEnum | Yes | The method used for the payment. |
ProviderMethodParameters | ProviderMethodParameters | Yes | Parameters for the combination of ProviderEnum and MethodEnum. |
StatusCallbackUrl | Uri | No | Callback where the Tenant will get payment updates through HTTP. |
Metadata | Dictionary<string, dynamic> | No | Custom metadata for payment. |
Usage
new InitiatePaymentRequest
(
CurrencyEnum.SEK,
1000,
new OrderItem[]
{
new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
},
ProviderEnum.dummy,
MethodEnum.dummy,
new DummyProviderMethodParameters(PaymentStatusEnum.COMPLETE),
new Uri(CallbackUrl)
);
InitiateSessionRequest
Namespace: PingPayments.KYC.Session.V1.Initiate
Usage
new InitiateSessionRequest("[email protected]", "0700000000", "0000000000");
Item
Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Shared.V1
Usage
new Item("Hawaii Pizza", merchantId, 100, 2, SwedishVat.Vat12);
KycVerificationRequest
Namespace: PingPayments.KYC.Merchant.V1.Verification
Property | Type | Required | Description |
---|---|---|---|
BankAccount | BankAccount | Yes | Bank account information |
Country | string | Yes | Merchants country ofs residence |
string | Yes | Email of merchant | |
MerchantId | Guid | Yes | Id of a merchant |
Name | string | Yes | Name of merchant |
Phone | string | Yes | Phone number of merchant |
Type | LegalEntityTypeEnum | Yes | Legal entity type |
Files | File[] | No | Array of files for the verification |
PersonData | PersonData | No | Data for person |
OrganizationData | OrganizationData | No | Data for an organization |
Metadata | Dictionary<string, dynamic> | No | Metadata |
Questions | Dictionary<string, string> | No | Key value pair question and answers |
Usage
new KycVerificationRequest
(
bankAccount,
"SE",
"[email protected]",
merchantId,
"Svante",
"0705555555",
LegalEntityTypeEnum.person,
personData: personData
);
Organization
Namespace: PingPayments.PaymentsApi.Merchants.Shared.V1
Property | Type | Required | Description |
---|---|---|---|
Country | string | Yes | Country where a Merchant Is located given in 2 letters, and follows the ISO codes (alpha-2) as described in the ISO 3166 international standard. For example Swedens ISO code is "SE". |
NoOrganizationNumber | string | Yes, if Country property is "NO". | Number of a Norwegian organization (9 digits). |
SeOrganizationNumber | string | Yes, if Country property is "SE". | Number of a Swedish organization (10 digits). |
Usage
new Organization
{
Country = "SE",
SeOrganizationNumber = "1234567890"
};
OrganizationData
Namespace: PingPayments.KYC.Shared
Property | Type | Required | Description |
---|---|---|---|
Identity | string | Yes | Organization identity number |
Usage
new OrganizationData("000000000");
OrderItem
Namespace: PingPayments.PaymentsApi.Payments.Shared.V1
Property | Type | Required | Description |
---|---|---|---|
Amount | int | Yes | Cost of the item in minor currency units (eg. Ăśre for SEK). |
Name | string | Yes | Item name. |
Vat | decimal | Yes | The vat percentage. |
MerchantId | Guid | Yes | Id of a merchant. |
Metadata | Dictionary<string, dynamic> | No | Custom metadata for order item. |
Usage
new OrderItem
(
500,
"Name of OrderItem",
Swedish.Vat25,
merchantId,
metadata
);
PaymentProviderMethod
Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Shared.V1
Property | Type | Requierd | Description |
---|---|---|---|
Method | MethodEnum | Yes | Payment method. |
Provider | ProviderEnum | Yes | Payment method provider. |
Parameters | Dictionary<string, dynamic> | Depends on provider and the method. | Parameters for making a payment. |
It is recommended to use the helper class CreatePaymentProviderMethod for implementation of the type PaymentProviderMethod.
Usage
new PaymentProviderMethod
(
MethodEnum.card,
ProviderEnum.payment_iq
);
Person
Namespace: PingPayments.PaymentsApi.Merchants.Shared.V1
Usage
new Person
{
Country = "SE",
SePersonalIdentityNumber = "197709065566"
};
PersonData
Namespace: PingPayments.KYC.Shared
Property | Type | Required | Description |
---|---|---|---|
Birthdate | string | Yes | Birthdate |
Firstname | string | Yes | Firstname of the person |
Lastname | string | Yes | Lastname of the person |
Gender | GenderEnum | Yes | Gender of the person |
Identity | string | Yes | Person identity number |
Usage
new PersonData
(
"1985-12-24",
"Svante",
"Larsson",
GenderEnum.Male,
identityNumber,
);
ProviderMethodParameters
Namespace: PingPayments.PaymentsApi.Payments.V1.Initiate.Request
Billmate
Property | Type | Required | Description |
---|---|---|---|
FirstName | string | Yes | Payer first name |
LastName | string | Yes | Payer last name |
NationalIdNumber | string | Yes | Payer national ID number |
string | Yes | Payer email adress | |
PhoneNumber | string | Yes | Payer phone number |
Country | string | Yes | Payer country of residence given in 2 letters, and follows the ISO codes (alpha-2) as described in the ISO 3166 international standard. For example Swedens ISO code is "SE". |
IpAdress | string | Yes | IP address of the device that the payment is being made from |
CustomerReference | string | Yes | Customer reference |
IsCompanyCustomer | boolean | Yes | Whether or not the payer is paying as a company |
Usage
new BillmateProviderMethodParameters
(
"firstname",
"lastname",
"[email protected]",
"national id number",
"07X-XXX XX XX",
"SE",
"ip adress",
"reference",
true
);
Dummy
Exists only in sandbox envorinment
Containing | Type | Required | Description |
---|---|---|---|
DesiredPaymentStatus | PaymentStatusEnum | Yes | Desired payment status |
Usage
new DummyProviderMethodParameters(PaymentStatusEnum.COMPLETED);
PaymentIq
Usage
new PaymentIqProviderMethodParameters
(
new Uri(sucessUrl)
new Uri(cancelUrl)
"sv-se"
);
Swish E-Commerce
Usage
new SwishECommerceProviderMethodParameters
(
"Example text",
"07X-XXX XX XX"
);
Swish M-Commerce
Property | Type | Required | Description |
---|---|---|---|
Message | string | Yes | Message associated with the payment. Made available to the payee |
SwishQrCode | SwishQrCode | No | Object containing parameters regarding a qr code for a swish paymen |
Usage
new SwishMCommerceProviderMethodParameters
(
"Example text",
new SwishQrCode()
);
PingDepositParameters
Namespace: PingPayments.PaymentsApi.Payments.V1.Initiate.Request
Property | Type | Required | Description |
---|---|---|---|
ReferenceType | ReferenceTypeEnum | Yes | Reference type |
DesiredDateOfPayment | DateTimeOffset | No | Desired date of payment |
ReuseReference | string | No | Reference to an already completed deposit payment |
CompleteWhenFunded | bool | No | If this parameter is set to false, the payment status will not change to COMPLETED when the payment funds matches the total amount, the payment status will instead remain at status FUNDED. The deafult value of this parameter is set to true |
Usage
new PingDepositParameters
(
ReferenceTypeEnum.OCR,
DateTimeOffset.Now.AddMonths(1),
"reference number",
false
);
EmptyParameters
Namespace: PingPayments.PaymentsApi.Payments.V1.Initiate.Request
Usage
new EmptyProviderMethodParameters();
EmptyProviderMethodParameters is used when using credit as payment method
Supplier
Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Shared.V1
Usage
new Supplier("Supplier name");
SendPaymentLinkRequestBody
Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Send.V1.Requests
Property | Type | Requierd | Description |
---|---|---|---|
string | Yes, if Method property contains email. | Payers email adress. | |
Phone | string | Yes, if Method property contains sms. | Phone number of payer |
Method | DistributeMethodEnum[] | Yes | An array of DistributeMethodEnum. |
It is recommended to use the helper class DistributeMethod for implementation of the type SendPaymentLinkRequestBody.
Usage
new SendPaymentLinkRequestBody
(
"[email protected]",
"0705555555",
new DistributeMethodEnum[]
{
DistributeMethodEnum.email,
DistributeMethodEnum.sms
}
);
Style
Namespace: PingPayments.KYC.Shared
Property | Type | Required | Description |
---|---|---|---|
BackgroundColor | string | No | Background color of the page, given in hex color codes. |
FormBackgroundColor | string | No | Background color for the form, given in hex color codes. |
Primary | string | No | Primary color, buttons, progressbar and accents will be this color, given in hex color codes. |
Usage
new Style("#000000", "#000000", "#000000");
SwishQrCode
Namespace: PingPayments.PaymentsApi.Payments.V1.Initiate.Request
Property | Type | Required | Default | Description |
---|---|---|---|---|
Format | SwishQrCodeFormat | No | transparent_svg | QR code image format |
Border | int | No | 1 | QR code image border size in pixels |
Size | int | No | 300 | QR code image size in pixels |
Usage
new SwishQrCode();
Redirects
Namespace: PingPayments.KYC.Shared
Usage
new IntiateSessionRequest("www.somesite.se", "www.somesite.se", "www.somesite.se");
UpdatePaymentRequest
Namespace: PingPayments.PaymentsApi.Payments.Update.V1
Property | Type | Required | Description |
---|---|---|---|
OrderItems | OrderItem[] | Yes | Array of order items |
Usage
new UpdatePaymentRequest(OrderItemsArray);
UpdateTenantRequest
Namespace: PingPayments.PaymentsApi.Tenants.Update.V1
Usage
new UpdateTenantRequest(creditAccountTopUpCallbackUrl, merchantStatusCallbackUrl);
Updated about 2 months ago