Plug and Pay Volledig
   Niet ingelogd, klik hier
TargetPay home TargetPay SEPA ready
Home iDEAL Bancontact SOFORT Banking Mobile Billing 0900 nummer Premium SMS Paysafecard


Plug and Pay Volledig

In een notendop...

De bestelprocedure bestaat uit 2 stappen, en begint zodra de eindgebruiker besluit om te betalen voor de content. Bijvooboorbeeld door te klikken op "Nu kopen". De laatste stap is het valideren van de betaling:



Hou er rekening mee dat TargetPay automatisch het land van afkomst selecteerd op basis van het IP-adres, van de eindgebruiker. Deze methode is 99,9% accuraat.

Wanneer u gebruik wilt maken van iDEAL (alleen in Nederland) moet u de eindgebruiker vragen welke bank deze wilt gebruiken, zie hoofdstuk 2 voor meer informatie.



Stap 1: Lijst met landen op vragen

1.1 Aanroep

De eerste stap is om een lijst met beschikbare landen en diensten op te vragen.

Roep de url aan met HTTP-GET:

https://www.targetpay.com/api/plugandpay

Met de volgende parameters kunt u de resultaten wat beïnvloeden:

Veld Formaat/mogelijke waarden Beschrijving Verplicht Standarad Voorbeeld
ip CHAR(16) IP address van eindgebruiker ja "62.69.179.205"
land "auto" of INT(3) of leeg Wanneer u informatie wilt hebben over een specifiek land, zet dan de variabelen naar de land code. Bijvoorbeeld 31 voor Nederland. Wanneer u voor auto kiest word het land bepaald aan de hand van het IP adres. no "auto" "31"
adult 0, 1 Filter op adult content(1=alleen landen waarin adult is verboden) no 0 1

Voorbeeld
https://www.targetpay.com/api/plugandpay?action=getcountries&ip=82.93.114.241&adult=1

1.2 Resultaat

Het resultaat zal er ongeveer zo uit zien:

id|name|currency|language|exchangerate|ivr|ivr_adult_allowed|ivr_min_amount|ivr_max_amount|ivr_std_tariff|ivr_std_ct|ivr_std_cd| ivr_std_tariff_ppm|sms|sms_adult_allowed|sms_min_amount|sms_max_amount|sms_std_amount|ideal|ideal_min_amount| ideal_max_amount|ideal_std_amount|wallie|wallie_min_amount|wallie_max_amount|wallie_std_amount 44|United Kingdom|£|en|0.9380|1|number|0.75|90.00|150|PM|112|150|1|number|0.25|5.00|1.50|0||| 41|Switzerland|CHF|de|1.5260|1|number|2.11|250.00|422|PM|30|422|0|||||0||| 31|Nederland|€|nl|1.0000|1|always|0.35|40.00|130|PC||80|1|always|0.25|6.00|2.00|1|0.84|10000.00|1.89 39|Italy|€|en|1.0000|1|number|0.65|75.00|129|PM|90|129|0|||||0||| 353|Ireland|€|en|1.0000|0|number|||||||1|never|0.60|2.50|2.00|0||| 49|Germany|€|de|1.0000|1|number|1.00|120.00|199|PM|45|199|0|||||0||| 33|France|€|fr|1.0000|1|number|1.35|1.35|135|PC|||0|||||0||| 32|België|€|nl|1.0000|1|number|0.50|90.00|150|PC||150|1|always|1.00|4.00|2.00|0||| 43|Austria|€|de|1.0000|1|number|1.00|130.00|216|PM|50|216|0|||||0||| 61|Australia|$|en|1.9675|0||||||||1|never|0.55|3.50|3.50|0|||

De eerste regel bestaat ui de headers(variabel) en elke lijn daaropvolgend is informatie specifiek per land.
  • id: Land code van het land
  • currency: Het valuta symbool
  • language: ISO land code
  • exchangerate: Wisselkoers voor lokale bedragen(lokaal/euros)
  • ivr: Is IVR/0900 ondersteund?
  • ivr_adult_allowed: is adult toegestaan voor IVR?
  • ivr_min_amount, ivr_max_amount: Het laagste en hoogste bedrag dat via IVR kan worden afgerekend
  • ivr_std_tariff, ivr_std_ct, ivr_std_cd: Voor elk land hebben wij een standaard prijsberekend, welke ongeveer uit komt op een euro uitbetaling.
  • ivr_std_tariff_ppm: Het hoogste beschikbare tarief voor IVR.
  • sms, sms_adult_allowed, sms_min_amount, sms_max_amount, sms_std_amount, ideal, ideal_min_amount, ideal_max_amount, ideal_std_amount, wallie, wallie_min_amount, wallie_max_amount, wallie_std_amount: same idea as the IVR equivalents


