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

SEKSwedish krona (SEK)
NOKNorwegian krone (NOK)
EUREuropean euro (EUR)
GBPBrittish pound (GBP)
DKKDanish 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

smsDistributed via SMS
emailDistributed 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-commerceUsed in combination with the Swish provider.
M-commerceUsed in combination with the Swish provider.
cardUsed in combination with the Payment Iq providers.
invoiceUsed in combination with the billmate provider.
autogiroUsed in combination with the Bankgirot provider.
VippsUsed in combination with the Payment Iq provider.
depositUsed in combination with the Ping provider.
creditUsed in combination with the Ping provider.
dummyUsed in combination with the Dummy provider.
bank_loanUsed 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

INITIATEDPayment is initiated and Ping starts sending status updates
PENDINGPayment awaits the next action
DECLINEDPayment could not be processed
CRASHEDPayment caused an unexpected error
COMPLETEDSuccessful payment
EXPIREDPayment timed out
ABORTEDPayment was canceled by payer
OVERFUNDEDPayment has been overfunded
UNDERFUNDEDPayment has been underfunded
FUNDEDPayment 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

SwishUsed in combination with the e_commerce and m_commerce methods.
billmateUsed in combination with the invoice method.
BankgirotUsed in combination with the autogiro method.
payment_iqUsed in combination with the card and vipps methods.
pingUsed in combination with the deposit method.
dummyUsed in combination with the dummy method.
baaseUsed 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