Step 2: Starten van de betaling

2.1 Aanroep

De tweede stap is het starten van de betaling. U kunt zoveel details mee geven. Meer details betekend meer controle. Uw applicatie zal meer onderhoud vergen. Als u TargetPay het bedrag doorgeeft wat er betaald moet worden, en er worden nieuwe landen toegevoegd, zullen deze worden meegenomen.

U roept opnieuw aan:

https://www.targetpay.com/api/plugandpay

Hou er rekening mee dat op verschillende manieren een betaling kunt afhandelen. Dit is niet verplicht. Als u 1 methode wilt afhandelen is dit ook mogelijk. Bijvoorbeeld wanneer u de eindgebruiker al heeft gevraagd hoe te willen betalen.

Veld Formaat/Mogelijke waarden Beschrijving Verplicht Standaard Voorbeeld
action "start" Start payment yes "start"
method "IVR", "SMS", "IDE", "WAL" or empty Should we try to start the payment on all available payment methods (empty) or allow only the specified one? no empty empty
ip CHAR(16) IP address of end-user yes 62.69.179.205
domain CHAR(64) Domain name of your website yes "www.tbforum.com"
rtlo INT (8) Layoutcode, see www.targetpay.nl/welcome yes 47688
country INT(3) or empty Country of the end-user or use "auto" to select the country that belongs to the specified IP address. Use the international dialing code. no empty 31
adult 0, 1 This is an adult service, show only the payment options where adult is allowed no 0 1
ivramount INT (4) or empty Amount to charge for IVR payment in Eurocents. Local currency will be converted to Euros before selecting the best payment option. You can also explicitly specify the calltype (Pay per Minute/Pay per Call), the tariff (e.g. 80 cents per minute) and duration of the call (e.g. 90 seconds). If no value is filled in here and no calltype/callduration/calltariff is specified we select the most common tariff for the country. This common tariff will equal approximately 1 euro payout ex. VAT. no empty 300 (=€ 3,-)
smsamount INT (4) or empty or "min" or "max" Identical but for SMS. Note that if no exact amount could be selected, the next (more expensive) amount will be returned. If you use "min" or "max" the minimum or maximum amounts will be selected for each country. no empty 150
idealamount INT (4) or empty Identical but for iDEAL (available only in the Netherlands) no empty 150
wallieamount INT (4) or empty Identical but for Wallie no empty 150
calltariff 80 Tariff in local currency (cents) no empty 80 (= € 0.80 / £ 0.80 / $ 0.80)
calltype "PC", "PM", "PU" PC = Pay per call, PM = Pay per Minute, PU = Per use* no empty PC
callduration INT (4) Duration of the call in seconds no empty 300
confirmurl CHAR (255) Confirm URL , see appendix A for pay-per-use (calltype=PU) empty http://
www.mysite.nl
/regpayment.php
idealbank CHAR (4) Code of the bank, selected by the end-user in a previous step. See appendix B for iDEAL 81
description CHAR (32) Description of the transaction, will be visible on the statements of the end-user. Include your own reference IDs ! for iDEAL, Wallie "Buy 1500 credits"
returnurl CHAR(255) After payment, where should the end-user be directed to? for iDEAL, Wallie http://
www.mysite.nl
/afterpayment.php


* Pay-Per-Minute en Pay-Per-User gebruiken beiden een per-minuut-lijn. Met een pay-per-minute staat de gespreksduur nog niet vast. * Pay-Per-Minute and Pay-Per-Use both use a per-minute-payline. .

Voorbeeld
https://www.targetpay.com/api/plugandpay?action=start&ip=62.69.179.205&domain=www.tbforum.com&rtlo=47688

2.2 Resultaat

Wanneer er een fout is ontstaan, zal het resultaat terugkomen als error code:

001 No RTLO
002 Invalid IP
003 No payment options for this country/price
007 No domain


Bij succes zal het resultaat er zo uit zien:

IVR|31|0909-0400609|637027|€ 1,30 per gesprek
SMS|31|3010|BETAAL AR|€ 2,00