OCROCR (Optical Character Recognition) used on the Swedish market.
KIDKID (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

CREATEDMerchant has just been created
APPROVEDMerchant has been approved
DENIEDMerhcant has been denied
PENDINGMerchants 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

instantDeposit gets processed instantly
simulatedDeposit 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

ParametersTypeRequiredDescription
orderItemsOrderItem[]YesArray of OrderItems.
firstName stringYesPayer first name
lastName stringYesPayer last name
nationalIdNumber stringYesPayer national ID number
email stringYesPayer email adress
phoneNumber stringYesPayer phone number
country stringYesPayer 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 stringYesIP address of the device that the payment is being made from
customerReference stringYesCustomer reference
isCompanyCustomer booleanYesWhether or not the payer is paying as a company
statusCallbackUrl UriNoCallback where the Tenant will get payment updates through HTTP.
metadata Dictionary<string, dynamic>NoCustom 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

ParamatersTypeRequiredDescription
currencyCurrencyEnumYesCurrency used for payment.
orderItemsOrderItem[]YesArray of OrderItems.
statusCallbackUrlUriNoCallback where the Tenant will get payment updates through HTTP.
desiredPaymentStatusPaymentStatusEnumNoDesired payment status
metadata Dictionary<string, dynamic>NoCustom metadata for payment.
CreatePayment.Dummy.New
(
  CurrencyEnum.SEK,
  new OrderItem[]
  {
    new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
  },
  statusCallbackUrl,
  PaymentStatusEnum.COMPLETED
);

Bankgirot

Autogiro

ParamatersTypeRequiredDescription
orderItemsOrderItem[]YesArray of OrderItems.
mandateId stringYesPing Payments Autogiro mandate ID
statusCallbackUrlUriNoCallback where the Tenant will get payment updates through HTTP.
metadata Dictionary<string, dynamic>NoCustom metadata for payment.
CreatePayment.Bankgirot.Autogiro
(
  new OrderItem[]
  {
    new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
  },
  mandateId,
  statusCallbackUrl,
  metadata
);

PaymentIq

Card

ParamatersTypeRequiredDescription
currencyCurrencyEnumYesCurrency used for payment.
orderItemsOrderItem[]YesArray of OrderItems.
successUrl UriYesURL to which the user is directed at the end of a successful payment
cancelUrl UriYesURL to which the user is directed if the payment fails
statusCallbackUrl UriNoCallback where the Tenant will get payment updates through HTTP.
locale stringNoDefault: "en-us". Locale to use for localizing the Payment IQ Cashier UI
metadata Dictionary<string, dynamic>NoCustom metadata for payment.
CreatePayment.PaymentIq.Card
(
  CurrencyEnum.SEK,
  new OrderItem[]
  {
    new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
  },
  successUrl,
  cancelUrl,
  statusCallbackUrl
);

Vipps

ParamatersTypeRequiredDescription
orderItemsOrderItem[]YesArray of OrderItems.
successUrl UriYesURL to which the user is directed at the end of a successful payment
cancelUrl UriYesURL to which the user is directed if the payment fails
statusCallbackUrl UriNoCallback where the Tenant will get payment updates through HTTP.
locale stringNoDefault: "en-us". Locale to use for localizing the Payment IQ Cashier UI
metadata Dictionary<string, dynamic>NoCustom metadata for payment
CreatePayment.PaymentIq.Vipps
(
  new OrderItem[]
  {
    new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
  },
  successUrl,
  cancelUrl,
  statusCallbackUrl
);

Swish

Ecommerce

ParamatersTypeRequiredDescription
orderItemsOrderItem[]YesArray of OrderItems.
phoneNumber stringYesSwish-connected phone number of payer
message stringYesMessage associated with the payment. Made available to the payee
statusCallbackUrl UriNoCallback where the Tenant will get payment updates through HTTP.
metadata Dictionary<string, dynamic>NoCustom metadata for payment.
CreatePayment.Swish.Ecommerce
(
  new OrderItem[]
  {
    new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
  },
  phoneNumber,
  "message",
  statusCallbackUrl
);

Mcommerce

ParamatersTypeRequiredDescription
orderItemsOrderItem[]YesArray of OrderItems.
message stringYesMessage associated with the payment. Made available to the payee
statusCallbackUrl UriNoCallback where the Tenant will get payment updates through HTTP.
swishQrCodeSwishQrCodeNoObject containing parameters regarding a qr code for a swish paymen
metadata Dictionary<string, dynamic>NoCustom metadata for payment.
CreatePayment.Swish.Mcommerce
(
  new OrderItem[]
  {
    new OrderItem(500, "OrderItem", SwedishVat.Vat25, MerchantId),
  },
  "message",
  statusCallbackUrl
);

PingDeposit

Ocr

ParamatersTypeRequiredDescription
currencyCurrencyEnumYesCurrency used for deposit.
orderItemsOrderItem[]YesArray of OrderItems.
desiredDateOfPaymentDateTimeOffsetNoDesired date of payment
statusCallbackUrl UriNoCallback where the Tenant will get payment updates through HTTP.s
metadata Dictionary<string, dynamic>NoCustom metadata for deposit.
reuseReference stringNoReference to an already completed deposit payment
completeWhenFunded boolNoIf 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

ParamatersTypeRequiredDescription
currencyCurrencyEnumYesCurrency used for deposit.
orderItemsOrderItem[]YesArray of OrderItems.
desiredDateOfPaymentDateTimeOffsetNoDesired date of payment
statusCallbackUrl UriNoCallback where the Tenant will get payment updates through HTTP.s
metadata Dictionary<string, dynamic>NoCustom metadata for deposit.
reuseReference stringNoReference to an already completed deposit payment
completeWhenFunded boolNoIf 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

ParamatersTypeRequiredDescription
currencyCurrencyEnumYesCurrency used for payment.
orderItemsOrderItem[]YesArray of OrderItems.
statusCallbackUrl UriNoCallback where the Tenant will get payment updates through HTTP.
metadata Dictionary<string, dynamic>NoCustom 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

BillmateThrough the Billmate provider, the payment method Invoice is possible.
Payment IqThrough the Payment Iq provider, the payment methods Card and Vipps are possible.
SwishThrough 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

EmailWhen you want to send a Payment Link via email.
SmsWhen you want to send a Payment Link via sms.
SmsAndEmailWhen 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

SwedishThis will determine swedish as the language on the receipt/invoice and in the checkout.
NorwegianThis 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

Standard25All other taxable goods and services.
Reduced15Food and beverages.
Reduced11Point1Supply of raw fish.
Reduced6Certain cultural and sporting activities; transport services.
ZeroE-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

Vat25General tax rate, which applies to most goods and services.
Vat12Charged on food, hotels, and artists' own sales of works of art.
Vat6Applies to newspapers, magazines, books, concerts and passenger transport (taxis, buses, flights and trains) in Sweden.
ZeroApplies 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

PropertyTypeRequierdDescription
City stringYesCity of the adress.
StreetAdress stringYesStreet adress.
Zip stringYesZip code.

Usage

new Adress("Örebro", "Signalgatan 7", "702 25"); 

AisMerchantRequest

Namespace: PingPayments.KYC.Merchant.V1.AIS

PropertyTypeRequiredDescription
Country stringYesCountry of merchant
MerchantId GuidNoId of a merchant
DistributionDistributionNoWay of distribution
Email stringNoEmail of merchant
PhoneNumber stringNoPhone number of merchant
PsuId stringNopsu Id of merchant
RedirectsRedirectsNoObject of redirect urls
StyleStyleNoStyle options

Usage

 new AisMerchantRequest
 (
   "SE",
   merchantId
   distributionObj,
   "[email protected]",
   "0701231212",
   "199611015676",
   redirects,
   style
 );

BankAccount

Namespace: PingPayments.KYC.Shared

PropertyTypeRequiredDescription
Bic stringYesISO 9362 Business Identifier Code
Iban stringYesBank account number (IBAN)
Bban stringYesAccount number
Clearing stringYesClearing number
Bankgiro stringNoBankgiro number
Plusgiro stringNoPlusgiro number

Usage

new BankAccount
{
  Bic = "NDEASESS",
  Iban = "SE7280000810340009783242",
  Bban = "41971150033",
  Clearing = "6985",
  Plusgiro = "12345678",
  Bankgiro = "87654321"
 };

CreateDepositRequest

Namespace: PingPayments.Mimic.Deposit.Create.V1

PropertyTypeRequiredDescription
Amount intYesAmount to be payed
CurrencyCurrencyEnumYesCurrency of the payment
ReferenceTypeReferenceTypeEnumYesReference type
Reference stringYesReference of the payment
Iban stringNoIBAN of the target account, only necessary if simulating a deposit payment
TypeProcesseTypeEnumNoHow the deposit should be processed

Usage

new CreateDepositRequest(1000, CurrencyEnum.SEK, ReferenceTypeEnum.KID, "reference");

CreateInvoiceRequest

Namespace: PingPayments.PaymentLinksApi.Files.Invoice.Create.V1

PropertyTypeRequiredDescription
ReferenceTypeReferenceTypeEnumYesReference type the end user will use to pay the invoice.
DokumentName stringNoName of the document.

Usage

new CreateInvoiceRequest(ReferenceTypeEnum.KID);

CreateMerchantRequest

Namespace: PingPayments.PaymentsApi.Merchants.Create.V1

PropertyTypeRequiredDescription
Name stringYesName of the Merchant.
OrganizationOgranizationNoOrganization object.
PersonPersonNoPerson object.

Usage

new CreateMerchantRequest
{
    Name = "test merchant AB",
    Organization = new Organization
    {
        Country = "SE",
        SeOrganizationNumber = "1234567890"
    }
};

CreatePaymentOrderRequest

Namespace: PingPayments.PaymentsApi.PaymentOrders.Create.V1

PropertyTypeRequiredDescription
CurrencyCurrencyEnumYesEnum: SEK, NOK. Payments connected to a payment order must have the same currency as the payment order.
SplitParamters dynamicNoParameters used to control parts of the Split Tree.
SplitTreeId GuidNoId of a specific Split Tree.

Usage

new CreatePaymentOrderRequest(CurrencyEnum.SEK);

CreatePaymentLinkRequest

Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Create.V1.Request

PropertyTypeRequierdDescription
SplitTreeId GuidNoId of a specific split tree.
CurrencyCurrencyEnumYesThe currency which the amounts is given in.
CustomerCustomerYesCustomer intended to pay the PaymentLink.
DueDate stringYesThe expiration date of the PaymentLink.
Locale stringYesThe language used for the invoice. This will determin the language on the receipt/invoice and in the checkout.
ItemsItem[]YesAn array of Items inclueded in the PaymentLink.
SupplierSupplierYesSupplier of a PaymentLink.
PaymentProviderMethodsPaymentProviderMethod[]YesAn array of payment provider methods available in the checkout.
CheckoutCancelUrl stringNoCustomer gets redirected here when canceling a checkout.
CheckoutSuccessUrl stringNoCustomer gets redirected here when completed a checkout successfully.
CheckoutUrl stringNoThe url to the checkout (should only be set if building a custom checkout).
DeliveryAdressAdressNoAdress for delivery.
InvoiceAdressAdressNoInvoice adress for the payment.
LogoImageLink stringNoAn 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 stringNoThe callback which gets triggerd when a payment link status is changed.
Metadata Dictionary<string, dynamic>NoCustom 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

PropertyTypeRequierdDescription
FirstName stringYesFirst name of the Customer intended to pay the PaymentLink.
LastName stringYesLast name of the Customer intended to pay the PaymentLink.
Email stringNoEmail of the Customer intended to pay the PaymentLink.
Phone stringNoPhone number of the Customer intended to pay the PaymentLink.
Refrence stringnoA reference Customer intended to pay the PaymentLink.

Usage

new Customer("Elon", "Musk");

Distribution

Namespace: PingPayments.KYC.Shared

PropertyTypeRequiredDescription
EmailOptionsEmailOptionsYesOptions for email distribution
SmsOptionsSmsOptionsYesOptions for sms distribution

Usage

new Distribution()
{
  EmailOptions = emailOption, 
  SmsOption = smsOptions
};

EmailOptions

Namespace: PingPayments.KYC.Shared

PropertyTypeRequiredDescription
Distribute booleanYesDistribute email or not
Originator# stringYesOriginator of the email

Usage

new EmailOptions()
{
  Distribute = true, 
  Originator = "originator"
};

SmsOptions

Namespace: PingPayments.KYC.Shared

PropertyTypeRequiredDescription
Distribute booleanYesDistribute email or not
Message stringYesMessage to be sent. Url will replace $url in the message
Originator stringYesOriginator of the email

Usage

new EmailOptions()
{
  Distribute = true, 
  Message = "message"
  Originator = "originator"
};


File

Namespace: PingPayments.KYC.Shared

PropertyTypeRequierdDescription
Content stringYesFile contents
ContentType stringYesFile content type
Name stringYesFilename

Usage

new File
{
  Content = "JVBERi0yLjAKJbq63toKMSAwIG9iajw8L1R5cGUvQ2F0YWxvZy9QYWdlcyAyIDAgUi9NZXRhZGF0YSAxM...nR4cmVmCjE5MTM2CiUlRU9G",
  ContentType = "application/pdf;base64",
  Name = "file.pdf"
};

GetKycRequest

Namespace: PingPayments.KYC.Merchant.V1.Get

PropertyTypeRequiredDescription
PageSize intNoNumber of elements per page
Page intNoNumber of the page
MerchantId GuidNoId of a merchant

🚧

If MerchantId is provided, PageSize and Page will get overwritten

Usage

 new GetKycRequest(merchantId);

InitiatePaymentRequest

Namespace: PingPayments.PaymentsApi.Payments.V1.Initiate.Request

PropertyTypeRequierdDescription
CurrencyCurrencyEnumYesCurrency used for payment.
TotalAmount intYesTotal amount in minor currency unit.
OrderItemsOrderItem[]YesAn array of OrderItems.
ProviderProviderEnumYesThe provider used for the payment.
MethodMethodEnumYesThe method used for the payment.
ProviderMethodParametersProviderMethodParametersYesParameters for the combination of ProviderEnum and MethodEnum.
StatusCallbackUrl UriNoCallback where the Tenant will get payment updates through HTTP.
Metadata Dictionary<string, dynamic>NoCustom 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

PropertyTypeRequiredDescription
Email stringYesEmail of the one to perform the KYC
Phone stringYesPhone number of the one to perform the KYC
PsuId stringYesEither a social security number or a organization number
RedirectsRedirectsNoURL redirections
StyleStyleNoStyle for for the KYC session layout

Usage

new InitiateSessionRequest("[email protected]", "0700000000", "0000000000");

Item

Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Shared.V1

PropertyTypeRequierdDescription
Description stringYesA description of the Item.
MerchantId GuidYesMerchant Id.
Price intYesPrice of the item.
Quantity intYesQuantity of the Item.
Vat decimalYesThe vat percentage.
ItemNumber stringNoItem identifier.
Unit stringNoThe unit of the Item, deafult "st".

Usage

new Item("Hawaii Pizza", merchantId, 100, 2, SwedishVat.Vat12);

KycVerificationRequest

Namespace: PingPayments.KYC.Merchant.V1.Verification

PropertyTypeRequiredDescription
BankAccountBankAccountYesBank account information
Country stringYesMerchants country ofs residence
Email stringYesEmail of merchant
MerchantId GuidYesId of a merchant
Name stringYesName of merchant
Phone stringYesPhone number of merchant
TypeLegalEntityTypeEnumYesLegal entity type
FilesFile[]NoArray of files for the verification
PersonDataPersonDataNoData for person
OrganizationDataOrganizationDataNoData for an organization
Metadata Dictionary<string, dynamic>NoMetadata
Questions Dictionary<string, string>NoKey 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

PropertyTypeRequiredDescription
Country stringYesCountry 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 stringYes, if Country property is "NO".Number of a Norwegian organization (9 digits).
SeOrganizationNumber stringYes, if Country property is "SE".Number of a Swedish organization (10 digits).

Usage

new Organization
{
    Country = "SE",
    SeOrganizationNumber = "1234567890"
};

OrganizationData

Namespace: PingPayments.KYC.Shared

PropertyTypeRequiredDescription
Identity stringYesOrganization identity number

Usage

 new OrganizationData("000000000");

OrderItem

Namespace: PingPayments.PaymentsApi.Payments.Shared.V1

PropertyTypeRequiredDescription
Amount intYesCost of the item in minor currency units (eg. öre for SEK).
Name stringYesItem name.
Vat decimalYesThe vat percentage.
MerchantId GuidYesId of a merchant.
Metadata Dictionary<string, dynamic>NoCustom metadata for order item.

Usage

new OrderItem
(
    500,
    "Name of OrderItem",
    Swedish.Vat25,
    merchantId,
    metadata
);

PaymentProviderMethod

Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Shared.V1

PropertyTypeRequierdDescription
MethodMethodEnumYesPayment method.
ProviderProviderEnumYesPayment 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

PropertyTypeRequiredDescription
Country stringYesA string that represents the two-letter ISO 3166-2 country code of which the person is a citizen of or resides in.
SePersonalIdentityNumber stringNoSwedish personal identity number.

Usage

 new Person
 {
   Country = "SE",
   SePersonalIdentityNumber = "197709065566"
 };

PersonData

Namespace: PingPayments.KYC.Shared

PropertyTypeRequiredDescription
Birthdate stringYesBirthdate
Firstname stringYesFirstname of the person
Lastname stringYesLastname of the person
GenderGenderEnumYesGender of the person
Identity stringYesPerson identity number

Usage

 new PersonData
 (
   "1985-12-24",
   "Svante",
   "Larsson",
   GenderEnum.Male,
   identityNumber,
 );

ProviderMethodParameters

Namespace: PingPayments.PaymentsApi.Payments.V1.Initiate.Request

Billmate

PropertyTypeRequiredDescription
FirstName stringYesPayer first name
LastName stringYesPayer last name
NationalIdNumber stringYesPayer national ID number
Email stringYesPayer email adress
PhoneNumber stringYesPayer phone number
Country stringYesPayer 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 stringYesIP address of the device that the payment is being made from
CustomerReference stringYesCustomer reference
IsCompanyCustomer booleanYesWhether 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

ContainingTypeRequiredDescription
DesiredPaymentStatusPaymentStatusEnumYesDesired payment status

Usage

new DummyProviderMethodParameters(PaymentStatusEnum.COMPLETED);

PaymentIq

PropertyTypeRequiredDescription
SuccessUrl UriYesURL to which the user is directed at the end of a successful payment
ErrorUrl UriYesURL to which the user is directed if the payment fails
Locale stringNoDefault: "en-us". Locale to use for localizing the Payment IQ Cashier UI

Usage

new PaymentIqProviderMethodParameters
(
    new Uri(sucessUrl)
    new Uri(cancelUrl)
    "sv-se"
);

Swish E-Commerce

PropertyTypeRequiredDescription
Message stringYesMessage associated with the payment. Made available to the payee
PhoneNumber stringYesSwish-connected phone number of payer

Usage

new SwishECommerceProviderMethodParameters
(
    "Example text",
    "07X-XXX XX XX"
);

Swish M-Commerce

PropertyTypeRequiredDescription
Message stringYesMessage associated with the payment. Made available to the payee
SwishQrCodeSwishQrCodeNoObject 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

PropertyTypeRequiredDescription
ReferenceTypeReferenceTypeEnumYesReference type
DesiredDateOfPaymentDateTimeOffsetNoDesired date of payment
ReuseReference stringNoReference to an already completed deposit payment
CompleteWhenFunded boolNoIf 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

PropertyTypeRequierdDescription
Name stringYesName of the supplier.
City stringNoCity where the supplier is located.
OrganizationNumber stringNoOrganization number of the supplier.
Website stringNoWebbsite associated with the supplier.
Zip stringNoZip code for the supplier.

Usage

new Supplier("Supplier name");

SendPaymentLinkRequestBody

Namespace: PingPayments.PaymentLinksApi.PaymentLinks.Send.V1.Requests

PropertyTypeRequierdDescription
Email stringYes, if Method property contains email.Payers email adress.
Phone stringYes, if Method property contains sms.Phone number of payer
MethodDistributeMethodEnum[]YesAn 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

PropertyTypeRequiredDescription
BackgroundColor stringNoBackground color of the page, given in hex color codes.
FormBackgroundColor stringNoBackground color for the form, given in hex color codes.
Primary stringNoPrimary 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

PropertyTypeRequiredDefaultDescription
FormatSwishQrCodeFormatNotransparent_svgQR code image format
Border intNo1QR code image border size in pixels
Size intNo300QR code image size in pixels

Usage

 new SwishQrCode();

Redirects

Namespace: PingPayments.KYC.Shared

PropertyTypeRequiredDescription
CancelUrl UriNoUrl that the user will be redirected to upon cancellation
SuccessUrl UriNoUrl that the user will be redirected to after successful completion of the form
TimeoutUrl UriNoUrl that the user will be redirected to if the session timesout

Usage

new IntiateSessionRequest("www.somesite.se", "www.somesite.se", "www.somesite.se");

UpdatePaymentRequest

Namespace: PingPayments.PaymentsApi.Payments.Update.V1

PropertyTypeRequiredDescription
OrderItemsOrderItem[]YesArray of order items

Usage

 new UpdatePaymentRequest(OrderItemsArray);

UpdateTenantRequest

Namespace: PingPayments.PaymentsApi.Tenants.Update.V1

PropertyTypeRequiredDescription
CreditAccountTopUpCallbackUrl UriYesCallback url for top ups on credit account
MerchantStatusCallbackUrl UriYesCallback url for merchant status updates
DisbursementCallbackUrl UriNoCallback url for new disbursement updates

Usage

new UpdateTenantRequest(creditAccountTopUpCallbackUrl, merchantStatusCallbackUrl);