De eerste 2 kolommen zijn altijd de betaal methode ( IVR of SMS) en de landcode. De kolommen daarna hangen af van de betalingsmethode.:
  • Premium Rate Numbers (090x billing)
    • payline => Vraag de eindgebruiker om dit nummer te bellen...
    • paycode => ... en om deze code in te voeren in de telefoon.
    • cost information => Het is verplicht om het tarief te vermelden naast het nummer.

    Voorbeeld:


  • Premium SMS
    • shortcode => Vraag de eindgebruiker om een SMS te sturen naar dit nummer
    • keyword => Met dit keyword
    • cost information => Het is verplicht om het tarief te vermelden naast de shortcode!
    • Extra rules for Australia => vermeld het lokale support nummer "1800-246803"

    Voorbeeld:


  • iDEAL en Wallie
    • txid => Transaction ID
    • URL => Stuur de gebruiker naar deze url, waar hij de betaling kan afronden.

    Voorbeeld:




3. Check de betaling status

3.1 Aanroep

Wanneer de gebruiker het 0909 nummer heeft gebeld, of een code heeft verstuurd via Premium SMS, kunnen we de betaling gaan valideren. Als de gebruiker was doorgestuurd naar iDEAL, zal hij terug gestuurd worden naar de aangegeven "return URL", waarna u kunt kijken of er betaald is.

U roept weer aan:

https://www.targetpay.com/api/plugandpay

De meeste parameters zijn afhankelijk van de gekozen methode:

Veld Formaat/mogelijke waarden Beschrijving Verplicht Standaard Voorbeeld
action "check" Check payment yes "check"
method "IVR", "SMS", "IDE", "WAL" Payment method in use yes "IVR"
ip CHAR(16) IP address of end-user yes 62.69.179.205
domain CHAR(64) Domain name of your website yes "www.tbforum.com"
rtlo INT (8) Layoutcode, see www.targetpay.nl/welcome yes 47688
country INT(3) or empty Country of the end-user or use "auto" to select the country that belongs to the specified IP address. Use the international dialing code. no empty 31
payline CHAR(64) Payline, as returned by start payment for IVR 0900-2070207
paycode CHAR(6) Paycode as returned by start payment (IVR) or as entered by the end-user (SMS) for IVR and SMS 1906
shortcode CHAR(10) Shortcode, as returned by Start payment for SMS 3010
keyword CHAR(20) Keyword, as returned by Start payment for SMS BETAAL AR
idealtxid CHAR(64) iDEAL transaction ID, as returned by Start payment for iDEAL
test 0, 1 Test mode (1=always accept as paid) no 0 1

3.2 Resultaat

Als er iets niet goed gaat, zou u een van deze meldingen krijgen:

001 No RTLO
004 No method specified
007 No domain

En anders:

OK        Payment was geslaagd
NOT OK    De betaling was niet geslaagd of al eerder afgehandeld.



Appendix A. Bevestiging link

De bevestiging link is een systeem dat gebruikt word met Premium Rate Numbers, om u te laten weten of een gebruiker is verbonden of niet.
De gegeven link word aangeroepen met de volgende parameters:

Veld Formaat/mogelijke waarden Beschrijving Voorbeeld
callid CHAR (32) Call ID "10038383-1-22567"
status CHAR (3) Paymentstatus "CON"
paycode CHAR (6) The paycode "654321"
payline CHAR (64) The 090x-line "0909-0400397"
country INT (3) 2-digit country code 31
caller CHAR (16) The visitor id 02012345xxx

Uw script moet antwoorden met:

OK

Als dit niet het geval is, zal het script meerdere pogingen doen om een positieve uitkomst te krijgen. Als een tijdelijke fout ontstaat, doe dan ook een reactie met OK, zodat het platform weet dat het opnieuw proberen geen nut heeft.




Appendix B. iDEAL bank nummers

iDEAL bank nummers zijn:

Bank ID Bank name
0031 ABN AMRO
0081 Fortis
0091 Friesland Bank
0721 ING (Postbank)
0021 Rabobank
0751 SNS Bank
0761 ASN Bank
0771 SNS Regio Bank

Wij raden aan om de volgende manier te gebruiken om de bankcodes binnen te halen, deze update zich zelf!

<form name="bankselect">
Choose your bank:
<select name="bank" onchange="document.bankselect.submit();">
<script type="text/javascript" src="https://www.targetpay.com/ideal/issuers-en.js">
</script>
</select>
</form>


© TargetPay.com

F.A.Q. | Contact | Netwerk status | Voorwaarden | Cookie Policy | Cookie Instellingen | Privacy | Regelgeving | Over ons... | Print versie